BR

Npc Que Transporta Somente Premium Account

Por BravHart, 03 de ago. de 2011 em Scripts

3
1.2k
BravHartB
03 de agosto de 2011 às 17:53

Preciso de um npc que transporta somente players premium accounts.

galavernaG
03 de agosto de 2011 às 18:39

faz assim ó , crie 1 npc no xml e no script dele coloque isso :

 

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)



-- OTServ event handling functions start
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
-- OTServ event handling functions end



-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'hi'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Quer ir para  templo?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 2, cost = 0, destination = {x=60, y=44, z=7} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'})


keywordHandler:addKeyword({'destination'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to \'Ilha dos Eventos\' for just a small fee.'})

-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())

 

ai você troca os testos e o lugar

 

ajudei??REP+ please

2 semanas depois...
BravHartB
11 de agosto de 2011 às 10:34

Dúvida sanada!

O Topico ja pode ser movido.

Obrigado galaverna, lhe concedi +REP!

 

Abraços