
Paranoia
Members-
Posts
9 -
Joined
-
Last visited
Paranoia's Achievements

Seeker (1/7)
0
Reputation
-
That'll work! Thanks again
-
Thanks! Edit: I'm now having trouble with... $Coord[$i][$j] = PixelSearch( $L, $T, $R, $B, $BallColor, $BallShadeVar, $PixelSkip) I think it's because PixelSearch is an array, but I don't know how to fix this. also, sorry for the extremely late reply, I had forgotten I had posted this and I had not needed to use this script until now. :">
-
I'm trying to make a program to find the center of an object which is a single color. I have never used arrays before and i am unsure how to write them. This is what I have so far. $WinName = $BallColor = $BallShadeVar = $PixelSkip = ;Auto Global $Coord Global $Res $Vertical = 0 $Horizontal = 0 $AvgNum = 0 $WinSize = WinGetClientSize($WinName) $WidthInc = ($WinSize[0] / 10) $HeightInc = ($WinSize[1] / 10) Opt("CaretCoordMode", 0) For $i = 1 to 10 step 1 For $j = 1 to 10 step 1 SetError(0) $L = ($WidthInc * ($i - 1)) $T = ($HeightInc * ($j - 1)) $R = ($WidthInc * $i) $B = ($HeightInc * $j) $Coord = PixelSearch( $L, $T, $R, $B, $BallColor, $BallShadeVar, $PixelSkip) If @error Then $Res[$i][$j] = 0 Else $Res[$i][$j] = 1 EndIf Next Next For $i = 1 to 10 step 1 For $j = 1 to 10 Step 1 $Horizontal = ($Horizontal + ($Res[$i][$j] * $i)) $AvgNum = $AvgNum + $Res[$i][$j] Next Next $iCenter = ($Horizontal / $AvgNum) $AvgNum = 0 For $i = 1 to 10 step 1 For $j = 1 to 10 Step 1 $Vertical = ($Vertical + ($Res[$i][$j] * $j)) $AvgNum = $AvgNum + $Res[$i][$j] Next Next $jCenter = ($Vertical / $AvgNum) If your wondering I'm building myself a little robot to chase a ball around. Thanks, Paranoia
-
Wow, That's EXACTLY what I was looking for! Thank you so much!
-
Thank you very much. Unfortunately I recently found out that I cannot use C++ for this project since it requires windows.h, which is not allowed for VC++ express. I have been thinking about VB.net or VB6.0, but am still unsure whether I want to give up on autoit or not (one of the few I can understand). Anyways, just in case the of the off chance that this would be easy to translate, I'm going to post what I wanted to insert. I'm not asking you to translate, just if there is an easy way, a pointer or two would be nice. There is more, but it starts repeating the same structure, just different calls. EDIT: Now that I looked at it again, I'm thinking that this isn't enough information to be useful. I'll continue to try and figure it out by myself, but leave it up just in case I'm wrong. If you were curious, what I found. "A decision was made long ago by the team that Visual C++ Express (a free product) cannot be used for native Windows development out of the box. It can only be used for .NET/CLR development." Thanks, Paranoia
-
I really hate to be of a bother, but I've run into a road block while writing a certain script. I'm writing a script which is mostly using dll's to control an outside circuit board (com I think?). Anyways, I'm having troubles connecting to it. I have a sample of how to do it in C++ and was wondering if there was a way I could directly insert a small snippet of it into my program. Also, I have trouble reading C++, the structure just makes my mind shut down, so I'd really prefer not to write this in C++. Thanks, Paranoia
-
This is a gravitational bot =D automaticly increaces the velocity by one... so you can get all those pretty designs. Heres the script HotKeySet( "{esc}" , "Gone") WinActivate("Gravitational Combat") $i = 0 $x = 0 $y = 0 While WinActive( "Gravitational Combat" ) $i = $i + 1 while $i >= 10 $i = $i - 10 $x = $x + 1 WEnd While $x >= 10 $x = $x - 10 $y = $y + 1 WEnd $sum2 = 1 $sum = 2 Send("{Tab}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{" & $y & "}") Send("{" & $x & "}") Send("{" & $i & "}") Send("{Enter}") While $sum <> $sum2 $sum = PixelChecksum(0,0,@DesktopWidth,@DesktopHeight) Sleep(500) $sum2 = PixelChecksum(0,0,@DesktopWidth,@DesktopHeight) WEnd $sum2 = 1 $sum = 2 Send("{Tab}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{" & $y & "}") Send("{" & $x & "}") Send("{" & $i & "}") Send("{Enter}") While $sum <> $sum2 $sum = PixelChecksum(0,0,@DesktopWidth,@DesktopHeight) Sleep(500) $sum2 = PixelChecksum(0,0,@DesktopWidth,@DesktopHeight) WEnd WEnd Func Gone() Exit EndFunc oÝ÷ ÙêÞÉè¦êé¢Ç¢»aÆè¶+lë-)Ýiû§jwe¢,r%§¶«zÆ¥¢Ú)Þ²íëç§lGb·öÀ¦«z{eÊÊ&zئzËay¦è½êk¢ ÚØßÙíÂä²^è¬jv¥µêçjدzØb²Þ¬jX¶W¬©Ýj[(øµ©±©hbçè®Ø^²-¶Þ¢÷«Ü"[$§ºfÞ¬ëazº'y«¢+Ø)!½Ñ-åMÐ ÅÕ½ÐííÍôÅÕ½Ðì°ÅÕ½Ðí½¹ÅÕ½Ðì¤()]¥¹Ñ¥ÙÑ ÅÕ½ÐíÉÙ¥ÑÑ¥½¹° ½µÐÅÕ½Ðì¤(ÀÌØí¤ôÀ(ÀÌØíàôÀ(ÀÌØíäôÀ)]¡¥±]¥¹Ñ¥Ù ÅÕ½ÐíÉÙ¥ÑÑ¥½¹° ½µÐÅÕ½Ðì¤($ÀÌØí¤ôÀÌØí¤¬Ä(%Ý¡¥±ÀÌØí¤ÐìôÄÀ($$ÀÌØí¤ôÀÌØí¤´ÄÀ($$ÀÌØíàôÀÌØíà¬Ä(%]¹(%]¡¥±ÀÌØíàÐìôÄÀ($$ÀÌØíàôÀÌØíà´ÄÀ($$ÀÌØíäôÀÌØíä¬Ä(%]¹(%M±À ÔÀÀ¤(%M¹ ÅÕ½ÐííQôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½ÐíìÅÕ½ÐìµÀìÀÌØíäµÀìÅÕ½ÐíôÅÕ½Ðì¤(%M¹ ÅÕ½ÐíìÅÕ½ÐìµÀìÀÌØíàµÀìÅÕ½ÐíôÅÕ½Ðì¤(%M¹ ÅÕ½ÐíìÅÕ½ÐìµÀìÀÌØí¤µÀìÅÕ½ÐíôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí¹ÑÉôÅÕ½Ðì¤(%M±À ÔÀÀÀ¤(%M±À ÔÀÀ¤(%M¹ ÅÕ½ÐííQôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí MôÅÕ½Ðì¤(%M¹ ÅÕ½ÐíìÅÕ½ÐìµÀìÀÌØíäµÀìÅÕ½ÐíôÅÕ½Ðì¤(%M¹ ÅÕ½ÐíìÅÕ½ÐìµÀìÀÌØíàµÀìÅÕ½ÐíôÅÕ½Ðì¤(%M¹ ÅÕ½ÐíìÅÕ½ÐìµÀìÀÌØí¤µÀìÅÕ½ÐíôÅÕ½Ðì¤(%M¹ ÅÕ½Ðíí¹ÑÉôÅÕ½Ðì¤(%M±À ÔÀÀÀ¤)]¹()Õ¹½¹ ¤(%á¥Ð)¹Õ¹
-
My first real script(almost), I get an error before I start it and I'm wondering if people would help me fix it. I know this is not genral support, but I think its only a little glitch so I'll post the finished product in this same thread, or just edit it. USE AT YOUR OWN RISK It's a WoW fishing bot. Edit: No more errors, but still doesnt quite work ----------------------------------------------------------------------------------------------------------------------------- ;WorldOfWarcraft Fisher ;Declarations Global $BobberAppearTime Global $bobberAppearTime Global $BobberColor Global $BobberColorVariation Global $BobberPos Global $Bottom Global $Box Global $CastingKey Global $CatchClickDown Global $CatchClickDownVariation Global $Constant Global $Exit Global $i Global $Left Global $MouseSpeed Global $Right Global $SearchWait Global $Splash Global $SplashColor Global $SplashColorVariation Global $Start Global $Stop Global $Top Global $VCatchClickDown Global $VWaitBeforeCast Global $Wait Global $WaitBeforeCast Global $WaitBeforeCastVariation Global $WaitForMouse Global $WindowTitle ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; It is recomended that you turn down all graphics before starting script; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $WindowTitle = "World Of Warcraft" $CastingKey = "{1}" ;Hot Keys $Start = "{pgup}" ;Key you hit to start the bot $Stop = "{pgdn}" ;Key you hit to stop the bot $Exit = "{esc}" ;Key you hit to Exit the bot ;Color & Variations $BobberColor = 0x21274E $BobberColorVariation = 10 $SplashColor = 0xB8C2D4 $SplashColorVariation = 10 ;Waits $Wait = 30 ; in seconds $WaitBeforeCast = 5000 ;In Miliseconds $WaitBeforeCastVariation = 1000 $bobberAppearTime = 5000 ;Time it takes for the bobber to appear in miliseconds $CatchClickDown = 200 ;In Miliseconds $CatchClickDownVariation = 80 $SearchWait = 50 $MouseSpeed = 1 $WaitForMouse = 100 ;Searching Area ;Bobber $Top = 180 $Bottom = 540 $Right = 1159 $Left = 10 ;Box Size around bobber for searching for splash $Box = 200 ;Far left to far right, top to bottom, measuring from feather ;;;;;;;;;;;;;;;;;;;;Recalculations & Reformating;;;;;;;;;;;;;;;;;; ;Recalc $Wait = ($Wait * 1000) $Box = ($Box / 2) ;;;;;;;;;;;;;;;;;;;;End Of Recalculations;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;Hot Keys;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HotKeySet( $Start , "FishStart") HotKeySet( $Stop , "FishStop") HotKeySet( $Exit , "FishExit") ;;;;;;;;;;;;;;;;;;;;End Of Hot Keys;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;Main;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $Constant = 0 While 1 If $Constant = 1 Then Call("Fish") EndIf WEnd ;;;;;;;;;;;;;;;;;;;;End Of Main;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func Fish() $Constant = 1 While $Constant = 1 WinWaitActive( $WindowTitle ) $VWaitBeforeCast = $WaitBeforeCast + Random(-1 * $WaitBeforeCastVariation, $WaitBeforeCastVariation) Sleep($VWaitBeforeCast) Send( $CastingKey ) Sleep($BobberAppearTime) $BobberPos = PixelSearch( $Left, $Top, $Right, $Bottom, $BobberColor, $BobberColorVariation) $i = 0 If @error Then While @error & $i < $Wait $BobberPos = PixelSearch( $Left, $Top, $Right, $Bottom, $BobberColor, $BobberColorVariation) Sleep($SearchWait) $i = $i + $SearchWait WEnd EndIf $Splash = PixelSearch( $BobberPos[0] - $Box, $BobberPos[1] + $Box, $BobberPos[0] + $Box, $BobberPos[1] - $Box, $SplashColor, $SplashColorVariation) While @error & $i < $Wait $Splash = PixelSearch( $BobberPos[0] - $Box, $BobberPos[1] + $Box, $BobberPos[0] + $Box, $BobberPos[1] - $Box, $SplashColor, $SplashColorVariation) Sleep($SearchWait) $i = $i + $SearchWait WEnd If Not @error Then Call( "Catch") EndIf WEnd EndFunc Func Catch() MouseMove($BobberPos[0] , $BobberPos[1], $MouseSpeed) Sleep($WaitForMouse) Send("{SHIFTDOWN}") MouseDown("right") $VCatchClickDown = $CatchClickDown + Random( -1 * $CatchClickDownVariation, $CatchClickDownVariation) Sleep($VCatchClickDown) MouseUp("right") Send("{SHIFTUP}") EndFunc Func FishStart() $Constant = 1 EndFunc Func FishStop() $Constant = 0 EndFunc Func FishExit() Exit EndFunc ;;;;;;;;;;;;;;;;;;;;End Of Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;