leomendoza123
New Member
- Joined
- Oct 27, 2008
- Messages
- 10
- Reaction score
- 0
look that is the script
and in actions.xml... i put this:
And this is the error
"If this care, i am using the last tfs"
Plx help me!
Lua:
----- Potion by Kekox
local MIN = getPlayerLevel(cid) * 21.5 / getPlayerMagicLevel(cid) * 17
local MAX = getPlayerLevel(cid) * 25.1 / getPlayerMagicLevel(cid) * 19
local EMPTY_POTION = 2264
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 hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if doPlayerAddMana(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)
doRemoveItem(item.uid)
return TRUE
end
Lua:
<action itemid="2264" event="script" value="test.lua" allowfaruse="1"/>
And this is the error
[18/09/2009 15:18:41] Lua Script Error: [Action Interface]
[18/09/2009 15:18:41] data/actions/scripts/test.lua
[18/09/2009 15:18:41] internalGetPlayerInfo(). Player not found
[18/09/2009 15:18:41] Lua Script Error: [Action Interface]
[18/09/2009 15:18:41] data/actions/scripts/test.lua
[18/09/2009 15:18:41] data/actions/scripts/test.lua:2: attempt to perform arithmetic on a boolean value
[18/09/2009 15:18:41] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/test.lua)
"If this care, i am using the last tfs"
Plx help me!
Last edited: