Forum poświęcone powstawaniu Belxena OTS
function onUse(cid, item, frompos, item2, topos)
local lvl = getPlayerLevel(cid)
local addhealth = math.random(8, lvl) * 30 + 200 - 8*30 -- ta funkcja zapewnia losowosc dodanego hp
doSendAnimatedText(frompos,''.. addhealth ..'',22)
doPlayerSendCancel(cid,"Ahhhh...")
doSendMagicEffect(frompos,12)
doCreatureAddHealth(cid, addhealth)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
return 1
end
<action itemid="XXXX" script="frostheart.lua" />
Offline