TEVENTS - item triggers - Alaric - 07-10-2013 03:37 AM
A little problem but I have no idea why...
This works....
Code:
[itemdef blah]
dam=...
speed=...
on=@damage
blah
return 1
This doesn't....
Code:
[itemdef blah]
dam=...
speed=...
tevents=e_bonus_damage
[events e_bonus_damage]
on=@damage
blah
return 1
Why? I want to apply that bonus for more items and under every single weapon coppying on=@damage is stupid. What am I doing wrong?
RE: TEVENTS - item triggers - darksun84 - 07-10-2013 03:59 AM
You have to use [TYPEDEF e_bonus_damage] for items.
Looks like that you can install event in the [EVENTS eventname] format for item but they will not fire properly
RE: TEVENTS - item triggers - Alaric - 07-10-2013 04:28 AM
I'll post it all...
Code:
[ITEMDEF 0df0]
//Black Staff
//Using fencing type below
DEFNAME=i_staff_black
TYPE=T_WEAPON_MACE_STAFF
FLIP=1
DAM=12,14
SPEED=37
SKILL=MaceFighting
REQSTR=35
TWOHANDS=Y
VALUE={6 8}
WEIGHT=4
DUPELIST=0df1
TEVENTS=e_undead_damage
SKILLMAKE=CARPENTRY 75.0, t_carpentry
CATEGORY=Provisions - Weapons
SUBSECTION=Staves
DESCRIPTION=Black Staff
ON=@Create
HITPOINTS={50 60}
[EVENTS e_undead_damage]
ON=@Damage
serv.b works
if <src.brain>==brain_undead
src.damage <eval <argn1>*2>,<argn2>,<uid>
serv.b done
return 1
endif
return 0
I want it for silver weapons actually, the black staff is an example. But those weapons will be maces, swords, forks, etc.
If the typedef is the only way, I might coppy under every silver weapon the on=@damage.
RE: TEVENTS - item triggers - darksun84 - 07-10-2013 04:31 AM
(07-10-2013 04:28 AM)Alaric Wrote: I'll post it all...
Code:
[ITEMDEF 0df0]
//Black Staff
//Using fencing type below
DEFNAME=i_staff_black
TYPE=T_WEAPON_MACE_STAFF
FLIP=1
DAM=12,14
SPEED=37
SKILL=MaceFighting
REQSTR=35
TWOHANDS=Y
VALUE={6 8}
WEIGHT=4
DUPELIST=0df1
TEVENTS=e_undead_damage
SKILLMAKE=CARPENTRY 75.0, t_carpentry
CATEGORY=Provisions - Weapons
SUBSECTION=Staves
DESCRIPTION=Black Staff
ON=@Create
HITPOINTS={50 60}
[TYPEDEF e_undead_damage] //just put typedef instead of events :P
ON=@Damage
serv.b works
if <src.brain>==brain_undead
src.damage <eval <argn1>*2>,<argn2>,<uid>
serv.b done
return 1
endif
return 0
RE: TEVENTS - item triggers - Alaric - 07-10-2013 04:40 AM
Aaaah, cool. I understand it now Thanks, works.
The sphere is mysterious sometimes... npcs: events, events=, items: typedef, tevents=
|