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

Making a slot undropable / make an item untradeable.

Falazen

New Member
Joined
Feb 18, 2008
Messages
82
Reaction score
2
Hey everyone,

Been trying to come up with a way to make certain items undropable, mainly from a bag which will be in your arrow slot. I'm trying to find a way to make either one of these happen, where you can't drop the arrow slot, in which case I know of a few way to make the items inside untradeable. Is it possible to get just one slot to be protected? I'm coming up dry wherever I look throughout my distro (crying damson v8.2). If not, is it possible to stop an item from being traded in general?

Thanks for your time, any input is helpful :)
 
Check this onMove, you have to compile... I think is still possible without it but you can't handle the item if is moving inside of your Backpack.

For deny trade you can use:
Lua:
function onTradeRequest(cid, target, item)
    if item.itemid == XXX then
         doPlayerSendCancel (cid, "You can't trade this item.")
      return false
   end
   return true
end
Of course you have to registrer it on Login.lua and on Creaturescripts.xml
 
Interesting. So deny trade (the one you provided) is simply an on-login via creature scripts? And is it an onthink event or would it be something else? Thanks!
 
It simply cancels the trading attempt if the traded item is of a certain ID (the ID of the item you want to block), once a trade is attempted.
This wont work for your moving thing though, just use the method Cthugha told you to use. It's a lot easier than implementing it without new functions, if that is even possible without ruining the hierarchy of the server.
 
Back
Top