This function it's only an example...
This action need use this lib:
http://otland.net/f163/apcl-awsome-player-class-lib-v-1-0-like-revscripts-125079/
This code convert all health in mana points.
Done using the lib:
Just read the code ;D
This action need use this lib:
http://otland.net/f163/apcl-awsome-player-class-lib-v-1-0-like-revscripts-125079/
This code convert all health in mana points.
Done using the lib:
LUA:
local health_per_cycle = 100
function onUse(cid,item)
local cid = Player:new(cid)
if cid.health > health_per_cycle then
if cid:getstorage(16544) <= os.time() then
cid.storage = U:pack(16544,os.time()+2) --- 2 secs of exhaust
cid.addhealth = -100
cid.addmana = 100
cid:doCreatureSay('Ahhh',1)
doSendMagicEffect(cid.position,12)
doRemoveItem(item.uid)
else
cid:doPlayerSendCancel('You are exhausted.')
end
else
cid:doPlayerSendCancel('Sorry, no health.')
end
end
Just read the code ;D
Last edited: