rhaw
05-02-2009, 04:11
#include <GUIConstants.au3>
GUICreate("SRO FreeSlot Search v1.0.3", 240, 150)
$servery = GUICtrlCreateCombo ("Choose server:", 10,10, 110, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData($servery, "Titan (New)", "")
GUICtrlSetStyle($servery, $CBS_DROPDOWNLIST)
$size = GUICtrlCreateCombo ("Screen size:", 10,35, 110, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData($size, "800x600|1024x768|1280x1024", "")
GUICtrlSetStyle($size, $CBS_DROPDOWNLIST)
GUICtrlCreateGroup ("Credits", 10, 85, 150, 63)
GUIStartGroup()
GUICtrlCreateLabel ("Made by moczymorda", 15, 100, 130, 15)
GUICtrlCreateLabel ("www.gamerzplanet.pl", 15, 115, 110, 15)
GUICtrlCreateLabel ("Thanks to PyroHiro", 15, 130, 100, 15)
$group_1 = GUICtrlCreateGroup ("Free slots", 125, 4, 110, 50)
GUIStartGroup()
$radio_1=GUICtrlCreateRadio ("&3", 133, 20, 25, 20)
$radio_2=GUICtrlCreateRadio ("&2", 168, 20, 25, 20)
$radio_3=GUICtrlCreateRadio ("&1", 203, 20, 25, 20)
$radioval1 = 0
$radioval2 = 0
$1slot = 2499
$2slot = 2498
$3slot = 2497
$800 = 483
$600 = 396
$1280 = 717
$1024b = 669
$1024 = 602
$768 = 506
$button_1 = GUICtrlCreateButton ("S&earch", 80, 65, 80, 20)
GUISetState ()
If ProcessExists("ServerList.exe") Then
GUICtrlCreateLabel ("SRO List: ON", 165, 70, 80, 15)
Else
GUICtrlCreateLabel ("SRO List: OFF", 165, 70, 80, 15)
EndIf
If ProcessExists("sro_client.exe") Then
GUICtrlCreateLabel ("Silkroad: ON", 10, 70, 60, 15)
Else
GUICtrlCreateLabel ("Silkroad: OFF", 10, 70, 70, 15)
EndIf
While 1
sleep(50)
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $radio_1
$sloty = $3slot
Case $msg = $radio_2
$sloty = $2slot
Case $msg = $radio_3
$sloty = $1slot
Case $msg = $button_1
Look4slot()
Case $msg >= $radio_1 AND $msg <= $radio_3
$radioval1 = $msg - $radio_1
EndSelect
Wend
Func Look4slot()
While 1
$sName=GUICtrlRead($servery)
$sSize=GUICtrlRead($size)
If $sSize = "800x600" Then
$h = $800
$w = $600
ElseIf $sSize = "1024x768" Then
$h = $1024
$w = $768
ElseIf $sSize = "1280x1024" Then
$h = $1280
$w = $1024b
EndIf
$y = ControlListView("Sro Server List", "List1", 1001, "FindItem", $sName)
$x = ControlListView("Sro Server List", "List1", 1001, "GetText", $y, "2")
Sleep(500)
If $x <= $sloty Then
SoundPlay(@WindowsDir & "\media\tada.wav",0)
if ProcessExists ("SRO_Client.exe") Then
WinActivate("SRO_Client")
MouseClick("left",$h , $w, 2, 1)
Exit
EndIf
Exit
EndIf
WEnd
EndFunc
GUICreate("SRO FreeSlot Search v1.0.3", 240, 150)
$servery = GUICtrlCreateCombo ("Choose server:", 10,10, 110, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData($servery, "Titan (New)", "")
GUICtrlSetStyle($servery, $CBS_DROPDOWNLIST)
$size = GUICtrlCreateCombo ("Screen size:", 10,35, 110, 20, $CBS_DROPDOWNLIST)
GUICtrlSetData($size, "800x600|1024x768|1280x1024", "")
GUICtrlSetStyle($size, $CBS_DROPDOWNLIST)
GUICtrlCreateGroup ("Credits", 10, 85, 150, 63)
GUIStartGroup()
GUICtrlCreateLabel ("Made by moczymorda", 15, 100, 130, 15)
GUICtrlCreateLabel ("www.gamerzplanet.pl", 15, 115, 110, 15)
GUICtrlCreateLabel ("Thanks to PyroHiro", 15, 130, 100, 15)
$group_1 = GUICtrlCreateGroup ("Free slots", 125, 4, 110, 50)
GUIStartGroup()
$radio_1=GUICtrlCreateRadio ("&3", 133, 20, 25, 20)
$radio_2=GUICtrlCreateRadio ("&2", 168, 20, 25, 20)
$radio_3=GUICtrlCreateRadio ("&1", 203, 20, 25, 20)
$radioval1 = 0
$radioval2 = 0
$1slot = 2499
$2slot = 2498
$3slot = 2497
$800 = 483
$600 = 396
$1280 = 717
$1024b = 669
$1024 = 602
$768 = 506
$button_1 = GUICtrlCreateButton ("S&earch", 80, 65, 80, 20)
GUISetState ()
If ProcessExists("ServerList.exe") Then
GUICtrlCreateLabel ("SRO List: ON", 165, 70, 80, 15)
Else
GUICtrlCreateLabel ("SRO List: OFF", 165, 70, 80, 15)
EndIf
If ProcessExists("sro_client.exe") Then
GUICtrlCreateLabel ("Silkroad: ON", 10, 70, 60, 15)
Else
GUICtrlCreateLabel ("Silkroad: OFF", 10, 70, 70, 15)
EndIf
While 1
sleep(50)
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $radio_1
$sloty = $3slot
Case $msg = $radio_2
$sloty = $2slot
Case $msg = $radio_3
$sloty = $1slot
Case $msg = $button_1
Look4slot()
Case $msg >= $radio_1 AND $msg <= $radio_3
$radioval1 = $msg - $radio_1
EndSelect
Wend
Func Look4slot()
While 1
$sName=GUICtrlRead($servery)
$sSize=GUICtrlRead($size)
If $sSize = "800x600" Then
$h = $800
$w = $600
ElseIf $sSize = "1024x768" Then
$h = $1024
$w = $768
ElseIf $sSize = "1280x1024" Then
$h = $1280
$w = $1024b
EndIf
$y = ControlListView("Sro Server List", "List1", 1001, "FindItem", $sName)
$x = ControlListView("Sro Server List", "List1", 1001, "GetText", $y, "2")
Sleep(500)
If $x <= $sloty Then
SoundPlay(@WindowsDir & "\media\tada.wav",0)
if ProcessExists ("SRO_Client.exe") Then
WinActivate("SRO_Client")
MouseClick("left",$h , $w, 2, 1)
Exit
EndIf
Exit
EndIf
WEnd
EndFunc