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

Help with a healing script

Cristian2387

New Member
Joined
Oct 2, 2014
Messages
34
Reaction score
0
Hi, i want a script that does this:
Paladins:
from level 1 to 500 they heal 5000 min 7000 max
from 501 to 1000 they heal 7500 min 10000 max
from 1001 to 1500 they heal 11000 min 14500 max
Knights:
from level 1 to 500 they heal 3000 min 6000 max
from level 501 to 1000 they heal 6500 min 8500 max
from level 1001 to 1500 they heal 9000 min 12000 max
Druids & Sorcerers:
from level 1 to 500 they heal 6000 min 8000 max
from level 501 to 1000 they heal 8500 min 11000 max
from level 1001 to 1500 they heal 12000 min 16000 max
thank you ill really appreciate if someone comes up with a script like that
 
Not sure if this will work, i'm pretty high. #swag

data/actions/scripts/healrune.lua:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPaladin(cid) then
    if getPlayerLevel(cid) < 500 and getPlayerLevel(cid) > 1 then
        doCreatureAddHealth(cid, math.random(5000, 7000)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    elseif getPlayerLevel(cid) < 1000 and getPlayerLevel(cid) > 500 then
        doCreatureAddHealth(cid, math.random(7500, 10000)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    elseif getPlayerLevel(cid) < 1500 and getPlayerLevel(cid) > 1000 then
        doCreatureAddHealth(cid, math.random(11000, 14500)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    end
end

if isKnight(cid) then
    if getPlayerLevel(cid) < 500 and getPlayerLevel(cid) > 1 then
        doCreatureAddHealth(cid, math.random(3000, 6000)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    elseif getPlayerLevel(cid) < 1000 and getPlayerLevel(cid) > 500 then
        doCreatureAddHealth(cid, math.random(6500, 8500)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    elseif getPlayerLevel(cid) < 1500 and getPlayerLevel(cid) > 1000 then
        doCreatureAddHealth(cid, math.random(9000, 12000)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    end
end

if isSorcerer(cid) or isDruid(cid) then
    if getPlayerLevel(cid) < 500 and getPlayerLevel(cid) > 1 then
        doCreatureAddHealth(cid, math.random(6000, 8000)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    elseif getPlayerLevel(cid) < 1000 and getPlayerLevel(cid) > 500 then
        doCreatureAddHealth(cid, math.random(8500, 11000)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    elseif getPlayerLevel(cid) < 1500 and getPlayerLevel(cid) > 1000 then
        doCreatureAddHealth(cid, math.random(12000, 16000)) 
        doCreatureSay(itemEx.uid, "Healing Rune", TALKTYPE_ORANGE_1)
    end
end
    return true
end

data/actions/actions.xml:
Code:
<action itemid="ID" event="script" value="healrune.lua"/>
 
Back
Top