@BilauX
Substitua o que esta no arquivo vocations.lua por esse:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function changeVocation(cid)
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 9 or getPlayerVocation(cid) == 13 or getPlayerVocation(cid) == 17 or getPlayerVocation(cid) == 21 or getPlayerVocation(cid) == 25 then
return "Sorcerer"
end
if getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 10 or getPlayerVocation(cid) == 14 or getPlayerVocation(cid) == 18 or getPlayerVocation(cid) == 22 or getPlayerVocation(cid) == 26 then
return "Druid"
end
if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 11 or getPlayerVocation(cid) == 15 or getPlayerVocation(cid) == 19 or getPlayerVocation(cid) == 23 or getPlayerVocation(cid) == 27 then
return "Paladin"
end
if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 12 or getPlayerVocation(cid) == 16 or getPlayerVocation(cid) == 20 or getPlayerVocation(cid) == 24 or getPlayerVocation(cid) == 28 then
return "Knight"
end
end
local vocStage1 = {
--[ID DA VOCATION ATUAL DO PLAYER] = {prom = ID DA VOCACAO QUE O PLAYER VAI GANHAR}
--EX: [99] = {promo = 102}
[1] = {prom = 9},
[2] = {prom = 10},
[3] = {prom = 11},
[4] = {prom = 12},
}
local vocStage2 = {
[9] = {prom = 13},
[10] = {prom = 14},
[11] = {prom = 15},
[12] = {prom = 16},
}
local vocStage3 = {
[13] = {prom = 17},
[14] = {prom = 18},
[15] = {prom = 19},
[16] = {prom = 20},
}
local vocStage4 = {
[17] = {prom = 21},
[18] = {prom = 22},
[19] = {prom = 23},
[20] = {prom = 24},
}
local vocStage5 = {
[21] = {prom = 25},
[22] = {prom = 26},
[23] = {prom = 27},
[24] = {prom = 28}
}
function vocationStage1(cid, message, keywords, parameters, node)
if vocStage1[getPlayerVocation(cid)] ~= vocStage1[getPlayerVocation(cid)].prom then
doPlayerSetVocation(cid, vocStage1[getPlayerVocation(cid)].prom)
selfSay("Voce foi promovido para a classe Super de Promotion!", cid)
doBroadcastMessage("O player "..getCreatureName(cid).." foi promovido para Super " ..changeVocation(cid), MESSAGE_INFO_DESCR)
doSendMagicEffect(getThingPos(cid), CONST_ME_SOUND_GREEN)
end
end
function vocationStage2(cid, message, keywords, parameters, node)
if vocStage2[getPlayerVocation(cid)] ~= vocStage2[getPlayerVocation(cid)].prom then
doPlayerSetVocation(cid, vocStage2[getPlayerVocation(cid)].prom)
selfSay("Voce foi promovido para a classe Hyper de Promotion!", cid)
doBroadcastMessage("O player "..getCreatureName(cid).." foi promovido para Hyper " ..changeVocation(cid), MESSAGE_INFO_DESCR)
doSendMagicEffect(getThingPos(cid), CONST_ME_SOUND_GREEN)
end
end
function vocationStage3(cid, message, keywords, parameters, node)
if vocStage3[getPlayerVocation(cid)] ~= vocStage3[getPlayerVocation(cid)].prom then
doPlayerSetVocation(cid, vocStage3[getPlayerVocation(cid)].prom)
selfSay("Voce foi promovido para a classe Stronger de Promotion!", cid)
doBroadcastMessage("O player "..getCreatureName(cid).." foi promovido para Stronger " ..changeVocation(cid), MESSAGE_INFO_DESCR)
doSendMagicEffect(getThingPos(cid), CONST_ME_SOUND_GREEN)
end
end
function vocationStage4(cid, message, keywords, parameters, node)
if vocStage4[getPlayerVocation(cid)] ~= vocStage4[getPlayerVocation(cid)].prom then
doPlayerSetVocation(cid, vocStage4[getPlayerVocation(cid)].prom)
selfSay("Voce foi promovido para a classe OverPower de Promotion!", cid)
doBroadcastMessage("O player "..getCreatureName(cid).." foi promovido para OverPower " ..changeVocation(cid), MESSAGE_INFO_DESCR)
doSendMagicEffect(getThingPos(cid), CONST_ME_SOUND_GREEN)
end
end
function vocationStage5(cid, message, keywords, parameters, node)
if vocStage5[getPlayerVocation(cid)] ~= vocStage5[getPlayerVocation(cid)].prom then
doPlayerSetVocation(cid, vocStage5[getPlayerVocation(cid)].prom)
selfSay("Voce foi promovido para a classe Supreme de Promotion!", cid)
doBroadcastMessage("O player "..getCreatureName(cid).." foi promovido para Supreme "..changeVocation(cid), MESSAGE_INFO_DESCR)
doSendMagicEffect(getThingPos(cid), CONST_ME_SOUND_GREEN)
end
end
local node1 = keywordHandler:addKeyword({'super promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer ser promovido para as vocacoes Supers?'})
node1:addChildKeyword({'yes'}, vocationStage1, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Good Bye.', reset = true})
local node2 = keywordHandler:addKeyword({'hyper promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer ser promovido para as vocacoes Hypers?'})
node2:addChildKeyword({'yes'}, vocationStage2, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Good Bye.', reset = true})
local node3 = keywordHandler:addKeyword({'stronger promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer ser promovido para as vocacoes Strongers?'})
node3:addChildKeyword({'yes'}, vocationStage3, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Good Bye.', reset = true})
local node4 = keywordHandler:addKeyword({'overpower promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer ser promovido para as vocacoes OverPowers?'})
node4:addChildKeyword({'yes'}, vocationStage4, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Good Bye.', reset = true})
local node5 = keywordHandler:addKeyword({'supreme promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer ser promovido para as vocacoes Supremes?'})
node5:addChildKeyword({'yes'}, vocationStage5, {npcHandler = npcHandler, onlyFocus = true, reset = true})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Good Bye.', reset = true})
npcHandler:addModule(FocusModule:new())