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

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Automated Bot Shut Down

wtg001

Member
Joined
Mar 25, 2010
Messages
368
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