Postado Fevereiro 14, 2019 6 anos Boa noite galera. Bom, eu tenho aqui um script de tp scroll bem simples e queria que ele tivesse duas funções a mais, que seriam: -Delay de 10 minutos para usar novamente -Não poder usar em batalha Se alguém puder me ajudar Citar function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { pos = {x = 987, y = 1029, z = 7}, -- posição que o player vai cair } if(itemEx.itemid == 13576) then doPlayerSendTextMessage(cid, 19, "Voce foi transportado de volta a File City") -- mensagem que sairá quando ele for teleportado doTeleportThing(cid, config.pos) doRemoveItem(item.uid, 1) end return true end
Postado Fevereiro 15, 2019 6 anos function onUse(cid, item, fromPosition, itemEx, toPosition) if getCreatureCondition(cid, CONDITION_INFIGHT) == true then return doPlayerSendCancel(cid, "You can not be in Battle.") end local config = { pos = {x = 987, y = 1029, z = 7}, -- posição que o player vai cair waittime = 1.5 -- tempo de exhaustion em segundos storage = 115818 -- storage do exhaustion } if exhaustion.check(cid, config.storage) then doPlayerSendCancel(cid, "You are exhausted") return false end if(itemEx.itemid == 13576) then doPlayerSendTextMessage(cid, 19, "Voce foi transportado de volta a File City") -- mensagem que sairá quando ele for teleportado doTeleportThing(cid, config.pos) doRemoveItem(item.uid, 1) exhaustion.set(cid, config.storage, config.waittime) end return true end Editado Fevereiro 16, 2019 6 anos por .Smile (veja o histórico de edições)
Postado Fevereiro 16, 2019 6 anos Autor 6 horas atrás, .Smile disse: function onUse(cid, item, fromPosition, itemEx, toPosition) if getCreatureCondition(cid, CONDITION_INFIGHT) == true then return doPlayerSendCancel(cid, "You can not be in Battle.") end local config = { pos = {x = 987, y = 1029, z = 7}, -- posição que o player vai cair waittime = 1.5 -- tempo de exhaustion em segundos storage = 115818 -- storage do exhaustion } if exhaustion.check(cid, config.storage) then doPlayerSendCancel(cid, "You are exhausted") return false end if(itemEx.itemid == 13576) then doPlayerSendTextMessage(cid, 19, "Voce foi transportado de volta a File City") -- mensagem que sairá quando ele for teleportado doTeleportThing(cid, config.pos) doRemoveItem(item.uid, 1) exhaustion.set(cid, config.storage, config.waittime) end return true end Muito obrigado
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.