• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua TFS 0.4 NPC

Praxtor

Programmer
Joined
Jan 22, 2012
Messages
496
Reaction score
83
Hello. I have few questions about NPCs in TFS 0.4.

1) When I am selling items to NPC, he should take the item from backpack firstly.

2) When I'm buying a life ring for example, NPC should give it to my backpack, not the ring slot.

3) I'm using the old shopmodule system (talk) and shopModule:addSellableItem in npc's script. I'd like to make players possible to buy items on two ways:
- hi / rope / yes
- hi / buy rope / yes


How to make it, anyone know?
Thanks in advance.
 
Not sure if the shop system is altered if you're using CONVERSATION_DEFAULT or not. Can't remember. I can look at it later and post here if no one has already helped you by then.
 
1) that's how doPlayerRemoveItem works, first checks your eq slots
2) you have to alter the NPC system for that aswell with a clever script, or even edit source
3) modules.lua SHOPMODULE_MODE = SHOPMODULE_MODE_BOTH
 
Back
Top