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

Solved Amulet Equip

Maganius

PHP->Rulez
Joined
Dec 27, 2008
Messages
85
Reaction score
1
Location
Uruguay
I want create an amulet when this equip set a storage player but this amulet cant equip.

Message: You cannot dress this object here.

Movement.xml:

<movevent type="Equip" itemid="2139" slot="necklace" event="script" value="rare_amulet.lua"/>
<movevent type="DeEquip" itemid="2139" slot="necklace" event="script" value="rare_amulet.lua"/>

rare_amulet.lua
LUA:
function onEquip(cid, item, slot)
	  setPlayerStorageValue(cid, 15478, 1)
	   doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"1")
	   return false
end
function onDeEquip(cid, item, slot)
 doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"0")
	 setPlayerStorageValue(cid, 15478, 0)
	 return false
end

If i delete movement lines of amulet, i can equip it.
 
I test:

I disabled this lines and not work

LUA:
function onEquip(cid, item, slot)
	--  setPlayerStorageValue(cid, 15478, 1)
	 --  doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"1")
	 --  return false
end

function onDeEquip(cid, item, slot)
         --doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"0")
	 --setPlayerStorageValue(cid, 15478, 0)
	 --return false
end
 
Back
Top