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

Stack potion problem

puhefihi

New Member
Joined
Sep 28, 2011
Messages
84
Reaction score
0
hey guys so i fixed every other bug (i think) and came up with this one ALL Potions work perfect.. but when there stacked they when u use 1 it uses the whole stack.

i get 2 errors not sure if there related but the first error is when i start the server i get this error for pretty much every pot name; i will use strong health as an examle


[06/10/2011 13:38:07] Lua Script Error: [Test Interface]
[06/10/2011 13:38:07] data/actions/scripts/liquids/strong_health.lua
[06/10/2011 13:38:07] luaCreateConditionObject(). Condition not found
[06/10/2011 13:38:07] stack traceback:
[06/10/2011 13:38:07] [C]: in function 'createConditionObject'
[06/10/2011 13:38:07] data/actions/scripts/liquids/strong_health.lua:5: in main chunk\



then when i use the potions


[06/10/2011 13:44:52] Lua Script Error: [Action Interface]
[06/10/2011 13:44:52] data/actions/scripts/liquids/great_health.lua:eek:nUse
[06/10/2011 13:44:52] luaDoAddCondition(). Condition not found
[06/10/2011 13:44:52] stack traceback:
[06/10/2011 13:44:52] [C]: in function 'doAddCondition'
[06/10/2011 13:44:52] data/actions/scripts/liquids/great_health.lua:22: in function <data/actions/scripts/liquids/great_health.lua:8>

also when i hotkey them

13:46 Using one of 11 great health potions...

i dont know what script to put up for you to see but ill be checking this thread every 15 minutes for the next 18 hours. lol so i will be right back. p.s yes im working on this myself and i will post if it fixed it and how. :D thnx guys
 
Just post

data/actions/scripts/liquids/strong_health.lua

Just seems like something is misspellt or something in the script.
 
here it is.


local MIN = 500
local MAX = 700
local EMPTY_POTION = 7635

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end

if((not(isKnight(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80)) then
doCreatureSay(itemEx.uid, "Only knights of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
return TRUE
end

if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end

doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, EMPTY_POTION)
return TRUE
end
 
Back
Top