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

Lua TFS 1.0 NPC "spamming" bug

rsdsebek

C++/LUA coder
Joined
Oct 8, 2008
Messages
128
Reaction score
30
Hi
I have small bug with NPCs on TFS 1.0. My npc is ordinary default.lua with shop function. So, when we buy or sell item by writing e.g. "sell plate armor" and walk away, NPC begins to spam with "Good bye.", when other player arrives on screen NPC is also spamming "Good bye." until player gets out of its sight.
When NPC is spamming I get lua error about npcsystem.lua in console:
2lcv776.jpg


What can I do about it? All npc system files are from forgottenserver github.

Regards
 
Last edited:
I can't reproduce this.

I tried summoning Riona, said "hi", "trade" and walked away. She says "Good bye, NAME." once and no errors are showing up in the console.
 
No, @Mark. You must not say hi->trade, but e.g. hi-> buy plate armor->yes, and walk away. Then the NPC will start to spam. This happens also if you sell something buy writing item name.

Regards
 
I still can't reproduce it:
23:47 Riona: Greetings, Mark.
23:47 Mark [10]: buy backpack
23:47 Riona: Do you want to buy 1 backpack for 20 gold coins?
23:47 Mark [10]: yes
23:47 Riona: Here you are.
(I walk away and she says "Good bye." once in local chat)
23:47 Mark [10]: hi
23:47 Riona: Greetings, Mark.
23:47 Mark [10]: buy backpack
23:47 Riona: Do you want to buy 1 backpack for 20 gold coins?
23:47 Mark [10]: yes
23:47 Riona: You don't have enough money.
(I walk away and she says "Good bye." once in local chat)

There are no errors in the console.
 
I don't know what's going on. It's strange, NPC Riona is also spamming with "Good bye" on my server, I did all exactly as you . I double checked my files in data/npc/lib, they seem to be identical as that in forgottenserver github.. Default.lua in data/npc/scripts is also identical as that on github. Maybe lua libs version has something to do with this? (I compiled TFS on Linux).

Regards
 
Can you try without any changes in the data/ directory to see if it still happens (TFS map and default scripts)? I'm using LuaJIT 2.0.2, but I can test with Lua 5.1 or 5.2 too if you think the problem is there (which of them are you using?).
 
I used Lua 5.2 to compile TFS on Ubuntu 13.10, from what I remember, it happened also, when my TFS was standing on Mac OS X machine. I will try to compile clean TFS on it and give you feedback in about 30 minutes.

Regards
 
I just went to Mac OS X and I think compiling clean TFS is unnecessary. On Mac OS X I have TFS compiled with Lua 5.1.5 and NPCs aren't spamming. So I guess it's Lua 5.2's fault, I'll recompile it on my server.

Regards
 
I've tried with Lua 5.2 on Debian 7, and I still can't reproduce it.

Did you test with TFS default map without any local modifications other than setting IP and MySQL info in config.lua; summon Riona and say "hi", "buy backpack", "yes" and walk away?
 

Similar threads

Back
Top