Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TEVENTS - item triggers
Author Message
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #1
TEVENTS - item triggers
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?
(This post was last modified: 07-10-2013 03:54 AM by Alaric.)
07-10-2013 03:37 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: TEVENTS - item triggers
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
07-10-2013 03:59 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #3
RE: TEVENTS - item triggers
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.
(This post was last modified: 07-10-2013 04:29 AM by Alaric.)
07-10-2013 04:28 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: TEVENTS - item triggers
(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
(This post was last modified: 07-10-2013 04:33 AM by darksun84.)
07-10-2013 04:31 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #5
RE: TEVENTS - item triggers
Aaaah, cool. I understand it now Big Grin Thanks, works.
The sphere is mysterious sometimes... npcs: events, events=, items: typedef, tevents= Smile
(This post was last modified: 07-10-2013 04:41 AM by Alaric.)
07-10-2013 04:40 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)