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

[Request]Vip Spell

kokorec

Tavon Online - Soon
Joined
May 3, 2008
Messages
287
Reaction score
0
Location
Turkey
Hi,
i want make vip spell.stroge value 11551 like.some1 can do it?

Thanks.
 
people always with their vip shit lol

example, didnt tested, should work, in spells.xml put mana 0, you decide if use that exhausted or add exhausted from xml file.
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, -90, 0.7, -50)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

local exhaust = createConditionObject(CONDITION_EXHAUST_COMBAT)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, spellConfig.exhausted)

function onCastSpell(cid, var)
    if getPlayerStorageValue(cid, 11551) ~= -1 then
        if getCreatureMana(cid) >= spellConfig.mana then
            doCreatureAddMana(cid, spellConfig.mana)
            doPlayerAddSpentMana(cid, spellConfig.mana * getConfigInfo('rateMagic'))
            doAddCondition(cid, exhaust)
            doCombat(cid, combat, var)
        else
            doPlayerSendCancel(cid,"MESSAGE NO MANA.")
        end
    else
        doPlayerSendCancel(cid,"MESSAGE NO VIP.")
    end
end
 
its errors:

Code:
[11/01/2009  14:00:08] data/spells/scripts/support/vip.lua:10: attempt to index global 'spellConfig' (a nil value)
[11/01/2009  14:00:08] Warning: [Event::loadScript] Can not load script. data/spells/scripts/support/vip.lua

i am delete setConditionParam(exhaust, CONDITION_PARAM_TICKS, spellConfig.exhausted)
and then

Code:
[11/01/2009  13:53:06] Lua Script Error: [Spell Interface] 
[11/01/2009  13:53:06] data/spells/scripts/support/vip.lua:onCastSpell

[11/01/2009  13:53:06] data/spells/scripts/support/vip.lua:11: attempt to call global 'getCreatureMana' (a nil value)
[11/01/2009  13:53:06] stack traceback:
[11/01/2009  13:53:06] 	data/spells/scripts/support/vip.lua:11: in function <data/spells/scripts/support/vip.lua:9>
 
Last edited:
people always with their vip shit lol

example, didnt tested, should work, in spells.xml put mana 0, you decide if use that exhausted or add exhausted from xml file.
PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, -90, 0.7, -50)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

local exhaust = createConditionObject(CONDITION_EXHAUST_COMBAT)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, spellConfig.exhausted)

function onCastSpell(cid, var)
    if getPlayerStorageValue(cid, 11551) ~= -1 then
        if getCreatureMana(cid) >= spellConfig.mana then
            doCreatureAddMana(cid, spellConfig.mana)
            doPlayerAddSpentMana(cid, spellConfig.mana * getConfigInfo('rateMagic'))
            doAddCondition(cid, exhaust)
            doCombat(cid, combat, var)
        else
            doPlayerSendCancel(cid,"MESSAGE NO MANA.")
        end
    else
        doPlayerSendCancel(cid,"MESSAGE NO VIP.")
    end
end

Very waste, why do that? All is in XML...

PHP:
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

-- Put the rest of the combat code here O.o

function onCastSpell(cid, var)
    if getPlayerStorageValue(cid, 11551) ~= -1 then
        return doCombat(cid, combat, var)
    end

    doPlayerSendCancel(cid, "MESSAGE NO VIP.")
    return LUA_ERROR
end
 
Last edited:
@UP
thanks it is work but when i do "utani vip" it is not PUFF.it writing with normal words.how i add instead of normal word= PUFF?

Sorry for bad english
 
Very waste, why do that? All is in XML...

PHP:
local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

-- Put the rest of the combat code here O.o

function onCastSpell(cid, var)
    if getPlayerStorageValue(cid, 11551) ~= -1 then
        return doCombat(cid, combat, var)
    end

    doPlayerSendCancel(cid, "MESSAGE NO VIP.")
    return LUA_ERROR
end


because if a player no vip use the spell it will remove the mana btw lol, that no right dont u think so?
 
Back
Top