[Tool]Sbot Manager-sort your Sbot-Clients

07/11/2009 19:52 fawkes#106
i wanted to update the coode a bit ... and now it doesnt upload the .htm files (i was editing the HTML output code ... )
it isnt uploading enything ... included the style.css
can smb help me with that ?
07/14/2009 22:12 affgane123#107
###

NEW Version FOUND 2.27

[Only registered and activated users can see links. Click Here To Register...]

and try s3crets new tool sbot chat manager !!!! (more infos in first post)
07/21/2009 23:28 S3cret#108
Wasn't at home for longer time, so the new version took a bit.
Here you can see the progress of the new [Only registered and activated users can see links. Click Here To Register...]
07/22/2009 23:44 affgane123#109
New Sbot found :)


v. 2.28
###############
[Only registered and activated users can see links. Click Here To Register...]
07/23/2009 17:23 lacrymosa02525#110
REQUEST:

can you please add play sound feature on death ^^:handsdown:
07/25/2009 01:23 khalil1#111
can u upload it at another WS please ?
and thx
ah sry i have Questions:
i Should to register or what
cya
07/25/2009 11:13 S3cret#112
Quote:
Originally Posted by lacrymosa02525 View Post
REQUEST:

can you please add play sound feature on death ^^:handsdown:
Dunno yet, currently working on other stuff.
Quote:
Originally Posted by khalil1 View Post
can u upload it at another WS please ?
and thx
ah sry i have Questions:
i Should to register or what
cya
[Only registered and activated users can see links. Click Here To Register...]
You don't need to register anywhere.
07/29/2009 02:49 sharpie15#113
This needs an Update its not displaying the HP/MP meters or the Exp meter.
07/30/2009 11:19 rampino#114
i think this tool can be sitcked by moderators it's very useful
07/30/2009 14:11 S3cret#115
Here. This is the download for the newest version. Dunno why affgane didn't update it yet =)
07/30/2009 14:48 Adiko#116
Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Icon.ico
#AutoIt3Wrapper_outfile=SBot Manager.exe
#AutoIt3Wrapper_Res_Comment=SBot Manager by S3cret
#AutoIt3Wrapper_Res_Description=SBot Manager by S3cret
#AutoIt3Wrapper_Res_LegalCopyright=S3cret
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Run_AU3Check=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

$version = '2.29'

#Region Settings
#region - Set offsets and instances
;OFFSETS
$offset_curhp = 0x11A1AB0
$offset_maxhp = 0x11A1AA4
$offset_curmp = 0x11A1AB4
$offset_maxmp = 0x11A1AA8
$offset_curexp = 0x11A1A00

;INSTANCES
$instance_charname = 144 ;#######################
$instance_sroserverstatus = 9
$instance_botstatus = 11

$instance_level = $instance_charname + 2
$instance_gold = $instance_charname + 4
$instance_sp = $instance_charname + 6
$instance_location = $instance_charname + 8
$instance_x = $instance_charname - 5
$instance_y = $instance_charname - 3

$instance_totaltime = $instance_charname + 11
$instance_kills = $instance_charname + 13
$instance_xpgained = $instance_charname + 15
$instance_xpmin = $instance_charname + 17
$instance_xphour = $instance_charname + 19
$instance_spgained = $instance_charname + 21
$instance_spmin = $instance_charname + 23
$instance_sphour = $instance_charname + 25
$instance_died = $instance_charname + 27
$instance_itemdrops = $instance_charname + 29
$instance_goldloop = $instance_charname + 31

;Buttoninstances
$instance_goclientless = 4
$instance_starttraining = 178

$instance_stoptraining = $instance_starttraining + 1
$instance_resetstats = $instance_starttraining - 3
$instance_hideshowclient = $instance_starttraining - 1
#endregion - Set offsets and instances

$vFTPTutorialEn = "http://s3cret.s3.ohost.de/SBot%20Manager/Tutorials/FTP-TUT_en.htm"
$vFTPTutorialDe = "http://s3cret.s3.ohost.de/SBot%20Manager/Tutorials/FTP-TUT_de.htm"

Opt("GUIResizeMode", 802)
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)
Opt("GUIOnEventMode", 1)

#include <GuiListView.au3>
#include <GDIPlus.au3>
#include <Mem.au3>
#include <funcs.au3>
#include <GDIpProgress.au3>
#include <Inet.au3>

;Check for Managerversion 3.0!!!!
$manager3 = _INetGetSource("http://s3cret.s3.ohost.de/SBot%20Manager/newserver.txt")
If Not @error Then
	$manager3 = StringSplit($manager3, @CRLF)
	If $manager3[1] = 1 Then
		MsgBox(0, "Warning!", "There is a new version available, please download it immidiately!" & @CRLF & @CRLF & "Es ist eine neue Version verfügbar, bitte laden sie sie sofort herunter!.")
		ShellExecute($manager3[2])
		Exit
	EndIf
EndIf

;Updatecheck
Dim $GLanguage = 1, $startup = 1
If IniRead(@ScriptDir & "\images\configuration.ini", "Updatecheck", "CheckOnStartup", "no") = "yes"  Then
	$update = 1
	_Check4NewVersion()
Else
	$update = 0
EndIf
$startup = 0

#region - Load Options
;FTP activated? FTP = 1 -> Yes; 0 -> No
If IniRead(@ScriptDir & "\images\configuration.ini", "FTP", "UseFTP", "no") = "yes"  Then
	$ftp = 1
Else
	$ftp = 0
EndIf

$botftpserver = IniRead(@ScriptDir & "\images\configuration.ini", "FTP", "server", "")
$botftpuser = IniRead(@ScriptDir & "\images\configuration.ini", "FTP", "username", "")
$botftppw = IniRead(@ScriptDir & "\images\configuration.ini", "FTP", "passwort", "")
$botftpport = IniRead(@ScriptDir & "\images\configuration.ini", "FTP", "port", 21)
$botftpdir = IniRead(@ScriptDir & "\images\configuration.ini", "FTP", "directory", "/SBot Manager Chardata")
If $botftpdir = "0"  Then $botftpdir = "/SBot Manager Chardata"

