• 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 How to do that nothing can be dropped on item.

Yassate

New Member
Joined
Mar 26, 2011
Messages
13
Reaction score
0
Hello OTLand users.
It is my first post but I read this forum from about month. I have read a lot of tutorials and other threads, but I did not find solution, that is why I ask here. I am working atm on HotA quest and I need some help. I wrote script about these hats in Rahemos tomb, It works but I need to do that will be.impossible to drop smth on these hats. Can you tell me how to do this without editing items?

Thank You, Yassate.
 
the simplest solution would be to put item with ID 1548 under them.

if it removes the counter when you place it, try to copy&paste the 1548 instead

Think its possible to do with movements, PM me and i might fix it tomorrow, to damned tired right now ;)
no, it can't be done with standard movements. maybe only with doRemoveItem at onAddItem event, but I dont like that kind of solution :p
 
the simplest solution would be to put item with ID 1548 under them.

if it removes the counter when you place it, try to copy&paste the 1548 instead


no, it can't be done with standard movements. maybe only with doRemoveItem at onAddItem event, but I dont like that kind of solution :p

i ment with onAddItem and if tileItem == id then return false and error message that u can't drop ^_^
 
Think this might work ^_^
LUA:
local ItemID = 2160
--^ ItemID That you can't drop items on ^
function onAddItem(moveItem, tileItem, position, cid)
	if(tileItem == ItemID) then
		doPlayerSendCancel(cid, "You can\'t drop items here!")
	return false
	end
	return true
end

And below is if you have more than one item and don't want multiple scripts :)

LUA:
local ItemID = {2160, 2400, 6660}
--^ ItemIDs That you can't drop items on ^
function onAddItem(moveItem, tileItem, position, cid)
	if(isInArray(ItemID, tileItem)) then
		doPlayerSendCancel(cid, "You can\'t drop items here!")
	return false
	end
	return true
end
 
Thanks for your posts. I tried Milice's solution but It doesn't work (or I'm doing smth wrong). I'll try now Cykotitan's proposition =)

Thank you Cykotitan! It works! I'm not experienced user of forums but I gave you and Milice "reputation" =D
 
Last edited:
return false doesn't work, unfortunately. but mock made an onMoveItem event for this :p.
I see it's not needed now
 
Thanks for your posts. I tried Milice's solution but It doesn't work (or I'm doing smth wrong). I'll try now Cykotitan's proposition =)

Thank you Cykotitan! It works! I'm not experienced user of forums but I gave you and Milice "reputation" =D

Can you send the script for me via PM ?
 
Back
Top