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

How to Put Cooldown on Spells

CollapserMemory

New Member
Joined
Dec 4, 2014
Messages
66
Reaction score
1
I have Any Spell and i want put Cooldown on this ...
local scom1 = createCombatObject()
local scom2 = createCombatObject()

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -1.7, -1.8, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 3)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 15)

arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
setCombatArea(scom1, area1)
setCombatArea(scom2, area2)

function onTargetTile(cid, pos)
doCombat(cid,combat1,positionToVariant(pos))
end

function onTargetTile2(cid, pos)
doCombat(cid,combat2,positionToVariant(pos))
end

setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

local function onCastSpell1(parameters)
doCombat(parameters.cid, scom1, parameters.var)
end

local function onCastSpell2(parameters)
doCombat(parameters.cid, scom2, parameters.var)
end

function onCastSpell(cid, var)
doPlayerAddSoul(cid, math.random(2, 2))
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 1, parameters)
addEvent(onCastSpell2, 2, parameters)

return TRUE
end
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT,CONST_ME_ICEATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.6, -0, -1.7, 0)

local tempo = 10
local stor = 23232

function onCastSpell(cid, var)
print(exhaustion.check(cid, 23006), getPlayerStorageValue(cid, stor), os.time())
if exhaustion.check(cid, 23006) == false and (getPlayerStorageValue(cid, stor) - os.time() <= 0) then
setPlayerStorageValue(cid, stor, os.time() + tempo)
exhaustion.set(cid, 23006, 1)
doPlayerAddSoul(cid, math.random(1, 1))
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23006).."]")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can only use this spell one time every 10 seconds.")
return false
end
return true
end

Tell me what prints out in the console.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT,CONST_ME_ICEATTACK)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.6, -0, -1.7, 0)

local tempo = 10
local stor = 23232

function onCastSpell(cid, var)
print(exhaustion.check(cid, 23006), getPlayerStorageValue(cid, stor), os.time())
if exhaustion.check(cid, 23006) == false and (getPlayerStorageValue(cid, stor) - os.time() <= 0) then
setPlayerStorageValue(cid, stor, os.time() + tempo)
exhaustion.set(cid, 23006, 1)
doPlayerAddSoul(cid, math.random(1, 1))
return doCombat(cid, combat, var)
else
doPlayerSendCancel(cid, "Cooldown[" ..exhaustion.get(cid, 23006).."]")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can only use this spell one time every 10 seconds.")
return false
end
return true
end

Tell me what prints out in the console.
http://imageshack.com/a/img901/4435/KyVIJ5.png
https://imageshack.com/i/p1KyVIJ5p
 
I'd have to suggest waiting for further support. Not only am I unfamiliar with older distros but I'm unfamiliar with how spells are cast in general, so the fact that it isn't calling the onCastSpell is not something I know how to solve.
 
I'd have to suggest waiting for further support. Not only am I unfamiliar with older distros but I'm unfamiliar with how spells are cast in general, so the fact that it isn't calling the onCastSpell is not something I know how to solve.
I understand. I will stay on hold for hours, thank you for help
 
Code:
        local scom1 = createCombatObject()
        local scom2 = createCombatObject()

        local combat1 = createCombatObject()
        setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
        setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -1.7, -1.8, 0)

        local combat2 = createCombatObject()
        setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat2, COMBAT_PARAM_EFFECT, 15)

        arr1 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        arr2 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        local area1 = createCombatArea(arr1)
        local area2 = createCombatArea(arr2)
        setCombatArea(scom1, area1)
        setCombatArea(scom2, area2)

        function onTargetTile(cid, pos)
        doCombat(cid,combat1,positionToVariant(pos))
        end

        function onTargetTile2(cid, pos)
        doCombat(cid,combat2,positionToVariant(pos))
        end

        setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
        setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

        local function onCastSpell1(parameters)
        doCombat(parameters.cid, scom1, parameters.var)
        end

        local function onCastSpell2(parameters)
        doCombat(parameters.cid, scom2, parameters.var)
        end

        function onCastSpell(cid, var)
            local cd_stg = 9080
            local cd_time = 1 -- seconds
            if(getPlayerStorageValue(cid, cd_stg) < 1) then
                doPlayerSetStorageValue(cid, cd_stg, 1)
                addEvent(doPlayerSetStorageValue,cd_time, cid, cd_stg,0)
                doPlayerAddSoul(cid, math.random(2, 2))
                local parameters = { cid = cid, var = var}
                addEvent(onCastSpell1, 1, parameters)
                addEvent(onCastSpell2, 2, parameters)
            else
                doPlayerSendCancel("Spells is cooling down")
            end
        end
    return TRUE
end
 
Code:
        local scom1 = createCombatObject()
        local scom2 = createCombatObject()

        local combat1 = createCombatObject()
        setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
        setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -1.7, -1.8, 0)

        local combat2 = createCombatObject()
        setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat2, COMBAT_PARAM_EFFECT, 15)

        arr1 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        arr2 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        local area1 = createCombatArea(arr1)
        local area2 = createCombatArea(arr2)
        setCombatArea(scom1, area1)
        setCombatArea(scom2, area2)

        function onTargetTile(cid, pos)
        doCombat(cid,combat1,positionToVariant(pos))
        end

        function onTargetTile2(cid, pos)
        doCombat(cid,combat2,positionToVariant(pos))
        end

        setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
        setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

        local function onCastSpell1(parameters)
        doCombat(parameters.cid, scom1, parameters.var)
        end

        local function onCastSpell2(parameters)
        doCombat(parameters.cid, scom2, parameters.var)
        end

        function onCastSpell(cid, var)
            local cd_stg = 9080
            local cd_time = 1 -- seconds
            if(getPlayerStorageValue(cid, cd_stg) < 1) then
                doPlayerSetStorageValue(cid, cd_stg, 1)
                addEvent(doPlayerSetStorageValue,cd_time, cid, cd_stg,0)
                doPlayerAddSoul(cid, math.random(2, 2))
                local parameters = { cid = cid, var = var}
                addEvent(onCastSpell1, 1, parameters)
                addEvent(onCastSpell2, 2, parameters)
            else
                doPlayerSendCancel("Spells is cooling down")
            end
        end
    return TRUE
end
[27/07/2015 23:20:10] Warning: [Event::loadScript] Can not load script. data/spells/scripts/.lua
[27/07/2015 23:20:10] cannot open data/spells/scripts/.lua: No such file or directory
[27/07/2015 23:20:10] Warning: [Event::loadScript] Can not load script. data/spells/scripts/gran frigo.lua
[27/07/2015 23:20:10] data/spells/scripts/gran frigo.lua:82: '<eof>' expected near 'end'
 
Code:
        local scom1 = createCombatObject()
        local scom2 = createCombatObject()

        local combat1 = createCombatObject()
        setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
        setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -1.7, -1.8, 0)

        local combat2 = createCombatObject()
        setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat2, COMBAT_PARAM_EFFECT, 15)

        arr1 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        arr2 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        local area1 = createCombatArea(arr1)
        local area2 = createCombatArea(arr2)
        setCombatArea(scom1, area1)
        setCombatArea(scom2, area2)

        function onTargetTile(cid, pos)
        doCombat(cid,combat1,positionToVariant(pos))
        end

        function onTargetTile2(cid, pos)
        doCombat(cid,combat2,positionToVariant(pos))
        end

        setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
        setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

        local function onCastSpell1(parameters)
        doCombat(parameters.cid, scom1, parameters.var)
        end

        local function onCastSpell2(parameters)
        doCombat(parameters.cid, scom2, parameters.var)
        end

        function onCastSpell(cid, var)
            local cd_stg = 9080
            local cd_time = 1 -- seconds
            if(getPlayerStorageValue(cid, cd_stg) < 1) then
                doPlayerSetStorageValue(cid, cd_stg, 1)
                addEvent(doPlayerSetStorageValue,cd_time, cid, cd_stg,0)
                doPlayerAddSoul(cid, math.random(2, 2))
                local parameters = { cid = cid, var = var}
                addEvent(onCastSpell1, 1, parameters)
                addEvent(onCastSpell2, 2, parameters)
                return TRUE
            else
                doPlayerSendCancel("Spells is cooling down")
            end
        end
 
Code:
        local scom1 = createCombatObject()
        local scom2 = createCombatObject()

        local combat1 = createCombatObject()
        setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat1, COMBAT_PARAM_EFFECT, 6)
        setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1.7, -1.7, -1.8, 0)

        local combat2 = createCombatObject()
        setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
        setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, 3)
        setCombatParam(combat2, COMBAT_PARAM_EFFECT, 15)

        arr1 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        arr2 = {
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
        {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
        {0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        }

        local area1 = createCombatArea(arr1)
        local area2 = createCombatArea(arr2)
        setCombatArea(scom1, area1)
        setCombatArea(scom2, area2)

        function onTargetTile(cid, pos)
        doCombat(cid,combat1,positionToVariant(pos))
        end

        function onTargetTile2(cid, pos)
        doCombat(cid,combat2,positionToVariant(pos))
        end

        setCombatCallback(scom1, CALLBACK_PARAM_TARGETTILE, "onTargetTile")
        setCombatCallback(scom2, CALLBACK_PARAM_TARGETTILE, "onTargetTile2")

        local function onCastSpell1(parameters)
        doCombat(parameters.cid, scom1, parameters.var)
        end

        local function onCastSpell2(parameters)
        doCombat(parameters.cid, scom2, parameters.var)
        end

        function onCastSpell(cid, var)
            local cd_stg = 9080
            local cd_time = 1 -- seconds
            if(getPlayerStorageValue(cid, cd_stg) < 1) then
                doPlayerSetStorageValue(cid, cd_stg, 1)
                addEvent(doPlayerSetStorageValue,cd_time, cid, cd_stg,0)
                doPlayerAddSoul(cid, math.random(2, 2))
                local parameters = { cid = cid, var = var}
                addEvent(onCastSpell1, 1, parameters)
                addEvent(onCastSpell2, 2, parameters)
                return TRUE
            else
                doPlayerSendCancel("Spells is cooling down")
            end
        end
[27/07/2015 23:40:57] Lua Script Error: [Spell Interface]
[27/07/2015 23:40:57] data/spells/scripts/gran frigo.lua:eek:nCastSpell

[27/07/2015 23:40:57] data/spells/scripts/gran frigo.lua:71: attempt to call global 'doPlayerSetStorageValue' (a nil value)
[27/07/2015 23:40:57] stack traceback:
[27/07/2015 23:40:57] data/spells/scripts/gran frigo.lua:71: in function <data/spells/scripts/gran frigo.lua:67>
 
replace doPlayerSetStorageValue with setPlayerStorageValue

--It worked only once--

[27/07/2015 23:57:45] luaAddEvent(). callback parameter should be a function.

[27/07/2015 23:57:49] Lua Script Error: [Spell Interface]
[27/07/2015 23:57:49] data/spells/scripts/gran frigo.lua:eek:nCastSpell

[27/07/2015 23:57:49] luaDoPlayerSendCancel(). Player not found

[27/07/2015 23:57:51] Lua Script Error: [Spell Interface]
[27/07/2015 23:57:51] data/spells/scripts/gran frigo.lua:eek:nCastSpell

[27/07/2015 23:57:51] luaDoPlayerSendCancel(). Player not found

[27/07/2015 23:57:52] Lua Script Error: [Spell Interface]
[27/07/2015 23:57:52] data/spells/scripts/gran frigo.lua:eek:nCastSpell

[27/07/2015 23:57:52] luaDoPlayerSendCancel(). Player not found
 
change
Code:
doPlayerSendCancel("Spells is cooling down")
to
Code:
doPlayerSendCancel(cid, "Spells is cooling down")
[28/07/2015 00:08:20] Lua Script Error: [Spell Interface]
[28/07/2015 00:08:20] data/spells/scripts/gran frigo.lua:eek:nCastSpell

[28/07/2015 00:08:20] luaAddEvent(). callback parameter should be a function.
 
Back
Top