• 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 Npc can only but 30 at a time

Lurk

Active Member
Joined
Dec 4, 2017
Messages
336
Reaction score
48
Hello, I have a tfs 0.4 server and whenever a player has excessive items in containers (bcakpacks) and sell more than 40 at a time to a npc it will causes lag, probably because it has to check every slot in the player backpack idk, is there a way to limit the amount of itens the npc can buy at a time? the current limit is 100 when you sai "hi, trade", but lowering it would be nice
 
Change this
data\npc\lib\npcsystem\modules.lua
Lua:
maxCount = 100,
Just change the number.
 
Solution
each backpack in my server is already 800oz to workaround this.
thank you mustafa, will change it rn <3
 
wouldn't it also not let player sell stackable items (creature products) as well? for example, selling 100 vials to npc
Not sure about stackable items but I can't think of any other way it can be done with.
 
Last edited:
tfs 0.4

Edit: I found a band-aid solution, here it is: I setted autoloot to sell the items automatically, this way no players can garner enough items to lag the server
 
Last edited:
Back
Top