[Release/Guide] Bot GUI Shell

01/27/2011 04:47 Snoweł#1
[Only registered and activated users can see links. Click Here To Register...]

Mabinogi Bot Shell v1.0
Hey all, I made this a while ago and never got around to releasing it but anyways; it is just a basic GUI that you can add your own code too, or you can always examine the functions as there are comments on nearly every line.

Code:
[url=http://www.autoitscript.com/autoit3/docs/keywords.htm##include][color=#F000FF][i]#include[/i][/color][/url] [color=#9999CC]<GuiConstantsEx.au3>[/color] [color=#009933][i];This include is required for basic GUI functions to be accessible.[/i][/color]
[url=http://www.autoitscript.com/autoit3/docs/keywords.htm##include][color=#F000FF][i]#include[/i][/color][/url] [color=#9999CC]<EditConstants.au3>[/color] [color=#009933][i];This include is necessary for the modification and loading of Edit Boxes.[/i][/color]

[color=#000000]GUI[/color][color=#FF0000]([/color][color=#FF0000])[/color] [color=#009933][i];This will Initialize the "GUI" Function.[/i][/color]

[url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Func][color=#0000FF]Func[/color][/url] [color=#000000]GUI[/color][color=#FF0000]([/color][color=#FF0000])[/color] [color=#009933][i];This is the "GUI" function.    [/i][/color]
    [color=#AA0000]$LootFomors[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [color=#009933][i];Creates the variable "$LootFomors" and gives it a value of zero.[/i][/color]
    [color=#AA0000]$LootingGold[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [color=#009933][i];This creates a new variable; "$LootingGold", the variable's value wil be set to zero.[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICreate.htm][color=#000090][i]GUICreate[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Mabinogi Bot v1.0"[/color][color=#FF0000],[/color] [color=#AC00A9][i]366[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]258[/i][/color][color=#FF0000])[/color] [color=#009933][i];This creates a window with the name "Mabinogi Bot v1.0", the window is 366 pixels wide and 258 pixels tall.[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateGroup.htm][color=#000090][i]GUICtrlCreateGroup[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Bot Settings"[/color][color=#FF0000],[/color] [color=#AC00A9][i]19[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]12[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]329[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]178[/i][/color][color=#FF0000])[/color] [color=#009933][i];This creates a Group Box (X Position, Y Position, Width, Height) with the name "Bot Settings".[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm][color=#000090][i]GUICtrlCreateLabel[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Attack Delay:"[/color][color=#FF0000],[/color] [color=#AC00A9][i]35[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]39[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]65[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates the text; "Attack Delay:" (Text, X Position, Y Position, Width).[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm][color=#000090][i]GUICtrlCreateLabel[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Milliseconds"[/color][color=#FF0000],[/color] [color=#AC00A9][i]148[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]39[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]65[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates a label with the text; "Milliseconds" (Text, X Position, Y Position, Width).[/i][/color]
    [color=#AA0000]$AttackDelay[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateEdit.htm][color=#000090][i]GUICtrlCreateEdit[/i][/color][/url] [color=#FF0000]([/color] [color=#9999CC]"6000"[/color][color=#FF0000],[/color] [color=#AC00A9][i]104[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]35[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]40[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]21[/i][/color][color=#FF0000],[/color] [color=#AA0000]$ES_NUMBER[/color] [color=#FF0000])[/color] [color=#009933][i];This creates an Edit box containing "6000", whatever is entered in this edit box will become the new value of the variable "$AttackDelay". The Parameters are: (Default Value, X Position, Y Position, Width, Height, Style), "$ES_NUMBER" makes the edit box only accept numbers. Styles are completely optional.[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm][color=#000090][i]GUICtrlCreateLabel[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Looting Delay:"[/color][color=#FF0000],[/color] [color=#AC00A9][i]35[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]70[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]71[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates the text; "Looting Delay:" (Text, X Position, Y Position, Width).[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm][color=#000090][i]GUICtrlCreateLabel[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Milliseconds"[/color][color=#FF0000],[/color] [color=#AC00A9][i]151[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]70[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]65[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates a label with the text; "Milliseconds" (Text, X Position, Y Position, Width).[/i][/color]
    [color=#AA0000]$LootingDelay[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateEdit.htm][color=#000090][i]GUICtrlCreateEdit[/i][/color][/url] [color=#FF0000]([/color] [color=#9999CC]"2000"[/color][color=#FF0000],[/color] [color=#AC00A9][i]107[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]65[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]40[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]21[/i][/color][color=#FF0000],[/color] [color=#AA0000]$ES_NUMBER[/color] [color=#FF0000])[/color] [color=#009933][i];This creates an Edit box containing "2000". The Parameters are: (Default Value, X Position, Y Position, Width, Height, Style), "$ES_NUMBER" restricts the entered characters to numbers only. Styles are optional.[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm][color=#000090][i]GUICtrlCreateLabel[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Skill Hotkey to Use:"[/color][color=#FF0000],[/color] [color=#AC00A9][i]35[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]100[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]99[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates the text; "Skill Hotkey to Use:" (Text, X Position, Y Position, Width).[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateLabel.htm][color=#000090][i]GUICtrlCreateLabel[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"(Optional)"[/color][color=#FF0000],[/color] [color=#AC00A9][i]170[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]100[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]65[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates a label containing the text; "(Optional)". Parameters: (Text, X Position, Y Position, Width).[/i][/color]
    [color=#AA0000]$SkillHotkey[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateEdit.htm][color=#000090][i]GUICtrlCreateEdit[/i][/color][/url] [color=#FF0000]([/color] [color=#9999CC]"[color=#FF8800]{F1}[/color]"[/color][color=#FF0000],[/color] [color=#AC00A9][i]132[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]95[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]34[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]21[/i][/color][color=#FF0000],[/color] [color=#AA0000]$ES_UPPERCASE[/color][color=#FF0000])[/color] [color=#009933][i];Forms an Edit box containing "{F1}". The Parameters are: (Default Value, X Position, Y Position, Width, Height, Style) styles are optional.[/i][/color]
    [color=#AA0000]$RecommendedSettings[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateButton.htm][color=#000090][i]GUICtrlCreateButton[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Recommended Settings"[/color][color=#FF0000],[/color] [color=#AC00A9][i]24[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]168[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]125[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]18[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates a button containing the text; "Recommended Settings".[/i][/color]
    [color=#AA0000]$StartBot[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateButton.htm][color=#000090][i]GUICtrlCreateButton[/i][/color][/url] [color=#FF0000]([/color][color=#9999CC]"Start Bot"[/color][color=#FF0000],[/color] [color=#AC00A9][i]136[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]203[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]96[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]35[/i][/color][color=#FF0000])[/color] [color=#009933][i];This will create a buton captioned "Start Bot", the parameters for creating buttons is as follows: ("Text", X Position, Y Position, Width, Height, Style, exStyle) styles are completely optional.[/i][/color]
    [color=#AA0000]$LootFomorScrolls[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateCheckbox.htm][color=#000090][i]GUICtrlCreateCheckBox[/i][/color][/url][color=#FF0000]([/color][color=#9999CC]"&Loot Fomor Scrolls"[/color][color=#FF0000],[/color] [color=#AC00A9][i]66[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]139[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]112[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]21[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates a Checkbox named "Loot Fomor Scrolls", the parameters for Checkboxes are: ("Caption", X Position, Y Position, Width, Height, Style, exStyle) styles are always optional.[/i][/color]
    [color=#AA0000]$LootGold[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateCheckbox.htm][color=#000090][i]GUICtrlCreateCheckBox[/i][/color][/url][color=#FF0000]([/color][color=#9999CC]"&Loot Gold"[/color][color=#FF0000],[/color] [color=#AC00A9][i]218[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]139[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]80[/i][/color][color=#FF0000],[/color] [color=#AC00A9][i]21[/i][/color][color=#FF0000])[/color] [color=#009933][i];Creates a Checkbox labeled "Loot Gold" at the coordinates 218, 139, it is 80 pixels wide and 21 pixels in height.[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/functions/GUISetState.htm][color=#000090][i]GUISetState[/i][/color][/url] [color=#FF0000]([/color][color=#FF0000])[/color] [color=#009933][i];This causes the GUI to remain active during script execution.[/i][/color]
    
    [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#While][color=#0000FF]While[/color][/url] [color=#AC00A9][i]1[/i][/color] [color=#009933][i];Begins a "While" loop.[/i][/color]
        [color=#AA0000]$GUIStatus[/color] [color=#FF0000]=[/color] [url=http://www.autoitscript.com/autoit3/docs/functions/GUIGetMsg.htm][color=#000090][i]GUIGetMsg[/i][/color][/url] [color=#FF0000]([/color][color=#FF0000])[/color] [color=#009933][i];This determines what is happening with our GUI, it is necessary to include this if you intend on having any working buttons. When a button is clicked, the name of the button will be recorded in the "$GUIStatus" variable.[/i][/color]
        [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Select][color=#0000FF]Select[/color][/url] [color=#009933][i];Starts the "Select" function, the select function compares multiple variables and executes specified code depending on the results of the comparison.[/i][/color]
            [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Case][color=#0000FF]Case[/color][/url] [color=#AA0000]$GUIStatus[/color] [color=#FF0000]=[/color] [color=#AA0000]$GUI_EVENT_CLOSE[/color] [color=#009933][i];If "GUIStatus" is equivalent to "$GUI_EVENT_CLOSE" the GUI will be disabled and script execution will end.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Exit][color=#0000FF]Exit[/color][/url] [color=#009933][i];The "Exit" function stops script execution and exits the script. You can place code above "Exit" in order to specify actions that will occur before exiting the bot.[/i][/color]
            
            [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Case][color=#0000FF]Case[/color][/url] [color=#AA0000]$GUIStatus[/color] [color=#FF0000]=[/color] [color=#AA0000]$RecommendedSettings[/color] [color=#009933][i];This means that if "$GUIStatus" contains "$RecommendedSettings" someone clicked the "Recommended Settings" button.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetData.htm][color=#000090][i]GUICtrlSetData[/i][/color][/url][color=#FF0000]([/color][color=#AA0000]$AttackDelay[/color][color=#FF0000],[/color] [color=#AC00A9][i]6000[/i][/color][color=#FF0000])[/color] [color=#009933][i];Resets the attack delay to 6000 milliseconds, the recommended time.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetData.htm][color=#000090][i]GUICtrlSetData[/i][/color][/url][color=#FF0000]([/color][color=#AA0000]$LootingDelay[/color][color=#FF0000],[/color] [color=#AC00A9][i]2000[/i][/color][color=#FF0000])[/color] [color=#009933][i];Resets the looting delay to 2000 milliseconds, the recommended delay time for looting.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetData.htm][color=#000090][i]GUICtrlSetData[/i][/color][/url][color=#FF0000]([/color][color=#AA0000]$SkillHotkey[/color][color=#FF0000],[/color] [color=#9999CC]"[color=#FF8800]{F1}[/color]"[/color][color=#FF0000])[/color] [color=#009933][i];This will change the contents of "$SkillHotkey" to "{F1}", resetting the "Skill Hotky to Use" to the recommended value; "{F1}".[/i][/color]
            
            [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Case][color=#0000FF]Case[/color][/url] [color=#AA0000]$GUIStatus[/color] [color=#FF0000]=[/color] [color=#AA0000]$LootFomorScrolls[/color] [color=#009933][i];This will trigger a series of events if someone clicks the "Loot Fomor Scrolls" Checkbox.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#If][color=#0000FF]If[/color][/url] [color=#AA0000]$LootFomors[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Then][color=#0000FF]Then[/color][/url] [color=#009933][i];If "$LootFomors" is equivalent to 0 that means that the "Loot Fomor Scrolls" Checkbox has not been checked and that we should not loot, however IT WAS JUST CLICKED.[/i][/color]
                    [color=#AA0000]$LootFomors[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]1[/i][/color] [color=#009933][i];Since someone has just clicked the "Loot Fomor Scrolls" Checkbox we must set the variable; "$LootFomors" to 1 so that we know we should loot Fomor Scrolls. 1 means yes, loot, 0 means do not loot Fomor Scrolls.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Else][color=#0000FF]Else[/color][/url] [color=#009933][i];The code "If $LootFomors = 0" determines whether the "Loot Fomor Scrolls" checkbox has been clicked or not (1 = Clicked 0 = Not Clicked), if the variable; "$LootFomors" is not equal to zero the code below this line will execute. If "$LootFomors" contains a one, the code above will be executed instead.[/i][/color]
                    [color=#AA0000]$LootFomors[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [color=#009933][i];We know that Fomor Looting is active but someone clicked the Checkbox again, we must set "$LootFomors" to 0 so that we know to stop looting fomors.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf][color=#0000FF]EndIf[/color][/url] [color=#009933][i];Ends the "If Then" Check that determines whether the "Loot Fomor Scrolls" Checkbox has been checked or not.[/i][/color]
            
            [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Case][color=#0000FF]Case[/color][/url] [color=#AA0000]$GUIStatus[/color] [color=#FF0000]=[/color] [color=#AA0000]$LootGold[/color] [color=#009933][i];This shall execute a series of specified events if someone clicks the "Loot Gold" Checkbox, in this case we are checking the "Loot Gold" checkbox's status and determining whether it has been checked or not.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#If][color=#0000FF]If[/color][/url] [color=#AA0000]$LootGold[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Then][color=#0000FF]Then[/color][/url] [color=#009933][i];If the data in "$LootGold" is equal to 0 that means that the "Loot Gold" Checkbox has not been checked and that we should not loot, it was just clicked though, so the next line of code will execute.[/i][/color]
                    [color=#AA0000]$LootGold[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]1[/i][/color] [color=#009933][i];The "Loot Gold" checkbox has been checked, this sets "$LootGold" to 1 so that we know we should loot Gold during bot execution.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Else][color=#0000FF]Else[/color][/url] [color=#009933][i];If "$LootGold" does not contain "0" then the line immediately below will be executed, rather than the line of code directly above this line.[/i][/color]
                    [color=#AA0000]$LootGold[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [color=#009933][i];Gold looting has been activated, however, someone clicked the Checkbox again and we must set "$LootGold" to 0 so that we know to stop looting gold.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf][color=#0000FF]EndIf[/color][/url] [color=#009933][i];This will end the "If Then" function that determines whether or not the "Loot Gold" Checkbox has been checked.[/i][/color]
            [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Case][color=#0000FF]Case[/color][/url] [color=#AA0000]$GUIStatus[/color] [color=#FF0000]=[/color] [color=#AA0000]$StartBot[/color] [color=#009933][i];This determines whether or not the "Start Bot" button has been clicked.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#If][color=#0000FF]If[/color][/url] [color=#AA0000]$LootGold[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Then][color=#0000FF]Then[/color][/url] [color=#009933][i];If the data in "$LootGold" is equal to 0 that means that the "Loot Gold" Checkbox has not been checked and that we should not loot gold during bot execution.[/i][/color]
                    [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#If][color=#0000FF]If[/color][/url] [color=#AA0000]$LootFomors[/color] [color=#FF0000]=[/color] [color=#AC00A9][i]0[/i][/color] [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Then][color=#0000FF]Then[/color][/url] [color=#009933][i];Fomor looting is disabled, we can only attack.[/i][/color]
                        
                    [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Else][color=#0000FF]Else[/color][/url] [color=#009933][i];The code "If $LootFomors = 0" determines whether the "Loot Fomor Scrolls" checkbox has been clicked or not (1 = Clicked 0 = Not Clicked), if the variable; "$LootFomors" is not equal to zero the code below this line will execute. If "$LootFomors" contains a one, the code above will be executed instead.[/i][/color]
                        
                    [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf][color=#0000FF]EndIf[/color][/url] [color=#009933][i];Ends the "If Then" Check that determines whether the "Loot Fomor Scrolls" feature has been activated.[/i][/color]
                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#Else][color=#0000FF]Else[/color][/url] [color=#009933][i];If the "$LootGold" variable is not equal to "0" then Gold looting is enabled and the line immediately below will be executed, rather than the line of code directly above this line.[/i][/color]

                [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#EndIf][color=#0000FF]EndIf[/color][/url] [color=#009933][i];This will end the "If Then" function that determines whether or not we should loot gold.[/i][/color]
        [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#EndSelect][color=#0000FF]EndSelect[/color][/url] [color=#009933][i];This ends the "Select" function (executed on line twenty eight).[/i][/color]
    [url=http://www.autoitscript.com/autoit3/docs/keywords.htm#WEnd][color=#0000FF]WEnd[/color][/url] [color=#009933][i];The "WEnd" function Ends a "While" loop, in this case it is ending the "While 1" loop which is initialized on line twenty six.[/i][/color]
[url=http://www.autoitscript.com/autoit3/docs/keywords.htm#EndFunc][color=#0000FF]EndFunc[/color][/url]
01/28/2011 03:50 xlogic#2
Thanks. Haven't used it, but at least someones contributing to this community. x_o
04/19/2011 01:09 skate4love8#3
where do i put the code in?
04/19/2011 01:33 kotarou3#4
From what I see
Code:
Case $GUIStatus = $StartBot ;This determines whether or not the "Start Bot" button has been clicked.
                If $LootGold = 0 Then ;If the data in "$LootGold" is equal to 0 that means that the "Loot Gold" Checkbox has not been checked and that we should not loot gold during bot execution.
                    If $LootFomors = 0 Then ;Fomor looting is disabled, we can only attack.

                        >>Here<<

                    Else ;The code "If $LootFomors = 0" determines whether the "Loot Fomor Scrolls" checkbox has been clicked or not (1 = Clicked 0 = Not Clicked), if the variable; "$LootFomors" is not equal to zero the code below this line will execute. If "$LootFomors" contains a one, the code above will be executed instead.

                        >>Here<<

                    EndIf ;Ends the "If Then" Check that determines whether the "Loot Fomor Scrolls" feature has been activated.
                Else ;If the "$LootGold" variable is not equal to "0" then Gold looting is enabled and the line immediately below will be executed, rather than the line of code directly above this line.

                    >>And Here<<

                EndIf ;This will end the "If Then" function that determines whether or not we should loot gold.
04/19/2011 01:59 cr3stf4ll3n#5
Ok, well I've been working on a little side project for a couple of weeks now, and I've been having a pretty large error with this. I'm omitting the actual code (not that it's that great) to focus on an error. Whenever I run this bot, the values $AimTime and $Loop become 10 and 4. I've implemented a Msg Function to show you what I mean, run the bot yourself and see if you can help me out a bit. My goal is to make $AimTime and $Loop the values entered into the GUICtrlCreateGroup.

Edit: If I take out the GUICtrlCreateGroup's, then the earlier declaration prevails, and they become 315 and 1850.

Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $AimTime = 1850, $Loop = 315
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("River Killer", 316, 231, 729, 541)
$GroupBox1 = GUICtrlCreateGroup("", 8, 1, 297, 193)
$Loop = GUICtrlCreateEdit("315", 176, 64, 89, 21, $ES_NUMBER)
$Label2 = GUICtrlCreateLabel("Loop Number", 64, 64, 68, 25)
$Label3 = GUICtrlCreateLabel("Aiming Time (ms)", 64, 104, 68, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25)
$AimTime = GUICtrlCreateEdit("1850", 176, 104, 89, 21, $ES_NUMBER)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("+!x", "ExitScript")
$i = 1

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
MsgBox(0, $Loop, $AimTime)
		Case $Button2
			Exit (0)


	EndSwitch
WEnd


Func ExitScript()
	Exit (0)
EndFunc   ;==>ExitScript
04/19/2011 02:45 Ministry#6
what is this made with
04/19/2011 04:19 Snoweł#7
Quote:
Originally Posted by Ministry View Post
what is this made with
I made this with AutoIt v3.

Quote:
Originally Posted by cr3stf4ll3n View Post
Ok, well I've been working on a little side project for a couple of weeks now, and I've been having a pretty large error with this. I'm omitting the actual code (not that it's that great) to focus on an error. Whenever I run this bot, the values $AimTime and $Loop become 10 and 4. I've implemented a Msg Function to show you what I mean, run the bot yourself and see if you can help me out a bit. My goal is to make $AimTime and $Loop the values entered into the GUICtrlCreateGroup.

Edit: If I take out the GUICtrlCreateGroup's, then the earlier declaration prevails, and they become 315 and 1850.

I might take a look at it later.
04/20/2011 08:23 shaggyze#8
@cr3stf4ll3n
you need to use GUICtrlRead like:
MsgBox(0, GUICtrlRead($Loop), GUICtrlRead($AimTime))
04/20/2011 09:20 cr3stf4ll3n#9
Thanks, that solved the problem for me. Happy botting everyone.
07/22/2011 17:46 anthonyjr2#10
How can I associate what I put in the delay boxes to what is really in the code?
07/22/2011 18:55 Celestial Link#11
/request for lock. Frickin' necro. =w=;
07/22/2011 21:47 anthonyjr2#12
I decided instead of posting a new thread. that this one was still here, and in an earlier post there was another 3 month necro -_-
07/23/2011 08:31 kotarou3#13
Quote:
Originally Posted by Celestial Link View Post
/request for lock. Frickin' necro. =w=;
There isn't a necro rule on these forums
07/25/2011 10:49 adam_j#14
Request lock because OP supposedly quit this forum for the... Uh, how many times IS it now?


Btw:

$LootingDelay = GUICtrlCreateEdit (otherstuff)

$LootingDelay = what is in the box at that location.
Therefore, that variable contains what you entered for looting delay, so "Sleep($LootingDelay)" is probably the answer you're looking for.


AutoIt is quite simple if you just read it carefully.
07/27/2011 19:44 anthonyjr2#15
Quote:
Originally Posted by adam_j View Post
Request lock because OP supposedly quit this forum for the... Uh, how many times IS it now?


Btw:

$LootingDelay = GUICtrlCreateEdit (otherstuff)

$LootingDelay = what is in the box at that location.
Therefore, that variable contains what you entered for looting delay, so "Sleep($LootingDelay)" is probably the answer you're looking for.


AutoIt is quite simple if you just read it carefully.

Yeah, I have realized it is pretty easy to understand, its just I was way overthinking how to do this. Thanks for the help adam.