If IniRead(@ScriptDir & "\images\configuration.ini", "General", "Language", "") = "deutsch"  Then $GLanguage = 2

If Not IsInt($botftpport) Then
	$botftpport = 21
	IniWrite(@ScriptDir & "\images\configuration.ini", "FTP", "port", 21)
EndIf
$labeldelay = IniRead(@ScriptDir & "\images\configuration.ini", "Delaytimes", "Labels", 200)
$mapdelay = IniRead(@ScriptDir & "\images\configuration.ini", "Delaytimes", "Minimap", 2000)
$ftpdelay = IniRead(@ScriptDir & "\images\configuration.ini", "Delaytimes", "FTP-Upload", 180) * 1000
$sound = IniRead(@ScriptDir & "\images\configuration.ini", "DC", "Sound", "")
$flashwhendc = IniRead(@ScriptDir & "\images\configuration.ini", "DC", "WinFlash", "no")

If $labeldelay < 200 Then $labeldelay = 200
If $mapdelay < 2000 Then $mapdelay = 2000
If $ftpdelay < 60000 Then $ftpdelay = 60000
Dim $bShutdown = False, $bForceshutdown = False
#endregion - Load Options

#region - Check for valid mapfiles
If Not FileExists(@ScriptDir & "\images\sro worldmap.jpg") Or Not FileExists(@ScriptDir & "\images\point.png") Or Not FileExists(@ScriptDir & "\images\ChinTombB1.jpg") Or Not FileExists(@ScriptDir & "\images\ChinTombB2.jpg") Or Not FileExists(@ScriptDir & "\images\ChinTombB3.jpg") Or Not FileExists(@ScriptDir & "\images\ChinTombB4.jpg") Then
	If MsgBox(4, "Attention", "To use the minimap, you need some missing pictures." & @CRLF & "Download them now?") = 6 Then
		DirCreate(@ScriptDir & "\images")
		If Not FileExists(@ScriptDir & "\images\sro worldmap.jpg") Then
			$size = InetGetSize("http://secrets.kilu.de/SBot%20Manager/map/sro%20worldmap.jpg")
			InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/sro%20worldmap.jpg", @ScriptDir & "\images\sro worldmap.jpg", 0, 1)
			While @InetGetActive = 1
				TrayTip('Downloading "sro worldmap.jpg"', Round(@InetGetBytesRead / 1024, 0) & "/" & Round($size / 1024, 0) & " KB downloaded.", 3)
				Sleep(500)
			WEnd
		EndIf
		If Not FileExists(@ScriptDir & "\images\point.png") Then
			InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/point.png", @ScriptDir & "\images\point.png", 0, 1)
			TrayTip("", 'Downloading "point.png"', 10)
			While @InetGetActive = 1
				Sleep(100)
			WEnd
		EndIf
		If Not FileExists(@ScriptDir & "\images\ChinTombB1.jpg") Then
			InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/ChinTombB1.jpg", @ScriptDir & "\images\ChinTombB1.jpg", 0, 1)
			TrayTip("", 'Downloading "ChinTombB1.jpg"', 10)
			While @InetGetActive = 1
				Sleep(100)
			WEnd
		EndIf
		If Not FileExists(@ScriptDir & "\images\ChinTombB2.jpg") Then
			InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/ChinTombB2.jpg", @ScriptDir & "\images\ChinTombB2.jpg", 0, 1)
			TrayTip("", 'Downloading "ChinTombB2.jpg"', 10)
			While @InetGetActive = 1
				Sleep(100)
			WEnd
		EndIf
		If Not FileExists(@ScriptDir & "\images\ChinTombB3.jpg") Then
			InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/ChinTombB3.jpg", @ScriptDir & "\images\ChinTombB3.jpg", 0, 1)
			TrayTip("", 'Downloading "ChinTombB3.jpg"', 10)
			While @InetGetActive = 1
				Sleep(100)
			WEnd
		EndIf
		If Not FileExists(@ScriptDir & "\images\ChinTombB4.jpg") Then
			InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/ChinTombB4.jpg", @ScriptDir & "\images\ChinTombB4.jpg", 0, 1)
			TrayTip("", 'Downloading "ChinTombB4.jpg"', 10)
			While @InetGetActive = 1
				Sleep(100)
			WEnd
		EndIf
		TrayTip("", "Downloading finished", 3)
	EndIf
EndIf
If FileExists(@ScriptDir & "\images\ChinTombB1.jpg") And FileGetSize(@ScriptDir & "\images\ChinTombB1.jpg") <> 25811 Then
	If MsgBox(4, "Attention", 'You do not have the current fileversion of "ChinTombB1.jpg".' & @CRLF & "Download it now?") = 6 Then
		InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/ChinTombB1.jpg", @ScriptDir & "\images\ChinTombB1.jpg", 0, 1)
		TrayTip("", 'Downloading "ChinTombB1.jpg"', 10)
		While @InetGetActive = 1
			Sleep(100)
		WEnd
	EndIf
EndIf
If FileExists(@ScriptDir & "\images\ChinTombB2.jpg") And FileGetSize(@ScriptDir & "\images\ChinTombB2.jpg") <> 32488 Then
	If MsgBox(4, "Attention", 'You do not have the current fileversion of "ChinTombB2.jpg".' & @CRLF & "Download it now?") = 6 Then
		InetGet("http://s3cret.s3.ohost.de/SBot%20Manager/map/ChinTombB2.jpg", @ScriptDir & "\images\ChinTombB2.jpg", 0, 1)
		TrayTip("", 'Downloading "ChinTombB2.jpg"', 10)
		While @InetGetActive = 1
			Sleep(100)
		WEnd
	EndIf
EndIf
#endregion - Check for valid mapfiles

