• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC Venore and Liberty Bay's Captains 99%

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,858
Reaction score
96
Location
Brazil
Venore, chance to getting into Ghost Shop

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++
 
I like it, but about the npc Jack Fate, why don't you put that player need bring 30 pieces of wood to travel back to lb?
If you do this, I'll rep++ :D
 
It will be a different script(You must create 2 Jack Fates, 1 of LB and 1 of Goroma)
I have this:
Jack Fate.xml
Jack Fategoroma.xml

It's not hard but I don't know how to do that xD
 
I didn't it alone, just edited. All credits to Cykotitan who help me everydays.

I'm just sharing :D
 
Back
Top