Postado Março 18, 2018 7 anos Base:PDA toda hora fica dando esse erro chato. no script alguém poderia me ajudar resolver. erro que está acontecendo toda hora: [Error - Action Interface] data/actions/scripts/addons.lua:onUse Description: data/actions/scripts/addons.lua:23: attempt to compare nil with number stack traceback: data/actions/scripts/addons.lua:23: in function <data/actions/scripts/addons.lua:1> [Error - Action Interface] data/actions/scripts/addons.lua:onUse Description: (luaDoItemSetAttribute) Invalid data type script: Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) local addons = { [13562] = {pokemon= "Alakazam" , looktype = 2604, nome = "Red Addon"}, [13471] = {pokemon= "Dragonite" , looktype = 2501, nome = "Dragon Addon", fly = 2500} } if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Please back your pokemon.") return false end local numero = addons[item.itemid].looktype local fly = addons[item.itemid].fly local pb = getPlayerSlotItem(cid, 8).uid local pk = addons[item.itemid].pokemon local addonlook = addons[item.itemid].nome if getItemAttribute(pb,"poke") ~= pk then doPlayerSendCancel(cid, "Sorry, you can't use this addon on this poke.") return false end if getItemAttribute(pb,"addon") < 1 then doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid, 27, "Congratulations! Now your pokemon will use the addon.") doSetItemAttribute(pb,"addon",numero) doSetItemAttribute(pb,"addonfly",fly) doSetItemAttribute(pb,"addonlook",addonlook) return true end return true end Editado Março 18, 2018 7 anos por Pokemon X Ice (veja o histórico de edições)
Postado Março 18, 2018 7 anos Aqui no TibiaKing mensagens como UP e BUMP são proibidas, utilize o botão subir este tópico. Esta é uma mensagem automática!Pedimos que leia as regras do fórum! Spoiler Here in TibiaKing messages like UP and BUMP are prohibited, use the button raise this topic. This is an automated message!Please read the forum rules. Talvez você queira ver: BestBaiak [FAQ]Remere's Map Editor - Dúvidas e soluções de bugs Contato: Discord:
Postado Março 19, 2018 7 anos local addons = { [13562] = {pokemon= "Alakazam" , looktype = 2604, nome = "Red Addon"}, [13471] = {pokemon= "Dragonite" , looktype = 2501, nome = "Dragon Addon", fly = 2500} } local function getOldAddon (looktype) for index, value in pairs (addons) do if value.looktype == looktype then return index end end end function onUse(cid, item, fromPosition, itemEx, toPosition) local numero = addons[item.itemid].looktype local pb = itemEx.uid local pk = addons[item.itemid].pokemon if not isPokeball(itemEx.itemid) then doPlayerSendCancel(cid, "Você só poder usar este item em uma poke ball.") return true end if getPlayerSlotItem (cid, 8).uid == pb and (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) then doPlayerSendCancel (cid, "Desmonte do seu pokémon e volte-o para a poke ball.") return true end if getItemAttribute(pb, "addon") and getItemAttribute(pb, "addon") == numero then doPlayerSendCancel(cid, "Seu pokémon já está com este addon.") return true end if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "Por favor, volte o seu pokémon para a poke ball.") return true end if getItemAttribute(pb, "poke") ~= pk then doPlayerSendCancel(cid, "Desculpe, você não pode adicionar este addon neste pokémon.") return true end if getItemAttribute (pb, "addon") and getItemAttribute (pb, "addon") > 1 then doPlayerSendTextMessage(cid, 27, "Você substituiu um "..getItemNameById (getOldAddon (getItemAttribute (pb, "addon"))).." por um "..getItemNameById (item.itemid).."!") else doPlayerSendTextMessage(cid, 27, "Agora seu pokémon usará este "..getItemNameById (item.itemid).."!") end doRemoveItem(item.uid, 1) doSetItemAttribute(pb, "addon", numero) return true end
Postado Março 19, 2018 7 anos Autor henriquesafadao simplesmente você pegou de outro script addon.lua está faltando todas as funções adicionais para funcionar esse script.
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.