TIPO : SCRIPT QUE TELEPORTA O PLAYER PARA AREA VIP USANDO NPC
USO A VERSAO 8.6 - ALISSOW SERVER
O NPC QUE TELEPORTA PARA AREA VIP ESTA CHECANDO SE O PLAYER E PREMIUM E NAO VIP GOSTARIA DE ALTERAR
NPC
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Premium Teleporter" script="data/npc/scripts/vipteleporter.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="356" head="95" body="10" legs="56" feet="77" addons="0"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="helmet of the deep,5461,5000;" />
<parameter key="shop_sellable" value="helmet of the deep,5461,5000;" />
</parameters>
</npc>
SCRIPT
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({'vip'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Vip City??'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=373, y=888, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
local travelNode = keywordHandler:addKeyword({'carlin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Você deseja ir para Carlin?'})
travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 0, destination = {x=1083, y=1089, z=6} })
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Then stay here!'})
keywordHandler:addKeyword({'sail'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can take you to Vip City and Carlin.'})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Quer ir para area vip eu te teleporto.'})
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Podemos ir a Vip City and Carlin.'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
O NPC CHECA SE VOCE E PREMIUM QUERO Q ELE CHEQUE SE E VIP TAMBEM ES E NAO FOR QUE ELE DIGA ALGUMA COISA
OBRIGADO