• 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!

npc [travel]

redbull915

I learn...
Joined
Oct 10, 2008
Messages
235
Reaction score
0
Location
Poland/Radom
i have wrong in my script this view wrong in engin i use TFS 0.3b1pl2
Code:
[12/12/2008 19:06:52] [Warning - NpcScript::NpcScript] Can not load script: data/npc/scripts/boat/Travel1.lua
[12/12/2008 19:06:52] data/npc/scripts/boat/Travel1.lua:10: '}' expected near 'eternitat'
and my script
PHP:
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 travelNode = keywordHandler:addKeyword({'l'eternitat'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to 
Derelin for 119 gold coins?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 119, destination = {x=1367, y=403, z=7} 
})
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn\'t go there either.'})
local travelNode = keywordHandler:addKeyword({'bredan'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are 
you sure?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 40, cost = 230, destination = {x=981, y=980, 
z=6} })
	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the 
challange.'})
local travelNode = keywordHandler:addKeyword({'chicken itza'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, 
are you sure?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 40, cost = 230, destination = {x=1219, 
y=1022, z=6} })
	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the 
challange.'})
local travelNode = keywordHandler:addKeyword({'gurun stad'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, 
are you sure?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 40, cost = 230, destination = {x=1379, y=717, 
z=6} })
	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the 
challange.'})
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Gdzie chcesz po plynoc? Moge cie zabrac do tych 
miast {L'eternitat}, {Chicken Itza}, {Gurun Stad} i {Bredan}.'})
npcHandler:addModule(FocusModule:new())

sry for my english
 
Code:
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 travelNode = keywordHandler:addKeyword({'leternitat'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you wish to travel to 
Derelin for 119 gold coins?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, cost = 119, destination = {x=1367, y=403, z=7} 
})
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I wouldn't go there either.'})
local travelNode = keywordHandler:addKeyword({'bredan'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, are 
you sure?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 40, cost = 230, destination = {x=981, y=980, 
z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the 
challange.'})
local travelNode = keywordHandler:addKeyword({'chicken itza'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, 
are you sure?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 40, cost = 230, destination = {x=1219, 
y=1022, z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the 
challange.'})
local travelNode = keywordHandler:addKeyword({'gurun stad'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'It will cost you 230 gold, 
are you sure?'})
    travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 40, cost = 230, destination = {x=1379, y=717, 
z=6} })
    travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I guess your not ready for the 
challange.'})
keywordHandler:addKeyword({'travel'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Gdzie chcesz po plynac? Moge cie zabrac do tych 
miast {Leternitat}, {Chicken Itza}, {Gurun Stad} i {Bredan}.'})
npcHandler:addModule(FocusModule:new())

You can't use
symbol in keyword, cause it's closing with the same symbol. You can ofc write
like L/'eternitat aswell.

Now it's working with "leternitat" without
 
Back
Top