Categories:
functions triggers variables
Functions: all  aff  other  char  array  room  obj  quest  int  string  

Aff functions:

aff_apply
aff_apply_add
aff_apply_remove
aff_delete
aff_duration
aff_duration_type
aff_flag
aff_flag_add
aff_flag_remove
aff_get
aff_level
aff_new
aff_source
aff_type
isaff
valid

aff_apply
return value of affect apply, returns 0 when apply not exists
Syntax:
(int) aff_apply(affect, string)
Examples:
let aff = aff_get(me, "fly")
let apply = aff_apply(aff, "armor") - returns -15

aff_apply_add
return and set or modify value of affect apply type
Syntax:
(int) aff_apply_add(affect, string, int)
Examples:
let aff = aff_get(me, "fly")
let apply = aff_apply_add(aff, "armor", -30) - sets armor to -30 for affect fly

aff_apply_remove
return and remove value of affect apply type
Syntax:
(int) aff_apply_remove(affect, string)
Examples:
let aff = aff_get(me, "fly")
let apply = aff_apply_remove(aff, "armor") - remove armor apply from affect fly and returns its value

aff_delete
delete affect from char
Syntax:
(int) aff_delete(aff [, message = 0])
Examples:
let aff = aff_new(me, "fly")
aff_delete(aff) - delete affect without message
aff_delete(aff, "Fly is down!") - delete affect with specific message

aff_duration
return or set affect duration
Syntax:
(int) aff_duration(affect [, int])
Examples:
let aff = aff_get(me, "fly")
let duration = aff_duration(aff) - returns duration of fly affect
aff_duration(aff, 100) - set affects duration to 100 ticks/miniticks...

aff_duration_type
return or set affect duration type
Syntax:
(int) aff_duration_type(affect [, int])
Examples:
let aff = aff_get(me, "fly")
let duration = aff_duration_type(aff) - returns duration of fly affect
aff_duration_type(aff, 1) - change type to minitick
0 Tick
1 MINITICK
2 COMBAT_ONLY
3 SUSTAINED
4 COMBAT_SUSPEND - only in combat
5 COMBAT - round

aff_flag
return if affect contain this flag
Syntax:
(int) aff_flag(affect, string)
Examples:
let aff = aff_get(me, "fly")
let contain = aff_flag(aff, "fly") - returns 1

aff_flag_add
sets flag to affect, returns 1 when flag was addes, 0 otherwise
Syntax:
(int) aff_flag_add(affect, string)
Examples:
let aff = aff_get(me, "fly")
aff_flag_add(aff, "sanct") - add sanct flag to fly affect

aff_flag_remove
remove flag from affect, returns 1 when flag was removed, 0 otherwise
Syntax:
(int) aff_flag_remove(affect, string)
Examples:
let aff = aff_get(me, "fly")
aff_flag_remove(aff, "fly") - remove fly flag to fly affect

aff_get
find and returns affect variable on char or null if affect not found
Syntax:
(aff) aff_get(char, string | int)
Examples:
let aff = aff_get(ch, "haste")

aff_level
return or set affect level
Syntax:
(int) aff_level(affect [, int])
Examples:
let aff = aff_get(me, "fly")
let lev = aff_level(aff) - returns level of fly affect
aff_lev(aff, 100) - set affects level to 100 ticks/miniticks...

aff_new
create and attach new affect to char, enter manacost for dispel purposes, if not
entered, affect can't be dispeled
create and attach new affect to char, enter manacost for dispel purposes, if not
entered, affect can't be dispeled. Affect originates from caster.
Syntax:
(aff) aff_new(char, string[, manacost])
(aff) aff_new(char, string, caster[, manacost])
Examples:
let aff = aff_new(me, "special_affect")
let aff = aff_new(me, "special_affect", actor)

aff_source
return or set affect source id (-vnum of mob, +playerid)
Syntax:
(int) aff_source(affect [, char | int])
Examples:
let aff = aff_get(me, "fly")
let source = aff_source(aff) - returns source of fly affect
aff_source(aff, -100) - set affects source to mob vnum 100
aff_source(aff, me)

aff_type
return name of the affect ("fly", "gouge" etc)
Syntax:
(string) aff_type(affect)
Examples:
let aff = aff_get(me, "fly")
let spellname = aff_type(aff) -- returns "fly"

isaff
test if variable is affect
Syntax:
(int) isaff(variable)

valid
test if variable is still valid
test if string is valid
return allways 1 when argument is int
test if object is valid
test if affect is valid
test if array is valid
Syntax:
(int) valid(char)
(int) valid(string)
(int) valid(int)
(int) valid(obj)
(int) valid(aff)
(int) valid(array)
Examples:
if (valid(ch)) ...