Postado Março 6, 2018 7 anos if getPlayerStorageValue(cid, config.storagesorte) < config.levelsorte then poe assim if getPlayerStorageValue(cid, config.storagesorte) < 0 then setPlayerStorageValue(cid, config.storagesorte, 0) elseif getPlayerStorageValue(cid, config.storagesorte) >= 0 or getPlayerStorageValue(cid, config.storagesorte) < config.levelsorte then if getPlayerItemCount(cid, config.item) >= config.quant then doPlayerRemoveItem(cid, config.item, config.quant) ou vocÊ fala como que consegue esse pet. ai da p por storage 0 nele quando ganhar ele..ai e so fala pro npc da level. não tem como vc ganha pet.
Postado Março 6, 2018 7 anos local config = { storage = 489061564, tempo = 6000, -- tempo, em segundos que o efeito demorará para sair. } local eggo = { ["Holy Pet"] = {id = 6541, mon = "Holy Pet", cor = TEXTCOLOR_YELLOW, efeito = 21}, ["Fire Pet"] = {id = 6542, mon = "Fire Pet", cor = TEXTCOLOR_RED, efeito = 6}, ["Ice Pet"] = {id = 6543, mon = "Ice Pet", cor = TEXTCOLOR_TEAL, efeito = 43}, ["Terra Pet"] = {id = 6544, mon = "Terra Pet", cor = TEXTCOLOR_LIGHTGREEN, efeito = 45}, ["Phoenix Pet"] = {id = 2695, mon = "Phoenix Pet", cor = TEXTCOLOR_GREY, efeito = 17}, ["Draug Pet"] = {id = 6544, mon = "Draug Pet", cor = TEXTCOLOR_BROWN, efeito = 37}, ["Many Pet"] = {id = 2695, mon = "Many Pet", cor = TEXTCOLOR_TEAL, efeito = 37}, ["Energy Pet"] = {id = 6545, mon = "Energy Pet", cor = TEXTCOLOR_PURPLE, efeito = 22}, ["Jester Pet"] = {id = 9693, mon = "Jester Pet", cor = TEXTCOLOR_DARKPURPLE, efeito = 31}, ["Ferumbras Pet"] = {id = 11715, mon = "Ferumbras Pet", cor = TEXTCOLOR_DARKRED, efeito = 29} } function onThink(cid, interval) local function Macabro(cid) for k, v in pairs(eggo) do if isCreature(cid) and getCreatureName(cid) == k then if getPlayerStorageValue(cid,config.storage) < 0 then -- aqui ele vai verificar se o level do pokemon representado pelo storage vai ta -1, caso sim, seta como 0 setPlayerStorageValue(cid, config.storage, 0) end doSendMagicEffect(getThingPos(cid), v.efeito) doSendAnimatedText(getThingPos(cid), "Level: " ..(getPlayerStorageValue(cid,config.storage)).. "", v.cor) addEvent(function() Macabro(cid) end, 6000) end end end if (getPlayerStorageValue(cid, 70079)) <= 0 then -- storage que guarda o tempo do efeito. Macabro(cid) setPlayerStorageValue(cid, 70079, config.tempo + os.time()) else return true end return TRUE end Teste com essa verificação aí, o colega de cima deu ideia, acredito que isso já resolva o problema, pois como você já falou, quando fez o teste no book, aparentemente estava correto.
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.