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

Solved Help me with edit my script!

zxzxzx

New Member
Joined
Mar 12, 2011
Messages
334
Reaction score
3
Hello, I have problem with this script, this script is the rune whick giving HP and MANA, I would like to make this rune only for PALADINS is this possible?, I tried use this "if isPaladin(cid) == TRUE then" but not work...!

script

function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 7) + (mlevel * 1) - 50
local mana_maximum = (level * 12) + (mlevel * 1)
local mana_add = math.random(mana_minimum, mana_maximum)
local health_minimum = (level * 5) + (mlevel * 1) - 50
local health_maximum = (level * 10) + (mlevel * 1)
local health_add = math.random(health_minimum, health_maximum)

doPlayerAddMana(cid, mana_add)
doCreatureAddHealth(cid, health_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
return TRUE
end


Help for rep+! :P
 
Code:
if getPlayerVocation(cid) == 3 OR getPlayerVocation(cid) == 7 then
-- unique code for paladins/royal paladins here
end
 
-- unique code for paladins/royal paladins here
what is that?

where I must paste it? omg Im not scripter :<...

and please do not send me to lua tutorials...
if you can do it this for me...
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local level = getPlayerLevel(cid)
    local mlevel = getPlayerMagLevel(cid)
    local mana_minimum = (level * 7) + (mlevel * 1) - 50
    local mana_maximum = (level * 12) + (mlevel * 1)
    local mana_add = math.random(mana_minimum, mana_maximum)
    local health_minimum = (level * 5) + (mlevel * 1) - 50
    local health_maximum = (level * 10) + (mlevel * 1)
    local health_add = math.random(health_minimum, health_maximum)
   
    if isInArray({3, 7}, getPlayerVocation(cid)) then
        doPlayerAddMana(cid, mana_add)
        doCreatureAddHealth(cid, health_add)
        doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
        doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
    end
    return true
end
 
Back
Top