Ir para conteúdo

Featured Replies

Postado

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 por Dwarfer (veja o histórico de edições)

Contato:

 

  • Respostas 11
  • Visualizações 617
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • 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, fromPosi

  • local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT function onUse(cid, item, fromPosition, itemEx, toPosition) doTeleportThing(cid, newpos) doSendMagicEffect(newpos, effect) end <action ac

  • local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT local vocations = {1,2,3,4} function onUse(cid, item, fromPosition, itemEx, toPosition) if isInArray(vocations, getPlayerVocation(cid)) and isP

Postado
  • 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!

tumblr_o70wteR8521r9n6kzo1_400.gif

Postado
  • 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 por Yamborghini (veja o histórico de edições)

tumblr_o70wteR8521r9n6kzo1_400.gif

Postado
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:

 

Postado
  • 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!

tumblr_o70wteR8521r9n6kzo1_400.gif

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo