Jump to content
Sign in to follow this  
ecstatic

Gui Load and Save, loading and deleting the additional characters

Recommended Posts

ecstatic

Ok guys heres my code to start with.

Case $Save  
        $Skill1 = IniRead("Config.ini", "Skills", "Precast1","{" & GUICtrlRead($Precast1) & "}")
            $Skill2 =IniRead("Config.ini", "Skills", "Precast2", "{" & GUICtrlRead($Precast2) & "}")
            $Skill3 = IniRead("Config.ini", "Skills", "Cta1", GUICtrlRead($Cta1))
            $skill4 = IniRead("Config.ini", "Skills", "Cta2", GUICtrlRead($Cta2))
            $skill5 = IniRead("Config.ini", "Skills", "TeleportKey", GUICtrlRead($Teleport))
            $skill6 = IniRead("Config.ini", "Skills", "SorcMain", GUICtrlRead($SorcMain))
            $skill7 = IniRead("Config.ini", "Skills", "Concentrationkey", GUICtrlRead($Concentration))
            $skill8 = IniRead("Config.ini", "Skills", "Redemptionkey", GUICtrlRead($Redemption))

and

Case $load
GUICtrlCreateInput($skill1, 304, 64, 25, 21)
GUICtrlCreateInput($skill2, 304, 88, 25, 21)
GUICtrlCreateInput($skill3, 296, 144, 25, 21)
GUICtrlCreateInput($skill4, 296, 168, 25, 21)
GUICtrlCreateInput($skill5, 456, 104, 25, 21)
GUICtrlCreateInput($skill6, 456, 128, 25, 21)
GUICtrlCreateInput($skill7, 456, 152, 25, 21)
GUICtrlCreateInput($skill8, 456, 176, 25, 21)

When a user hits the save button, it will save their key name with { } and the key inside the {}'s which is Completely necessary.

however, when the user hits the LOAD Button, i need it to delete the {}'s.

How would i go about doing that?

Share this post


Link to post
Share on other sites
ecstatic

