Airstrike
New Member
- Joined
- Jun 24, 2009
- Messages
- 48
- Reaction score
- 0
i made a second promotion and ive tried 2 different scripts but the healing potions wont work. The mana ones work, but the healing ones keep comming up with:
[11/08/2009 20:38:02] Lua Script Error: [Action Interface]
[11/08/2009 20:38:02] data/actions/scripts/liquids/great_health.luanUse
[11/08/2009 20:38:02] data/actions/scripts/liquids/great_health.lua:21: attempt to call global 'doPlayerAddHealth' (a nil value)
[11/08/2009 20:38:03] stack traceback:
[11/08/2009 20:38:03] data/actions/scripts/liquids/great_health.lua:21: in function <data/actions/scripts/liquids/great_health.lua:1>
someone wanna help me make my pots work?
[11/08/2009 20:38:02] Lua Script Error: [Action Interface]
[11/08/2009 20:38:02] data/actions/scripts/liquids/great_health.luanUse
[11/08/2009 20:38:02] data/actions/scripts/liquids/great_health.lua:21: attempt to call global 'doPlayerAddHealth' (a nil value)
[11/08/2009 20:38:03] stack traceback:
[11/08/2009 20:38:03] data/actions/scripts/liquids/great_health.lua:21: in function <data/actions/scripts/liquids/great_health.lua:1>
Code:
function onUse(cid, item, frompos, item2, topos)
playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}
player = getThingfromPos(playerpos)
ml = getPlayerMagLevel(cid)
lvl = getPlayerLevel(cid)
voc = getPlayerVocation(cid)
ex = getPlayerStorageValue(cid,4862)
r1 = math.random(200,400)
params = { [1]=cid, [2]=lvl, [3]=voc, [4]=ml }
if item2.itemid == 1 then
if item.itemid == 7634 then
doPlayerSendCancel(cid,"It is empty.")
else
if item2.uid == cid then
if lvl >= 140 then
if voc == 4 or voc == 8 or voc == 12 then
if ex == -1 then
doPlayerAddHealth(cid,r1)
doSendMagicEffect(playerpos,12)
addEvent(ums,1000,params)
setPlayerStorageValue(cid,4862, 1)
doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_RED)
else
doPlayerSendCancel(cid,'You are exhausted.')
doSendMagicEffect(playerpos,2)
end
else
doPlayerSendCancel(cid, 'This potion can only be consumed by heroic knights of level 140 or higher.')
end
else
doPlayerSendCancel(cid,'This potion can only be consumed by heroic and knights of level 140 or higher.')
end
else
splash = doCreateItem(2025,10,topos)
doTransformItem(item.uid,7634)
doDecayItem(splash)
end
end
else
if item.itemid == 7634 then
doPlayerSendCancel(cid,"It is empty.")
else
splash = doCreateItem(2025,10,topos)
doTransformItem(item.uid,7634)
doDecayItem(splash)
end
end
return 1
end
function ums(params)
cid = params[1]
setPlayerStorageValue(cid,4862, -1)
end
someone wanna help me make my pots work?