ssiwyy158
Member
- Joined
- Jan 24, 2011
- Messages
- 128
- Solutions
- 2
- Reaction score
- 13
TFS 0.4 r3884 8.6.
Hello. Script:
Console error when use rune:
Hello. Script:
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, EXHAUST_HEALING)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local min, max
local lvl, mag = getPlayerLevel(cid), getPlayerMagLevel(cid)
if isSorcerer(cid) or isDruid(cid) then
min = lvl * 1.0 + mag * 1.0
max = lvl * 1.0 + mag * 1.0
elseif isPaladin(cid) then
min = lvl * 1.0 + mag * 1.0
max = lvl * 1.0 + mag * 1.0
elseif isKnight(cid) then
min = lvl * 0.5 + mag * 0.5
max = lvl * 1.0 + mag * 1.0
end
local rand = math.random(min, max)
if rand > 550 then
rand = 550
end
if rand < 350 then
rand = 350
end
if hasCondition(cid, CONDITION_EXHAUST, EXHAUST_HEALING) then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
end
if not isPlayer(itemEx.uid) then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
return doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE) and doPlayerAddMana(itemEx.uid, rand) and doAddCondition(cid, exhaust) and doCreatureSay(itemEx.uid, "Aaah...", TALKTYPE_ORANGE_1)
end
Console error when use rune:
Code:
https://zapodaj.net/3db5437de64ac.png.html