#region - Load mapfiles
_GDIPlus_Startup()
$worldmap = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\sro worldmap.jpg")
$mappoint = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\point.png")
$maptomb1 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\ChinTombB1.jpg")
$maptomb2 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\ChinTombB2.jpg")
$maptomb3 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\ChinTombB3.jpg")
$maptomb4 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\ChinTombB4.jpg")
;$mapdhcave1 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\images\DH-Cave F1.jpg")
#endregion - Load mapfiles

#region - GUI
$width = 560
$extrawidth = 245
$gui = GUICreate("SBot Manager   v" & $version, $width + $extrawidth, 265)
GUISetBkColor(0x000000, $gui)
GUISetIcon("Street.ico")

$settings = GUICtrlCreateMenu("Settings")
GUICtrlSetBkColor(-1, 0x000000)
$ontop = GUICtrlCreateMenu("Set Manager always on top", $settings)
$ontopenable = GUICtrlCreateMenuItem("Enable", $ontop)
$ontopdisable = GUICtrlCreateMenuItem("Disable", $ontop)
$uploaddata = GUICtrlCreateMenu("Upload data to FTP", $settings)
$uploaddataenable = GUICtrlCreateMenuItem("Enable", $uploaddata)
$uploaddatadisable = GUICtrlCreateMenuItem("Disable", $uploaddata)
$shutdown = GUICtrlCreateMenu("Shutdown when all Chars are DC'ed", $settings)
$shutdownenable = GUICtrlCreateMenuItem("Enable", $shutdown)
$shutdowndisable = GUICtrlCreateMenuItem("Disable", $shutdown)
$forceshutdown = GUICtrlCreateMenuItem("Force shutdown", $shutdown)
GUICtrlCreateMenuItem("", $settings)
$generalsettings = GUICtrlCreateMenuItem("General Settings", $settings)
$check4newversion = GUICtrlCreateMenuItem("Check for a new version now", $settings)
$checksbotversion = GUICtrlCreateMenuItem("Check for the latest SBot-Version", $settings)
;##########

$ftpupload = GUICtrlCreateMenu("FTP-Upload")
$info = GUICtrlCreateMenuItem("General information", $ftpupload)
$tutorial = GUICtrlCreateMenuItem("FTP-Tutorial", $ftpupload)
$uploadstyle = GUICtrlCreateMenuItem("Upload standart style", $ftpupload)
If $ftp = 1 Then
	GUICtrlSetState($uploaddataenable, 1)
Else
	GUICtrlSetState($uploaddatadisable, 1)
EndIf
GUICtrlSetState($ontopdisable, 1)
GUICtrlSetState($shutdowndisable, 1)
;-------------------------------------------------------------------------------
;Groups
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
$groupcharlist = GUICtrlCreateGroup("SBot Charlist", 5, 5, 170, 220)
GUICtrlSetColor(-1, 0xFFFFFF)
$groupgeneral = GUICtrlCreateGroup("General", 180, 5, 194, 220)
GUICtrlSetColor(-1, 0xFFFFFF)
$groupbottingstats = GUICtrlCreateGroup("Botting stats", 379, 5, 150, 220)
GUICtrlSetColor(-1, 0xFFFFFF)
DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 7)
;-------------------------------------------------------------------------------
$sbotlist = GUICtrlCreateListView("Charname|Handle", 8, 25, 160, 165, BitOR(0x0004, 0x4000, 0x0010, 0x0008), 0x00000020)
GUICtrlSetBkColor(-1, 0x000000)
$sbotlisthandle = GUICtrlGetHandle($sbotlist)
_GUICtrlListView_SetColumnWidth($sbotlist, 0, 160)
$refresh = GUICtrlCreateButton("Refresh List", 12, 195, 73, 20)
$hideall = GUICtrlCreateButton("Hide all", 87, 195, 82, 20)
;-------------------------------------------------------------------------------
$progresshp = _ProgressCreate(190, 40, 84, 17, 0xFF0000, 0xFF0000, 0x000000, 0x000000)
$progressmp = _ProgressCreate(280, 40, 84, 17, 0x2E4FC1, 0x2E4FC1, 0x000000, 0x000000)
$progressexp = _ProgressCreate(190, 61, 174, 17, 0x32CD32, 0x32CD32, 0x000000, 0x000000)
_ProgressSetFont($progresshp, "", 9, "", 0xFFFFFF)
_ProgressSetFont($progressmp, "", 9, "", 0xFFFFFF)
_ProgressSetFont($progressexp, "", 9, "", 0xFFFFFF)
_ProgressSetText($progresshp, "")
_ProgressSetText($progressmp, "")
_ProgressSetText($progressexp, "")

