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

wrinting plugin... how to check if he is in main menu...

found nothing in the ressources of db
!ZetaDia.Me.IsInGame Would tell you that the player is not in game. I am not at home so not 100% sure on the method, but something close.
 
You can also use the Zeta.Bot.GameEvents.OnGameLeft event to know when player leaves the game and enters main menu.
 
First check ZetaDia.IsInGame.
Then to determine if your in the main menu.. use UIElement.
To get the hash of a button (i.e. Start Game) hover over it and hit alt-8 and it will print in demonbuddy.
After you got the Hash, then you can use UIElement.FromHash().
Then using the UIElement you can check using logic: uie != null && uie.IsValid && uie.IsVisible;
If it returns True.. then you will know if your in the main menu!


However if you are trying to run the Bot.. it may be better to insert a hook into [OutOfGame] treehook. By inserting a new decorator at the beginning you can do all kinds of things before demonbuddy tries to make the next game. Although this will not necessary tell you if your in the main menu, just that your not in game!
 
Back
Top