Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using NewWidget.Core;
  5. using NewWidget.Core.Native;
  6. using NewWidget.Core.Scripting;
  7.  
  8. public class Script : ScriptBase {
  9. const int Wind_Walk = 1204;
  10. const int Paagrian_Haste = 1282;
  11. const int Improved_Movement = 1504;
  12. const int Chant_of_Movement = 1535;
  13. const int Wind_Walk_Potion_b = 2034;
  14. const int Song_of_Wind = 268;
  15. int[] SpeedBuffs = new int[] {Wind_Walk, Paagrian_Haste, Improved_Movement, Chant_of_Movement, Wind_Walk_Potion_b, Song_of_Wind};
  16.  
  17. const bool log = false;
  18. const string ScriptName = "Anti-Fear";
  19.  
  20. public override void OnStart() {
  21. base.OnStart();
  22.  
  23. CreateTimer(250, () => Me.IsAffraid, DispelBuffs);
  24. }
  25.  
  26. void DispelBuffs(){
  27. foreach(int id in SpeedBuffs){
  28. var buff = Me.Buffs.FindById(id);
  29. if(buff != null){
  30. cl(string.Format("Dispel {0}", buff.Name));
  31. Client.Dispel(buff);
  32. }
  33. }
  34. }
  35.  
  36. void cl(string str){
  37. if(log) Console.WriteLine(string.Format("[{0}] {1}", ScriptName, str));
  38. }
  39.  
  40. int TimeNow(){
  41. return Environment.TickCount;
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement