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

On Bot Start

SuperSlow

New Member
Joined
Jan 15, 2010
Messages
18
Reaction score
0
Sorry, I searched, but I am tired so I probably missed it.

How do I write a function that is executed when the "START" button is pushed(regardless of what bot:mode I am in).

I looked at
public static event Styx.BotEvents.OnBotStartDelegate OnBotStart
but I am unsure how to use this or if it is even the correct item to be looking at.
 
Quite by coincidence I went through this exercise last night.

Code:
public Faunus()
        {
            if (Me.Class != CharacterClass) return;
 
[B]            BotEvents.OnBotStarted += BotEvents_OnBotStarted;[/B]
[B]            BotEvents.OnBotStopped += BotEvents_OnBotStopped;[/B]
 
            DruidHelper.DruidSpec = (DruidType) Talents.Spec;
            OneSettings.Load(); LoadSettings();
        }
 
[B]void BotEvents_OnBotStopped(EventArgs args)[/B]
        {
            BotIsRunning = false;
        }
 
[B]void BotEvents_OnBotStarted(EventArgs args)[/B]
        {
            BotIsRunning = true;
        }
 
Last edited:
Back
Top