dualshock3
New Member
- Joined
- May 14, 2010
- Messages
- 89
- Reaction score
- 3
i need help with my smp cuz when i use it with a druid level 50 and ml 25 heals 50 of mana i want a script that if the player is druid or sorc it heals depending on the ml and if the playe is knight or pally it heals depending on the level.
here is my script if helps in something,
here is my script if helps in something,
Code:
local MIN = 1.0
local MAX = 1.3
local EMPTY_POTION = 7634
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 1000))
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end
if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if doPlayerAddMana(itemEx.uid, math.random((getPlayerLevel(cid) * MIN), (getPlayerLevel(cid) * MAX))) == LUA_ERROR
then
return FALSE
end
doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "", TALKTYPE_ORANGE_1)
return TRUE
end