Ir para conteúdo

Posts Recomendados

Agora que percebi q tem um bug no meu ot =s, quando eu tento compra promotion, ele sempre diz que eu n tenho dinheiro, custa 20k e msm com 20kk na bp ele fala q n tenho dinheiro, vo posta o script do npc ai:

ywordHandler = 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

 

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})

node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

 

npcHandler:addModule(FocusModule:new())

 

 

Se alguem puder me ajudar fico mto agradecido =D

Link para o comentário
https://xtibia.com/forum/topic/176547-npc-de-promotion/
Compartilhar em outros sites

×
×
  • Criar Novo...