Author Topic: Help with script when PC attacks/hits Something  (Read 312 times)

Legacy_Devling

  • Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
Help with script when PC attacks/hits Something
« on: March 04, 2014, 06:04:39 pm »


               

Hey everybody.


I am in need of a way to launch a script whenever a PC attacks something


 


I am trying to add some extra scripted damage whenever a PC attacks.


 


Therefore i am in need of a way to launch a script whenever a PC damages something or hits something.



               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Help with script when PC attacks/hits Something
« Reply #1 on: March 04, 2014, 07:51:12 pm »


               

You are confusing three different words: attack, hit, and damage.  The answer to your post would be with regards to which word you meant.  If it is attack, then you could have target creatures be dealt damage in their OnPhysicalAttacked Event.  If it is hit you could be using an on-hit cast spell property on either a PC weapon or the target armor/skin.  If you are looking for damage you would be considering the creature's OnDamaged Event.



               
               

               
            

Legacy_Devling

  • Newbie
  • *
  • Posts: 30
  • Karma: +0/-0
Help with script when PC attacks/hits Something
« Reply #2 on: March 04, 2014, 08:33:11 pm »


               

The thing i need is a script which could:


make a foating text above the PCs head with the amount of damage the PC would do, if he meet the conditions. It should happen to everything he attacks(all NPCs), so an OnDamage hit on every single mob would be alot of work, is there any way to make this shorter?