GUICtrlCreateLabel("Charname:", 190, 25, "", 15)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("Level:", 190, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("SP:", 275, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("X:", 190, 95)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("Y:", 275, 95)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("Gold:", 190, 110)
GUICtrlSetColor(-1, 0xFFFFFF)
$labellocation = GUICtrlCreateLabel("Location:", 190, 125)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelsroserver = GUICtrlCreateLabel("Silkroad server status:", 190, 140)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelbotstatus = GUICtrlCreateLabel("Bot status:", 190, 155)
GUICtrlSetColor(-1, 0xFFFFFF)

$charname = GUICtrlCreateLabel("", 245, 25, 100, 15)
GUICtrlSetColor(-1, 0xFFFFFF)
$level = GUICtrlCreateLabel("", 230, 80, 30, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$sp = GUICtrlCreateLabel("", 300, 80, 70, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$x = GUICtrlCreateLabel("", 215, 95, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$y = GUICtrlCreateLabel("", 300, 95, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$gold = GUICtrlCreateLabel("", 235, 110, 100, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$location = GUICtrlCreateLabel("", 245, 125, 100, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$sroserverstatus = GUICtrlCreateLabel("", 300, 140, 66, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$botstatus = GUICtrlCreateLabel("", 245, 155, 120, 17)
GUICtrlSetColor(-1, 0xFFFFFF)

$hideshowclient = GUICtrlCreateButton("...", 188, 171, 88, 20)
$goclientless = GUICtrlCreateButton("Go clientless", 188, 195, 88, 20)
$stoptrain = GUICtrlCreateButton("Stop training", 278, 195, 88, 20)
$starttrain = GUICtrlCreateButton("Start training", 278, 171, 88, 20)
;-------------------------------------------------------------------------------
$labeltotaltime = GUICtrlCreateLabel("Total time:", 389, 30, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelkills = GUICtrlCreateLabel("Kills:", 389, 46, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelxpgained = GUICtrlCreateLabel("XP gained:", 389, 62, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelxpmin = GUICtrlCreateLabel("XP/min:", 389, 78, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelxph = GUICtrlCreateLabel("XP/h:", 389, 94, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelspgained = GUICtrlCreateLabel("SP gained:", 389, 110, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelspmin = GUICtrlCreateLabel("SP/min:", 389, 126, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labelsph = GUICtrlCreateLabel("SP/h:", 389, 142, 80)
GUICtrlSetColor(-1, 0xFFFFFF)
$labeldied = GUICtrlCreateLabel("Died:", 389, 158)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("Itemdrops:", 450, 159)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("Gold/loop:", 389, 175)
GUICtrlSetColor(-1, 0xFFFFFF)

$totaltime = GUICtrlCreateLabel("", 470, 31, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$kills = GUICtrlCreateLabel("", 470, 47, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$xpgained = GUICtrlCreateLabel("", 470, 63, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$xpmin = GUICtrlCreateLabel("", 470, 79, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$xphour = GUICtrlCreateLabel("", 470, 95, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$spgained = GUICtrlCreateLabel("", 470, 111, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$spmin = GUICtrlCreateLabel("", 470, 127, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$sphour = GUICtrlCreateLabel("", 470, 143, 50, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$died = GUICtrlCreateLabel("", 418, 159, 30, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$itemdrops = GUICtrlCreateLabel("", 500, 159, 23, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
$goldloop = GUICtrlCreateLabel("", 450, 175, 76, 17)
GUICtrlSetColor(-1, 0xFFFFFF)

$resetstats = GUICtrlCreateButton("Reset stats", 389, 195, 130, 20)
;-------------------------------------------------------------------------------
$openclosemap = GUICtrlCreateButton("=>" & @CRLF & @CRLF & "M" & @CRLF & "I" & @CRLF & "N" & @CRLF & "I" & @CRLF & "M" & @CRLF & "A" & @CRLF & "P" & @CRLF & @CRLF & "=>", 535, 10, 20, 215, 0x2000);BitOR(0x0300, 0x2000))
GUICtrlCreateLabel("", 560, 10, 214, 214)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("", 561, 11, 212, 212)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlCreateLabel("+", 784, 10)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlCreateLabel("_", 784, 200)
GUICtrlSetColor(-1, 0xFFFFFF)
$Graphic = _GDIPlus_GraphicsCreateFromHWND($gui)
$zoom = GUICtrlCreateSlider(775, 25, 30, 185, 0x0002)
GUICtrlSetBkColor(-1, 0x000000)
_GUICtrlSlider_SetTicFreq($zoom, 1)
GUICtrlSetLimit($zoom, 15, 0)
GUICtrlSetData($zoom, 15)

$mapinfo = GUICtrlCreateLabel("", 557, 228, 220, 17, 0x01)
GUICtrlSetColor(-1, 0xFFFFFF)
;-------------------------------------------------------------------------------
$ftpuploadlabel = GUICtrlCreateLabel("FTP-Server upload: ", 10, 228)
GUICtrlSetColor(-1, 0xFFFFFF)
If $ftp = 1 Then
	$showftp = GUICtrlCreateLabel("Enabled, next upload in:", 110, 228, 445)
	GUICtrlSetColor(-1, 0x32CD32)
Else
	$showftp = GUICtrlCreateLabel("Disabled", 110, 228, 445)
	GUICtrlSetColor(-1, 0xFF0000)
EndIf
$ftpuploadstatus = GUICtrlCreateLabel("", 110, 228, 500, 17)
GUICtrlSetColor(-1, 0x32CD32)
GUICtrlSetState(-1, 32);Hide
$sbotversionstatus = GUICtrlCreateLabel("", 10, 228, 400, 17)
GUICtrlSetColor(-1, 0x32CD32)
GUICtrlSetState(-1, 32);Hide
$time2nextupload = GUICtrlCreateLabel("", 250, 228, 100, 17)
GUICtrlSetColor(-1, 0x32CD32)

$credit = GUICtrlCreateLabel("Made by S3cret", 455, 228)
GUICtrlSetColor(-1, 0x32CD32)
$pos = WinGetPos($gui)
WinMove($gui, "", $pos[0], $pos[1], $width + 5)
;###############################################################################
TraySetToolTip("SBot-Manager v" & $version)
TraySetClick(16)
$trayshowhide = TrayCreateMenu("Hide/Show")
$trayhide = TrayCreateItem("Hide", $trayshowhide)
$trayshow = TrayCreateItem("Show", $trayshowhide)
TrayCreateItem("")
$trayexit = TrayCreateItem("Exit")
TrayItemSetOnEvent($trayshow, "GUIShow")
TrayItemSetOnEvent($trayhide, "GUIHide")
TrayItemSetOnEvent($trayexit, "_Exit")
TraySetOnEvent(-13, "GUISetByTray")
;###############################################################################
GUISetOnEvent(-3, "_Exit", $gui)

GUICtrlSetOnEvent($ontopenable, "General")
GUICtrlSetOnEvent($ontopdisable, "General")
GUICtrlSetOnEvent($generalsettings, "SettingGUI")
GUICtrlSetOnEvent($check4newversion, "_Check4NewVersion")
GUICtrlSetOnEvent($info, "General")
GUICtrlSetOnEvent($uploaddataenable, "General")
GUICtrlSetOnEvent($uploaddatadisable, "General")
GUICtrlSetOnEvent($shutdowndisable, "General")
GUICtrlSetOnEvent($shutdownenable, "General")
GUICtrlSetOnEvent($forceshutdown, "General")
GUICtrlSetOnEvent($uploadstyle, "StyleGen")
GUICtrlSetOnEvent($checksbotversion, "General")
GUICtrlSetOnEvent($tutorial, "General")

GUICtrlSetOnEvent($refresh, "Refresh_SBot_List")
GUICtrlSetOnEvent($starttrain, "General")
GUICtrlSetOnEvent($stoptrain, "General")
GUICtrlSetOnEvent($resetstats, "General")
GUICtrlSetOnEvent($hideshowclient, "General")
GUICtrlSetOnEvent($goclientless, "General")
GUICtrlSetOnEvent($openclosemap, "General")
GUICtrlSetOnEvent($sbotlist, "General")
GUICtrlSetOnEvent($zoom, "Refresh_Map")
GUICtrlSetOnEvent($hideall, "General")
#endregion - GUI

If $GLanguage = 2 Then SetLanguage(2, 1)
GUIRegisterMsg($WM_NOTIFY, "SBotListDoubleClick")

Refresh_SBot_List()

GUISetState(@SW_SHOW, $gui)

#region declare vars
Dim $oldcurhp, $oldmaxhp, $oldcurmp, $oldmaxmp, $oldexp, $mapopen = False, $oldcharname, $labelscleared, $oldtime

;Timer
$setmaptimer = True
$setdctimer = True
$setftptimer = True
$settimetimer = True
$setshutdowntimer = True
Dim $ftptimer
#endregion declare vars

AdlibEnable("Refresh_Labels", $labeldelay)
If $ftp = 1 Then FTP_Upload()
While 1
	#region set timers
	If $setmaptimer = True Then
		$maptimer = TimerInit()
		$setmaptimer = False
	EndIf
	If $setdctimer = True Then
		$dctimer = TimerInit()
		$setdctimer = False
	EndIf
	If $ftp = 1 And $setftptimer = True Then
		$ftptimer = TimerInit()
		$setftptimer = False
	EndIf
	If $settimetimer = True Then
		$timetimer = TimerInit()
		$settimetimer = False
	EndIf
	If $setshutdowntimer = True Then
		$shutdowntimer = TimerInit()
		$setshutdowntimer = False
	EndIf
	#endregion set timers
	
	If _GUICtrlListView_GetSelectedCount($sbotlisthandle) = 1 Then
		$handle = _Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1))
		$newcharname = _GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 0)
		
		If $newcharname <> $oldcharname Then
			Refresh_Labels()
			Refresh_Map()
			$oldcharname = $newcharname
		EndIf
		
		If $GLanguage = 1 Then
			If GUICtrlRead($hideshowclient) <> ControlGetText($handle, "", "[CLASS:Button; INSTANCE:" & $instance_hideshowclient & "]") Then GUICtrlSetData($hideshowclient, ControlGetText(_Str2HWnd($handle), "", "[CLASS:Button; INSTANCE:" & $instance_hideshowclient & "]"))
		ElseIf $GLanguage = 2 Then
			If ControlGetText($handle, "", "[CLASS:Button; INSTANCE:" & $instance_hideshowclient & "]") = "Hide client"  And GUICtrlRead($hideshowclient) <> "Client verstecken"  Then
				GUICtrlSetData($hideshowclient, "Client verstecken")
			ElseIf ControlGetText($handle, "", "[CLASS:Button; INSTANCE:" & $instance_hideshowclient & "]") = "Show client"  And GUICtrlRead($hideshowclient) <> "Client zeigen"  Then
				GUICtrlSetData($hideshowclient, "Client zeigen")
			EndIf
		EndIf
	Else
		If $labelscleared <> 1 Then
			ClearLabels()
			Refresh_Map()
			$labelscleared = 1
		EndIf
	EndIf
	
	#region - check if timers rechead time
	If TimerDiff($maptimer) >= $mapdelay Then
		Refresh_Map()
		$setmaptimer = True
	EndIf
	If TimerDiff($dctimer) >= 5000 Then
		Check4DC()
		$setdctimer = True
	EndIf
	If $ftp = 1 And TimerDiff($ftptimer) >= $ftpdelay Then
		FTP_Upload()
		$setftptimer = True
	EndIf
	If $ftp = 1 And TimerDiff($timetimer) >= 200 Then
		$newtime = Round(($ftpdelay - TimerDiff($ftptimer)) / 1000, 0)
		If $newtime <> $oldtime And $newtime >= 0 Then
			If $GLanguage = 1 Then GUICtrlSetData($time2nextupload, $newtime & " Seconds")
			If $GLanguage = 2 Then GUICtrlSetData($time2nextupload, $newtime & " Sekunden")
			$oldtime = $newtime
		EndIf
		$settimetimer = True
	EndIf
	If TimerDiff($shutdowntimer) > 60000 Then
		$chars = 0
		$charsdc = 0
		$winlist = WinList("[CLASS:wxWindowClassNR]")
		$processlist = ProcessList()
		For $q = 1 To $winlist[0][0]
			If StringInStr($winlist[$q][0], "[") And StringInStr($winlist[$q][0], "]") Then
				For $p = 1 To $processlist[0][0]
					If StringInStr($processlist[$p][0], "SBot") <> 0 And WinGetProcess($winlist[$q][1]) = $processlist[$p][1] Then
						$chars += 1
						If ControlGetText($winlist[$q][1], "", "[CLASS:Static; INSTANCE:" & $instance_sroserverstatus & "]") = "Disconnected"  Then _
								$charsdc += 1
					EndIf
				Next
			EndIf
		Next
		If $chars > 0 And $chars = $charsdc Then
			If $bShutdown = True Then
				If $bForceshutdown = True Then
					Shutdown(5)
				Else
					Shutdown(1)
				EndIf
			EndIf
		EndIf
		$setshutdowntimer = True
	EndIf
	#endregion

	Sleep(10)
WEnd

Func Refresh_Labels()
	If _GUICtrlListView_GetSelectedCount($sbotlisthandle) = 1 Then
		$labelscleared = 0
		$handle = _Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1))
		
		If GUICtrlRead($charname) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_charname & "]") Then GUICtrlSetData($charname, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_charname & "]"))
		If GUICtrlRead($level) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_level & "]") Then GUICtrlSetData($level, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_level & "]"))
		If GUICtrlRead($gold) <> _StringAddThousandsSep(ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_gold & "]"), ".") Then GUICtrlSetData($gold, _StringAddThousandsSep(ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_gold & "]"), "."))
		If GUICtrlRead($sp) <> _StringAddThousandsSep(ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_sp & "]"), ".") Then GUICtrlSetData($sp, _StringAddThousandsSep(ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_sp & "]"), "."))
		If GUICtrlRead($location) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_location & "]") Then GUICtrlSetData($location, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_location & "]"))
		$x_ = ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_x & "]")
		If $x_ < 0 Then $xsep = "-"
		If $x_ >= 0 Then $xsep = ""
		If GUICtrlRead($x) <> ($xsep & _StringAddThousandsSep($x_, ".")) Then GUICtrlSetData($x, $xsep & _StringAddThousandsSep($x_, "."))
		$y_ = ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_y & "]")
		If $y_ < 0 Then $ysep = "-"
		If $y_ >= 0 Then $ysep = ""
		If GUICtrlRead($y) <> ($ysep & _StringAddThousandsSep($y_, ".")) Then GUICtrlSetData($y, $ysep & _StringAddThousandsSep($y_, "."))
		$serverstatus = ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_sroserverstatus & "]")
		If GUICtrlRead($sroserverstatus) <> $serverstatus Then
			If $serverstatus = "Disconnected"  Then
				GUICtrlSetColor($sroserverstatus, 0xFF0000)
			Else
				GUICtrlSetColor($sroserverstatus, 0xFFFFFF)
			EndIf
			GUICtrlSetData($sroserverstatus, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_sroserverstatus & "]"))
		EndIf
		If GUICtrlRead($botstatus) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_botstatus & "]") Then GUICtrlSetData($botstatus, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_botstatus & "]"))
		If GUICtrlRead($totaltime) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_totaltime & "]") Then GUICtrlSetData($totaltime, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_totaltime & "]"))
		If GUICtrlRead($kills) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_kills & "]") Then GUICtrlSetData($kills, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_kills & "]"))
		If GUICtrlRead($xpgained) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_xpgained & "]") Then GUICtrlSetData($xpgained, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_xpgained & "]"))
		If GUICtrlRead($xpmin) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_xpmin & "]") Then GUICtrlSetData($xpmin, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_xpmin & "]"))
		If GUICtrlRead($xphour) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_xphour & "]") Then GUICtrlSetData($xphour, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_xphour & "]"))
		If GUICtrlRead($sp) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_spgained & "]") Then GUICtrlSetData($spgained, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_spgained & "]"))
		If GUICtrlRead($spmin) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_spmin & "]") Then GUICtrlSetData($spmin, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_spmin & "]"))
		If GUICtrlRead($sphour) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_sphour & "]") Then GUICtrlSetData($sphour, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_sphour & "]"))
		If GUICtrlRead($died) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_died & "]") Then GUICtrlSetData($died, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_died & "]"))
		If GUICtrlRead($itemdrops) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_itemdrops & "]") Then GUICtrlSetData($itemdrops, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_itemdrops & "]"))
		If GUICtrlRead($goldloop) <> ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_goldloop & "]") Then GUICtrlSetData($goldloop, ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_goldloop & "]"))

		$mem = _MemoryOpen(WinGetProcess($handle), 0x00000010)
		
		If _MemoryRead($offset_maxhp, $mem) > 0 Then
			
			$curhp = _MemoryRead($offset_curhp, $mem)
			$maxhp = _MemoryRead($offset_maxhp, $mem)
			If $curhp <> $oldcurhp Or $maxhp <> $oldmaxhp Then
				_ProgressSet($progresshp, Round($curhp / $maxhp, 2) * 100)
				_ProgressSetText($progresshp, $curhp & "/" & $maxhp)
				$oldcurhp = $curhp
				$oldmaxhp = $maxhp
			EndIf
			
			$curmp = _MemoryRead($offset_curmp, $mem)
			$maxmp = _MemoryRead($offset_maxmp, $mem)
			If $curmp <> $oldcurmp Or $maxmp <> $oldmaxmp Then
				_ProgressSet($progressmp, Round($curmp / $maxmp, 2) * 100)
				_ProgressSetText($progressmp, $curmp & "/" & $maxmp)
				$oldcurmp = $curmp
				$oldmaxmp = $maxmp
			EndIf
			
			$curexp = _MemoryRead($offset_curexp, $mem)
			If $curexp <> $oldexp Then
				$exp = Round($curexp / _NextExp(ControlGetText($handle, "", "[CLASS:Static; INSTANCE:" & $instance_level & "]")) * 100, 2)
				If $exp >= 1 And $exp < 2 Then
					_ProgressSet($progressexp, 2)
				Else
					_ProgressSet($progressexp, $exp)
				EndIf
				$exp = StringFormat("%.2f", $exp)
				_ProgressSetText($progressexp, $exp & "%")
				$oldexp = $curexp
			EndIf

		EndIf
		_MemoryClose($mem)
	EndIf
