What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Automated Bot Shut Down

wtg001

Member
Joined
Mar 25, 2010
Messages
368
Reaction score
0
Is there a way I can get the bot to shut down and close wow once my character has hit level 70 while I am afk?

Cheers
 
I wrote this for you, should work... Tried it on a level 2 char, worked as expected when it leveled!

It'll check when your character levels up what level it is, and if it is lvl X, it will close WoW for you :)

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;
using Styx.Helpers;

namespace ShutDown
{
    public class Class1 : HBPlugin
    {
        public  override string Author { get { return "Zapman"; } }
        public override Version Version { get { return new Version(1, 0, 0, 0); } }
        public override string Name { get { return "Close When X Level"; } }
        private bool hasBeenInitialized = false;

        //Settings
        private int levelToClose = 70;

        public void Initialize()
        {
            Logging.Write("Initializing Shutdown when X level");
            Styx.BotEvents.Player.OnLevelUp += new BotEvents.Player.LevelUpDelegate(Player_OnLevelUp);
        }

        public void Player_OnLevelUp(Styx.BotEvents.Player.LevelUpEventArgs arg)
        {
            Logging.Write("Character has reached a new level! Level = " + arg.NewLevel.ToString());

            if (arg.NewLevel == levelToClose)
            {
                Lua.DoString("ForceQuit()");
            }
        }

        public override void Pulse()
        {
            if (!hasBeenInitialized)
            {
                Initialize();
                hasBeenInitialized = true;
            }
        }
    }
}
 

Attachments

Last edited:
Back
Top