SS SBot Alchemy tool (open source autoit)

12/23/2011 16:30 darkbudweiser#1
[Only registered and activated users can see links. Click Here To Register...]
beta v1
Auto fix alchemy errors
Beep when item is done
Beep when no exlixirs
Beep when no lucky
Beep if no item
Set a wait time b4 starting again from error

I stop playing this game will not make updates.....

Code:
#RequireAdmin
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GuiListView.au3>
#include <GuiEdit.au3>
#include <GUIListBox.au3>
#Region ### START Koda GUI section ### Form=
$Waittime = IniRead("config.ini", "SS Alchemy", "WaitTimeIfError", "2000")
$Maxplus = IniRead("config.ini", "SS Alchemy", "MaxPlus", "5")
$Beep1 = IniRead("config.ini", "SS Alchemy", "Beep1", "0")
$Beep2 = IniRead("config.ini", "SS Alchemy", "Beep2", "0")
$SS = GUICreate("SS SBot Alchemy V1 by (simplescripting.blogspot.com)", 517, 296, 216, 144)
GUISetBkColor(0x000000)
$ListView = GUICtrlCreateListView("", 0, 0, 250, 294, BitOR( $LVS_LIST, $WS_VSCROLL))
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
Global $listviewMenu = GUICtrlCreateContextMenu($listview)
Global $Ref = GUICtrlCreateMenuItem("Refresh", $listviewMenu)
Global $Setchar = GUICtrlCreateMenuItem("Use this sbot for alchemy", $listviewMenu)
$Label1 = GUICtrlCreateLabel("SBot Status:", 256, 8, 63, 17)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
$Label2 = GUICtrlCreateLabel("Standing by", 320, 8, 188, 17)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
$Label3 = GUICtrlCreateLabel("CharName:", 256, 24, 57, 17)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
$Label4 = GUICtrlCreateLabel("None", 312, 24, 196, 17)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
$Graphic1 = GUICtrlCreateGraphic(256, 40, 260, 8)
GUICtrlSetBkColor(-1, 0xA6CAF0)
$Label5 = GUICtrlCreateLabel("Max plus", 256, 64, 46, 17)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
$Input1 = GUICtrlCreateInput($Maxplus, 304, 64, 33, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
$Label6 = GUICtrlCreateLabel("Wait to restart if error for", 256, 96, 117, 17)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
$Input2 = GUICtrlCreateInput($Waittime, 376, 96, 57, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
$Label7 = GUICtrlCreateLabel("Ms", 432, 96, 18, 17)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
$Checkbox1 = GUICtrlCreateCheckbox("play sound if out of elixirs or lucky or no item", 256, 136, 250, 17)
GUICtrlSetBkColor(-1, 0xA6CAF0)
If $Beep1 = 1 Then GUICtrlSetState($Checkbox1, $GUI_CHECKED)
$Checkbox3 = GUICtrlCreateCheckbox("Play sound if done", 256, 168, 113, 17)
GUICtrlSetBkColor(-1, 0xA6CAF0)
If $Beep2 = 1 Then GUICtrlSetState($Checkbox3, $GUI_CHECKED)
$Button1 = GUICtrlCreateButton("Save settings", 328, 240, 99, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("Start!", 256, 272, 123, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetCursor (-1, 0)
$Button3 = GUICtrlCreateButton("Stop!", 384, 271, 123, 17, $WS_GROUP)
GUICtrlSetColor(-1, 0xA6CAF0)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$SbotEditPlus = "Edit78"
$RICHEDIT = "RICHEDIT13"
_ref()
While 1
	sleep(50)
	$nMsg = GUIGetMsg()
	Switch $nMsg
	    case $Button1
			IniWrite("config.ini", "SS Alchemy", "WaitTimeIfError", _GUICtrlEdit_GetText($Input2))
			IniWrite("config.ini", "SS Alchemy", "MaxPlus", _GUICtrlEdit_GetText($Input1))
			If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) = $GUI_CHECKED Then
				$CheckboxChecked = 1
			Else
				$CheckboxChecked = 0
			EndIf
			IniWrite("config.ini", "SS Alchemy", "Beep1", $CheckboxChecked)
			If BitAND(GUICtrlRead($Checkbox3), $GUI_CHECKED) = $GUI_CHECKED Then
				$CheckboxChecked = 1
			Else
				$CheckboxChecked = 0
			EndIf
			IniWrite("config.ini", "SS Alchemy", "Beep2", $CheckboxChecked)
	    case $Button2
		    If _GUICtrlEdit_GetText($Label4) = "None" Then
				MsgBox(64,"SS Msg","Error! You must set the char to use (Dumb Shit)")
			Else
			$MaxPlus = _GUICtrlEdit_GetText($Input1)
			GUICtrlSetData($Label2,"Max plus is " & $MaxPlus)
			ControlSetText($Winlistsbot, "", $RICHEDIT, "SS Alchemy Started max plus " & $MaxPlus & @CRLF)
			ControlSetText($Winlistsbot, "", $SbotEditPlus, $MaxPlus)
			sleep(100)
			ControlClick($Winlistsbot, "", "Start!")
			sleep(2000)
			ControlGetText($Winlistsbot, "Goal: +" & $MaxPlus & "!", $RICHEDIT)
			If @error Then
				ControlClick($Winlistsbot, "", "Stop training")
				MsgBox(64,"SS Msg","Error! SBot alchemy stoped! problem (Error code 1)")
			Else
			$Error = 0
			$Problem = 0
			$ProblenMsg = "ERROR!"
			$Done = 0
			$NoItem = 0
			While 1
				sleep(100)
				_LookForError()
				If $Problem = 1 Then
					If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) = $GUI_CHECKED Then
						Beep(1000, 800)
					EndIf
					GUICtrlSetData($Label2, $ProblenMsg & " Standing by")
					ExitLoop
				EndIf
				If $Done = 1 Then
					If BitAND(GUICtrlRead($Checkbox3), $GUI_CHECKED) = $GUI_CHECKED Then
						Beep(1000, 800)
					EndIf
					GUICtrlSetData($Label2, "Grats your item is +" & $MaxPlus)
					ExitLoop
				EndIf
				If $NoItem = 1 Then
					If BitAND(GUICtrlRead($Checkbox1), $GUI_CHECKED) = $GUI_CHECKED Then
						Beep(1000, 800)
					EndIf
					GUICtrlSetData($Label2, "Error no item ) :")
					ExitLoop
				EndIf
				If $Error = 1 Then
					GUICtrlSetData($Label2, "Fixing Eror!")
					ControlClick($Winlistsbot, "", "Stop training")
					sleep(_GUICtrlEdit_GetText($Input2))
					ControlSetText($Winlistsbot, "", $RICHEDIT, "SS Alchemy Started max plus " & $MaxPlus)
					ControlClick($Winlistsbot, "", "Start!")
					$Error = 0
					GUICtrlSetData($Label2,"Max plus is " & $MaxPlus)
				EndIf
				$nMsg = GUIGetMsg()
				Switch $nMsg
					case $Button3
						ControlClick($Winlistsbot, "", "Stop training")
						GUICtrlSetData($Label2, "Standing by")
						ExitLoop
				EndSwitch
			WEnd
		    EndIf
		    EndIf
	    case $Setchar
			$Winlistsbot = (GUICtrlRead(GUICtrlRead($listview)))
			$SplitArr=StringSplit($Winlistsbot,"]")
			$clientb4=$SplitArr[1]
			If @error Then
				MsgBox(64,"SS Msg","Error! Make sure you clicked the char! (Dumb Shit)")
			Else
			$SplitArr=StringSplit($clientb4,"[")
			$client=$SplitArr[2]
			GUICtrlSetData($Label4,$client)
			EndIf
		case $Ref
			_ref()
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd
Func _LookForError()
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; errors
	ControlGetText($Winlistsbot, "Autoalchemy: Stopped alchemy due to an error", $RICHEDIT)
	If @error Then
		;nothing
	Else
		$Error = 1
	EndIf
	ControlGetText($Winlistsbot, "Autoalchemy: Stopping automatic alchemy function due to alchemy timeout!", $RICHEDIT)
	If @error Then
		;nothing
	Else
		$Error = 1
	EndIf
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; problems
	ControlGetText($Winlistsbot, "Autoalchemy: Stopping automatic alchemy function! No Elixirs left!", $RICHEDIT)
	If @error Then
		;nothing
	Else
		$Problem = 1
		$ProblenMsg = "No Elixirs"
	EndIf
	ControlGetText($Winlistsbot, "Autoalchemy: Stopping automatic alchemy function. No lucky powders left!", $RICHEDIT)
	If @error Then
		;nothing
	Else
		$Problem = 1
		$ProblenMsg = "No lucky"
	EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;done
	ControlGetText($Winlistsbot, "Alchemy success! Plus: " & $MaxPlus, $RICHEDIT)
	If @error Then
		;nothing
	Else
		$Done = 1
	EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;no item
	ControlGetText($Winlistsbot, "Autoalchemy: Cannot find item", $RICHEDIT)
	If @error Then
		;nothing
	Else
		$NoItem = 1
	EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;end of no item
EndFunc
Func _ref()
opt("WinDetectHiddenText",1)
_GUICtrlListView_BeginUpdate($listview)
_GUICtrlListView_DeleteAllItems($listview)
$Client = WinList("[CLASS:wxWindowClassNR]" , "Connected")
If $Client[0][0] > 0 Then
	For $X = 1 To $Client[0][0]
    GUICtrlCreateListViewItem($Client[$X][0], $listview)
Next
Else
	GUICtrlCreateListViewItem("No Clients Found", $listview)
EndIf
_GUICtrlListView_EndUpdate($listview)
opt("WinDetectHiddenText",0)
EndFunc
[Only registered and activated users can see links. Click Here To Register...]
01/01/2012 02:37 bnk4#2
good job, this tool can be upgrade whit mbot? thats sound cool
01/02/2012 19:11 smedrik86#3
yeah, please edit it so we can use it for mbot and vsro private servers :D
03/09/2012 00:37 AIIEyezOnMe#4
this has to be one of the best tools out there someone please pick it up and edit it for mbot / vsro servers
03/13/2012 01:05 AIIEyezOnMe#5
still noting :(
03/14/2012 01:41 darkbudweiser#6
Quote:
Originally Posted by AIIEyezOnMe View Post
still noting :(
Yea i stop playing this shit game, maybe so one can make one for mbot if it's like sbot then it's not hard at all, i stopped making all silkroad tools...
03/15/2012 04:29 Eouzz#7
It would be so awesome..
03/15/2012 06:01 IceLatino#8
This would be such a nice tool.
I would pay for it! :D
04/21/2012 09:12 applesauceface#9
Saw this and thought maybe it should get some attention so people can edit and give it use.
*Bump*
04/22/2012 01:39 theoneofgod#10
I don't see the point to this. I thought SBot has auto plus?
04/28/2012 13:22 lordjaggi#11
this is useless unless it adds lucky automatically.
05/03/2012 09:57 H3ll King#12
good job tool
05/03/2012 13:21 LastThief*#13
Quote:
Originally Posted by H3ll King View Post
good job tool

i'm new in auto it

and trying to learn it as much as possible
resize your sig...
07/03/2012 12:02 Athaetu#14
0
07/30/2012 23:58 Pej0#15
useless tool , sbot already have this feature