-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
- 0 respostas
- 470 visualizações
-
- 0 respostas
- 1549 visualizações
-
- 0 respostas
- 1188 visualizações
-
- 2 respostas
- 2033 visualizações
-
- 0 respostas
- 2043 visualizações
-

Pergunta
Deadpool 862
Boa noite galera.. Estou mexendo em um servidor.. Porem, fui tentar usar um pokémon e deu o seguinte erro na distro:
Então, eu fui na lib, e encontrei essa parte:
function doGoPokemon(cid) local item = getPlayerSlotItem(cid, 8) -------- msgunicaback = backMSG[math.random(#backMSG)] msgunicago = goMSG[math.random(#goMSG)] btype = getPokeballType(item.itemid) usando = pokeballs[btype].use online = pokeballs[btype].on morto = pokeballs[btype].off if isIconeSystem(cid) then effect = getItemAttribute(item.uid, "effect") else effect = getItemAttribute(item.uid, "effect") end -------- if isZumbie(cid) or isHuman(cid) then return doPlayerSendCancel(cid, "Sorry, is not possible.") end if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then doPlayerSendCancel(cid, "You must put your pokeball in the correct place!") return TRUE end if not canSummon(cid) then return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM) end if getPlayerStorageValue(cid, 63215) >= 1 then return doPlayerSendCancel(cid, "You can't use pokeball while surfing.") end if getPlayerStorageValue(cid, 62314) >= 1 then return doPlayerSendCancel(cid, "You can't use pokeball while flying.") end if #getCreatureSummons(cid) >= 1 then return doPlayerSendCancel(cid, "You have already summoned a pokemon.") end for i,x in pairs(pokes) do if i == getItemAttribute(item.uid, "poke"):sub(9, findLetter(getItemAttribute(item.uid, "poke"), "'")-1) then if getPlayerLevel(cid) < x.level+getPokemonBoostt(item.uid) then doPlayerSendCancel(cid, "You need level "..x.level+getPokemonBoostt(item.uid).." or higher to use this pokemon.") return true end local removed = doCreateItem(1285, 1, getThingPos(cid)) local monster = doSummonCreature(i, farAwayPos, false) --/////////////////////////////////////// Nick system if string.find(tostring(getCreatureName(monster)), "Shiny") then local newName = tostring(getCreatureName(monster)):match("Shiny (.*)") setCreatureName(monster, newName, "a "..newName..".") end if getItemAttribute(item.uid, "nick") then setCreatureName(monster, getItemAttribute(item.uid, "nick"), "a "..getItemAttribute(item.uid, "nick")..".") end --/////////////////////////////////////// Nick system local pk = monster doConvinceCreature(cid, pk) setPlayerStorageValue(pk, storages.pokeName, i) local pokemonName = getPlayerStorageValue(pk, storages.pokeName) doTeleportThing(pk, {x = getThingPos(cid).x, y = getThingPos(cid).y+8, z = getThingPos(cid).z}) doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), false) doRemoveItem(removed, 1) doCreatureSetLookDir(pk, 2) local maxh = pokes[pokemonName].vida if getItemAttribute(item.uid, "ballId") < 0 then doItemSetAttribute(item.uid, "boost", 0) end local levellife = ((getPlayerLevel(cid)) * 2 + configBoostSystem[getItemAttribute(item.uid, "boost")].hp) if pokeballStatus[getItemAttribute(item.uid, "ballId")] then tabela = {} -- Status das novas pokebolas tabela.status = pokeballStatus[getItemAttribute(item.uid, "ballId")].status tabela.count = pokeballStatus[getItemAttribute(item.uid, "ballId")].count tabela.type = pokeballStatus[getItemAttribute(item.uid, "ballId")].type tabela.type2 = pokeballStatus[getItemAttribute(item.uid, "ballId")].type2 tabela.type3 = pokeballStatus[getItemAttribute(item.uid, "ballId")].type3 levellife = levellife + doChangeStatusBall(pk, tabela) end local health = tonumber(getItemAttribute(item.uid, "poke"):match("%[(.-)/")) doCreatureAddHealth(pk, health-maxh) local pct = ((getCreatureHealth(pk)) / (getCreatureMaxHealth(pk))) local vidis = (getCreatureHealth(pk)) setCreatureMaxHealth(pk, ((maxh) + (levellife))) doCreatureAddHealth(pk, 2) doCreatureAddHealth(pk, -vidis) doCreatureAddHealth(pk, ((getCreatureMaxHealth(pk)) * (pct)) - 2) doTransformItem(item.uid, item.itemid+1) --doPlayerSendTextMessage(cid, 27, getPokemonMin(getCreatureName(pk))) local pokename = pokemonName local mgo = msgunicago:gsub("doka", getCreatureName(pk)) doCreatureSay(cid, mgo, TALKTYPE_SAY) if math.random(1,100) <= 35 then setPokemonFeed(cid, getPokemonFeed(cid)-5) -- Food system end doSendFeedEffect(cid) if getItemAttribute(item.uid, "nome") ~= "Ditto" then for i = 1, 12 do if not getMoveNamee(cid, i) then addEvent(doGoBackSetCooldown, 200, cid) end end else for a = 1, 12 do setPokemonCooldown(cid, a, "Don't have this move.") end end doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), "."))) doItemSetAttribute(item.uid, "pokes", ""..pokename.."") doSendMagicEffect(getCreaturePosition(pk), effect) setPlayerStorageValue(cid, 61204, 1) registerCreatureEvent(pk, "DiePoke") registerCreatureEvent(pk, "Exp") doPlayerSendTextMessage(cid, 27, getItemAttribute(item.uid, "task")) adjustWildPoke(pk, item.uid) doSendFeedEffect(cid) -------- ------------------------passiva hitmonchan------------------------------ if isSummon(pk) then --alterado v1.8 \/ if pokemonName == "Elite Hitmonchan" or pokemonName == "Hitmonchan" then if not getItemAttribute(item.uid, "hands") then doItemSetAttribute(item.uid, "hands", 0) end local hands = getItemAttribute(item.uid, "hands") doSetCreatureOutfit(pk, {lookType = hitmonchans[getCreatureName(pk)][hands].out}, -1) end end ------------------------------------------------------------------------- ---------movement magmar, jynx------------- if EFFECTS[pokemonName] then markPosEff(pk, getThingPos(pk)) sendMovementEffect(pk, EFFECTS[pokemonName], getThingPos(pk)) end if getItemAttribute(item.uid, "boost") >= 20 and getItemAttribute(item.uid, "auras") then sendAuraEffect(getCreatureSummons(cid)[1], auras[getItemAttribute(item.uid, "auras")]) end -------------------------------------------------------------------------- ------------- addon system ---------------------- if getItemAttribute(item.uid, "addonNow") then if getItemAttribute(item.uid, "color1") then local color1, color2, color3, color4 = getItemAttribute(item.uid, "color1"), getItemAttribute(item.uid, "color2"), getItemAttribute(item.uid, "color3"), getItemAttribute(item.uid, "color4") doCreatureChangeOutfit(pk, {lookType = getItemAttribute(item.uid, "addonNow"), lookBody = color1, lookHead = color2, lookLegs = color3, lookFeet = color4}) else doCreatureChangeOutfit(pk, {lookType = getItemAttribute(item.uid, "addonNow")}) end end ------------- addon system --------------------- if getPlayerStorageValue(cid, 6598754) >= 1 then doCreatureSetSkullType(pk, 3) -- Identificador de times, time vermelho elseif getPlayerStorageValue(cid, 6598755) >= 1 then doCreatureSetSkullType(pk, 4) -- Identificador de times, time azull end if getPlayerStorageValue(cid, 991) >= 1 then --- Ginasios doSendAnimatedText(getThingPos(cid), "POKEIN", COLOR_ICE) end ------------- ditto system ---------------------- if pokemonName == "Ditto" then if getItemAttribute(item.uid, "dittoName") then doCreatureChangeOutfit(pk, {lookType = getItemAttribute(item.uid, "dittoOut")}) setPlayerStorageValue(pk, storages.pokeName, getItemAttribute(item.uid, "dittoName")) end elseif pokemonName == "Shiny Ditto" then if not getItemAttribute(item.uid, "dittoName") or tonumber(getItemAttribute(item.uid, "dittoName")) and getItemAttribute(item.uid, "dittoName") <= 0 then local out, out1 = getCreatureOutfit(pk), getCreatureOutfit(cid) doCreatureChangeOutfit(pk, {lookType = out.lookType, lookLegs = out1.lookBody}) else doCreatureChangeOutfit(pk, {lookType = getItemAttribute(item.uid, "dittoOut"), lookLegs = getCreatureOutfit(cid).lookBody}) setPlayerStorageValue(pk, storages.pokeName, getItemAttribute(item.uid, "dittoName")) end end if getItemAttribute(item.uid, "nome") == "Smeargle" then setPlayerStorageValue(pk, storages.pokeName, getItemAttribute(item.uid, "smeargleName")) end ------------- ditto system ---------------------- ------------- uknown system ---------------------- if pokemonName == "Uknown" then local roupas = {721, 722, 723, 724} doCreatureChangeOutfit(pk, {lookType = roupas[math.random(#roupas)]}) doSendMagicEffect(getThingPos(pk), 211) end break end end endAi logo vi, que essa linha(que está dando o erro na distro):
local maxh = pokes[pokemonName].vidaQue fica na LIB, chamava essa tabela(vou mostrar só o começo):
pokes = { ["Spectral Gengar"] = {level = 120, cons = 43, vida = 16500},Então.. eu resolvi mudar essa linha:
local maxh = pokes[pokemonName].vidaPara essa:
Porem, continua dando erro.. Alguem poderia me ajudar?
Link para o comentário
https://xtibia.com/forum/topic/237238-resolvido-goback-poketibia/Compartilhar em outros sites
19 respostass a esta questão
Posts Recomendados