Postado Agosto 23, 2017 7 anos Tente pedir tudo de uma só vez, amigo. local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT local vocations = {1,2,3,4} local id, remover = 2160, "yes" function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerItemCount(cid, id) == 0 then return doPlayerSendCancel(cid, "Você não tem o item necessário.") end if isInArray(vocations, getPlayerVocation(cid)) and isPremium(cid) then doTeleportThing(cid, newpos) doSendMagicEffect(newpos, effect) if remover == "yes" then doPlayerRemoveItem(cid, id, 1) end else doPlayerSendCancel(cid, "Você não tem a vocação necessária ou não é premium.") end return true end É só alterar o id 2160 para o seu. Editado Agosto 23, 2017 7 anos por Dwarfer (veja o histórico de edições) Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Agosto 23, 2017 7 anos Autor 21 minutos atrás, Dwarfer disse: Tente pedir tudo de uma só vez, amigo. local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT local vocations = {1,2,3,4} local id, remover = 2160, "yes" function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerItemCount(cid, id) == 0 then return doPlayerSendCancel(cid, "Você não tem o item necessário.") end if isInArray(vocations, getPlayerVocation(cid)) and isPremium(cid) then doTeleportThing(cid, newpos) doSendMagicEffect(newpos, effect) if remover == "yes" then doPlayerRemoveItem(cid, id, 1) end else doPlayerSendCancel(cid, "Você não tem a vocação necessária ou não é premium.") end return true end É só alterar o id 2160 para o seu. Muito obrigado!!!! tudo certinho, valeu!
Postado Agosto 23, 2017 7 anos Autor 20 horas atrás, Dwarfer disse: Tente pedir tudo de uma só vez, amigo. local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT local vocations = {1,2,3,4} local id, remover = 2160, "yes" function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerItemCount(cid, id) == 0 then return doPlayerSendCancel(cid, "Você não tem o item necessário.") end if isInArray(vocations, getPlayerVocation(cid)) and isPremium(cid) then doTeleportThing(cid, newpos) doSendMagicEffect(newpos, effect) if remover == "yes" then doPlayerRemoveItem(cid, id, 1) end else doPlayerSendCancel(cid, "Você não tem a vocação necessária ou não é premium.") end return true end É só alterar o id 2160 para o seu. @Dwarfer Desculpa vir aqui de novo, mas teria como por um exhausted pra usar a estatua e um level minimo para usar? o player ta indo e voltando sem parar, dificultando o pvp Mil desculpas Editado Agosto 23, 2017 7 anos por Yamborghini (veja o histórico de edições)
Postado Agosto 23, 2017 7 anos local t = { newpos = {x=1,y=1,z=1}, effect = CONST_ME_TELEPORT, vocations = {1,2,3,4}, id = 2160, remover = "yes", level = 10, tempo = 30 -- em segundos } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 19883) - os.time() > 0 then return doPlayerSendCancel(cid, "Você deve esperar "..t.tempo.." segundos para usar novamente.") end if getPlayerItemCount(cid, t.id) == 0 then return doPlayerSendCancel(cid, "Você não tem o item necessário.") end if getPlayerLevel(cid) < t.level then return doPlayerSendCancel(cid, "O level mínimo requerido é "..t.level.." .") end if not isInArray(t.vocations, getPlayerVocation(cid)) then return doPlayerSendCancel(cid, "Você não tem a vocação necessária.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end setPlayerStorageValue(cid, 19883, t.tempo + os.time()) doTeleportThing(cid, t.newpos) doSendMagicEffect(t.newpos, t.effect) if t.remover == "yes" then doPlayerRemoveItem(cid, t.id, 1) end return true end Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Agosto 23, 2017 7 anos Autor 1 hora atrás, Dwarfer disse: local t = { newpos = {x=1,y=1,z=1}, effect = CONST_ME_TELEPORT, vocations = {1,2,3,4}, id = 2160, remover = "yes", level = 10, tempo = 30 -- em segundos } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, 19883) - os.time() > 0 then return doPlayerSendCancel(cid, "Você deve esperar "..t.tempo.." segundos para usar novamente.") end if getPlayerItemCount(cid, t.id) == 0 then return doPlayerSendCancel(cid, "Você não tem o item necessário.") end if getPlayerLevel(cid) < t.level then return doPlayerSendCancel(cid, "O level mínimo requerido é "..t.level.." .") end if not isInArray(t.vocations, getPlayerVocation(cid)) then return doPlayerSendCancel(cid, "Você não tem a vocação necessária.") end if not isPremium(cid) then return doPlayerSendCancel(cid, "Você não é premium.") end setPlayerStorageValue(cid, 19883, t.tempo + os.time()) doTeleportThing(cid, t.newpos) doSendMagicEffect(t.newpos, t.effect) if t.remover == "yes" then doPlayerRemoveItem(cid, t.id, 1) end return true end Deixou ainda melhor..... 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.