Nigel Posted November 8, 2009 Posted November 8, 2009 (edited) expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> Opt('MustDeclareVars', 1) AutoPerm() Func AutoPerm() Local $defaultstatus, $status, $filemenu, $fileitem, $helpmenu, $saveitem Local $infoitem, $exititem, $recentfilesmenu, $separator1, $viewmenu Local $viewstatusitem, $okbutton, $cancelbutton, $statuslabel, $msg, $file Local $radio_1, $radio_2, $radio_3, $radio_4, $radio_5, $radio_6, $radio_7, $radio_8, $cdmenu, $cditem_1, $cditem_2 GUICreate("Auto Perm", 500, 350) Global $defaultstatus = "Ready" Global $status $filemenu = GUICtrlCreateMenu("&File") $fileitem = GUICtrlCreateMenuItem("Open", $filemenu) GUICtrlSetState(-1, $GUI_DEFBUTTON) $cdmenu = GUICtrlCreateMenu("CD-Keys") $cditem_1 = GUICtrlCreateMenuItem("Classic", $cdmenu) $cditem_2 = GUICtrlCreateMenuItem("Expansion", $cdmenu) $helpmenu = GUICtrlCreateMenu("?") $saveitem = GUICtrlCreateMenuItem("Save", $filemenu) GUICtrlSetState(-1, $GUI_DISABLE) $infoitem = GUICtrlCreateMenuItem("Info", $helpmenu) $exititem = GUICtrlCreateMenuItem("Exit", $filemenu) $recentfilesmenu = GUICtrlCreateMenu("Recent Perms", $filemenu, 1) $separator1 = GUICtrlCreateMenuItem("", $filemenu, 2) ; create a separator line $viewmenu = GUICtrlCreateMenu("View", -1, 1) ; is created before "?" menu $viewstatusitem = GUICtrlCreateMenuItem("Statusbar", $viewmenu) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlCreateCheckbox("Run in Background", 350, 20, 120, 20) GUICtrlCreateInput("Account Name", 20, 20, 120, 20) GUICtrlCreateInput("Account Password", 20, 45, 120, 20) GUICtrlCreateInput("C:\Program Files\Diablo II\Diablo II.exe", 160, 20, 120, 20) GUICtrlCreateGroup("Character Position", 15, 90, 150, 110) $radio_1 = GUICtrlCreateRadio("Position 1", 20, 110, 70, 15) $radio_2 = GUICtrlCreateRadio("Position 2", 90, 110, 70, 15) $radio_3 = GUICtrlCreateRadio("Position 3", 20, 130, 70, 15) $radio_2 = GUICtrlCreateRadio("Position 4", 90, 130, 70, 15) $radio_3 = GUICtrlCreateRadio("Position 5", 20, 150, 70, 15) $radio_2 = GUICtrlCreateRadio("Position 6", 90, 150, 70, 15) $radio_3 = GUICtrlCreateRadio("Position 7", 20, 170, 70, 15) $radio_2 = GUICtrlCreateRadio("Position 8", 90, 170, 70, 15) $okbutton = GUICtrlCreateButton("Start", 190, 275, 80, 20) GUICtrlSetState(-1, $GUI_FOCUS) $cancelbutton = GUICtrlCreateButton("Cancel", 300, 275, 70, 20) $statuslabel = GUICtrlCreateLabel("Ready", 100, 310, 300, 16, BitOR($SS_SIMPLE, $SS_SUNKEN)) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $fileitem Then $file = FileOpenDialog("Locate Game.exe", @ProgramFilesDir, "All (*.*)") If @error <> 1 Then GUICtrlCreateMenuItem($file, $recentfilesmenu) EndIf If $msg = $cditem_1 Then InputBox("Insert CD-Key", "Classic CD-Key") EndIf If $msg = $cditem_2 Then InputBox("Insert CD-Key", "Expansion CD-Key") EndIf If $msg = $viewstatusitem Then If BitAND(GUICtrlRead($viewstatusitem), $GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($viewstatusitem, $GUI_UNCHECKED) GUICtrlSetState($statuslabel, $GUI_HIDE) Else GUICtrlSetState($viewstatusitem, $GUI_CHECKED) GUICtrlSetState($statuslabel, $GUI_SHOW) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Or $msg = $exititem Then ExitLoop If $msg = $infoitem Then MsgBox(0, "Info", "Hai") WEnd GUIDelete() EndFunc The process of perming is logging in a diablo 2 character, creating a game, and leaving the character to sit for 2 hours so that it will be registered on the server. If a character is not permed, it has 11 days to become permed or logged into before it expires. The program that I am scripting is a Diablo 2 Auto Permer. I know I need a lot more work, but I was wondering if anyone could help me build it. At the moment, I am working on the "Character Position" portion of it. I am trying to make it that if you check "Position 1", it will click on the Top Left character, and so forth. If anyone could help me, that would be great :-) Also, if you have any suggestions on what I could do to improve my script that would be great :-)! Eh.. think I posted in the wrong forum :< Edited November 8, 2009 by Nigel
Valik Posted November 8, 2009 Posted November 8, 2009 Bots are against the Diablo II terms of service. I suggest you read them.
Recommended Posts