EndFunc   ;==>Refresh_Labels

Func ClearLabels()
	GUICtrlSetData($charname, "")
	GUICtrlSetData($level, "")
	GUICtrlSetData($gold, "")
	GUICtrlSetData($sp, "")
	GUICtrlSetData($location, "")
	GUICtrlSetData($x, "")
	GUICtrlSetData($y, "")
	GUICtrlSetData($sroserverstatus, "")
	GUICtrlSetData($botstatus, "")
	GUICtrlSetData($totaltime, "")
	GUICtrlSetData($kills, "")
	GUICtrlSetData($xpgained, "")
	GUICtrlSetData($xpmin, "")
	GUICtrlSetData($xphour, "")
	GUICtrlSetData($spgained, "")
	GUICtrlSetData($spmin, "")
	GUICtrlSetData($sphour, "")
	GUICtrlSetData($died, "")
	GUICtrlSetData($itemdrops, "")
	GUICtrlSetData($goldloop, "")
	_ProgressSet($progresshp, 0)
	_ProgressSet($progressmp, 0)
	_ProgressSet($progressexp, 0)
	_ProgressSetText($progresshp, "")
	_ProgressSetText($progressmp, "")
	_ProgressSetText($progressexp, "")
	$oldcharname = -1
	$oldcurhp = -1
	$oldmaxhp = -1
	$oldcurmp = -1
	$oldmaxmp = -1
	$oldexp = -1
