LucasFerraz
Systems Analyst
Venore, chance to getting into Ghost Shop
Captain Fearless
Liberty Bay, chance to getting into Goroma
Jack Fate
------------------
Repp++
Captain Fearless
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Captain Fearless" script="data/npc/scripts/Venore/Captain Fearless.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="129" head="19" body="113" legs="95" feet="115" addons="0"/>
<parameters>
<parameter key="message_greet" value="Welcome on board, |PLAYERNAME|. Do you want to {travel}?"/>
<parameter key="message_farewell" value="Good bye. Recommend us if you were satisfied with our service."/>
<parameter key="module_travel" value="1"/>
<parameter key="travel_destinations" value="ab'dendriel,32734,31668,6,0;ankrahmun,33092,32883,6,0;carlin,32387,31820,6,0;edron,33173,31764,6,0;kick,32954,32034,6,0;thais,32310,32210,6,0;liberty bay,32285,32891,6,0;port hope,32529,32784,6,0;svargrond,32431,31162,6,0;yalahar,614,679,5,0;"/>
<parameter key="keywords" value="captain;travel;" />
<parameter key="keyword_reply1" value="I\'m the captain of this ship." />
<parameter key="keyword_reply2" value="I can take you to Ab\'dendriel, Ankrahmun, Carlin, Darashia, Edron, Thais, Liberty Bay, Port Hope, Svargrond and Yalahar." />
</parameters>
</npc>
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local Topic = {}
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 creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
elseif msgcontains(msg, 'darashia') then
selfSay('Do you want to sail to Darashia?', cid)
Topic[cid] = 1
elseif Topic[cid] == 1 then
if msgcontains(msg, 'yes') then
if isPremium(cid) then
if not isPlayerPzLocked(cid) then
local pos = math.random(10) == 5 and {x=33330, y=32172, z=5} or {x=33289, y=32480, z=6}
selfSay('Set the sails!', cid)
npcHandler:releaseFocus(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, pos)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
else
selfSay('First get rid of those blood stains! You are not going to ruin my vehicle!', cid)
end
else
selfSay('I\'m sorry, but you need a premium account in order to travel onboard our ships.', cid)
end
else
selfSay('We would like to serve you some time.', cid)
end
Topic[cid] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Liberty Bay, chance to getting into Goroma
Jack Fate
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Jack Fate" script="data/npc/scripts/Liberty Bay/Jack Fate.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="129" head="19" body="69" legs="88" feet="69" addons="0"/>
<parameters>
<parameter key="message_greet" value="Welcome on board, |PLAYERNAME|. Do you want to {travel}?"/>
<parameter key="message_farewell" value="Good bye. Recommend us if you were satisfied with our service."/>
<parameter key="module_travel" value="1"/>
<parameter key="travel_destinations" value="ankrahmun,33092,32883,6,0;darashia,33289,32480,6,0;edron,33173,31764,6,0;goroma,31994,32565,6,0;kick,32274,32902,6,0;port hope,32529,32784,6,0;venore,32952,32022,6,0;yalahar,614,679,5,0;"/>
<parameter key="keywords" value="captain;travel;" />
<parameter key="keyword_reply1" value="I\'m the captain of this ship." />
<parameter key="keyword_reply2" value="I can take you to Ankrahmun, Darashia, Edron, Goroma, Port Hope, Thais, Venore and Yalahar." />
</parameters>
</npc>
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local Topic = {}
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 creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
elseif msgcontains(msg, 'thais') then
selfSay('Do you want to sail to Thais?', cid)
Topic[cid] = 1
elseif Topic[cid] == 1 then
if msgcontains(msg, 'yes') then
if isPremium(cid) then
if not isPlayerPzLocked(cid) then
local pos = math.random(10) == 5 and {x=31994, y=32565, z=6} or {x=32310, y=32210, z=6}
selfSay('Set the sails!', cid)
npcHandler:releaseFocus(cid)
doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, pos)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
else
selfSay('First get rid of those blood stains! You are not going to ruin my vehicle!', cid)
end
else
selfSay('I\'m sorry, but you need a premium account in order to travel onboard our ships.', cid)
end
else
selfSay('We would like to serve you some time.', cid)
end
Topic[cid] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
------------------
Repp++