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

TFS 0.3.6pl1 NPC SYSTEM

Swiff

Member
Joined
Apr 6, 2009
Messages
366
Reaction score
12
Location
Sweden
Problem solved - downloaded another distro and copied all my customized stuff bit by bit while restarting server untill I had all the important stuff I needed.

I don't understand why 10k people downloaded the same server as me aand yet I haven't seen anyone with same problems, it really pisses me off. But I should blame myself for having such a hobby;P

Thanks Cykotitan for trying to help me.
 
Last edited:
yes, but also freepremium.

Code:
	freePremium = true
	premiumForPromotion = true

Buying/selling items at npcs with the trade system works.
Everytime I or someone else ask for let's say promotion or addon npc answer "would you like to buy it for xxx gold?

When I write "yes" I get the error in the console and nothing else happens(meaning no addon or promotion, doesne't matter if i have enough money or not either).
 
02:02 Varkhal: Do you want to buy the first addons set for 50000 gold coins?
02:02 GM Swiff [2208]: yes

Console:
Code:
[Error - Npc interface]
data/npc/scripts/addons.lua:onCreatureSay
Description:
data/lib/function.lua:432: attempt to index local 'str' <a boolean value>
stack traceback:
    data/lib/function.lua:432: in function 'getBooleanFromString'
    data/lib/function.lua:87: in function 'isPlayerPremiumCallback'
    data/npc/scripts/addons.lua:20: in function 'callback'
    data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
    data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
    data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
    data/npc/lib/npcsystem/npchandler.lua:387: in function 'onCreatureSay'
    data/npc/scripts/addons.lua:7: in function <data/npc/scripts/addons.lua:7>

02:34 /reload talkactions
02:34 Reloading talkactions...
02:34 Reloaded successfully.


Console:
Code:
[Error - TalkAction Interface]
data/talkactions/scripts/frags.lua
Description:
data/lib/function.lua:432: attempt to index local 'str' <a  boolean value>
[Warning - Event::LoadScript] Cannot load scripts <data/talkactions/scripts/frags.lua>

[Error - TalkAction Interface]
data/talkactions/scripts/online.lua
Description:
data/lib/function.lua:432: attempt to index local 'str' <a boolean value>
[Warning - Event::LoadScript] Cannot load scripts <data/talkactions/scripts/online.lua>

[Error - TalkAction Interface]
data/talkactions/scripts/serverinfo.lua
Description:
data/lib/function.lua:432: attempt to index local 'str' <a boolean value>
[Warning - Event::LoadScript] Cannot load scripts <data/talkactions/scripts/serverinfo.lua>

[Error - TalkAction Interface]
data/talkactions/scripts/commands.lua
Description:
data/lib/function.lua:432: attempt to index local 'str' <a boolean value>
[Warning - Event::LoadScript] Cannot load scripts <data/talkactions/scripts/commands.lua>

Sorry for the delayed reply, takes a while to copy from the console.. Thanks for trying to help

Edit* the promotion aswell.
02:46 The Forgotten King: I can promote you for 20000 gold coins. Do you want me to promote you?
02:46 GM Swiff [2208]: yes

Console:
Code:
[Error - Npc interface]
data/npc/scripts/promotion.lua:onCreatureSay
Description:
data/lib/function.lua:432: attempt to index local 'str' <a boolean value>
stack traceback:
    data/lib/function.lua:432: in function 'getBooleanFromString'
    data/lib/function.lua:87: in function 'isPlayerPremiumCallback'
    data/npc/lib/npcsystem/modules.lua:75: in function 'callback'
    data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
    data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
    data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
    data/npc/lib/npcsystem/npchandler.lua:387: in function 'onCreatureSay'
    data/npc/scripts/promotion.lua:7: in function <data/npc/scripts/promotion.lua:7>
 
Last edited:
I would suggest you to update your entire data/lib/ folder. What you need to fix (update) for your problem specifically is function getBooleanFromString(input) in 050-function.lua:
Code:
function getBooleanFromString(input)
	local tmp = type(input)
	if(tmp == 'boolean') then
		return input
	end

	if(tmp == 'number') then
		return input > 0
	end

	local str = string.lower(tostring(input))
	return (str == "yes" or str == "true" or (tonumber(str) ~= nil and tonumber(str) > 0))
end
 
I don't really understand that suggestion, what does that code that you posted do?

I think I have the newest aviable, I got it from here:
[8.54] The Forgotten Server 0.3.6pl1 (Crying Damson) - OpenTibia Fans

which seems to be the same posted on otland.

Thank you

I checked the function getBooleanFromString(input) in 050 - function.lua and it looks exactly as you wrote it. This means.. I still have the problem.. I tried to search for npc packages and the like, but none is newer than the ones I alredy got. I'm goning to try more tomorrow. hiting the bed for now. If someone got any suggestions, don't hesitate =)
 
Last edited:
Back
Top