\data\talkactions\scripts\voc1.lua
---Vocs por talkaction-by Sky Hunter---sorc- function onSay(cid, words, param) playerpos = getPlayerPosition(cid) if math.max(math.abs(playerpos.x-156), math.abs(playerpos.y-192)) < 1 then doPlayerSetVocation(cid,1) doTeleportThing(cid,getPlayerMasterPos(cid)) doPlayerSay(cid, "Sua nova vocação é: Sorcerer!", 16) return 0 end return 1 end
-----------------------------
\data\talkactions\scripts\voc2.lua
---Vocs por talkaction-by Sky Hunter---druid- function onSay(cid, words, param) playerpos = getPlayerPosition(cid) if math.max(math.abs(playerpos.x-156), math.abs(playerpos.y-192)) < 1 then doPlayerSetVocation(cid,2) doTeleportThing(cid,getPlayerMasterPos(cid)) doPlayerSay(cid, "Sua nova vocação é: Druida!", 16) return 0 end return 1 end
-----------------------------
\data\talkactions\scripts\voc3.lua
---Vocs por talkaction-by Sky Hunter---pala- function onSay(cid, words, param) playerpos = getPlayerPosition(cid) if math.max(math.abs(playerpos.x-156), math.abs(playerpos.y-192)) < 1 then doPlayerSetVocation(cid,3) doTeleportThing(cid,getPlayerMasterPos(cid)) doPlayerSay(cid, "Sua nova vocação é: Paladino!", 16) return 0 end return 1 end
-----------------------------
\data\talkactions\scripts\voc4.lua
---Vocs por talkaction-by Sky Hunter---kina- function onSay(cid, words, param) playerpos = getPlayerPosition(cid) if math.max(math.abs(playerpos.x-156), math.abs(playerpos.y-192)) < 1 then doPlayerSetVocation(cid,4) doTeleportThing(cid,getPlayerMasterPos(cid)) doPlayerSay(cid, "Sua nova vocação é: Knight!", 16) return 0 end return 1 end
-----------------------------
\data\talkactions\talkactions.xml
<talkaction words="sorcerer" script="voc1.lua" />
<talkaction words="druid" script="voc2.lua" />
<talkaction words="paladin" script="voc3.lua" />
<talkaction words="knight" script="voc4.lua" />
---------
Funciona assim: Qdo o cara tiver na posição das coordenadas escolhidas, ele fala o nome da vocação que quiser e é teleportado pro temple(não precisa configurar as coordenadas do temple, é automático.