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

[OTHire] Travel NPC not working

nilaya

New Member
Joined
Dec 29, 2011
Messages
18
Reaction score
0
Hello!

I'm a complete noob in this programing stuff. But i have a legacy tibia server running (THIS). The problem i have right now is to get the travel NPC's working.


Lua:
:: Total loading time: 6.666s
:: Starting Server... [done]
:: Server Running...

Lua Script Error: [Npc interface]
data/npc/scripts/Captain Bluebear.lua:onCreatureSay

attempt to index a nil value
stack traceback:
        [C]: in function 'doTeleportThing'
        data/npc/scripts/lib/npcsystem/modules.lua:143: in function 'callback'
        data/npc/scripts/lib/npcsystem/keywordhandler.lua:47: in function 'processMessage'
        data/npc/scripts/lib/npcsystem/keywordhandler.lua:180: in function 'processNodeMessage'
        data/npc/scripts/lib/npcsystem/keywordhandler.lua:133: in function 'processMessage'
        data/npc/scripts/lib/npcsystem/npchandler.lua:298: in function 'onCreatureSay'
        data/npc/scripts/Captain Bluebear.lua:10: in function <data/npc/scripts/Captain Bluebear.lua:10>

FOE

hi
edron
yes

and then i get this (see code) message.

Anyone got a clue ?
 
You need to add the positions here
Like this one
Lua:
addTravelKeyword('ab\'dendriel', 130, Position(32734, 31668, 6))
Or have you defined this BOATPOS_AB somewhere else with the correct position?

Tried to add that line in Captain Bluebear.lua

Lua:
addTravelKeyword('ab\'dendriel', 130, Position(32734, 31668, 6))
addTravelKeyword('carlin', 110, BOATPOS_CARLIN, function(cid) if getPlayerStorageValue(cid, Storage.postman.Mission01) == 1 then setPlayerStorageValue(cid, Storage.postman.Mission01, 2) end end)
addTravelKeyword('edron', 160, BOATPOS_EDRON)
addTravelKeyword('port hope', 160, BOATPOS_PORT)
addTravelKeyword('venore', 170, BOATPOS_VENORE)

Then i get this error.

Code:
Lua Script Error: [Npc interface]
data/npc/scripts/Captain Bluebear.lua

data/npc/scripts/Captain Bluebear.lua:59: attempt to call global 'Position' (a nil value)
Warning: [NpcScript::NpcScript] Can not load script. data/npc/scripts/Captain Bluebear.lua

Where do i define BOATPOS_EDRON ?
 
Probably need to use

{x = 1000, y = 1000, z = 7}

instead of

Position(1000, 1000, 7)
 
Solution
Back
Top