ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
I get this error:
Here is health_potion.lua
What I did was, I am using TFS 0.3.6 Crying Damson V5 and all the potions were messing up, if they were in a stack then it would use all of them at once but only give you one's worth. So I took OTServ 8.60 r.6052 and switched out the lines in actions.xml for liquids and replaced the liquids folder in TFS with the one from OTServ. Now the problem is solved, as in when you use a stack of 5 mana potions, it removes only one, creates an empty potion bottle, but it does not heal you at all (which is what I think the error is dealing with).
So how do I fix this mess?
Code:
[02/10/2012 21:58:23] [Error - Action Interface]
[02/10/2012 21:58:23] data/actions/scripts/liquids/health_potion.lua
[02/10/2012 21:58:23] Description:
[02/10/2012 21:58:23] (luaCreateConditionObject) Condition not found
Here is health_potion.lua
Code:
local MIN = 110
local MAX = 210
local EMPTY_POTION = 7636
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
setCombatFormula(combat, COMBAT_FORMULA_DAMAGE, MIN, 0, MAX, 0)
local exhaust = createConditionObject(CONDITION_EXHAUST_POTION)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('minactionexinterval'))
function onUse(cid, item, frompos, item2, topos)
if(isPlayer(item2.uid) == false)then
return false
end
if(hasCondition(cid, CONDITION_EXHAUST_POTION) ) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end
if not doCombat(cid, combat, numberToVariant(item2.uid)) then
return false
end
doAddCondition(cid, exhaust)
doCreatureSay(item2.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, EMPTY_POTION, 1)
return true
end
What I did was, I am using TFS 0.3.6 Crying Damson V5 and all the potions were messing up, if they were in a stack then it would use all of them at once but only give you one's worth. So I took OTServ 8.60 r.6052 and switched out the lines in actions.xml for liquids and replaced the liquids folder in TFS with the one from OTServ. Now the problem is solved, as in when you use a stack of 5 mana potions, it removes only one, creates an empty potion bottle, but it does not heal you at all (which is what I think the error is dealing with).
So how do I fix this mess?