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

Click use on ring to place in ring slot

Nightimarez

New Member
Joined
Jul 24, 2008
Messages
287
Reaction score
2
Okay so I made a script that changes a might ring into a death ring. But when you click use on the might ring, it goes into your backpack. I would like for it to go back into the ring slot.
I don't know if it can be done by doTransformItem or CONST_SLOT_RING, but someone please help me.

PHP:
function onUse(cid, item, frompos, item2, topos)
  	if doPlayerRemoveMoney(cid, 500000) == TRUE then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA);
		doRemoveItem(item.uid,1)
  		doPlayerAddItem(cid,6300,1)
  else 
            doPlayerSendCancel(cid, 'You need 50 Crystal coins.') 
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
        end 
        end

Edit, nvm guys.. got it working.

PHP:
function onUse(cid, item, frompos, item2, topos)
	local value = 6301
  	if doPlayerRemoveMoney(cid, 500000) == TRUE then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA);
	doTransformItem(item.uid, value)
  else 
            doPlayerSendCancel(cid, 'You need 50 Crystal coins.') 
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) 
        end 
        end
 
Back
Top