Advertisement
Guest User

Untitled

a guest
Jan 24th, 2011
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. datablock ShapeBaseImageData(k : AdminWandImage)
  2. {
  3.     showBricks = 0;
  4.     colorShiftColor = "1 1 0 1";
  5. };
  6.  
  7. function servercmdkillwand(%c)
  8. {
  9.     if(isObject(%p = %c.player))
  10.         %p.mountImage(k,0);
  11. }
  12.  
  13. function k::onMount(%t,%o)
  14. {
  15.     fixArmReady(%o);
  16. }
  17.  
  18. function k::onPreFire(%t,%o)
  19. {
  20.     WandImage.onPreFire(%o);
  21. }
  22.  
  23. function k::onStopFire(%t,%o)
  24. {
  25.     %o.playThread(2,root);
  26. }
  27.  
  28. function k::onFire(%t,%o)
  29. {
  30.     AdminWandImage::onFire(%t,%o);
  31. }
  32.  
  33. function k::onHitObject(%t,%o,%s,%c,%p,%v)
  34. {
  35.     if(%c.getClassName() $= "fxDTSBrick")
  36.     {
  37.         %c[0]  = %c;
  38.         %b[%c] = 1;
  39.         %b     = 1;
  40.        
  41.         for(%a = 0; %a != %b; %a++)
  42.         {
  43.             %c = %c[%a];
  44.            
  45.             if(getTrustLevel(%o,%c) < 2)
  46.             {
  47.                 %o.client.centerPrint("You need full trust for that.",2);
  48.                 return;
  49.             }
  50.            
  51.             if(%c.getColorFXID() != 1)
  52.                 %c.fakeKillBrick(0,9);
  53.            
  54.             for(%i = 0; %i < %c.getNumDownBricks(); %i++)
  55.             {
  56.                 %d = %c.getDownBrick(%i);
  57.                
  58.                 if(!%b[%d])
  59.                 {
  60.                     %b[%d] = 1;
  61.                     %c[%b] = %d;
  62.                     %b++;
  63.                 }
  64.             }
  65.            
  66.             for(%i = 0; %i < %c.getNumUpBricks(); %i++)
  67.             {
  68.                 %d = %c.getUpBrick(%i);
  69.                
  70.                 if(!%b[%d])
  71.                 {
  72.                     %b[%d] = 1;
  73.                     %c[%b] = %d;
  74.                     %b++;
  75.                 }
  76.             }
  77.         }
  78.     }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement