Generator Posted May 3, 2008 Share Posted May 3, 2008 (edited) Game website: RunescapeBrief Description:Runescape Power Training is a program that is designed to raise the level of Mining and Wood cutting using chop/mine and drop technique. Regardless the money lost, you will reach your desired level of mining/wood cutting in no time under ideal conditions. It uses the tuned version of primary PixelSearch and MouseMove function to accomplish its task. The bot has over 90% of the accuracy if you do a few trail and error with the pixel you get. On the other hand the bot is more human like with the randomized pauses between the gap and full of customizable options available for you to use. It is a human like bot and it has less than 5% chance of being caught botting(Unless by human player). It is guaranteed to work in most of the time where the color is distinguishable from others, ex. Willow trees, ex. Ores. This bot has been tested and it work 100% of the time. Features:Customizable options and timeRandomized time between gapReasonable rest time between gap to ensure it works 100% on many computersNo external program is neededUsable for mining and wood cuttingPower training technique involve with drop featureInstructions:Run the program under Windows XP with Java and IE installedClick start to continue to the main windowsLog in to the main runescape window using the embedded IE control and scroll down fullyCustomize all the options or use the defaultClick the buttons and drag to the color to obtain and storeIt is most recommended to keep only the tool you will use and leaving all the item inventory available for main purposesStart trainingPress Esc to stop the process if any necessary changes are needed(ex. color wasn't correct ex. timing is not correct)When finish botting press esc to stop it and press X to exitProgram's efficiencyThroughout the testing I've got to level 60 wood cutting in less than 16 hours of botting using steel axes the full time(excluded from disconnection, slay by monster, anti-marco events)Running pictures:Source Code:Power_Training.au3Edit: Updated and TestedComments, criticism, improvements and suggestions are welcomed. Edited May 10, 2008 by Generator Link to comment Share on other sites More sharing options...
Generator Posted May 10, 2008 Author Share Posted May 10, 2008 *Reviving the post* Link to comment Share on other sites More sharing options...
ludocus Posted May 10, 2008 Share Posted May 10, 2008 (edited) Cool, Going to try this out!, what's ur username? mine is ******* (in runescape) Edited May 20, 2008 by ludocus Link to comment Share on other sites More sharing options...
DexterMorgan Posted May 10, 2008 Share Posted May 10, 2008 (edited) Cool, Going to try this out!, what's ur username? mine is *** (in runescape)cool my bro will like this... His Username is *******Edit: Rermoved mine and Ludocus's usernames Edited November 8, 2008 by DexterMorgan code Link to comment Share on other sites More sharing options...
Generator Posted May 10, 2008 Author Share Posted May 10, 2008 (edited) Cool, Going to try this out!, what's ur username? mine is ******* (in runescape)cool my bro will like this... His username is *******Thanks for the comment but I figured it's best not to reveal the true user name on internet like this. Edited May 23, 2009 by Generator Link to comment Share on other sites More sharing options...
DexterMorgan Posted May 10, 2008 Share Posted May 10, 2008 Thanks for the comment but I figured it's best not to reveal the true user name on internet like this. True lol. Let me edit it ! Feeling stupid.... code Link to comment Share on other sites More sharing options...
Muchuchu Posted May 11, 2008 Share Posted May 11, 2008 I like the embedded ie, makes things a lot easier. Beats the crap out of my rs programs. Link to comment Share on other sites More sharing options...
m0nk3yI3unz Posted May 18, 2008 Share Posted May 18, 2008 (edited) Yea, the embedded IE thing really is great O.o how did you get just the client on there? ooo I see, you had to scroll down xD I thought you found JUST the client to display xDD pretty nifty! Edited May 18, 2008 by m0nk3yI3unz Monkeh. Link to comment Share on other sites More sharing options...
Sprille Posted November 4, 2008 Share Posted November 4, 2008 (edited) Very nice made, but i can't seem to get it to work quite proberly. It keeps clicking on the ores in inventory, but this might be something with the color setup. May i suggest a box where you can actualy see which colors you picked. Also searching the inventory for the color will make you hit the ore exactly the same place each time = detectable. I also think that might be the case for the ore rock searching. I'm saying this because i was actualy cought by jagex for botting with a color searching bot. But it only cost me a black mark and a week off for that account so nothing bad (free world account). This let me to search for a way to make the dropping of ores random, meaning you wont hit the ore the same spot every time. im still working on this metod, but had a trial run today, and it works, it goes like this: It must be possible to place these arrays inside a program like yours, giving them a fixed value, that is not chancing when run on another system expandcollapse popup;The columns in inventory Global $drop_x_min[4] = [813,855,897,939] Global $drop_x_max[4] = [844,886,928,970] ;standard detail 7 rows 1 row = 31px spacing = 5 Global $drop_y_min[7] = [419,455,491,527,563,599,635] Global $drop_y_max[7] = [450,486,522,558,594,630,666] ;this is where our x & y cordinates for search results go Global $Cords[2] = [0,0] ;this defines where popup menu for dropping is Global $menu_cords[2] = [0,0] ;this is the color we search for in inventory Global $inv_color = 4006425 ;this is at what slot we start dropping Global $drop_slot = 2 Global $slot_search[4] = [0,0,0,0] ;set up the search area drop_slot_changed($drop_slot) Global $get_tired = Random(50, 100, 1) Global $sleeptime = 0 Global $dropped = 0 ;main program While 1 search_slot() Sleep(1000) WEnd Func search_slot() $Cords = PixelSearch($slot_search[0],$slot_search[1],$slot_search[2],$slot_search[3], $inv_color, 8) If Not @error Then ;we are full start dropping Local $i = 0 Local $row = 0 Local $column = 0 Do ;get the random drop position. We just feed the function with the min values for dropzone get_drop_pos($drop_x_min[$column], $drop_y_min[$row]) ;drop ore MouseMove( $Cords[0], $Cords[1],2) Sleep(Random(200,500,1)) MouseClick("Right") Sleep(Random(500,1000,1)) MouseMove($menu_cords[0],$menu_cords[1],2) MouseClick("Left") Sleep(Random(500,1200,1)) $dropped+=1 if $dropped = $get_tired Then $sleeptime = Random(7000,20000,1) $get_tired = Random(50, 100, 1) $dropped = 0 Sleep($sleeptime) EndIf ;Increase value for drop count $i = $i + 1 ;increase column number $column+=1 ;if we exceed 3 in column number go to next row if $column > 3 Then $column = 0 $row+=1 EndIf Until $i = $drop_slot EndIf EndFunc ;When a ore is found in inventory we use this to click a random place on ore Func get_drop_pos($x, $y) Select Case ( $x >= $drop_x_min[0] ) And ( $x <=$drop_x_max[0] ) $Cords[0] = Random($drop_x_min[0], $drop_x_max[0], 1) Case ( $x >= $drop_x_min[1] ) And ( $x <= $drop_x_max[1] ) $Cords[0] = Random($drop_x_min[1], $drop_x_max[1], 1) Case ( $x >= $drop_x_min[2] ) And ( $x <= $drop_x_max[2] ) $Cords[0] = Random($drop_x_min[2], $drop_x_max[2], 1) Case ( $x >= $drop_x_min[3] ) And ( $x <= $drop_x_max[3] ) $Cords[0] = Random($drop_x_min[3], $drop_x_max[3], 1) EndSelect Select Case ( $y >= $drop_y_min[0] ) And ( $y <= $drop_y_max[0] ) $Cords[1] = Random($drop_y_min[0], $drop_y_max[0], 1) Case ( $y >= $drop_y_min[1] ) And ( $y <= $drop_y_max[1] ) $Cords[1] = Random($drop_y_min[1], $drop_y_max[1], 1) Case ( $y >= $drop_y_min[2] ) And ( $y <= $drop_y_max[2] ) $Cords[1] = Random($drop_y_min[2], $drop_y_max[2], 1) Case ( $y >= $drop_y_min[3] ) And ( $y <= $drop_y_max[3] ) $Cords[1] = Random($drop_y_min[3], $drop_y_max[3], 1) Case ( $y >= $drop_y_min[4] ) And ( $y <= $drop_y_max[4] ) $Cords[1] = Random($drop_y_min[4], $drop_y_max[4], 1) Case ( $y >= $drop_y_min[5] ) And ( $y <= $drop_y_max[5] ) $Cords[1] = Random($drop_y_min[5], $drop_y_max[5], 1) Case ( $y >= $drop_y_min[6] ) And ( $y <= $drop_y_max[6] ) $Cords[1] = Random($drop_y_min[6], $drop_y_max[6], 1) EndSelect ;when drop menu comes up we need a random place to click it ;it will always show up right under where we click as long as we are not at last row If $y <= $drop_y_max[5] then $menu_cords[0] = Random($Cords[0]-40, $Cords[0]+40, 1) $menu_cords[1] = Random($Cords[1]+36, $Cords[1]+48, 1) Else ;we are at last row so define where the drop text shows up $menu_cords[0] = Random($Cords[0]-35, $Cords[0]+35, 1) $menu_cords[1] = Random(699, 713, 1) EndIf EndFunc ;this function defines the search area for the drop slot, if we have something in here we start dropping Func drop_slot_changed($slot) Select Case $slot = 1 $slot_search[0] = $drop_x_min[0] $slot_search[1] = $drop_y_min[0] $slot_search[2] = $drop_x_max[0] $slot_search[3] = $drop_y_max[0] Case $slot = 2 $slot_search[0] = $drop_x_min[1] $slot_search[1] = $drop_y_min[0] $slot_search[2] = $drop_x_max[1] $slot_search[3] = $drop_y_max[0] Case $slot = 3 $slot_search[0] = $drop_x_min[2] $slot_search[1] = $drop_y_min[0] $slot_search[2] = $drop_x_max[2] $slot_search[3] = $drop_y_max[0] Case $slot = 4 $slot_search[0] = $drop_x_min[3] $slot_search[1] = $drop_y_min[0] $slot_search[2] = $drop_x_max[3] $slot_search[3] = $drop_y_max[0] Case $slot = 8 $slot_search[0] = $drop_x_min[3] $slot_search[1] = $drop_y_min[1] $slot_search[2] = $drop_x_max[3] $slot_search[3] = $drop_y_max[1] Case $slot = 12 $slot_search[0] = $drop_x_min[3] $slot_search[1] = $drop_y_min[2] $slot_search[2] = $drop_x_max[3] $slot_search[3] = $drop_y_max[2] Case $slot = 16 $slot_search[0] = $drop_x_min[3] $slot_search[1] = $drop_y_min[3] $slot_search[2] = $drop_x_max[3] $slot_search[3] = $drop_y_max[3] Case $slot = 20 $slot_search[0] = $drop_x_min[3] $slot_search[1] = $drop_y_min[4] $slot_search[2] = $drop_x_max[3] $slot_search[3] = $drop_y_max[4] Case $slot = 24 $slot_search[0] = $drop_x_min[3] $slot_search[1] = $drop_y_min[5] $slot_search[2] = $drop_x_max[3] $slot_search[3] = $drop_y_max[5] Case $slot = 28 $slot_search[0] = $drop_x_min[3] $slot_search[1] = $drop_y_min[6] $slot_search[2] = $drop_x_max[3] $slot_search[3] = $drop_y_max[6] EndSelect EndFunc This is very dirty code but i already given it a trial run to test the idea, and it does the job perfectly, and is only ment as a drop bot for mining. Gonna run this for a while on the account i got busted on, just to see if jagex are awake, but i doubt they will ever know this is a bot. Edited November 4, 2008 by Sprille Link to comment Share on other sites More sharing options...
Sprille Posted November 6, 2008 Share Posted November 6, 2008 Yup was indeed possible ! I now have a working speciment of one great drop bot, that achieves 100 % drop rates. In fact it's so good that im beginning to wonder if i should build some kinda fail mechanism into it. Lets say clicking examine ore instead of dropping it, then continue dropping and return back to drop those left in inventory when done. It's build on the skeleton of Generator's bot, but i dident like the way it was working so rewrote most of it, and flushed the area searching. So far the dropbot only supports free world play, as im not risking my highlvl player when doing these tests. If anyone wanna see the source, just let me know and i'll be happy to post it, as im sure some of u guys could improve the code. Link to comment Share on other sites More sharing options...
IKilledBambi Posted November 7, 2008 Share Posted November 7, 2008 If this is still supported, can I get this edited(I'm not nearly smart enough to do it myself) where it doesn't drop? I'm not saying i want it to go sell. I'm saying that i want it to be able to attack monsters and not try to sell anything. Link to comment Share on other sites More sharing options...
Sprille Posted November 7, 2008 Share Posted November 7, 2008 Well gererators bot is easily modifyed to a combat bot, just remove the dropping part and u basicaly have a fighting bot. Only problem with this color searching is that if someone comes along with something on that matches your searching color, you would be clicking this person. At the moment im running some test on the bot i made build on gererators bot, and so far im nearly at 70 mining, and have not been detected so far. If this goes on i might expand it. But until im sure that they can't detect it, im not gonna do any changes to it. Atm it supports only dropping ores or trees. It remembers your setting with ini file if will fail dropping ores/trees - then redrop those deliberatly missed. It will check text in upper left corner to confirm that mouse is over an ore / tree before dropping - if not it will stop supports dropping from any slot in inventory Link to comment Share on other sites More sharing options...
Sprille Posted November 8, 2008 Share Posted November 8, 2008 (edited) Thought i might as well post what i came up with untill now, so here it goes.... expandcollapse popup;Build on Generator's bot in AutoIt Forums @ http://www.autoitscript.com/forum/index.php?showtopic=70399&st=0&gopid=601549&#entry601549 ;UDF by Developers of AutoIt ;heavily modifyed by Sprille #NoTrayIcon #include<GUIConstants.au3> #include <WindowsConstants.au3> #include<IE.au3> #include<Misc.au3> Opt("GUIOnEventMode", 1) Opt("GUICloseOnESC", 0) AutoItSetOption("MouseCoordMode", 2); sets mouse to use client cordinates AutoItSetOption("PixelCoordMode", 2); set pixel functions to use client cordinates ;---------------------------------------------------------------------------------------- ; Declare some variables ;---------------------------------------------------------------------------------------- ;Standard detail free world 1 column = 30 px spacing = 12 Dim $drop_x_min[4] = [586,628,670,712] Dim $drop_x_max[4] = [616,658,700,742] ;standard detail free world - 7 rows - 1 row = 30px spacing = 6 Dim $drop_y_min[7] = [355,391,427,463,499,535,571] Dim $drop_y_max[7] = [385,421,457,493,529,565,601] Dim $mode = 0, $version = "", $start = 0 Dim $Color[2], $timer[6], $Cords[2] = [0,0], $pos[2] = [0,0] Dim $menu_cords[2] = [0,0], $dropped Dim $get_tired = Random(50, 100, 1), $sleeptime Dim $drop_from_slot Dim $fail_at, $fail_counter = 0, $failed_slot ="" ;----------------------------------------------------------------------------------------- ; Setup all inventory slots ;----------------------------------------------------------------------------------------- Dim $slot[29][4] dim $i Dim $row = 0 Dim $column = 0 For $i = 1 to 28 $slot[$i][0] = $drop_x_min[$column] $slot[$i][1] = $drop_x_max[$column] $slot[$i][2] = $drop_y_min[$row] $slot[$i][3] = $drop_y_max[$row] $column+=1 if $column > 3 Then $column = 0 $row+=1 EndIf Next HotKeySet("{ESC}", "_StopBot") _Singleton("Power Training") _IEErrorHandlerRegister() #region Welcome GUI $form0 = GUICreate("Power Training", 400, 70, -1, -1, $WS_CAPTION, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) $label0 = GUICtrlCreateLabel("Welcome to Power Training...Please wait for vertification....", 10, 5, 390, 20, -1) $progress0 = GUICtrlCreateProgress(10, 25, 240, 20, $PBS_SMOOTH) $label1 = GUICtrlCreateLabel("Looking for Java plug-in....", 10, 50, 240, 20, -1) GUISetState(@SW_SHOW, $form0) For $i = 1 To 100 GUICtrlSetData($progress0, $i) Sleep(5) Next If Not _CheckJava() Then $label3 = GUICtrlCreateLabel("Get the latest Java", 260, 25, 140, 20, -1) GUICtrlSetData($label1, "Please install Java before continuing...") _HyperLink($label3) Else GUICtrlCreateLabel("Version: " & $version, 260, 25, 140, 20, -1) $label4 = GUICtrlCreateLabel("Start", 370, 50, 30, 20, -1) _HyperLink($label4) EndIf While Not $mode $Info0 = GUIGetCursorInfo($form0) If $version == "" Then If $Info0[2] And $Info0[4] = $label3 Then While _IsPressed("01") Sleep(1) WEnd _GetJava() Exit EndIf ElseIf $Info0[2] And $Info0[4] = $label4 Then While _IsPressed("01") Sleep(1) WEnd $mode = 1 GUIDelete($form0) EndIf Sleep(1) WEnd #endregion Welcome GUI #region Main GUI ;---------------------------------------------------------------------------------- ; Setup the GUI ;---------------------------------------------------------------------------------- $form1 = GUICreate("RSClient", 810, 700, -1, -1, -1) ;Create tab page $tab=GUICtrlCreateTab (20,10,770,125) GUICtrlSetFont($tab, 9, 400, 0, "Tahoma") ;Create first tab $tab0=GUICtrlCreateTabitem ("Main") $button2 = GUICtrlCreateButton("Start Training", 600, 48, 170, 65, -1) GUICtrlSetFont(-1, 16, 400,0,"Century Gothic") $status_label = GUICtrlCreateLabel("", 35, 70, 530,20, $SS_CENTER) GUICtrlSetFont(-1, 12, 400,0,"Century Gothic") ;Create thierd tab $tab3=GUICtrlCreateTabitem ("Inventory") ;Create the label for the scan slots / drop spot $scan_slots_label = GUICtrlCreateLabel("Start dropping at slot :", 35, 45, 125,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $drop_spot = GUICtrlCreateInput (IniRead("power trainer.ini", "inventory", "drop_slot", 2),165,43, 40, 20,$ES_READONLY) $updown_1 = GUICtrlCreateUpdown($drop_spot) GUICtrlSetLimit ( $updown_1, 28, 1 ) ;Timers for before right click $label_12 = GUICtrlCreateLabel("Time before right click between:", 255, 45, 190,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $timer_1 = GUICtrlCreateInput (IniRead("power trainer.ini", "timers", "timer_1", 2),460,43, 40, 20,$ES_READONLY) $updown_2 = GUICtrlCreateUpdown($timer_1) GUICtrlSetLimit ( $updown_2, 50, 1 ) $label_13 = GUICtrlCreateLabel("and", 510, 45, 30,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $timer_2 = GUICtrlCreateInput (IniRead("power trainer.ini", "timers", "timer_2", 5),540,43, 40, 20,$ES_READONLY) $updown_3 = GUICtrlCreateUpdown($timer_2) GUICtrlSetLimit ( $updown_3, 50, 1 ) ;Timers for before mouse move $label_13 = GUICtrlCreateLabel("Time before mouse move between:", 255, 75, 210,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $timer_3 = GUICtrlCreateInput (IniRead("power trainer.ini", "timers", "timer_3", 5),460,73, 40, 20,$ES_READONLY) $updown_4 = GUICtrlCreateUpdown($timer_3) GUICtrlSetLimit ( $updown_4, 50, 1 ) $label_14 = GUICtrlCreateLabel("and", 510, 75, 30,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $timer_4 = GUICtrlCreateInput (IniRead("power trainer.ini", "timers", "timer_4", 10),540,73, 40, 20,$ES_READONLY) $updown_5 = GUICtrlCreateUpdown($timer_4) GUICtrlSetLimit ( $updown_5, 50, 1 ) ;Timers for before menu click $label_15 = GUICtrlCreateLabel("Time before menu click between:", 255, 105, 210,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $timer_5 = GUICtrlCreateInput (IniRead("power trainer.ini", "timers", "timer_5", 2),460,103, 40, 20,$ES_READONLY) $updown_6 = GUICtrlCreateUpdown($timer_5) GUICtrlSetLimit ( $updown_5, 50, 1 ) $label_16 = GUICtrlCreateLabel("and", 510, 105, 30,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $timer_6 = GUICtrlCreateInput (IniRead("power trainer.ini", "timers", "timer_6", 6),540,103, 40, 20,$ES_READONLY) $updown_7 = GUICtrlCreateUpdown($timer_6) GUICtrlSetLimit ( $updown_6, 50, 1 ) ;create the button for color picking $label_10 = GUICtrlCreateLabel("When finding this color :", 35, 70, 140,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") ;this is label for the color display of the picked color $label_11 = GUICtrlCreateLabel("", 35, 85, 130,35) GUICtrlSetBkColor ( $label_11, IniRead("power trainer.ini", "inventory", "color", 4006425)) ;Colorpicker button $button1 = GUICtrlCreateButton("+", 650, 70, 100, 40, -1) GUICtrlSetCursor(-1, 3) GUICtrlSetFont(-1, 30, 400) ;create label for colorpicker $label8 = GUICtrlCreateLabel("Log/Ore Color", 650, 45, 100, 20, $SS_CENTER) GUICtrlSetFont(-1, 9.5, 400,0,"Tahoma") ;Create fourth tab $tab4=GUICtrlCreateTabitem ("Fail-Drop") ;Create the label for the drop $fail_drop_label = GUICtrlCreateLabel("Hit examine ore random between :", 35, 45, 195,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $fail_at_1 = GUICtrlCreateInput (IniRead("power trainer.ini", "inventory", "fail_at_1", 6),235,43, 40, 20,$ES_READONLY) $updown_8 = GUICtrlCreateUpdown($fail_at_1) GUICtrlSetLimit ( $updown_1, 99, 1 ) $label_17 = GUICtrlCreateLabel("and", 285, 45, 30,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") $fail_at_2 = GUICtrlCreateInput (IniRead("power trainer.ini", "inventory", "fail_at_2", 28),315,43, 40, 20,$ES_READONLY) $updown_9 = GUICtrlCreateUpdown($fail_at_2) GUICtrlSetLimit ( $updown_1, 99, 1 ) $label_18 = GUICtrlCreateLabel("drops", 365, 45, 30,20) GUICtrlSetFont(-1, 9.5, 400, 0, "Tahoma") ;end tab definition GUICtrlCreateTabitem ("") ;---------------------------------------------------------------------------------- ; Create the explorer object and navigate to free world ;---------------------------------------------------------------------------------- $oIE = _IECreateEmbedded() $guiactivex = GUICtrlCreateObj($oIE, 20, 10, 770, 680, BitOR($WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) _IENavigate($oIE, "http://www.runescape.com/game.ws?m=0&j=1", 0) ;---------------------------------------------------------------------------------- ; set the events for GUI ;---------------------------------------------------------------------------------- ; GUICtrlSetOnEvent ( $updown_1, "drop_spot_selector_changed" ) GUICtrlSetOnEvent ( $updown_2, "timer_1_click" ) GUICtrlSetOnEvent ( $updown_3, "timer_2_click" ) GUICtrlSetOnEvent ( $updown_4, "timer_3_click" ) GUICtrlSetOnEvent ( $updown_5, "timer_4_click" ) GUICtrlSetOnEvent ( $updown_6, "timer_5_click" ) GUICtrlSetOnEvent ( $updown_7, "timer_6_click" ) GUICtrlSetOnEvent ( $updown_8, "fail_at_changed" ) GUICtrlSetOnEvent ( $updown_9, "fail_at_changed" ) GUICtrlSetOnEvent($button2, "_Start") GUISetOnEvent($GUI_EVENT_MINIMIZE, "_StopBot") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") ;---------------------------------------------------------------------------------- ; Show the GUI ;---------------------------------------------------------------------------------- GUISetState(@SW_SHOW, $form1) ;---------------------------------------------------------------------------------- ; Init start values ;---------------------------------------------------------------------------------- ;init the dropspot in inventory to get cordinates to scan drop_spot_selector_changed() ;init timer values. All times in GUI are stated in 1/100 of a second timer_1_click() timer_2_click() timer_3_click() timer_4_click() timer_5_click() timer_6_click() ;Init the inventory search color $Color[1] = IniRead("power trainer.ini", "inventory", "color", 4006425) ;set the fail point where we deliberatly hit examine ore fail_at_changed() ;---------------------------------------------------------------------------------- ; Main program ;---------------------------------------------------------------------------------- While 1 $Info1 = GUIGetCursorInfo($form1) ;If $Info1[2] And $Info1[4] = $button0 Then ; While _IsPressed("01") ; Sleep(1) ; WEnd ; _GetColor(0) If $Info1[2] And $Info1[4] = $button1 Then While _IsPressed("01") Sleep(1) WEnd _GetColor(1) EndIf While $start GUICtrlSetData ( $status_label, "Searching inventory slot " & $drop_from_slot & " for color match" ) $Cords = PixelSearch($slot[$drop_from_slot][0], $slot[$drop_from_slot][2], $slot[$drop_from_slot][1], $slot[$drop_from_slot][3], $Color[1], 8) If Not @error Then ;When done we return mouse back to aproximate where we took it from $pos = MouseGetPos() $pos[0] = Random($pos[0]-20, $pos[0]+20,1) $pos[1] = Random($pos[1]-20, $pos[1]+20,1) ;we are full start dropping For $i = 1 To $drop_from_slot GUICtrlSetData ( $status_label, "Dropping from inventory slot " & $i ) If $start = 0 Then ExitLoop ;get the random drop position $Cords[0] = Random($slot[$i][0], $slot[$i][1]) $Cords[1] = Random($slot[$i][2], $slot[$i][3]) ;move mouse to get a text displayed if this is an ore MouseMove( $Cords[0], $Cords[1],2) Sleep(Random($timer[0],$timer[1],1)) ;------------------------------------------------------- ; check if the text in upper left corner matches an ore ;------------------------------------------------------- $dummy = PixelSearch(61, 147, 95, 161, 15106873, 40) If Not @error Then ;confirmed ore in inventory we need the menu cords $menu_cords[0] = Random($Cords[0]-30, $Cords[0]+30, 1) $fail_counter+=1 if $fail_at = $fail_counter Then if $i < 25 Then $menu_cords[1] = Random($Cords[1]+49, $Cords[1]+63, 1) Else $menu_cords[1] = Random(613, 627, 1) EndIf if IsArray ( $failed_slot ) Then ReDim $failed_slot[UBound($failed_slot) + 1] $failed_slot[UBound($failed_slot) - 1] = $i Else Dim $failed_slot[1] = [$i] EndIf $fail_counter = 0 ;----------------------------------------------- ; Set a new random failpoint ;----------------------------------------------- fail_at_changed() Else if $i < 25 Then $menu_cords[1] = Random($Cords[1]+34, $Cords[1]+48, 1) Else $menu_cords[1] = Random(598, 612, 1) EndIf EndIf MouseClick("Right") Sleep(Random($timer[2],$timer[3],1)) MouseMove($menu_cords[0],$menu_cords[1],2) MouseClick("Left") Sleep(Random($timer[4],$timer[5],1)) $dropped+=1 if $dropped = $get_tired Then $sleeptime = Random(7000,20000,1) GUICtrlSetData ( $status_label, "Pausing script for " & Round($sleeptime/1000, 1) & " seconds." ) $get_tired = Random(50, 100, 1) $dropped = 0 Sleep($sleeptime) EndIf Else ;We might just have been taken by a random event, or something is deffently wrong - so we stop Dim $failed_slot = "" _StopBot() GUICtrlSetData ( $status_label, "Stopped as i could not confirm ore in inventory" ) ExitLoop EndIf Sleep(1) Next ;-------------------------------------------------------------------------------------------------------------- ; if we deliberatly missed to drop something we will clean it up here ;-------------------------------------------------------------------------------------------------------------- if IsArray ( $failed_slot ) Then For $i = UBound($failed_slot)-1 to 0 Step -1 GUICtrlSetData ( $status_label, "Dropping from inventory slot " & $failed_slot[$i] ) If $start = 0 Then ExitLoop ;get the random drop position $Cords[0] = Random($slot[$failed_slot[$i]][0], $slot[$failed_slot[$i]][1]) $Cords[1] = Random($slot[$failed_slot[$i]][2], $slot[$failed_slot[$i]][3]) ;move mouse to get a text displayed if this is an ore MouseMove( $Cords[0], $Cords[1],2) Sleep(Random($timer[0],$timer[1],1)) ;------------------------------------------------------- ; check if the text in upper left corner matches an ore ;------------------------------------------------------- $dummy = PixelSearch(61, 147, 95, 161, 15106873, 40) If Not @error Then ;confirmed ore in inventory we need the menu cords $menu_cords[0] = Random($Cords[0]-30, $Cords[0]+30, 1) if $failed_slot[$i] < 25 Then $menu_cords[1] = Random($Cords[1]+34, $Cords[1]+48, 1) Else $menu_cords[1] = Random(598, 612, 1) EndIf MouseClick("Right") Sleep(Random($timer[2],$timer[3],1)) MouseMove($menu_cords[0],$menu_cords[1],2) MouseClick("Left") Sleep(Random($timer[4],$timer[5],1)) $dropped+=1 if $dropped = $get_tired Then $sleeptime = Random(7000,20000,1) GUICtrlSetData ( $status_label, "Pausing script for " & Round($sleeptime/1000, 1) & " seconds." ) $get_tired = Random(50, 100, 1) $dropped = 0 Sleep($sleeptime) EndIf Else ;We might just have been taken by a random event, or something is deffently wrong - so we stop Dim $failed_slot = "" _StopBot() GUICtrlSetData ( $status_label, "Stopped as i could not confirm ore in inventory" ) ExitLoop EndIf Sleep(1) Next Dim $failed_slot = "" EndIf ;return mouse to about where it came from MouseMove($pos[0],$pos[1],2) EndIf Sleep(1000) WEnd Sleep(1) WEnd #endregion Main GUI Func _HyperLink($label) GUICtrlSetColor($label, 0x1B2392) GUICtrlSetFont($label, 8.5, 400, 4, "Arial") GUICtrlSetCursor($label, 0) EndFunc ;==>_HyperLink Func _CheckJava() $regread = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Web Start", "CurrentVersion") $version = String($regread) If Not @error Then Return $version And 1 Else Return 0 EndIf EndFunc ;==>_CheckJava Func _GetJava() _IECreate("www.java.com/getjava/", 0, 1, 0, 0) EndFunc ;==>_GetJava Func _Exit() IniWrite("power trainer.ini", "inventory", "color", $Color[1]) IniWrite("power trainer.ini", "inventory", "drop_slot", GUICtrlRead ($drop_spot)) IniWrite("power trainer.ini", "timers", "timer_1", GUICtrlRead ($timer_1)) IniWrite("power trainer.ini", "timers", "timer_2", GUICtrlRead ($timer_2)) IniWrite("power trainer.ini", "timers", "timer_3", GUICtrlRead ($timer_3)) IniWrite("power trainer.ini", "timers", "timer_4", GUICtrlRead ($timer_4)) IniWrite("power trainer.ini", "timers", "timer_5", GUICtrlRead ($timer_5)) IniWrite("power trainer.ini", "timers", "timer_6", GUICtrlRead ($timer_6)) IniWrite("power trainer.ini", "inventory", "fail_at_1", GUICtrlRead ($fail_at_1)) IniWrite("power trainer.ini", "inventory", "fail_at_2", GUICtrlRead ($fail_at_2)) Exit EndFunc ;==>_Exit ;timer functions Func timer_1_click() $timer[0] = GUICtrlRead ($timer_1) * 100 EndFunc ;==>_timer_1_click Func timer_2_click() $timer[1] = GUICtrlRead ($timer_2) * 100 EndFunc ;==>_timer_2_click Func timer_3_click() $timer[2] = GUICtrlRead ($timer_3) * 100 EndFunc ;==>_timer_3_click Func timer_4_click() $timer[3] = GUICtrlRead ($timer_4) * 100 EndFunc ;==>_timer_4_click Func timer_5_click() $timer[4] = GUICtrlRead ($timer_5) * 100 EndFunc ;==>_timer_5_click Func timer_6_click() $timer[5] = GUICtrlRead ($timer_6) * 100 EndFunc ;==>_timer_6_click Func fail_at_changed() $fail_at = Random(GUICtrlRead ($fail_at_1), GUICtrlRead ($fail_at_2), 1) EndFunc ;color function Func _GetColor($number) Local $Colordata $Colordata = PixelGetColor(MouseGetPos(0), MouseGetPos(1)) $Color[$number] = $Colordata if $number = 1 Then GUICtrlSetBkColor ( $label_11, $Colordata ) EndIf EndFunc ;==>_GetColor ;start function Func _Start() ;GUICtrlSetState($button0, $GUI_DISABLE) GUICtrlSetState($button1, $GUI_DISABLE) GUICtrlSetState($button2, $GUI_DISABLE) $start = 1 EndFunc ;==>_Start ;stop function Func _StopBot() If $start Then $start = 0 ;GUICtrlSetState($button0, $GUI_ENABLE) GUICtrlSetState($button1, $GUI_ENABLE) GUICtrlSetState($button2, $GUI_ENABLE) GUICtrlSetData ( $status_label, "Stopped" ) EndIf EndFunc;==>_StopBot ;Get a new drop spot set Func drop_spot_selector_changed() $drop_from_slot = GUICtrlRead ($drop_spot) EndFunc;==>_drop:spot_selector_changed Edited November 8, 2008 by Sprille Link to comment Share on other sites More sharing options...
Catta Posted November 8, 2008 Share Posted November 8, 2008 I tried to run the first script, the power trainer and i got this error: CODEC:\blablabla\Power_Training.au3 (21) : ==> Variable used without being declared.: $form0 = GUICreate("Power Training", 400, 70, -1, -1, $WS_CAPTION, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) $form0 = GUICreate("Power Training", 400, 70, -1, -1, ^ ERROR i tried to run your last script and i got another error: CODEC:\blablabla\filename.au3 (64) : ==> Variable used without being declared.: $progress0 = GUICtrlCreateProgress(10, 25, 240, 20, $PBS_SMOOTH) $progress0 = GUICtrlCreateProgress(10, 25, 240, 20, ^ ERROR it seem this is not a common problem, how can i fix it? Link to comment Share on other sites More sharing options...
Catta Posted November 8, 2008 Share Posted November 8, 2008 nevermind, it was a common problem i got with almost every AutoIt scripts, i fixed it.. sorry for posts, delete them Catta Link to comment Share on other sites More sharing options...
Dyson Posted November 10, 2008 Share Posted November 10, 2008 Catta how did you fix it? I'm getting the same problem but i'm newer to Autoit and I don't know how to fix it. I feel like it's something unrelated to the variable not being declared because I can't possibly see what variable they're talking about. Link to comment Share on other sites More sharing options...
DexterMorgan Posted November 10, 2008 Share Posted November 10, 2008 Catta how did you fix it? I'm getting the same problem but i'm newer to Autoit and I don't know how to fix it. I feel like it's something unrelated to the variable not being declared because I can't possibly see what variable they're talking about.i think you need #include<progressbarconstants.au3> and#include<staticconstatnts.au3>#include<windowsconstatnts.au3>at the top..not sure, something like that, Im not good with the new includes ethier code Link to comment Share on other sites More sharing options...
JellyFish666 Posted November 11, 2008 Share Posted November 11, 2008 you guys do know, Runescape added protection for mining making it a lot harder to mine. Link to comment Share on other sites More sharing options...
Sprille Posted November 11, 2008 Share Posted November 11, 2008 you guys do know, Runescape added protection for mining making it a lot harder to mine.Well it's only a drop bot, and it wont hit same spot twice (if it does it will be very rare) as it does not use color search to drop, only to confirm ore is there.But yes mining is hard, at least making a bot that would work without beeing detected is. Thats why i'll stick to dropping, thats not all that hard i think. Link to comment Share on other sites More sharing options...
jvanegmond Posted November 11, 2008 Share Posted November 11, 2008 The link to the exe is dead but the attached ZIP still holds the code:http://www.autoitscript.com/forum/index.php?showtopic=28984I've been working with RuneScape quite a bit more after that, and it seemed to me that trying to OCR the text in the top left is the perfect way to make sure that whatever you're clicking is what you want to click. So I've tried to OCR it, but that was quite a pain, if anyone else wants to pick it up I can post the source code of the unfinished OCR here. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now