
Tex
Member

Nov 3, 2008, 6:01 PM
Post #3 of 3
(413 views)
Shortcut
|
|
Re: [Cadeon] VB .NET + Runescape, Pixel/Colour Searching..
[In reply to]
|
Can't Post
|
|
Well after a while of searching I came across "autoit", a program/macroing language that lets you create scripts with the autoit language and compile them into stand-alone .exe's. Managed to create a pixel searcher after finding that, hope that helps anyone with the same problem.. Messy code time. made this a while ago i have like 29383982398 different color picking (lmao) autos that all blow compared to neXus and rsbot etc. but thats java and i made these off of no programming experience other than teaching myself as well as the help menu.
#include <GUIConstants.au3> #NoTrayIcon hotkeyset("{end}","quit") hotkeyset("{ESC}","start") global $paused #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Rs Exploits Miner", 407, 216, 193, 125, $WS_CAPTION, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) $Group1 = GUICtrlCreateGroup("", 8, 8, 185, 177) $orebut = GUICtrlCreateButton("Rock", 16, 136, 73, 41, 0) $rockbut = GUICtrlCreateButton("Ore", 112, 136, 73, 41, 0) $connect = GUICtrlCreateButton("Pick Color", 16, 16, 169, 49, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("", 209, 10, 185, 81) $Label3 = GUICtrlCreateLabel("How many Seconds in between", 216, 24, 154, 17) $Label4 = GUICtrlCreateLabel("each Rock?", 216, 40, 63, 17) $Input1 = GUICtrlCreateInput("10", 216, 64, 153, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label1 = GUICtrlCreateLabel("Press ESCAPE to Start", 8, 192, 112, 17) $Group3 = GUICtrlCreateGroup("", 212, 105, 185, 81) $Label5 = GUICtrlCreateLabel("How many rocks would you like", 219, 119, 148, 17) $Input2 = GUICtrlCreateInput("25", 219, 159, 153, 21) $Label6 = GUICtrlCreateLabel("to mine?", 219, 133, 52, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label7 = GUICtrlCreateLabel("Press END to Stop", 290, 192, 117, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit endswitch select case $nmsg = $connect HotKeySet("{PAUSE}" , "TogglePause") $hexColor=GUICtrlCreateInput("", 80, 900, 90, 20,$ES_READONLY) GUICtrlCreateLabel("Color:", 20, 74) $MostrarColor=GUICtrlCreateLabel("", 60, 70, 90, 20,$ES_READONLY) $mostrarcolor = GUICtrlCreateLabel(" ", 16, 70, 167, 41) GUICtrlCreateLabel("Press Pause/Break to FREEze color.", 0, 115 ,200, 15, $SS_CENTER) GUISetState() while 1 While 1 $msg=GUIGetMsg() data() Select Case $msg=$GUI_EVENT_CLOSE exit EndSelect WEnd Func data() While 1 $msg=GUIGetMsg() Select Case $msg=$GUI_EVENT_CLOSE $loop=0 exit EndSelect Sleep(25) $pos=MouseGetPos() global $color=PixelGetColor($pos[0],$pos[1]) $HEX6=StringRight(Hex($color),6) GUICtrlSetData($hexColor,"0x"&$HEX6) GUICtrlSetBkColor($MostrarColor,"0x"&Hex($color)) WEnd EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(10) Select Case $msg=$GUI_EVENT_CLOSE $loop=0 exit EndSelect $msg = GUIGetMsg() if $msg = $orebut then global $vary2 = $color msgbox(1,"Rock","Rock color picked!") Endif if $msg = $rockbut then global $vary4 = $color msgbox(1,"Ore","Ore color Picked") Endif WEnd EndFunc $msg=$connect2 Select Case $msg=$connect2 exitloop EndSelect WEnd endselect wend Func Start() $pcp = 0 $vary = guictrlread($input1) $vary3 = guictrlread($input2) Dim $arr[2][1000] $i = 0 $StockPriceChange = Random(1000, 3000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;clicks and mines rock Do Do GUIsetstate(@SW_MINIMIZE) Sleep("2000") $coord = PixelSearch(0, 0, 1279, 1023, $vary2) If @error Then $coord = PixelSearch(0, 0, 1279, 1023, $vary2) EndIf Until Not @error $arr[0][$i] = $coord[0] $arr[1][$i] = $coord[1] Sleep("70") MouseMove($coord[0], $coord[1]) Sleep("100") MouseDown("left") Sleep("100") MouseUp("left") $StockPriceChange = Random(1, 28) sleep("1200") $rand = random(0,25) if $rand < 1 Then send("{left down}") sleep("1100") send("{left up}") endif if $rand < 2 and $rand > .9 Then send("{right down}") sleep("1074") send("{right up}") endif if $rand < 3 and $rand > 1.9 Then send("{up down}") sleep("1160") send("{up up}") endif if $rand < 4 and $rand > 2.9 Then send("{down down}") sleep("1004") send("{down up}") endif if $rand < 5 and $rand > 3.9 Then send("hi") sleep("800") send("{enter}") endif if $rand < 6 and $rand > 4.9 Then send("i hate mining") sleep("1112") send("{enter}") endif if $rand < 7 and $rand > 5.9 Then sleep("200") send("so bored") sleep("570") send("{enter}") endif Sleep($vary*1000+$stockpricechange) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BELOW RIGHT CLICKS ORE if $pcp = 0 Then firstround() EndIf if $pcp > 0 Then secondround() endif ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $pcp = $pcp + 1 Until $pcp = $vary3 msgbox(1,"Finished", "The AutoMiner has completed it's task") endfunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; global $arr1[2][1000] func firstround() do do global $i = 0 global $arr1[2][1000] sleep("1000") global $coord1 = PixelSearch(0, 0, 1279, 1023, $vary4) If @error Then PixelSearch(0, 0, 1279, 1023, $vary4) EndIf until not @error $arr1[0][$i] = $coord1[0] $arr1[1][$i] = $coord1[1] Sleep("70") MouseMove($coord1[0], $coord1[1]) Sleep("70") MouseDown("right") Sleep("100") MouseUp("right") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Goes down 40 pixels global $a = mousegetpos() sleep("1000") global $right = mousemove($a[0], $a[1] + 40) sleep("600") MouseDown("right") Sleep("100") MouseUp("right") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; sleep("600") MouseDown("left") Sleep("200") MouseUp("left") $i = $i + 1 until $i = 1 endfunc global $arr1[2][1000] global $arr1[0][$i] = $coord1[0] global $arr1[1][$i] = $coord1[1] global $a = mousegetpos() global $right = mousemove($a[0], $a[1] + 40) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; func secondround() $clicks = random(1, 5) do $i = 0 sleep("1000") MouseMove($coord1[0] + $clicks, $coord1[1] + $clicks) sleep("600") MouseDown("right") Sleep("100") MouseUp("right") sleep("600") MouseMove($a[0], $a[1] + 40) sleep("400") MouseDown("left") Sleep("200") MouseUp("left") $i = $i + 1 until $i = 1 endfunc func quit() Exit endfunc
hewoo
(This post was edited by Tex on Nov 3, 2008, 6:02 PM)
|