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

Vip Spell

Streks

New Member
Joined
Feb 27, 2016
Messages
62
Reaction score
2
How do I get to this magic to 15 % more than 'haste' and effect 31 ?? /z 31 ... and i need that a spell only vip can use.

druid:

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 22000)
setConditionFormula(condition, 0.7, -56, 0.7, -56)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end



knight / paladin:

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 33000)
setConditionFormula(condition, 0.3, -24, 0.3, -24)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end



tks
 
Solution
setConditionFormula(condition, mina, minb, maxa, maxb)

Formula for extra speed is:
random((basespeed * mina + minb), (basespeed * maxa + maxb))

If you have mina == maxa and minb == maxb you don't need the random then you just calculate the 15%:

extraspeed = (basespeed*mina + minb)
extraspeed * 1.15 = (basespeed*mina + minb)*1.15
= basespeed*(mina*1.15) + (minb*1.15)

So you just multiply the mina and minb for 1.15... Basic maths.

If you want just for vips you should have an if looking like:
Code:
if not isVip(cid) then
    return false
end

As i don't know what vip system you're using you should find out what is the function to check if a player is vip or not.
setConditionFormula(condition, mina, minb, maxa, maxb)

Formula for extra speed is:
random((basespeed * mina + minb), (basespeed * maxa + maxb))

If you have mina == maxa and minb == maxb you don't need the random then you just calculate the 15%:

extraspeed = (basespeed*mina + minb)
extraspeed * 1.15 = (basespeed*mina + minb)*1.15
= basespeed*(mina*1.15) + (minb*1.15)

So you just multiply the mina and minb for 1.15... Basic maths.

If you want just for vips you should have an if looking like:
Code:
if not isVip(cid) then
    return false
end

As i don't know what vip system you're using you should find out what is the function to check if a player is vip or not.
 
Solution
also this ^^
Code:
doSendMagicEffect(getCreaturePosition(cid), 31)
 
For the effect he just has to change:
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

To:
setCombatParam(combat, COMBAT_PARAM_EFFECT, 31)

Lol...
 
For the effect he just has to change:
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)

To:
setCombatParam(combat, COMBAT_PARAM_EFFECT, 31)

Lol...
:eek:

:oops:

I almost never open spells because they confuse the hell out of me.
I knew that just forgot to remember that. :p
 
you are my boss !! tks very much

my vip == VIP System by Mock

so, even then you can help me !!!!!!? or where can I see this function ?


tks again.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 31)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionFormula(condition, mina, minb, maxa, maxb)
random((basespeed * mina + minb), (basespeed * maxa + maxb))
extraspeed = (basespeed*mina + minb)
extraspeed * 1.15 = (basespeed*mina + minb)*1.15
= basespeed*(mina*1.15) + (minb*1.15)

function onCastSpell(cid, var)
 if getPlayerVipDays(cid) < 1 then
         doPlayerSendCancel(cid, "You cannot use this spell")
         return false
     end
return doCombat(cid, combat, var)
end

or

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 31)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_HASTE)
setConditionFormula(condition, mina, minb, maxa, maxb)
random((basespeed * mina + minb), (basespeed * maxa + maxb))
extraspeed = (basespeed*mina + minb)
extraspeed * 1.15 = (basespeed*mina + minb)*1.15
= basespeed*(mina*1.15) + (minb*1.15)

function onCastSpell(cid, var)
if not vip.hasVip(cid) then
return doCombat(cid, combat, var)
end
 
Code:
function onCastSpell(cid, var)
    if not vip.hasVip(cid) then
        doPlayerSendCancel(cid, "You cannot use this spell")
        return false
    end
    return doCombat(cid, combat, var)
end
 
Back
Top