Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 19th, 2010 | Syntax: None | Size: 0.84 KB | Hits: 72 | Expires: Never
Copy text to clipboard
  1. //! zinc
  2. library FireBlast {
  3.     unit u;
  4.     real x;
  5.     real y;
  6.     real dx;
  7.     real dy;  
  8.     real angle;
  9.    
  10.     function Tick() {
  11.     }
  12.    
  13.     function Actions() {
  14.         timer t = CreateTimer();
  15.         u = GetTriggerUnit();
  16.         x = GetUnitX( u );
  17.         y = GetUnitY( u );
  18.         dx = GetSpellTargetX();
  19.         dy = GetSpellTargetY();
  20.         angle = GetUnitFacing( u );
  21.        
  22.         TimerStart(t, 0.035, true, function Tick);
  23.     }
  24.    
  25.     function Conditions() -> boolean {
  26.         return GetSpellAbilityId() == 'A000';
  27.     }
  28.    
  29.     function onInit() {
  30.         trigger t = CreateTrigger();
  31.         TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT );
  32.         TriggerAddCondition(t, Condition( function Conditions ));
  33.         TriggerAddAction( t, function Actions );
  34.     }
  35. }
  36. //! endzinc