EndFunc   ;==>ClearLabels

Func General()
	Switch @GUI_CtrlId
		Case $openclosemap
			$pos = WinGetPos($gui)
			If $mapopen = True Then
				GUICtrlSetData($openclosemap, "=>" & @CRLF & @CRLF & "M" & @CRLF & "I" & @CRLF & "N" & @CRLF & "I" & @CRLF & "M" & @CRLF & "A" & @CRLF & "P" & @CRLF & @CRLF & "=>")
				GUICtrlSetData($mapinfo, "")
				WinMove($gui, "", $pos[0], $pos[1], $width + 5)
				$mapopen = False
			ElseIf $mapopen = False Then
				WinMove($gui, "", $pos[0], $pos[1], $width + $extrawidth)
				GUICtrlSetData($openclosemap, "<=" & @CRLF & @CRLF & "M" & @CRLF & "I" & @CRLF & "N" & @CRLF & "I" & @CRLF & "M" & @CRLF & "A" & @CRLF & "P" & @CRLF & @CRLF & "<=")
				$mapopen = True
				Refresh_Map()
			EndIf
		Case $starttrain
			If _GUICtrlListView_GetSelectedCount($sbotlisthandle) = 1 Then _
					ControlClick(_Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1)), "", "[CLASS:Button; INSTANCE:" & $instance_starttraining & "]")
		Case $stoptrain
			If _GUICtrlListView_GetSelectedCount($sbotlisthandle) = 1 Then _
					ControlClick(_Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1)), "", "[CLASS:Button; INSTANCE:" & $instance_stoptraining & "]")
		Case $resetstats
			If _GUICtrlListView_GetSelectedCount($sbotlisthandle) = 1 Then _
					ControlClick(_Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1)), "", "[CLASS:Button; INSTANCE:" & $instance_resetstats & "]")
		Case $goclientless
			If _GUICtrlListView_GetSelectedCount($sbotlisthandle) = 1 Then
				If $GLanguage = 1 Then
					If MsgBox(4, "Warning", "If you go to clientless mode, it won't be able to restore the client." & @CRLF & "Go clientless?") = 6 Then _
							ControlClick(_Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1)), "", "[CLASS:Button; INSTANCE:" & $instance_goclientless & "]")
				ElseIf $GLanguage = 2 Then
					If MsgBox(4, "Warnung", "Ist der Char einmal Clientless, so lässt sich der Client nicht wieder öffnen." & @CRLF & "Clientless gehen?") = 6 Then _
							ControlClick(_Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1)), "", "[CLASS:Button; INSTANCE:" & $instance_goclientless & "]")
				EndIf
			EndIf
		Case $hideshowclient
			If _GUICtrlListView_GetSelectedCount($sbotlisthandle) = 1 Then
				$handle = _Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1))
				$state = WinGetState($handle)
				ControlClick($handle, "", "[CLASS:Button; INSTANCE:" & $instance_hideshowclient & "]")
				Sleep(100)
				If BitAND($state, 2) <> 2 Then WinSetState($handle, "", @SW_HIDE)
			EndIf
		Case $hideall
			For $z = 1 To _GUICtrlListView_GetItemCount($sbotlist)
				WinSetState(_Str2HWnd(_GUICtrlListView_GetItemText($sbotlist, $z - 1, 1)), "", @SW_HIDE)
			Next
		Case $info
			If $GLanguage = 1 Then MsgBox(64, "Upload chardata to a FTP-Server", 'Activate this function to get your personal chardata uploaded to an FTP-Server. This will help you to have a look over what your char does, where your char currently is, how good his leveling is going and more! The data on the server will be updated every 2-3 minutes. You have to use your own FTP-Server for this function.' & @CRLF & @CRLF & "1. Set your FTP-Data (Settings -> General Settings)" & @CRLF & "2. Activate FTP-Upload (Settings -> Upload data to FTP -> Enable)" & @CRLF & '3. Enjoy viewing your characters stats online =)')
			If $GLanguage = 2 Then MsgBox(64, "Chardaten auf einen FTP-Server laden", 'Beim aktivieren dieser Funktion werden alle Daten aus dem SBot von jedem Char in der Liste auf einen FTP-Server geladen, damit man überall online sehen kann, was welcher Char gerade tut, wie gut er levelt und mehr. Die Daten werden alle 2-3 Minuten neu hochgeladen. Es muss ein eigener FTP-Server eingerichtet werden um diese Funktion nutzen zu können.' & @CRLF & @CRLF & "1. FTP-Daten eingeben (Einstellungen -> Allgemeine Einstellungen)" & @CRLF & "2. Hochladen aktivieren (Einstellungen -> Chardaten auf FTP laden -> Aktivieren)" & @CRLF & '3. Chardaten online auf dem FTP-Server angucken =)')
		Case $ontopenable
			GUICtrlSetState($ontopdisable, 4)
			GUICtrlSetState($ontopenable, 1)
			WinSetOnTop($gui, "", 1)
		Case $ontopdisable
			GUICtrlSetState($ontopdisable, 1)
			GUICtrlSetState($ontopenable, 4)
			WinSetOnTop($gui, "", 0)
		Case $uploaddataenable
			GUICtrlSetColor($showftp, 0x32CD32)
			If $GLanguage = 1 Then GUICtrlSetData($showftp, "Enabled, next upload in:")
			If $GLanguage = 2 Then GUICtrlSetData($showftp, "Aktiviert, nächster Upload in:")
			GUICtrlSetState($uploaddataenable, 1)
			GUICtrlSetState($uploaddatadisable, 4)
			IniWrite(@ScriptDir & "\images\configuration.ini", "FTP", "UseFTP", "yes")
			$ftp = 1
			If _GUICtrlListView_GetItemCount($sbotlist) > 0 Then FTP_Upload()
			$ftptimer = TimerInit()
			$setftptimer = False
		Case $uploaddatadisable
			If $GLanguage = 1 Then
				GUICtrlSetData($showftp, "Disabled")
			ElseIf $GLanguage = 2 Then
				GUICtrlSetData($showftp, "Deaktiviert")
			EndIf
			GUICtrlSetColor($showftp, 0xFF0000)
			GUICtrlSetState($uploaddataenable, 4)
			GUICtrlSetState($uploaddatadisable, 1)
			GUICtrlSetState($time2nextupload, 32);Hide
			IniWrite(@ScriptDir & "\images\configuration.ini", "FTP", "UseFTP", "no")
			$ftp = 0
			$setftptimer = True
		Case $checksbotversion
			GUICtrlSetState($showftp, 32);Hide
			GUICtrlSetState($ftpuploadlabel, 32);Hide
			GUICtrlSetState($time2nextupload, 32);Hide
			GUICtrlSetState($sbotversionstatus, 16);Show
			If $GLanguage = 1 Then GUICtrlSetData($sbotversionstatus, 'Receiving SBot-Version from bot-cave.net...')
			If $GLanguage = 2 Then GUICtrlSetData($sbotversionstatus, 'Empfange SBot-Version von bot-cave.net...')
			$source = _INetGetSource("http://www2.bot-cave.net/main")
			If Not @error Then
				$sbotversion = StringRegExp($source, 'Latest SBot-Version: <strong>(.*?)</strong>', 1)
				$sbotreleasedate = StringRegExp($source, 'Release Date: <strong>(.*?)</strong>', 1)
				If $GLanguage = 1 Then MsgBox(64, "SBot-Version", "Latest SBot-Version: " & $sbotversion[0] & @CRLF & "Release Date: " & $sbotreleasedate[0] & @CRLF & @CRLF & @CRLF & "Please visit [url=http://www.bot-cave.net]Bot-Cave.net[/url] for more information.")
				If $GLanguage = 2 Then MsgBox(64, "SBot-Version", "Neueste SBot-Version: " & $sbotversion[0] & @CRLF & "Erscheinungsdatum: " & $sbotreleasedate[0] & @CRLF & @CRLF & @CRLF & "Auf [url=http://www.bot-cave.net]Bot-Cave.net[/url] gibt es mehr Informationen.")
			Else
				GUICtrlSetColor($sbotversionstatus, 0xFF0000)
				If $GLanguage = 1 Then MsgBox(48, "Connection Error", "You either don't have a connection to the world wide web or the server is currently down!")
				If $GLanguage = 2 Then MsgBox(48, "Verbindungsfehler", "Es besteht entweder keine Verbindung zum Internet oder der Server ist momentan nicht erreichbar!")
			EndIf
			GUICtrlSetState($sbotversionstatus, 32);Hide
			GUICtrlSetState($ftpuploadlabel, 16);Show
			If $ftp = 1 Then GUICtrlSetState($time2nextupload, 16);Show
			GUICtrlSetState($showftp, 16);Show
		Case $shutdownenable
			$bShutdown = True
			GUICtrlSetState($shutdowndisable, 4)
			GUICtrlSetState($shutdownenable, 1)
		Case $shutdowndisable
			$bShutdown = False
			GUICtrlSetState($shutdowndisable, 1)
			GUICtrlSetState($shutdownenable, 4)
		Case $forceshutdown
			If GUICtrlRead($forceshutdown) = 65 Then
				GUICtrlSetState($forceshutdown, 4)
				$bForceshutdown = False
			Else
				GUICtrlSetState($forceshutdown, 1)
				$bForceshutdown = True
			EndIf
		Case $tutorial
			If $GLanguage = 2 Then
				ShellExecute($vFTPTutorialDe)
			Else
				ShellExecute($vFTPTutorialEn)
			EndIf
	EndSwitch
