Postado Fevereiro 3, 2019 6 anos Boa noite, alguém poderia me ajudar a colocar um Exhausted de 1 semana nesse item, vlw. Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = {x=31293, y=32627, z=7} -- if getPlayerStorageValue(cid, ZE_isOnZombieArea) > 0 then if getPlayerStorageValue(cid, 201201112201) == 1 then if getPlayerLevel(cid) >= 500 then if getTilePzInfo(getCreaturePosition(cid)) then doTeleportThing(cid,pos) doSendMagicEffect(getPlayerPosition(cid),66) doSendAnimatedText(getCreaturePosition(cid), "Teleport!", TEXTCOLOR_ORANGE) else doPlayerSendCancel(cid, "You need to be in protection zone.") end else doPlayerSendCancel(cid, "Not enough level (500).") end else doPlayerSendCancel(cid, "You need to be epic to use this item.") end -- else -- return doPlayerSendCancel(cid, "You can't use this scroll now.") -- end return true end
Postado Fevereiro 3, 2019 6 anos Não tenho como testar o script. local config ={ pos = {x=31293, y=32627, z=7}, tempo = 7*86400, -- 7 dias storageTempo = 37, level = 500, storage = 201201112201 } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, config.storageTempo) > os.time() - config.tempo then doPlayerSendCancel(cid, "Voce ainda nao pode usar esse item") return false end if getPlayerStorageValue(cid, config.storage) == 1 then if getPlayerLevel(cid) >= config.level then if getTilePzInfo(getCreaturePosition(cid)) then doTeleportThing(cid, config.pos) setPlayerStorageValue(cid, config.storageTempo, os.time() + config.tempo) doSendMagicEffect(getPlayerPosition(cid),66) doSendAnimatedText(getCreaturePosition(cid), "Teleport!", TEXTCOLOR_ORANGE) else doPlayerSendCancel(cid, "You need to be in protection zone.") end else doPlayerSendCancel(cid, "Not enough level (500).") end else doPlayerSendCancel(cid, "You need to be epic to use this item.") end return true end Editado Fevereiro 3, 2019 6 anos por luiz.marsilio Correção do tempo (veja o histórico de edições)
Postado Fevereiro 3, 2019 6 anos Autor Mesmo qndo vou sair o item pela primeira vez, fala q já estou com o exhausted.
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.