Postado Outubro 10, 2014 10 anos Tente esse script: Cria um arquivo .lua na pasta action > script, chamado statue_vocation, e cole isso dentro: modaldialog = { title = "Statue of Destiny", message = "Choose your vocation.", buttons = { { id = 1, value = "Ok" }, { id = 2, value = "Cancel" }, }, buttonEnter = 1, buttonEscape = 2, choices = { { id = 1, value = "[Sorcerer]" }, { id = 2, value = "[Druid]" }, { id = 3, value = "[Paladin]" }, { id = 4, value = "[Knight]" } }, popup = false } local templeID = 1 function callback(cid, button, choice) if button == 1 or button == 29 or button == 0 then if (choice == 1) then doPlayerSetVocation(cid, 1) doTeleportThing(cid, getTownTemplePosition(templeID)) doSendMagicEffect(getTownTemplePosition(templeID), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulation, now you are a sorcerer!") elseif (choice == 2) then doPlayerSetVocation(cid, 2) doTeleportThing(cid, getTownTemplePosition(templeID)) doSendMagicEffect(getTownTemplePosition(templeID), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulation, now you are a druid!") elseif (choice == 3) then doPlayerSetVocation(cid, 3) doTeleportThing(cid, getTownTemplePosition(templeID)) doSendMagicEffect(getTownTemplePosition(templeID), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulation, now you are a paladin!") elseif (choice == 4) then doPlayerSetVocation(cid, 4) doTeleportThing(cid, getTownTemplePosition(templeID)) doSendMagicEffect(getTownTemplePosition(templeID), CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulation, now you are a knight!") end end end function onUse(cid, item, fromPosition, itemEx, toPosition) addDialog(modaldialog, 2345, cid, callback); return true end Bem, esse script é para uma unica estatua. Adicione isso no action.xml: <action actionid="5505" event="script" value="statue_vocation.lua"/> ... Não se esqueça de configurar no script. local templeID = 1 Você vai por o número do Templo ID para onde o player será teleportado após escolher a vocação. Teria como adicionar a função addDialog em servidor 8.6? Uso tfs 0.4
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.