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

Lua Help! vip spell

lalovega

New Member
Joined
Nov 4, 2008
Messages
85
Reaction score
1
Code:
local combat = createCombatObject()	
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)	
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)	
		if getPlayerStorageValue(cid,11551) = 1 then	
	end
	return doCombat(cid, combat, var)
end

im just trying to add this to my server but it doesnt work for vip players :S

this spell is an example i just add this but dunno if is correct.

if getPlayerStorageValue(cid,11551) = 1 then
end
 
Last edited:
LUA:
local combat = createCombatObject()	
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)	
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)
   		if getPlayerStorageValue(cid,11551) == 1 then	
	end
	return doCombat(cid, combat, var)
end
 
LUA:
local combat = createCombatObject()	
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)	
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)
   		if getPlayerStorageValue(cid,11551) == 1 then	
	end
	return doCombat(cid, combat, var)
end

So if it returns true, it does nothing.
Yeah, the problem is that it says = 1, when it should be == 1 :)

Really now?
 
LUA:
local combat = createCombatObject()	
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)	
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)
   		if getPlayerStorageValue(cid,11551) == 1 then	
	end
	return doCombat(cid, combat, var)
end
the error has disappeared but with a normal account still using the spell plz help...
 
LUA:
 local combat = createCombatObject()	
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)	
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)
    if getPlayerStorageValue(cid,11551) == 1 then	
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "You cannot use this spell") 
    end
end
 
LUA:
 local combat = createCombatObject()	
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)	
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)
    if getPlayerStorageValue(cid,11551) == 1 then	
        return doCombat(cid, combat, var)
    else
        doPlayerSendCancel(cid, "You cannot use this spell") 
    end
end
the spell it works but vip and normal account can't use it
 
Back
Top