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

Quest-Move

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
I created a box, but players can move it.
Code:
			---by BomBa---
			--------------

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerGroupId(cid) <= 1 then
	if getPlayerStorageValue(cid, 2404) == -1 then
	   doPlayerAddItem(cid, 2404, 1)
	   doPlayerAddExp(cid, 50)
	   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a Combat Knife.")
	   setPlayerStorageValue(cid, 2404, 1)
    else
	   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
  end
    else
	   doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not a common player.")
 end
  return TRUE
end

I wish it were impossible to move it.
I wanted it to be impossible to move it.

Help-me please.
 
Something like this should do I suppose.
PHP:
<movevent event="RemoveItem" tileitem="0" itemid="CHEST_ITEM_ID_HERE" script="cannotmovechest.lua" />
PHP:
function onRemoveItem(moveitem, tileitem, position)
     if moveitem.uid > 0 or moveitem.actionid > 0 then
           doPlayerSendCancel(cid, "You are not able to move this item.")
           return FALSE
     end
end
 
Back
Top