Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using NewWidget.Core;
- using NewWidget.Core.Native;
- using NewWidget.Core.Scripting;
- public class Script : ScriptBase {
- const int Wind_Walk = 1204;
- const int Paagrian_Haste = 1282;
- const int Improved_Movement = 1504;
- const int Chant_of_Movement = 1535;
- const int Wind_Walk_Potion_b = 2034;
- const int Song_of_Wind = 268;
- int[] SpeedBuffs = new int[] {Wind_Walk, Paagrian_Haste, Improved_Movement, Chant_of_Movement, Wind_Walk_Potion_b, Song_of_Wind};
- const bool log = false;
- const string ScriptName = "Anti-Fear";
- public override void OnStart() {
- base.OnStart();
- CreateTimer(250, () => Me.IsAffraid, DispelBuffs);
- }
- void DispelBuffs(){
- foreach(int id in SpeedBuffs){
- var buff = Me.Buffs.FindById(id);
- if(buff != null){
- cl(string.Format("Dispel {0}", buff.Name));
- Client.Dispel(buff);
- }
- }
- }
- void cl(string str){
- if(log) Console.WriteLine(string.Format("[{0}] {1}", ScriptName, str));
- }
- int TimeNow(){
- return Environment.TickCount;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement