• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua SPELLS + STORAGE (HELP)

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
Hello I'm trying to do something like:
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_MAGICWALL)

function onCastSpell(creature, variant, isHotkey)
if creature:isPlayer() then
        local Stop = [storage here]
        if Stop then
            return false
        end
    end
    return combat:execute(creature, variant)
end


Disable the use of Magic Walls if have with XX storage

any idea?
 
PHP:
function onCastSpell(creature, variant, isHotkey)

    if getPlayerStorageValue(creature, [storage here]  ) == [storage value]  then
        return false
    else
        return combat:execute(creature, variant)
    end
   
end
 
Back
Top