sestorme
Member
Code:
local combat = createCombatObject()
function onTargetTile(cid, pos)
local target = getThingFromPos({x=pos.x, y=pos.y, z=pos.z, stackpos=254})
local dur = 0.25 + ((0.25 * getPlayerStorageValue(cid, 1002)) * getCreatureStorage(target.uid, 2000))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "".. dur .."")
end
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
Simply:
[27/01/2013 18:06:17] [Error - Spell Interface]
[27/01/2013 18:06:17] In a callback: data/spells/scripts/attack/stone shower.luanTargetTile
[27/01/2013 18:06:17] (Unknown script file)
[27/01/2013 18:06:17] Description:
[27/01/2013 18:06:17] (luaGetCreatureStorage) Creature not found
[27/01/2013 18:06:17] [Error - Spell Interface]
[27/01/2013 18:06:17] In a callback: data/spells/scripts/attack/stone shower.luanTargetTile
[27/01/2013 18:06:17] (Unknown script file)
[27/01/2013 18:06:17] Description:
[27/01/2013 18:06:17] data/spells/scripts/attack/stone shower.lua:21: attempt to perform arithmetic on a boolean value
[27/01/2013 18:06:17] stack traceback:
[27/01/2013 18:06:17] data/spells/scripts/attack/stone shower.lua:21: in function <data/spells/scripts/attack/stone shower.lua:18>
[27/01/2013 18:06:17] [C]: in function 'doCombat'
[27/01/2013 18:06:17] data/spells/scripts/attack/stone shower.lua:28: in function <data/spells/scripts/attack/stone shower.lua:27>
It's a rune that requires target, so apparently it is there, but for some reason script can't return it. What's wrong?