• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Simple Pot Changer

Beo

Three Magic
Joined
Aug 25, 2009
Messages
9,075
Solutions
1
Reaction score
857
Simply changes your mana potion to a health potion:

Code:
<action itemid="2229" script="other/manahealth.lua"/>

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
  if(itemEx.itemid == 7620) then
    doTransformItem(itemEx.uid, 7618)
    doRemoveItem(item.uid,0)
    doSendMagicEffect(toPosition, 9)
    return TRUE
  end
end

P.S
My first script :]
 
Last edited:
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
  if(itemEx.itemid == 7620) then
    doTransformItem(itemEx.uid, 7618)
    doSendMagicEffect(cid, 9)
    return TRUE
  end
end

You also no need: doRemoveItem(item.uid,0) so is RemoveItem 0 and the function Transform (transform the item and remove other)
 
Back
Top