• Welcome to Valhalla Legends Archive.
 

Connect on Startup

Started by Yegg, August 21, 2004, 05:01 PM

Previous topic - Next topic

Yegg

Ok, Im trying to get my bot to connect as soon as the bot is opened, and I also want to be able to check a checkbox to determine if this will happen or not. Can anyone help me with the code I need to enter to make this happen?

Kp

Yes.  Create a button; on exit from the program, save whether the button was checked.  On startup, load that setting from registry/disk/wherever, and if it says the button was checked, call your connect method immediately.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

Yegg

Im not sure i really understand that, but is there a way I can make something automatically "run" when I open the bot. I cna figure out the rest on my own.

Kp

Quote from: Yegg on August 21, 2004, 06:12 PMIm not sure i really understand that, but is there a way I can make something automatically "run" when I open the bot. I cna figure out the rest on my own.

Yes.  Put it in the entry point function, which is typically main (Win32 console / Unix), or WinMain (Win32 GUI).  Alternate names are needed if you want to get Unicode native parameters.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

LordNevar

Or on Form_Load, just call your connect call and it should start the logon sequence. Or you can do what was previoulsy posted and make a button to call on when you load your bot.

A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.

l2k-Shadow

Supposing that you have Getstuff and WriteStuff functions:

In config form:


Private Sub SaveButton_Click()
Writestuff "Misc","ConnectOnStartup", YourCheckBoxName
End Sub

Private Sub Form_Load()
YourCheckBoxName = Getstuff("Misc","ConnectOnStartup")
End Sub

'Main Form
Private Sub Form_Load()
If Getstuff("Misc","ConnectOnStartup") = "1" Then
'Connect Coding Goes Here
End if
End Sub

:)
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.