#Region;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=D2Ai.ico
#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Documents and Settings\admin\My Documents\BackUp\Backup.kxf
$form1_1 = GUICreate("Configuration tool", 894, 274, -1, -1)
$OkButton = GUICtrlCreateButton("Ok", 8, 8, 51, 25, 0)
$About = GUICtrlCreateButton("About", 64, 8, 51, 25, 0)
$Load = GUICtrlCreateButton("Load", 120, 8, 51, 25, 0)
$Label1 = GUICtrlCreateLabel("Account Name:", 8, 56, 78, 17)
$Account = GUICtrlCreateInput("", 88, 56, 121, 21)
$Label2 = GUICtrlCreateLabel("Account Pass:", 8, 88, 73, 17)
$Password = GUICtrlCreateInput("", 88, 88, 121, 21)
$Label3 = GUICtrlCreateLabel("Home Channel:", 8, 120, 77, 17)
$Chanel = GUICtrlCreateInput("", 88, 120, 121, 21)
$Label4 = GUICtrlCreateLabel("Channel Msg:", 8, 152, 69, 17)
$Away = GUICtrlCreateInput("Hey guys im using D2 AI, a free pindle/shenk/elderitch bot available at d2ai.org", 88, 152, 121, 21)
$Label5 = GUICtrlCreateLabel("Difficulty", 8, 184, 44, 17)
$Difficulut = GUICtrlCreateInput("Hell", 88, 184, 121, 21)
$CharSlot = GUICtrlCreateCombo("", 88, 216, 33, 25)
GUICtrlSetData(-1, "1|2|3|4|5|6")
$Label19 = GUICtrlCreateLabel("Character Slot:", 8, 216, 74, 17)
$Label6 = GUICtrlCreateLabel("1  2", 144, 216, 31, 17)
$Label7 = GUICtrlCreateLabel("3  4", 144, 232, 31, 17)
$Label8 = GUICtrlCreateLabel("5  6", 144, 248, 31, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Character Related Settings", 240, 8, 281, 257)
$Label9 = GUICtrlCreateLabel("Character Class", 248, 32, 78, 17)
$Class = GUICtrlCreateCombo("", 336, 32, 145, 25)
GUICtrlSetData(-1, "Lightning Sorc|Hammerdin")
$LabelA = GUICtrlCreateLabel("Precast 1", 248, 64, 49, 17)
$Precast1 = GUICtrlCreateInput("F4", 304, 64, 25, 21)
$Label10 = GUICtrlCreateLabel("Precast 2", 248, 88, 49, 17)
$Precast2 = GUICtrlCreateInput("F5", 304, 88, 25, 21)
$Cta = GUICtrlCreateCheckbox("Precast CTA", 248, 120, 97, 17)
$Label11 = GUICtrlCreateLabel("CTA 1", 248, 144, 34, 17)
$Cta1 = GUICtrlCreateInput("F6", 296, 144, 25, 21)
$Label12 = GUICtrlCreateLabel("CTA 2", 248, 168, 34, 17)
$Cta2 = GUICtrlCreateInput("F7", 296, 168, 25, 21)
$Group3 = GUICtrlCreateGroup("Skills", 344, 80, 161, 145)
$Label13 = GUICtrlCreateLabel("Teleport Key", 352, 104, 64, 17)
$Teleport = GUICtrlCreateInput("F1", 456, 104, 25, 21)
$Label14 = GUICtrlCreateLabel("Sorc: Main Skill:", 352, 128, 80, 17)
$SorcMain = GUICtrlCreateInput("F3", 456, 128, 25, 21)
$Label15 = GUICtrlCreateLabel("Pally: Concentration", 352, 152, 98, 17)
$Concentration = GUICtrlCreateInput("F3", 456, 152, 25, 21)
$Label16 = GUICtrlCreateLabel("Pally: Redemption", 352, 176, 89, 17)
$Redemption = GUICtrlCreateInput("F7", 456, 176, 25, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Advanced Settings", 536, 16, 345, 201)
$Advertise = GUICtrlCreateCheckbox("Advertise Bot", 544, 40, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Merc = GUICtrlCreateCheckbox("Use Merc", 544, 56, 97, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
$Shenk = GUICtrlCreateCheckbox("Shenk", 544, 72, 97, 17)
$Elderitch = GUICtrlCreateCheckbox("Elderitch", 544, 88, 97, 17)
$Pindle = GUICtrlCreateCheckbox("Pindle", 544, 104, 97, 17)
$Rares = GUICtrlCreateCheckbox("Pickup Rares", 544, 152, 97, 17)
$Uniques = GUICtrlCreateCheckbox("Pickup Uniques", 544, 168, 97, 17)
$Label17 = GUICtrlCreateLabel("Pick-It", 544, 136, 34, 17)
$Chitter = GUICtrlCreateCheckbox("Chitter in lobby", 680, 32, 97, 17)
$Label18 = GUICtrlCreateLabel("MSG1", 640, 64, 34, 17)
$Msg1 = GUICtrlCreateInput("Hey whats up guys", 680, 64, 193, 21)
$Label20 = GUICtrlCreateLabel("MSG2", 640, 96, 34, 17)
$MSG2 = GUICtrlCreateInput("Helllooooo..?", 680, 96, 193, 21)
$Label21 = GUICtrlCreateLabel("MSG3", 640, 128, 34, 17)
$MSG3 = GUICtrlCreateInput("Ok well im ganna go now", 680, 128, 193, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


Func _IsChecked($control)
    Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc  ;==>_IsChecked
While 1
    $msg = GUIGetMsg();
    Switch $msg
        Case $OkButton
            #Region --- CodeWizard generated code Start ---
;InputBox features: Title=Yes, Prompt=Yes, Default Text=Yes, Mandatory
            IniWrite("Config.ini", "Account Info", "Username", GUICtrlRead($Account))
            IniWrite("Config.ini", "Account Info", "Password", GUICtrlRead($Password))
            IniWrite("Config.ini", "Account Info", "CharLocation", GUICtrlRead($CharSlot))
            IniWrite("Config.ini", "ChannelSequence", "Channel", GUICtrlRead($Chanel))
            IniWrite("Config.ini", "ChannelSequence", "Away", GUICtrlRead($Away))
            IniWrite("Config.ini", "Account Info", "Difficulty", GUICtrlRead($Difficulut))
            IniWrite("Config.ini", "Account Info", "UseMerc", GUICtrlRead($Merc))


If _IsChecked($pindle) Then
    IniWrite("Config.ini", "Account Info", "Pindle", "Yes")
Else
    IniWrite("Config.ini", "Account Info", "Pindle", "No")
EndIf

If _IsChecked($Shenk) Then
    IniWrite("Config.ini", "Account Info", "Shenk", "Yes")
Else
    IniWrite("Config.ini", "Account Info", "Shenk", "No")
EndIf

If _IsChecked($Chitter) Then
    Iniwrite("Config.ini", "Chitter", "Chitter", "Yes")
    IniWrite("Config.ini", "Chitter", "MSG1", GUICtrlRead($MSG1))
        IniWrite("Config.ini", "Chitter", "MSG2", GUICtrlRead($MSG2))
            IniWrite("Config.ini", "Chitter", "MSG3", GUICtrlRead($MSG3))
        Else
                Iniwrite("Config.ini", "Chitter", "Chitter", "No")
EndIf

If _IsChecked($Elderitch) Then
    IniWrite("Config.ini", "Account Info", "Elderitch", "Yes")
Else
    IniWrite("Config.ini", "Account Info", "Elderitch", "No")
EndIf
If _IsChecked($Advertise) Then
    IniWrite("Config.ini", "Other Info", "Advertise", "Yes")
Else
    IniWrite("Config.ini", "Other Info", "Advertise", "No")
EndIf
If _IsChecked($Cta) Then
    IniWrite("Config.ini", "Skills", "UseCta", "True")
Else
    IniWrite("Config.ini", "Skills", "UseCta", "False")
EndIf

If _IsChecked($uniques) Then
    IniWrite("Config.ini", "Pickit", "PickupUniques", "Yes")
Else
    IniWrite("Config.ini", "Pickit", "PickupUniques", "No")
EndIf
If _IsChecked($rares) Then
    IniWrite("Config.ini", "Pickit", "PickupRares", "Yes")
Else
    IniWrite("Config.ini", "Pickit", "PickupRares", "No")
EndIf


            IniWrite("Config.ini", "Skills", "Class", GUICtrlRead($Class))
            IniWrite("Config.ini", "Delays", "PickitDelay", "2000")
            IniWrite("Config.ini", "Delays", "WalkMoveDelay", "2500")
            IniWrite("Config.ini", "Delays", "TeleportDelay", "400")
            Iniwrite("Config.ini", "Delays", "FailedGameWaitDelay","80000")
            IniWrite("Config.ini", "Skills", "Precast1","{" & GUICtrlRead($Precast1) & "}")
            IniWrite("Config.ini", "Skills", "Precast2", "{" & GUICtrlRead($Precast2) & "}")
            IniWrite("Config.ini", "Skills", "Cta1", "{" & GUICtrlRead($Cta1) & "}")
            IniWrite("Config.ini", "Skills", "Cta2", "{" & GUICtrlRead($Cta2) & "}")
            IniWrite("Config.ini", "Skills", "TeleportKey", "{" & GUICtrlRead($Teleport) & "}")
            IniWrite("Config.ini", "Skills", "SorcMain", "{" & GUICtrlRead($SorcMain) & "}")
            IniWrite("Config.ini", "Skills", "Concentrationkey", "{" & GUICtrlRead($Concentration) & "}")
            IniWrite("Config.ini", "Skills", "Redemptionkey", "{" & GUICtrlRead($Redemption) & "}")
            iniWrite("Config.ini", "Main Info", "D2path", "C:\Program FIles\Diablo II")         
            iniWrite("Config.ini", "Main Info", "D2file", "Diablo II.exe")          
            iniWrite("Config.ini", "Main Info", "D2Params", "-w -skiptobnet -direct -txt")          
            iniWrite("Config.ini", "Delays", "GameJoinDelay", "3000")           
            iniWrite("Config.ini", "Delays", "KeyDelay", "1000")            
            iniWrite("Config.ini", "Delays", "ClickDelay", "1000")  
            iniWrite("Config.ini", "Delays", "StartDelay", "3000")  
            iniWrite("Config.ini", "Delays", "CharScreenDelay", "1000") 
            iniWrite("Config.ini", "Delays", "ChatScreenDelay", "3000") 
            iniWrite("Config.ini", "Delays", "EndGameDelay", "1000")    
            iniWrite("Config.ini", "Delays", "GameLoginDelay", "1000")  
            iniWrite("Config.ini", "Delays", "CastDelay", "100")    
            iniWrite("Config.ini", "Delays", "WalkDelay", "2500")   
            iniWrite("Config.ini", "Delays", "RealmDownAvoidDelay", "180000")   
            iniWrite("Config.ini", "Delays", "Pickitdelay", "250")  
            iniWrite("Config.ini", "Delays", "FailedGameWaitDelay", "30000")    
            iniWrite("Config.ini", "Delays", "RealmDownAvoidDelay", "180000")   
            iniWrite("Config.ini", "Delays", "Advertise", "Yes")    
            
            #Region --- CodeWizard generated code Start ---
ToolTip("Saved! Program will exit in 4 seconds",Default,Default,"Configuration",1,1)
Sleep(4000)
Exit

#EndRegion --- CodeWizard generated code End ---
            
        Case $About
            Msgbox(0, "About", "Made by AiMan, Support @ D2Ai.org Made for D2 AI")
            
        Case $Load
            $Class2 = IniRead("Config.ini", "Skills", "Class", GUICtrlRead($Class))
            $Delay1 = IniRead("Config.ini", "Delays", "PickitDelay", "2000")
            $Delay2 = IniRead("Config.ini", "Delays", "WalkMoveDelay", "2500")
            $Delay3 = IniRead("Config.ini", "Delays", "TeleportDelay", "400")
            $Delay4 = IniRead("Config.ini", "Delays", "FailedGameWaitDelay","80000")
            $Skill1 = IniRead("Config.ini", "Skills", "Precast1", GUICtrlRead($Precast1))
            $Skill2 =IniRead("Config.ini", "Skills", "Precast2",  GUICtrlRead($Precast2))
            $Skill3 = IniRead("Config.ini", "Skills", "Cta1", GUICtrlRead($Cta1))
            $skill4 = IniRead("Config.ini", "Skills", "Cta2", GUICtrlRead($Cta2))
            $skill5 = IniRead("Config.ini", "Skills", "TeleportKey", GUICtrlRead($Teleport))
            $skill6 = IniRead("Config.ini", "Skills", "SorcMain", GUICtrlRead($SorcMain))
            $skill7 = IniRead("Config.ini", "Skills", "Concentrationkey", GUICtrlRead($Concentration))
            $skill8 = IniRead("Config.ini", "Skills", "Redemptionkey", GUICtrlRead($Redemption))
            $Maininfo1 = IniRead("Config.ini", "Main Info", "D2path", "C:\Program FIles\Diablo II")         
            $maininfo2 = IniRead("Config.ini", "Main Info", "D2file", "Diablo II.exe")          
            $Maininfo3 = IniRead("Config.ini", "Main Info", "D2Params", "-w -skiptobnet -direct -txt")          
            $delay5 = IniRead("Config.ini", "Delays", "GameJoinDelay", "3000")          
            $delay6 = IniRead("Config.ini", "Delays", "KeyDelay", "1000")           
            $delay7 = IniRead("Config.ini", "Delays", "ClickDelay", "1000") 
            $delay8 = IniRead("Config.ini", "Delays", "StartDelay", "3000") 
            $delay9 = IniRead("Config.ini", "Delays", "CharScreenDelay", "1000")    
            $delay10 = IniRead("Config.ini", "Delays", "ChatScreenDelay", "3000")   
            $delay11 = IniRead("Config.ini", "Delays", "EndGameDelay", "1000")  
            $delay12 = IniRead("Config.ini", "Delays", "GameLoginDelay", "1000")    
            $delay13 = IniRead("Config.ini", "Delays", "CastDelay", "100")  
            $delay14 = IniRead("Config.ini", "Delays", "WalkDelay", "2500") 
            $delay15 = IniRead("Config.ini", "Delays", "RealmDownAvoidDelay", "180000") 
            $delay16 = IniRead("Config.ini", "Delays", "Pickitdelay", "250")    
            $delay17 = IniRead("Config.ini", "Delays", "FailedGameWaitDelay", "30000")  
            $delay18 = IniRead("Config.ini", "Delays", "RealmDownAvoidDelay", "180000") 
            $delay19 = IniRead("Config.ini", "Delays", "Advertise", "Yes")      
            $AccountInfo1 = IniRead("Config.ini", "Account Info", "Pindle", "Yes")
            $AccountInfo2 = IniRead("Config.ini", "Account Info", "Shenk", "No")
            $Chitter1 = IniRead("Config.ini", "Chitter", "Chitter", "Yes")
            $Chitter2 = IniRead("Config.ini", "Chitter", "MSG1", "ERROR")
            $Chitter3 = IniRead("Config.ini", "Chitter", "MSG2", "ERROR")
            $Chitter4 = IniRead("Config.ini", "Chitter", "MSG3", "ERROR")
            $accountinfo3 = IniRead("Config.ini", "Account Info", "Elderitch", "No")
            $otherinfo = IniRead("Config.ini", "Other Info", "Advertise", "Yes")
            $skills8 = IniRead("Config.ini", "Skills", "UseCta", "True")
            $pickit1 = IniRead("Config.ini", "Pickit", "PickupUniques", "Yes")
            $pickit2 = IniRead("Config.ini", "Pickit", "PickupRares", "Yes")
        ;InputBox features: Title=Yes, Prompt=Yes, Default Text=Yes, Mandatory
            $username2 = IniRead("Config.ini", "Account Info", "Username", GUICtrlRead($Account))
            $Password2 = IniRead("Config.ini", "Account Info", "Password", GUICtrlRead($Password))
            $charlocation2 = IniRead("Config.ini", "Account Info", "CharLocation", GUICtrlRead($CharSlot))
            $channel2 = IniRead("Config.ini", "ChannelSequence", "Channel", GUICtrlRead($Chanel))
            $Away2 = IniRead("Config.ini", "ChannelSequence", "Away", GUICtrlRead($Away))
            $difficulty2 = IniRead("Config.ini", "Account Info", "Difficulty", GUICtrlRead($Difficulut))
            $merc2 = IniRead("Config.ini", "Account Info", "UseMerc", GUICtrlRead($Merc))
            ToolTip("Settings loaded!",Default,Default,"Configuration",1,1)

GUICtrlCreateInput($username2, 88, 56, 121, 21)
GUICtrlCreateInput($Password2, 88, 88, 121, 21)
GUICtrlCreateInput($channel2, 88, 120, 121, 21)
GUICtrlCreateInput($away2, 88, 152, 121, 21)
GUICtrlCreateInput($difficulty2, 88, 184, 121, 21)
GUICtrlCreateCombo($charlocation2, 88, 216, 33, 25)
GUICtrlCreateCombo($class2, 336, 32, 145, 25)
GUICtrlCreateInput($skill1, 304, 64, 25, 21)
GUICtrlCreateInput($skill2, 304, 88, 25, 21)
If $skills8 = "Yes" Then
$Cta = GUICtrlCreateCheckbox("Precast CTA", 248, 120, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
Endif
GUICtrlCreateInput($skill3, 296, 144, 25, 21)
GUICtrlCreateInput($skill4, 296, 168, 25, 21)
GUICtrlCreateInput($skill5, 456, 104, 25, 21)
GUICtrlCreateInput($skill6, 456, 128, 25, 21)
GUICtrlCreateInput($skill7, 456, 152, 25, 21)
If $delay19 = "Yes" Then
$Advertise = GUICtrlCreateCheckbox("Advertise Bot", 544, 40, 97, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
Endif
If $merc = "Yes" Then
$Merc = GUICtrlCreateCheckbox("Use Merc", 544, 56, 97, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
Endif
If $AccountInfo2 = "Yes" Then
    $Shenk = GUICtrlCreateCheckbox("Shenk", 544, 72, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
Endif
If $AccountInfo3 = "Yes" Then
$Elderitch = GUICtrlCreateCheckbox("Elderitch", 544, 88, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
Endif
If $AccountInfo1 = "Yes" Then
    $Pindle = GUICtrlCreateCheckbox("Pindle", 544, 104, 97, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    Endif
If $pickit2 = "Yes" then
$Rares = GUICtrlCreateCheckbox("Pickup Rares", 544, 152, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
Endif
If $pickit1 = "Yes" Then
    $Uniques = GUICtrlCreateCheckbox("Pickup Uniques", 544, 168, 97, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    Endif
If $chitter1 = "Yes" Then
    $Chitter99 = GUICtrlCreateCheckbox("Chitter in lobby", 680, 32, 97, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
Endif
GUICtrlCreateInput($Chitter2, 680, 64, 193, 21)
GUICtrlCreateInput($Chitter3, 680, 96, 193, 21)
GUICtrlCreateInput($Chitter4, 680, 128, 193, 21)
            Case $GUI_EVENT_CLOSE
Exit

                EndSwitch
WEnd

Share this post


Link to post
Share on other sites
smashly

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $Ini = @ScriptDir & "\Config.ini"

$form1_1 = GUICreate("Configuration tool", 894, 274, -1, -1)
$OkButton = GUICtrlCreateButton("Ok", 8, 8, 51, 25, 0)
$About = GUICtrlCreateButton("About", 64, 8, 51, 25, 0)
$Load = GUICtrlCreateButton("Load", 120, 8, 51, 25, 0)
$Label1 = GUICtrlCreateLabel("Account Name:", 8, 56, 78, 17)
$Account = GUICtrlCreateInput("", 88, 56, 121, 21)
$Label2 = GUICtrlCreateLabel("Account Pass:", 8, 88, 73, 17)
$Password = GUICtrlCreateInput("", 88, 88, 121, 21)
$Label3 = GUICtrlCreateLabel("Home Channel:", 8, 120, 77, 17)
$Chanel = GUICtrlCreateInput("", 88, 120, 121, 21)
$Label4 = GUICtrlCreateLabel("Channel Msg:", 8, 152, 69, 17)
$Away = GUICtrlCreateInput("Hey guys im using D2 AI, a free pindle/shenk/elderitch bot available at d2ai.org", 88, 152, 121, 21)
$Label5 = GUICtrlCreateLabel("Difficulty", 8, 184, 44, 17)
$Difficulut = GUICtrlCreateInput("Hell", 88, 184, 121, 21)
$CharSlot = GUICtrlCreateCombo("", 88, 216, 33, 25)
GUICtrlSetData(-1, "1|2|3|4|5|6")
$Label19 = GUICtrlCreateLabel("Character Slot:", 8, 216, 74, 17)
$Label6 = GUICtrlCreateLabel("1     2 3     4 5     6", 144, 216, 31, 50, $SS_CENTER)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Character Related Settings", 240, 8, 281, 257)
$Label9 = GUICtrlCreateLabel("Character Class", 248, 32, 78, 17)
$Class = GUICtrlCreateCombo("", 336, 32, 145, 25)
GUICtrlSetData(-1, "Lightning Sorc|Hammerdin")
$LabelA = GUICtrlCreateLabel("Precast 1", 248, 64, 49, 17)
$Precast1 = GUICtrlCreateInput("F4", 304, 64, 25, 21)
$Label10 = GUICtrlCreateLabel("Precast 2", 248, 88, 49, 17)
$Precast2 = GUICtrlCreateInput("F5", 304, 88, 25, 21)
$Cta = GUICtrlCreateCheckbox("Precast CTA", 248, 120, 97, 17)
$Label11 = GUICtrlCreateLabel("CTA 1", 248, 144, 34, 17)
$Cta1 = GUICtrlCreateInput("F6", 296, 144, 25, 21)
$Label12 = GUICtrlCreateLabel("CTA 2", 248, 168, 34, 17)
$Cta2 = GUICtrlCreateInput("F7", 296, 168, 25, 21)
$Group3 = GUICtrlCreateGroup("Skills", 344, 80, 161, 145)
$Label13 = GUICtrlCreateLabel("Teleport Key", 352, 104, 64, 17)
$Teleport = GUICtrlCreateInput("F1", 456, 104, 25, 21)
$Label14 = GUICtrlCreateLabel("Sorc: Main Skill:", 352, 128, 80, 17)
$SorcMain = GUICtrlCreateInput("F3", 456, 128, 25, 21)
$Label15 = GUICtrlCreateLabel("Pally: Concentration", 352, 152, 98, 17)
$Concentration = GUICtrlCreateInput("F3", 456, 152, 25, 21)
$Label16 = GUICtrlCreateLabel("Pally: Redemption", 352, 176, 89, 17)
$Redemption = GUICtrlCreateInput("F7", 456, 176, 25, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Advanced Settings", 536, 16, 345, 201)
$Advertise = GUICtrlCreateCheckbox("Advertise Bot", 544, 40, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Merc = GUICtrlCreateCheckbox("Use Merc", 544, 56, 97, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
$Shenk = GUICtrlCreateCheckbox("Shenk", 544, 72, 97, 17)
$Elderitch = GUICtrlCreateCheckbox("Elderitch", 544, 88, 97, 17)
$Pindle = GUICtrlCreateCheckbox("Pindle", 544, 104, 97, 17)
$Rares = GUICtrlCreateCheckbox("Pickup Rares", 544, 152, 97, 17)
$Uniques = GUICtrlCreateCheckbox("Pickup Uniques", 544, 168, 97, 17)
$Label17 = GUICtrlCreateLabel("Pick-It", 544, 136, 34, 17)
$Chitter = GUICtrlCreateCheckbox("Chitter in lobby", 680, 32, 97, 17)
$Label18 = GUICtrlCreateLabel("MSG1", 640, 64, 34, 17)
$Msg1 = GUICtrlCreateInput("Hey whats up guys", 680, 64, 193, 21)
$Label20 = GUICtrlCreateLabel("MSG2", 640, 96, 34, 17)
$MSG2 = GUICtrlCreateInput("Helllooooo..?", 680, 96, 193, 21)
$Label21 = GUICtrlCreateLabel("MSG3", 640, 128, 34, 17)
$MSG3 = GUICtrlCreateInput("Ok well im ganna go now", 680, 128, 193, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)

Load()

While 1
    $msg = GUIGetMsg();
    Switch $msg
        Case $OkButton

            ;InputBox features: Title=Yes, Prompt=Yes, Default Text=Yes, Mandatory
            IniWrite($Ini, "Account Info", "Username", GUICtrlRead($Account))
            IniWrite($Ini, "Account Info", "Password", GUICtrlRead($Password))
            IniWrite($Ini, "Account Info", "CharLocation", GUICtrlRead($CharSlot))
            IniWrite($Ini, "ChannelSequence", "Channel", GUICtrlRead($Chanel))
            IniWrite($Ini, "ChannelSequence", "Away", GUICtrlRead($Away))
            IniWrite($Ini, "Account Info", "Difficulty", GUICtrlRead($Difficulut))
            IniWrite($Ini, "Account Info", "UseMerc", GUICtrlRead($Merc))

            If _IsChecked($pindle) Then
                IniWrite($Ini, "Account Info", "Pindle", "Yes")
            Else
               IniWrite($Ini, "Account Info", "Pindle", "No")
            EndIf

            If _IsChecked($Shenk) Then
                IniWrite($Ini, "Account Info", "Shenk", "Yes")
            Else
                IniWrite($Ini, "Account Info", "Shenk", "No")
            EndIf

            If _IsChecked($Chitter) Then
                Iniwrite($Ini, "Chitter", "Chitter", "Yes")
                IniWrite($Ini, "Chitter", "MSG1", GUICtrlRead($MSG1))
                IniWrite($Ini, "Chitter", "MSG2", GUICtrlRead($MSG2))
                IniWrite($Ini, "Chitter", "MSG3", GUICtrlRead($MSG3))
            Else
                Iniwrite($Ini, "Chitter", "Chitter", "No")
            EndIf

            If _IsChecked($Elderitch) Then
                IniWrite($Ini, "Account Info", "Elderitch", "Yes")
            Else
                IniWrite($Ini, "Account Info", "Elderitch", "No")
            EndIf
            
            If _IsChecked($Advertise) Then
                IniWrite($Ini, "Other Info", "Advertise", "Yes")
            Else
                IniWrite($Ini, "Other Info", "Advertise", "No")
            EndIf
            
            If _IsChecked($Cta) Then
                IniWrite($Ini, "Skills", "UseCta", "True")
            Else
                IniWrite($Ini, "Skills", "UseCta", "False")
            EndIf

            If _IsChecked($uniques) Then
                IniWrite($Ini, "Pickit", "PickupUniques", "Yes")
            Else
                IniWrite($Ini, "Pickit", "PickupUniques", "No")
            EndIf
            
            If _IsChecked($rares) Then
                IniWrite($Ini, "Pickit", "PickupRares", "Yes")
            Else
                IniWrite($Ini, "Pickit", "PickupRares", "No")
            EndIf

            IniWrite($Ini, "Skills", "Class", GUICtrlRead($Class))
            IniWrite($Ini, "Delays", "PickitDelay", "2000")
            IniWrite($Ini, "Delays", "WalkMoveDelay", "2500")
            IniWrite($Ini, "Delays", "TeleportDelay", "400")
            Iniwrite($Ini, "Delays", "FailedGameWaitDelay","80000")
            IniWrite($Ini, "Skills", "Precast1","{" & GUICtrlRead($Precast1) & "}")
            IniWrite($Ini, "Skills", "Precast2", "{" & GUICtrlRead($Precast2) & "}")
            IniWrite($Ini, "Skills", "Cta1", "{" & GUICtrlRead($Cta1) & "}")
            IniWrite($Ini, "Skills", "Cta2", "{" & GUICtrlRead($Cta2) & "}")
            IniWrite($Ini, "Skills", "TeleportKey", "{" & GUICtrlRead($Teleport) & "}")
            IniWrite($Ini, "Skills", "SorcMain", "{" & GUICtrlRead($SorcMain) & "}")
            IniWrite($Ini, "Skills", "Concentrationkey", "{" & GUICtrlRead($Concentration) & "}")
            IniWrite($Ini, "Skills", "Redemptionkey", "{" & GUICtrlRead($Redemption) & "}")
            iniWrite($Ini, "Main Info", "D2path", "C:\Program FIles\Diablo II")            
            iniWrite($Ini, "Main Info", "D2file", "Diablo II.exe")            
            iniWrite($Ini, "Main Info", "D2Params", "-w -skiptobnet -direct -txt")            
            iniWrite($Ini, "Delays", "GameJoinDelay", "3000")            
            iniWrite($Ini, "Delays", "KeyDelay", "1000")            
            iniWrite($Ini, "Delays", "ClickDelay", "1000")    
            iniWrite($Ini, "Delays", "StartDelay", "3000")    
            iniWrite($Ini, "Delays", "CharScreenDelay", "1000")    
            iniWrite($Ini, "Delays", "ChatScreenDelay", "3000")    
            iniWrite($Ini, "Delays", "EndGameDelay", "1000")    
            iniWrite($Ini, "Delays", "GameLoginDelay", "1000")    
            iniWrite($Ini, "Delays", "CastDelay", "100")    
            iniWrite($Ini, "Delays", "WalkDelay", "2500")    
            iniWrite($Ini, "Delays", "RealmDownAvoidDelay", "180000")    
            iniWrite($Ini, "Delays", "Pickitdelay", "250")    
            iniWrite($Ini, "Delays", "FailedGameWaitDelay", "30000")    
            iniWrite($Ini, "Delays", "RealmDownAvoidDelay", "180000")    
            iniWrite($Ini, "Delays", "Advertise", "Yes")    
            
            ToolTip("Saved! Program will exit in 4 seconds",Default,Default,"Configuration",1,1)
            Sleep(4000)
            Exit

        Case $About
            Msgbox(0, "About", "Made by AiMan, Support @ D2Ai.org Made for D2 AI")
        Case $Load
            Load()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Func Load()
    If Not FileExists($Ini) Then Return -1
    $Class2 = IniRead($Ini, "Skills", "Class", GUICtrlRead($Class))
    $Delay1 = IniRead($Ini, "Delays", "PickitDelay", "2000")
    $Delay2 = IniRead($Ini, "Delays", "WalkMoveDelay", "2500")
    $Delay3 = IniRead($Ini, "Delays", "TeleportDelay", "400")
    $Delay4 = IniRead($Ini, "Delays", "FailedGameWaitDelay","80000")
    $Skill1 = IniRead($Ini, "Skills", "Precast1", GUICtrlRead($Precast1))
    $Skill2 =IniRead($Ini, "Skills", "Precast2",  GUICtrlRead($Precast2))
    $Skill3 = IniRead($Ini, "Skills", "Cta1", GUICtrlRead($Cta1))
    $skill4 = IniRead($Ini, "Skills", "Cta2", GUICtrlRead($Cta2))
    $skill5 = IniRead($Ini, "Skills", "TeleportKey", GUICtrlRead($Teleport))
    $skill6 = IniRead($Ini, "Skills", "SorcMain", GUICtrlRead($SorcMain))
    $skill7 = IniRead($Ini, "Skills", "Concentrationkey", GUICtrlRead($Concentration))
    $skill8 = IniRead($Ini, "Skills", "Redemptionkey", GUICtrlRead($Redemption))
    $Maininfo1 = IniRead($Ini, "Main Info", "D2path", "C:\Program FIles\Diablo II")            
    $maininfo2 = IniRead($Ini, "Main Info", "D2file", "Diablo II.exe")            
    $Maininfo3 = IniRead($Ini, "Main Info", "D2Params", "-w -skiptobnet -direct -txt")            
    $delay5 = IniRead($Ini, "Delays", "GameJoinDelay", "3000")            
    $delay6 = IniRead($Ini, "Delays", "KeyDelay", "1000")            
    $delay7 = IniRead($Ini, "Delays", "ClickDelay", "1000")    
    $delay8 = IniRead($Ini, "Delays", "StartDelay", "3000")    
    $delay9 = IniRead($Ini, "Delays", "CharScreenDelay", "1000")    
    $delay10 = IniRead($Ini, "Delays", "ChatScreenDelay", "3000")    
    $delay11 = IniRead($Ini, "Delays", "EndGameDelay", "1000")    
    $delay12 = IniRead($Ini, "Delays", "GameLoginDelay", "1000")    
    $delay13 = IniRead($Ini, "Delays", "CastDelay", "100")    
    $delay14 = IniRead($Ini, "Delays", "WalkDelay", "2500")    
    $delay15 = IniRead($Ini, "Delays", "RealmDownAvoidDelay", "180000")    
    $delay16 = IniRead($Ini, "Delays", "Pickitdelay", "250")    
    $delay17 = IniRead($Ini, "Delays", "FailedGameWaitDelay", "30000")    
    $delay18 = IniRead($Ini, "Delays", "RealmDownAvoidDelay", "180000")    
    $delay19 = IniRead($Ini, "Delays", "Advertise", "Yes")        
    $AccountInfo1 = IniRead($Ini, "Account Info", "Pindle", "Yes")
    $AccountInfo2 = IniRead($Ini, "Account Info", "Shenk", "No")
    $Chitter1 = IniRead($Ini, "Chitter", "Chitter", "Yes")
    $Chitter2 = IniRead($Ini, "Chitter", "MSG1", GUICtrlRead($MSG1))
    $Chitter3 = IniRead($Ini, "Chitter", "MSG2", GUICtrlRead($MSG2))
    $Chitter4 = IniRead($Ini, "Chitter", "MSG3", GUICtrlRead($MSG3))
    $accountinfo3 = IniRead($Ini, "Account Info", "Elderitch", "No")
    $otherinfo = IniRead($Ini, "Other Info", "Advertise", "Yes")
    $skills8 = IniRead($Ini, "Skills", "UseCta", "True")
    $pickit1 = IniRead($Ini, "Pickit", "PickupUniques", "Yes")
    $pickit2 = IniRead($Ini, "Pickit", "PickupRares", "Yes")
    ;InputBox features: Title=Yes, Prompt=Yes, Default Text=Yes, Mandatory
    $username2 = IniRead($Ini, "Account Info", "Username", GUICtrlRead($Account))
    $Password2 = IniRead($Ini, "Account Info", "Password", GUICtrlRead($Password))
    $charlocation2 = IniRead($Ini, "Account Info", "CharLocation", GUICtrlRead($CharSlot))
    $channel2 = IniRead($Ini, "ChannelSequence", "Channel", GUICtrlRead($Chanel))
    $Away2 = IniRead($Ini, "ChannelSequence", "Away", GUICtrlRead($Away))
    $difficulty2 = IniRead($Ini, "Account Info", "Difficulty", GUICtrlRead($Difficulut))
    $merc2 = IniRead($Ini, "Account Info", "UseMerc", GUICtrlRead($Merc))
    ToolTip("Settings loaded!",Default,Default,"Configuration",1,1)
    GUICtrlSetData($Account, $username2)
    GUICtrlSetData($Password, $Password2)
    GUICtrlSetData($Chanel, $channel2)
    GUICtrlSetData($away, $away2)
    GUICtrlSetData($Difficulut, $difficulty2)
    GUICtrlSetData($CharSlot, $charlocation2)
    GUICtrlSetData($Class, $class2)
    GUICtrlSetData($Precast1, StringRegExpReplace($skill1, "({|})", ""))
    GUICtrlSetData($Precast2, StringRegExpReplace($skill2, "({|})", ""))
    If $skills8 = "Yes" Then GUICtrlSetState($Cta, $GUI_CHECKED)
    GUICtrlSetData($Cta1, StringRegExpReplace($skill3, "({|})", ""))
    GUICtrlSetData($Cta2, StringRegExpReplace($skill4, "({|})", ""))
    GUICtrlSetData($Teleport, StringRegExpReplace($skill5, "({|})", ""))
    GUICtrlSetData($SorcMain, StringRegExpReplace($skill6, "({|})", ""))
    GUICtrlSetData($Concentration, StringRegExpReplace($skill7, "({|})", ""))
    If $delay19 = "Yes" Then GUICtrlSetState($Advertise, $GUI_CHECKED)
    If $merc = "Yes" Then GUICtrlSetState($Merc, $GUI_CHECKED)
    If $AccountInfo2 = "Yes" Then GUICtrlSetState($Shenk, $GUI_CHECKED)
    If $AccountInfo3 = "Yes" Then GUICtrlSetState($Elderitch, $GUI_CHECKED)
    If $AccountInfo1 = "Yes" Then GUICtrlSetState($Pindle, $GUI_CHECKED)
    If $pickit2 = "Yes" Then GUICtrlSetState($Rares, $GUI_CHECKED)
    If $pickit1 = "Yes" Then GUICtrlSetState($Uniques, $GUI_CHECKED)
    If $chitter1 = "Yes" Then GUICtrlSetState($Chitter, $GUI_CHECKED)
    GUICtrlSetData($Msg1, $Chitter2)
    GUICtrlSetData($Msg2, $Chitter3)
    GUICtrlSetData($Msg3, $Chitter4)    
EndFunc

Func _IsChecked($control)
    Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc  ;==>_IsChecked

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.