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

Add Flag 46 into condition, and remove condition on player attack once please :D how?

Blood BlvD Ot

Member
Joined
Jun 12, 2010
Messages
243
Reaction score
7
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 1200)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 120)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
Really, id do it if i knew the command to add player flag and remove but im sure ill learn if i get help from someone on this ;). iRePP ++

I want it so that in the condition it adds the flag #46 onto/into the player. and on the event of the player attacking or casting a spell. etc. do remove condition.

Idea: make a second condition ((condition2) for the flag #46) and keep the attack buffs
:P.:peace:
 
AMG, thats hurting lol.
SO! thanks for the info but can u help me figure another way around this?
I need it so that the char goes invisible like God..
 
Last edited:
Hmm.

Hmm, so its a great idea that takes alot of re-arranging eh :P
IM ON IT!! xD. Just one thing i have to ask.
The number in the goup file... where it says flags...
WTF! its just a bundle of numbers i tried figureing out a pattern of some sort..n ahhh nope came up with nothing.

And , how would i do the same thing with changing "Group ID" instead of the flags .. like in the conditions of the script.
 
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 1200)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 120)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

----------------------------------------------------------------------
local invis = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3000)
doPlayerSetGroupId(cid,2)

function onCastSpell(cid, var)

if getPlayerGroupId(Cid) <= 2 then
doAddCondition(cid,invis)
end

return doCombat(cid, combat, var)
end

I get this error. prob something simple..

[12/08/2010 08:22:43] (luaDoPlayerSetGroupId) Player not found
 
Last edited:
Back
Top