EndFunc   ;==>General

Func SBotListDoubleClick($gui, $vMsgID, $vWParam, $vLParam)
	If $vWParam = $sbotlist Then
		$vTagNMHDR = DllStructCreate("int;int;int", $vLParam)
		$vEvent = DllStructGetData($vTagNMHDR, 3)
		
		If $vEvent = $NM_DBLCLK And _GUICtrlListView_GetSelectedCount($sbotlist) <> 0 Then
			$sbotwinhandle = _Str2HWnd(_GUICtrlListView_GetItemText($sbotlisthandle, _GUICtrlListView_GetSelectedIndices($sbotlisthandle), 1))
			If BitAND(WinGetState($sbotwinhandle), 2) Then
				WinSetState($sbotwinhandle, "", @SW_HIDE)
			Else
				WinSetState($sbotwinhandle, "", @SW_SHOW)
			EndIf
		EndIf
	EndIf
EndFunc   ;==>SBotListDoubleClick
Source?? 0.o
07/30/2009 15:04 theoneofgod#117
Your point?
07/30/2009 21:15 affgane123#118
new version 2.29
[Only registered and activated users can see links. Click Here To Register...]

:D
07/31/2009 10:57 InvincibleNoOB#119
Quote:
Originally Posted by theoneofgod View Post
nah just saying if sbot takes 1% (it does for me) why does the manager take more?
Because it's made in autoit by Steve Jobs. :)
08/04/2009 01:03 S3cret#120
Quote:
Originally Posted by InvincibleNoOB View Post
Because it's made in autoit by Steve Jobs. :)
Did I missunderstand you? Steve Jobs? Who is that? It's made by me lol!?