Ir para conteúdo

[NPC] 8.5 Outfit De Rei (promotion)


Vilden

Posts Recomendados

Npc

 

 

Npc 8.50, O npc é de promotion e usa outift de rei.

vamos la..

 

Data/npc/ (crie um arquivo .xml e coloque o nome de King jonatha) cole isso:

<?xml version="1.0" encoding="UTF-8"?>

<npc name="King Jonatha" script="data/npc/scripts/promotefor.lua" walkinterval="2000" floorchange="0">

<health now="100" max="100"/>

<look type="332" head="20" body="39" legs="45" feet="7" addons="3"/>

</npc>

 

 

agora vai em

 

 

Data/npc/script (crie um arquivo .lua e coloque o nome de promotefor) cole isso:

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

 

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())

 

 

Flw galerinha.. esse npc só funciona em ots 8.50 por ter outift da v-8.50

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
×
×
  • Criar Novo...