• 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 Create Condition in Onthink [tfs 0.6.3?]

Zell

Intermediate OT User
Joined
Oct 23, 2010
Messages
214
Reaction score
117
hiho my dears :)

Im trying to give a condition to player who have X vocation, but i think conditions is just for spells..

Can anyone help me to do this? something like..

Code:
       function onThink(cid)

local condition2 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition2, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 125)
------------
if Voc == X then
doAreaCombatCondition(cid, getThingPos(cid), condition2)

I just want give the attributes for infinite time, any idea?

By the way I try to use "CastSpell(cid, x)
But in my serv dont have this function..


Thanks!
 
hiho my dears :)

Im trying to give a condition to player who have X vocation, but i think conditions is just for spells..

Can anyone help me to do this? something like..

Code:
       function onThink(cid)

local condition2 = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition2, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 125)
------------
if Voc == X then
doAreaCombatCondition(cid, getThingPos(cid), condition2)

I just want give the attributes for infinite time, any idea?

By the way I try to use "CastSpell(cid, x)
But in my serv dont have this function..


Thanks!
what TFS you are using.
 
Share the solution or next time don't ask for help.. if that sounds mean then good coz keeping the solution to yourself is even meaner.

Yeah, you're right, I dont pasted the code because I just add a bad argument of function and I guess is a simple way to get this..

Buut here is:

Code:
[*] function onThink(cid)
[*]

[*]local condition2 = createConditionObject(CONDITION_ATTRIBUTES)
[*]setConditionParam(condition2, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 125)
[*]------------
[*]if Voc == X then
[*]doAreaCombatCondition(cid, getThingPos(cid), condition2) <--- WRONG
[*]    doAddCondition(cid, condition2) <--- correct

:)
 
Back
Top