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

|TRAVELCOST| Issue OTHire

nilaya

New Member
Joined
Dec 29, 2011
Messages
18
Reaction score
0
Yesterday i made so that certain NPC can sell backpacks of runes. All good there! But today when i was going to travel i get this message ingame.

03:26 Mister: hi
03:26 Captain Fearless: Welcome on board, Sir Mister.
03:26 Mister: edron
03:26 Captain Fearless: Do you seek a passage to Edron for |TRAVELCOST|?

There is no console errors. All i can think of is that there is something wrong in modules.lua

I checked that TAG_TRAVELCOST = '|TRAVELCOST|' are located in npcsystem.lua, npchandler.lua.

It's really not a big issue, but it worked before, and i want it to work now again.

Anyone got a clue ?

Attached the files below.

/Mike
 

Attachments

Solution
modules.lua:43 change:
Lua:
        local parseInfo = {
                [TAG_PLAYERNAME] = getPlayerName(cid),
            }

to:
Lua:
        local parseInfo = {
                [TAG_PLAYERNAME] = getPlayerName(cid),
                [TAG_TRAVELCOST] = parameters.cost
            }

It should work I guess, if not it needs a nil check then.
Show me your npc xml and lua file and I'll check, I think I can see the issue but I want some confirmation not to fix it blindly
 
Last edited:
modules.lua:43 change:
Lua:
        local parseInfo = {
                [TAG_PLAYERNAME] = getPlayerName(cid),
            }

to:
Lua:
        local parseInfo = {
                [TAG_PLAYERNAME] = getPlayerName(cid),
                [TAG_TRAVELCOST] = parameters.cost
            }

It should work I guess, if not it needs a nil check then.
 
Solution
I'll try it when i get home. Will notify if it's working or not. Thanks!
Post automatically merged:

That worked as a charm! Big thanks to you @Azakelis
 
Last edited:
Back
Top