Postado Novembro 23, 2014 10 anos Mais Tipo, ja fiz esse procedimento, ja criei a quest pelo rme e coloquei o bau, quais as informações que coloco nele agora? Depois de ter adicionado o script e tag aos locais corretos e ter configurado o actionID na tag, adicione esse mesmo actionID (número de identificação da action) ao baú (pelo remere's map editor). e como faz para cada tipo de vocação ganha uma spell diferente ao clicar nesse gau ? Use este script: local tab = { [1] = {spell = "hell granade"}, -- [vocId] = {spell = "Instant Name da Spell"} verifique a string usada na spell em seu spells.xml [2] = {spell = "hell granade"}, [3] = {spell = "hell granade"}, [4] = {spell = "hell granade"} } function onUse(cid, item, fromPos, item2, toPos) local v = tab[getPlayerVocation(cid)] if not v then doPlayerSendCancel(cid, "Your vocation can't do this quest.") end if getPlayerLearnedInstantSpell(cid, v.spell) then doPlayerSendCancel(cid, "You already have done this quest.") end doPlayerLearnInstantSpell(cid, v.spell) doSendMagicEffect(toPos, CONST_ME_MAGIC_RED) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned a new spell!!") return true end Editado Novembro 23, 2014 10 anos por Suicide (veja o histórico de edições) The corrupt fear us. The honest support us. The heroic join us.
Postado Novembro 24, 2014 10 anos Autor Depois de ter adicionado o script e tag aos locais corretos e ter configurado o actionID na tag, adicione esse mesmo actionID (número de identificação da action) ao baú (pelo remere's map editor). Use este script: local tab = { [1] = {spell = "hell granade"}, -- [vocId] = {spell = "Instant Name da Spell"} verifique a string usada na spell em seu spells.xml [2] = {spell = "hell granade"}, [3] = {spell = "hell granade"}, [4] = {spell = "hell granade"} } function onUse(cid, item, fromPos, item2, toPos) local v = tab[getPlayerVocation(cid)] if not v then doPlayerSendCancel(cid, "Your vocation can't do this quest.") end if getPlayerLearnedInstantSpell(cid, v.spell) then doPlayerSendCancel(cid, "You already have done this quest.") end doPlayerLearnInstantSpell(cid, v.spell) doSendMagicEffect(toPos, CONST_ME_MAGIC_RED) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned a new spell!!") return true end Deu certooo o/. 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.