Postado Julho 7, 2014 10 anos ola, gostaria de uma quest que adiciona-se uma vocation se o player possuir os requisitos. -o player tem que ja tem a vocation id= 7 para adquirir vocation id= 8 -o player deve possuir level 110k caso ele nao possua esses requisitos nao podera completar a quest. a quest só pode ser feita 1 vez pelo char. e é obrigatorio possuir a vocation id= 7
Postado Julho 7, 2014 10 anos Fiz para um baú quest.lua Mostrar conteúdo oculto function onUse(cid) local storage = 88889 if getPlayerStorageValue(cid, storage) ~= 1 and getPlayerVocation(cid) == 7 and getPlayerLevel(cid) >= 110000 then doPlayerSetStorageValue(cid, storage, 1) doPlayerSetVocation(cid, 8) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns, você adquiriu sua vocação.") elseif getPlayerStorageValue(cid, storage) == 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já fez essa quest.") elseif getPlayerVocation(cid) ~= 7 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem a vocação necessária.") elseif getPlayerLevel(cid) < 110000 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem level suficiente.") end return TRUE end actions.xml <action actionid="9595" script="quest.lua"/> E, adicione actiond id 9595 no baú..
Postado Julho 7, 2014 10 anos Autor cara ficou certinho só que esqueci de mencionar (me perdoe) que o char tem que voltar ao level 30k
Postado Julho 7, 2014 10 anos Não testei, testa ai, sou novato se der certo da reputa se não der avisa qual foi o erro function onUse(cid) local storage = 88889 if getPlayerStorageValue(cid, storage) ~= 1 and getPlayerVocation(cid) == 7 and getPlayerLevel(cid) >= 110000 then doPlayerSetStorageValue(cid, storage, 1) doPlayerSetVocation(cid, 8) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns, você adquiriu sua vocação.") local param,config = string.lower(param),{pid = getPlayerGUID(cid),newlv = 30000,life = 30000,mana = 30000} elseif getPlayerStorageValue(cid, storage) == 1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você já fez essa quest.") elseif getPlayerVocation(cid) ~= 7 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem a vocação necessária.") elseif getPlayerLevel(cid) < 110000 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não tem level suficiente.") end return TRUE end Editado Julho 7, 2014 10 anos por saulosurerus (veja o histórico de edições)
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.