Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spells on @gethit
Author Message
Barnabus
Journeyman
*

Posts: 124
Likes Given: 0
Likes Received: 3 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #2
RE: Spells on @gethit
Combat can be tricky. GETHIT happens when the player actually gets hit with a damage.
It is not the trigger used to calculate the damage...

MAGE DAMAGE - do all your calculations inside the SpellEffect Trigger.
PHP Code:
ON=@SpellEffect
    REF1
=<SERV.UID.<SRC.UID>> // Caster 
    
REF2=<SERV.UID.<UID>>      // Target
// also here in this trigger <ARGN1> is the spell no.
// Here we know the caster the target and the spellno
// do your calculations here get a total, local.DamageTotal
// then carry the damage value across to the GetHit Trigger, for example as a CTAG
REF2.CTAG.A_Mage_Damaged_Me_For=<EVAL <LOCAL.damageTotal>> 
MELEE DAMAGE - do all your calculations inside the HIT Trigger.
PHP Code:
ON=@HIT
    REF1
=<SERV.UID.<UID>>        // Attacker
    
REF2=<SERV.UID.<SRC.UID>>    // Victim
    
REF3=<SERV.UID.<ARGO.UID>>    // Weapon 0 if Fists
// here in this trigger <ARGO> is the weapon
// Here we know the attacker target and weapon
// do your calculations here get a total, local.DamageTotal
// then carry the damage value across to the GetHit Trigger, for example :
REF2.CTAG.A_Melee_Damaged_Me_For=<EVAL <LOCAL.damageTotal>> 

Then now you have the damage tagged to the person whom is getting Hit !!

PHP Code:
ON=@GETHIT
REF1
=<SERV.UID.<UID>>        // Person getting HIT
IF <REF1.CTAG0.A_Melee_Damaged_Me_For>
    
ARGN1=<EVAL <REF1.CTAG.A_Melee_Damaged_Me_For>>
    
ARGN2=dam_god // This is the damage type you can have dam_fire etc also look into it
    
ARGN3=I cant remeber what this is )
ELIF <REF1.CTAG0.A_Mage_Damaged_Me_For>
    
ARGN1=<EVAL <REF1.CTAG.A_Mage_Damaged_Me_For>>
    
ARGN2=dam_god // This is the damage type you can have dam_fire etc also look into it
    
ARGN3=I cant remeber what this is )
ELSE
    
// This should never happen.
ENDIF 

Ok so briefly now :

1. Do all your damage calculations in HIT and SPELLEFECT
2. Transfer these damages one way or another to the GETHIT Trigger
3. In the GETHIT Trigger set ARGN1 asthe damage
4. ARGN2 as the damage type
5. Set ARGN3 as 0 (I dont remeber why i did this but i have a feeling it was parry or resist)
6. NOTE:dam_fire, or dam_cold, will get resisted by resfire rescold etc but dam_god wont get resisted.


Ooops I forgot to say and its important... Remeber to remove the tags after you pass the damage !!
PHP Code:
ARGN1=<EVAL <REF1.CTAG.A_Mage_Damaged_Me_For>>
    
REF1.CTAG.A_Mage_Damaged_Me_For
(This post was last modified: 10-16-2012 08:28 PM by Barnabus.)
10-16-2012 07:08 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Spells on @gethit - Lano - 10-16-2012, 06:41 AM
RE: Spells on @gethit - Barnabus - 10-16-2012 07:08 AM
RE: Spells on @gethit - Lano - 10-16-2012, 05:29 PM
RE: Spells on @gethit - Barnabus - 10-17-2012, 12:13 AM
RE: Spells on @gethit - Lano - 10-17-2012, 03:40 AM
RE: Spells on @gethit - Barnabus - 10-17-2012, 05:57 AM
RE: Spells on @gethit - Lano - 10-17-2012, 05:11 PM
RE: Spells on @gethit - Lano - 10-18-2012, 03:09 AM
RE: Spells on @gethit - Barnabus - 10-18-2012, 05:56 AM
RE: Spells on @gethit - Skul - 10-18-2012, 07:03 AM
RE: Spells on @gethit - Barnabus - 10-18-2012, 08:17 AM
RE: Spells on @gethit - Lano - 10-18-2012, 05:01 PM

Forum Jump:


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