Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Disable Login on start up of TreeBot

Joined
Feb 21, 2016
Messages
60
Hey,

I'm quite new to the bot programming though I have some experience in C# using Unity3D.
Can't seem to figure out where to call
GameEvents.Universal.LOGIN_HANDLER.disable();

Wanted to test the FXML UI first but it logs in when the bot is instantiated which is unnecessary as I wait for the user to fill in the settings first.

main class extends TreeBot and implements EmbeddableUI
though if I call the disable in the creation of the instance of the main class getting the exception
java.lang.UnsupportedOperationException: Only a Thread within a bot's ThreadGroup may eavesdrop on the game client.

So I guess that's not the right place, so I tried it in the RootBranch the TreeBranch that waits till the user has pressed run.
But even there In the initialization of RootBranch I couldn't call the disable method.
So... where to actually call this method to disable it?
 
I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
Hey,

I'm quite new to the bot programming though I have some experience in C# using Unity3D.
Can't seem to figure out where to call
GameEvents.Universal.LOGIN_HANDLER.disable();

Wanted to test the FXML UI first but it logs in when the bot is instantiated which is unnecessary as I wait for the user to fill in the settings first.

main class extends TreeBot and implements EmbeddableUI
though if I call the disable in the creation of the instance of the main class getting the exception
java.lang.UnsupportedOperationException: Only a Thread within a bot's ThreadGroup may eavesdrop on the game client.

So I guess that's not the right place, so I tried it in the RootBranch the TreeBranch that waits till the user has pressed run.
But even there In the initialization of RootBranch I couldn't call the disable method.
So... where to actually call this method to disable it?
put it in the method onStart.
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
You should really read a bit through the JDocs... If you want to do something upon start of the bot there is a method you can override which has a pretty self explanatory name...
 
put it in the method onStart.
Why are you spoonfeeding
 
I've been called a god before.
Joined
Aug 5, 2014
Messages
3,212
You should really read a bit through the JDocs... If you want to do something upon start of the bot there is a method you can override which has a pretty self explanatory name...
 

Why are you spoonfeeding
Yeah won't do it next time.
 
Joined
Feb 21, 2016
Messages
60
put it in the method onStart.

Tnx will try and find how to get the onStart going as the extension of TreeBot doesn't have onStart as an override

edit: ah found it :) seems like IntelliJ didn't give me the autocomplete to the string arguements

You should really read a bit through the JDocs... If you want to do something upon start of the bot there is a method you can override which has a pretty self explanatory name...
 

Why are you spoonfeeding

Quite fun to read through the Jdoc for GameEvents.Universal but couldn't even find anything about Login_Handler
Also not used to the documentation format. Unity documentation is a bit easier for me :p
But thanks for the tip though :) still trying to figure it out.
I guess i'll just do it on my own
 
Last edited:
Top