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