Postado Julho 9, 2014 11 anos Olá pessoal, bom como está no titulo tenho uma dúvida sobre a Boost stone, em meu caso ela não está pegando! Eu adicionei tudo, direitinho, mas quando vou usar ela no server dá o seguinte erro: You cannot use this object. Fala que não posso usar este objeto.. Bom esses são os script: booststone.lua: function onUse(cid, item, topos, item2, frompos) local myball = getPlayerSlotItem(cid, 8) local boost = getItemAttribute(myball.uid, "boost") or 0 local boosts = 1 if boost == 10 then doPlayerSendCancel(cid, "Seu pokemon ja está boostado no maximo.") return true end if not isSummon(item2.uid) then doPlayerSendCancel(cid, "Use isso em um pokemon.") return true end boosts = boosts local pokemon = getItemAttribute(myball.uid, "poke") local off = pokes[pokemon].offense * boost_rate * boosts local def = pokes[pokemon].defense * boost_rate * boosts local agi = pokes[pokemon].agility * boosts local spatk = pokes[pokemon].specialattack * boost_rate * boosts local vit = pokes[pokemon].vitality * boost_rate * boosts newBoost = boost + boosts if newBoost > 10 then newBoost = 10 end doSetItemAttribute(myball.uid, "boost", newBoost) doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off) doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def) doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi) doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk) doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit) doRemoveItem(item.uid) doSendMagicEffect(getThingPos(item2.uid), 103) doPlayerSendTextMessage(cid, 27, "parabens, seu "..pokemon..", foi boostado com +"..boosts..".") doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..newBoost..".") doSendAnimatedText(getThingPos(item2.uid), "+"..boosts.." Boost", 215) return true end Actions.xml <action itemid="2361" event="script" value="booststone.lua" allowfaruse="1"/> Items.xml: <item id="2361" article="a" name="Boost Stone"> <attribute key="weight" value="0" /> <attribute key="description" value="A peculiar stone that makes certain species of Pokemon evolve." /> </item> Erro no The Forgotten Server: [09/07/2014 10:44:14] [Error - Action Interface] [09/07/2014 10:44:14] data/actions/scripts/booststone.lua:onUse [09/07/2014 10:44:14] Description: [09/07/2014 10:44:14] data/actions/scripts/booststone.lua:15: attempt to index global 'pokes' (a nil value) [09/07/2014 10:44:14] stack traceback: [09/07/2014 10:44:14] data/actions/scripts/booststone.lua:15: in function Fala que está com erro na linha 15 mas não encontro erro algum..Alguém consegue me ajudar? Ajudei ? Resp+ Assim o Tibia King vai crescer rsrs.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.