private static void Spellbook_OnCastSpell(Spellbook sender, SpellbookCastSpellEventArgs args)
        {
            if (!sender.Owner.IsMe)
            {
                return;
            }
            if (!Spells.Contains(args.Slot))
            {
                return;
            }
            var action = Actions.FirstOrDefault(x => x.Slot == args.Slot);

            if (action == null)
            {
                Actions.Add(new Action()
                {
                    Slot = args.Slot, Tick = Environment.TickCount
                });
                CameraControling.Spellbook_OnCastSpell(sender, args);
            }
            else
            {
                if (Environment.TickCount - action.Tick >= 200 && !Actions.Any(x => x.Slot != args.Slot && x.Tick == Environment.TickCount))
                {
                    action.Tick = Environment.TickCount;
                    CameraControling.Spellbook_OnCastSpell(sender, args);
                }
                else
                {
                    args.Process     = false;
                    SpellBlockCount += 1;
                }
            }
        }
Beispiel #2
0
 private static void Game_OnGameLoad(EventArgs args)
 {
     Config = new Menu("BadaoActionsLimiter", "BadaoActionsLimiter", true);
     Config.AddToMainMenu();
     Config.AddItem(new MenuItem("DrawSpell", "Draw Spell Block").SetValue(true));
     Config.AddItem(new MenuItem("DrawAttack", "Draw Attack Block").SetValue(true));
     Config.AddItem(new MenuItem("DrawMove", "Draw Movement Block").SetValue(true));
     Config.AddItem(new MenuItem("CameraControl", "Camera To Out-Screen Cast Position").SetValue(true));
     SpellBlock.BadaoActivate();
     AttackBlock.BadaoActivate();
     MovementBlock.BadaoActivate();
     CameraControling.BadaoActivate();
     Drawing.OnDraw += Drawing_OnDraw;
     Chat.Print("Badao Actions Limiter Loaded !");
 }
Beispiel #3
0
 private static void Game_OnGameLoad()
 {
     Config = new Menu("BadaoActionsLimiter", "BadaoActionsLimiter", true);
     Config.Attach();
     Config.Add(new MenuBool("DrawSpell", "Draw Spell Block"));
     Config.Add(new MenuBool("DrawAttack", "Draw Attack Block"));
     Config.Add(new MenuBool("DrawMove", "Draw Movement Block"));
     Config.Add(new MenuBool("CameraControl", "Camera To Out-Screen Cast Position"));
     SpellBlock.BadaoActivate();
     AttackBlock.BadaoActivate();
     MovementBlock.BadaoActivate();
     CameraControling.BadaoActivate();
     Drawing.OnDraw += Drawing_OnDraw;
     Chat.Print("Badao Actions Limiter Loaded !");
 }