• 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] Make an item unpickupable?

Tufte

Member
Joined
Nov 19, 2007
Messages
652
Reaction score
24
Location
Norway
Is there a way to make an item unpickupable other than making it really heavy?
 
Just an example:
Code:
function Player:onMoveItem(item, count, fromPosition, toPosition)
   if item:getId() == 2144 then
     if fromPosition.x < 0xFFFF and toPosition.x == 0xFFFF and (count > 1 or self:getItemCount(2144) > 0) then
       self:sendCancelMessage("Nope")
       return false
     end
   end
   return true
end
Edit: What this example does is that you can only hold 1 item with id 2144.
 
well its a tic tac toe token, so people has to be able to throw it, just not pick it up.

thanks dalkon i'll try later

there's no moveitem event in tfs 1.0 only additem
 
Last edited by a moderator:
There is a folder called "events", it's located there. If you don't have it then you're using outdated sources.
 
Back
Top