Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo
void print_hello_world() {
PrintF("Hello World.");
}
void on_hk_1() {
print_hello_world();
}
VOID ShowDialog() {
// Create a dialog.
HWND hDialog = CreateDialog(
NULL, // No owner.
"my bot (c)", // Window title.
90, 120, 320, 300, // Position and size.
"" ); // No function for handling messages this time.
if ( hDialog == NULL ) { return; }
// Enumerate the control ID’s. 0 is not a valid control ID, so start at 1.
enum {
CTRL_BUTTON_HERO = 1,
CTRL_BUTTON_SKILL,
CTRL_BUTTON_FLAGS1,
CTRL_BUTTON_FLAGS2,
CTRL_BUTTON_MMAP,
CTRL_BUTTON_CLOSE,
CTRL_BUTTON_DEMO,
CTRL_BUTTON_SHOWF,
CTRL_BUTTON_ONCE,
CTRL_BUTTON_REPEAT,
CTRL_BUTTON_FULL,
CTRL_BUTTON_GO,
CTRL_CHECK,
CTRL_CHECK_TEST,
CTRL_CHECK_DEBUG,
CTRL_CHECK_CUSTOMER,
CTRL_EDIT,
};
// Add a button to it.
if ( !AddButton( hDialog,
20, 10, 75, 23,
CTRL_BUTTON_HERO, "Select HeroS",
"HeroButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
20, 35, 75, 23,
CTRL_BUTTON_SKILL, "Select skills",
"SkillButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
20, 60, 75, 23,
CTRL_BUTTON_FLAGS1, "Flags 1",
"Flags1ButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
20, 85, 75, 23,
CTRL_BUTTON_FLAGS2, "Flags 2",
"Flags2ButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
20, 115, 75, 23,
CTRL_BUTTON_MMAP, "MissionMap",
"MissionButtonProc" ) ) { return; }
// Add a button to it.
// Our function to handle the Close button.
if ( !AddButton( hDialog,
20, 230, 75, 23,
CTRL_BUTTON_CLOSE, "Close",
"CLOSEButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
110, 10, 75, 23,
CTRL_BUTTON_DEMO, "+demo",
"DEMOButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
110, 35, 75, 23,
CTRL_BUTTON_SHOWF, "+ShowF",
"ShowFactionButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
110, 75, 75, 23,
CTRL_BUTTON_ONCE, "+Once",
"DISCOVERButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
110, 105, 75, 23,
CTRL_BUTTON_REPEAT, "+Repeat",
"MARKButtonProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
110, 135, 75, 23,
CTRL_BUTTON_FULL, "+FullF",
"VIEW_MARKButtonProc" ) ) { return; }
// Add a check to it.
if ( !AddCheck( hDialog,
195, 10, 75, 16,
CTRL_CHECK_TEST, "Test",
"TestProc" ) ) { return; }
// Add a check to it.
if ( !AddCheck( hDialog,
195, 30, 75, 16,
CTRL_CHECK_DEBUG, "Debug",
"DebugProc" ) ) { return; }
// Add a check to it.
if ( !AddCheck( hDialog,
195, 51, 75, 16,
CTRL_CHECK_CUSTOMER, "Customer",
"CustomerProc" ) ) { return; }
// Add a button to it.
if ( !AddButton( hDialog,
195, 75, 75, 23,
CTRL_BUTTON_GO, "+Go",
"for_real" ) ) { return; }
if ( !AddStatic( hDialog,
200, 115, 75, 13,
0, "Mezzo b0t v1.3 (c)" ) ) { return; }
//
// Trying to get all the handles into the global variables, instead of local to a function.
//
botcontrolpanelWND = hDialog;
}
Torero wrote:I need to write a very smart bot for this mmorpg I am playing,
if there is no main, how does it respond to events and do things I want it to do?
mezzo wrote:there is no main.
* ctrl+k for the hotkey menu (or just look under tools)
* click new
* select the key you want to bind it to
* change the option 'funtion' to "scriptfunction'
* in parm 1 box, add the number of the hotkey (so for on_hk_1 put 1 in that box)
and that's it..
(I think the reason there is no main, is cuz the main is internal to LSS and MHS and that main is a routine that polls for hotkeys.)
Users browsing this forum: No registered users and 0 guests