• 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 1.X+ Prevent player from throwing/trading item

mackerel

Well-Known Member
Joined
Apr 26, 2017
Messages
398
Solutions
18
Reaction score
73
Is there a function to prevent player from throwing away or selling trading certain item? If not, how about could I do it

using Tfs 1.0
 
Last edited:
Solution
Is there a function to prevent player from throwing away or selling certain item? If not, how about could I do it

using Tfs 1.0
Selling you control with npc if item isn't list then obviously you cant sell it.
As for moving an item see below
Code:
https://github.com/otland/forgottenserver/blob/1.0/src/events.cpp#L366
Code:
Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition)
Is there a function to prevent player from throwing away or selling certain item? If not, how about could I do it

using Tfs 1.0
Selling you control with npc if item isn't list then obviously you cant sell it.
As for moving an item see below
Code:
https://github.com/otland/forgottenserver/blob/1.0/src/events.cpp#L366
Code:
Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition)
 
Solution
Selling you control with npc if item isn't list then obviously you cant sell it.
As for moving an item see below
Code:
https://github.com/otland/forgottenserver/blob/1.0/src/events.cpp#L366
Code:
Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition)

I meant trading, my mistake sorry :oops: but yeah I sorted the trading bit and thanks for the moving part

here is for trading, if anyone is interested: Making a slot undropable / make an item untradeable.
 
Back
Top