Mbot Silkroad 4 World Auto Alchemy


Hi there , i am offering you to add auto alchemy function in mbot . I think you can make it cuz other bots have it . Here I m giving you the open autoit codes for auto alchemy tool , if you have the time please join it into mbot source codes ! please please please We need auto alchemy in VSRO based servers and its so easy !


----------------------------------------------------------------------------------------------------------------------------------------
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 **** 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 **** for alchemy", $listviewMenu)
$Label1 = GUICtrlCreateLabel("**** 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 ###
$****EditPlus = "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($Winlist****, "", $RICHEDIT, "SS Alchemy Started max plus " & $MaxPlus & @CRLF)
   ControlSetText($Winlist****, "", $****EditPlus, $MaxPlus)
   sleep(100)
   ControlClick($Winlist****, "", "Start!")
   sleep(2000)
   ControlGetText($Winlist****, "Goal: +" & $MaxPlus & "!", $RICHEDIT)
   If @error Then
    ControlClick($Winlist****, "", "Stop training")
    MsgBox(64,"SS Msg","Error! **** 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($Winlist****, "", "Stop training")
     sleep(_GUICtrlEdit_GetText($Input2))
     ControlSetText($Winlist****, "", $RICHEDIT, "SS Alchemy Started max plus " & $MaxPlus)
     ControlClick($Winlist****, "", "Start!")
     $Error = 0
     GUICtrlSetData($Label2,"Max plus is " & $MaxPlus)
    EndIf
    $nMsg = GUIGetMsg()
    Switch $nMsg
     case $Button3
      ControlClick($Winlist****, "", "Stop training")
      GUICtrlSetData($Label2, "Standing by")
      ExitLoop
    EndSwitch
   WEnd
      EndIf
      EndIf
     case $Setchar
   $Winlist**** = (GUICtrlRead(GUICtrlRead($listview)))
   $SplitArr=StringSplit($Winlist****,"]")
   $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($Winlist****, "Autoalchemy: Stopped alchemy due to an error", $RICHEDIT)
 If @error Then
  ;nothing
 Else
  $Error = 1
 EndIf
 ControlGetText($Winlist****, "Autoalchemy: Stopping automatic alchemy function due to alchemy timeout!", $RICHEDIT)
 If @error Then
  ;nothing
 Else
  $Error = 1
 EndIf
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; problems
 ControlGetText($Winlist****, "Autoalchemy: Stopping automatic alchemy function! No Elixirs left!", $RICHEDIT)
 If @error Then
  ;nothing
 Else
  $Problem = 1
  $ProblenMsg = "No Elixirs"
 EndIf
 ControlGetText($Winlist****, "Autoalchemy: Stopping automatic alchemy function. No lucky powders left!", $RICHEDIT)
 If @error Then
  ;nothing
 Else
  $Problem = 1
  $ProblenMsg = "No lucky"
 EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;done
 ControlGetText($Winlist****, "Alchemy success! Plus: " & $MaxPlus, $RICHEDIT)
 If @error Then
  ;nothing
 Else
  $Done = 1
 EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;no item
 ControlGetText($Winlist****, "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
This is the open source codes for auto alchemy in the other bot , you can copy it into mbot . We dont want to change out bot we are happy with the current mbot ! Thanks...

Reply With Quote

0 التعليقات:

Blogger Template by Clairvo