Posta print do erro completo na distro.
Sobre o player matar um pokemon selvagem sem um dele fora da ball, é em situações do tipo quando o pokémon selvagem está sob algum efeito de status negativo, como burn por exemplo?
info
Grupo: Lorde
Registrado: 05/06/12
Posts: 2.2k
Reputação: +215
Gênero: Masculino

Posta print do erro completo na distro.
Sobre o player matar um pokemon selvagem sem um dele fora da ball, é em situações do tipo quando o pokémon selvagem está sob algum efeito de status negativo, como burn por exemplo?
Em 27/02/2021 em 12:35, Yan18 disse:Posta print do erro completo na distro.
Sobre o player matar um pokemon selvagem sem um dele fora da ball, é em situações do tipo quando o pokémon selvagem está sob algum efeito de status negativo, como burn por exemplo?
[28/02/2021 09:20:35] [Error - CreatureScript Interface]
[28/02/2021 09:20:35] datapack/creaturescripts/scripts/pokelevel.lua:onKill
[28/02/2021 09:20:35] Description:
[28/02/2021 09:20:35] (luaGetCreatureName) Creature not found
info
Grupo: Artesão
Registrado: 20/04/18
Posts: 116
Reputação: +30
Olá pessoal, eu tenho um sistema de level system para pokemons, só que quando um player mata um pokemon sem estar com seu pokemon para fora, da esse erro
datapack/creaturescripts/scripts/pokelevel.lua:onKill
(luaGetItemAttribute) Item not found
Como faço para quando o player não tiver com o poke pra fora e matar outro pokemon (no soco) não acontecer esse erro?
script:
function onKill(cid, target) ------------------ VARIAVEIS ------------------------------------------------------------------------------------------------------------ local posss = getCreaturePosition(cid) local exppp = math.random(15, 75) local feet = getPlayerSlotItem(cid, CONST_SLOT_FEET) local chck = getItemAttribute(feet.uid, "exp") local chckc = getItemAttribute(feet.uid, "level") local mypoke = getCreatureSummons(cid)[1] local boostlevel = getItemAttribute(feet.uid, "boost") or 0 ----------------------------------------------------------------------------------------------------------------------------------------- if isPlayer(target) == false and getItemAttribute(feet.uid, "level") == 100 then --doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Limite de Level do Pokemon Atingido !") return true end if isPlayer(cid) == true and isSummon(target) == true then doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, "Your Pokemon dont gain experience in Duel") return true end ---------------------------------------------------------------- level 1 ---------------------------------------------------------------- if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == False then return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == 1 and getItemAttribute(feet.uid, "exp") >= 0 and getItemAttribute(feet.uid, "exp") <= 250 then doItemSetAttribute(feet.uid, "exp", chck +exppp) doSendAnimatedText(getThingPos(mypoke), ""..exppp.." (EXP)", 215) return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "exp") >= 250 and getItemAttribute(feet.uid, "level") == 1 then doPlayerSendTextMessage(cid, 25, "Seu "..getCreatureName(mypoke).." avançou do nível 1 para o nível 2!") doItemSetAttribute(feet.uid, "level", chckc +1) doSendAnimatedText(getCreaturePosition(getCreatureSummons(cid)[1]), "LEVEL UP!", 215) doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 211) doSendAnimatedText(getCreaturePosition(getCreatureSummons(cid)[1]), "LEVEL UP!", 215) doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 211) doItemSetAttribute(feet.uid, "exp", 1) local nick = ""..getCreatureName(getCreatureSummons(cid)[1]).." ["..getItemAttribute(feet.uid, "level").."]" doCreatureSetNick(getCreatureSummons(cid)[1], nick) return true end ------------------------------------------------------------------------------------------------------------------------------------------ ---------------------------------------------------------------- level 2 ---------------------------------------------------------------- if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == False then return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "level") == 2 and getItemAttribute(feet.uid, "exp") >= 0 and getItemAttribute(feet.uid, "exp") <= 500 then doItemSetAttribute(feet.uid, "exp", chck +exppp) doSendAnimatedText(getThingPos(mypoke), ""..exppp.." (EXP)", 215) return true end if isPlayer(target) == FALSE and getItemAttribute(feet.uid, "exp") >= 500 and getItemAttribute(feet.uid, "level") == 2 then doPlayerSendTextMessage(cid, 25, "Seu "..getCreatureName(mypoke).." avançou do nível 2 para o nível 3!") doItemSetAttribute(feet.uid, "level", chckc +1) doSendAnimatedText(getCreaturePosition(getCreatureSummons(cid)[1]), "LEVEL UP!", 215) doSendMagicEffect(getCreaturePosition(getCreatureSummons(cid)[1]), 211) doItemSetAttribute(feet.uid, "exp", 1) local nick = ""..getCreatureName(getCreatureSummons(cid)[1]).." ["..getItemAttribute(feet.uid, "level").."]" doCreatureSetNick(getCreatureSummons(cid)[1], nick) return true end end