Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:59

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Requests - AutoIt only

Discussion on Requests - AutoIt only within the AutoIt forum part of the Coders Den category.

Reply
 
Old 03/01/2019, 19:31   #286
 
elite*gold: 0
Join Date: Apr 2011
Posts: 306
Received Thanks: 115
Quote:
Originally Posted by buglyff View Post
hi i have a request, Im playing a certain game that needs a lot of farming.. i already have a code that finds the monster and kill it but my code is not yet complete. If someone could write me a code that will determine if the monster im killing is still alive and wait until my character kills it before switching to other monster.. I could post my code here if someone will be willing to add some revisions of it.. btw im playing Flyff private server..

I refactor your code, can't test it because i don't play the game, but you will have to change to your values in the code, there is a bunch of comments and image reference for u to make it work.



Code:
#Include <FastFind.au3>

Global $Running = False


; $states -> "unknown","fighting","searching"
Global $state = "unknown"


HotKeySet("{PGUP}", "start")
HotKeySet("{PGDN}", "stop")
HotKeySet("{F10}", "pause")

;Function called to check if a monster is selected, it determines it by searching for blue bar that is below HP bar
;Check image for reference
Func checkMonsterSelected()


;searchBoxX0  left coordinate of pixel search area
;searchBoxY0  top coordinate of pixel search area
;searchBoxX1 right coordinate of pixel search area
;searchBoxY2 bottom coordinate of pixel search area

;From image reference this is the rectangle in violet
;(searchBoxX0,searchBoxYo)
   ;╔════════════════════════════════════════════════╗
   ;║	HP Bar	 =============================  	 ║
   ;║			     								 ║
   ;║	Blue Bar ============================= 		 ║
   ;╚════════════════════════════════════════════════╝
										  ;(searchBoxX1,searchBoxY1)
;Change this to your box search coordinates (u can use autoit window info for this)
$searchBoxX0 = 100
$searchBoxY0 = 100
$searchBoxX1 = 400
$searchBoxY1 = 400

;PUT BLUE BAR COLOR IN HERE
$mobSelectedBlueBarColor = 0x00000000

;If monster found change state to fighting otherwise unknown
$pixel = FFNearestSpot( $searchBoxX0,$searchBoxY0,$searchBoxX1,$searchBoxY1, $mobSelectedBlueBarColor, false)
 If IsArray($pixel) = True Then
	$state = "fighting"
 Else
	$state = "unknown"
 EndIf
EndFunc

While Sleep(15)

If $Running Then
;if state unknown or searching
If $state <> "fighting" Then
$state = "searching"
;[I belive this is for clicking a monster]
$pixel = FFNearestSpot( 1, 1, 1237, 91, 0xFFFAA5, false)
   If IsArray($pixel) = True Then
	MouseMove($pixel [0], $pixel [1], 1)
	MouseDown ("Left")
   Else
;[and this for walking around if no monster found]
	Dim $box[4] = [253, 178, 555, 376]
	MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))
	Sleep(3000)
 EndIf

EndIf

 checkMonsterSelected()

EndIf

ToolTip($state,0,0,"Current State")

WEnd

Func start()
   $Running = Not $Running
   WinActive("Mighty Flyff - ThomaShelby")
   WinMove("Mighty Flyff - ThomaShelby", "", 0, 0)
EndFunc


Func pause()
$Running = False
EndFunc

Func stop()
    Exit 0
EndFunc   ;==>stop



elmarcia is offline  
Old 04/26/2019, 17:27   #287
 
elite*gold: 0
Join Date: Apr 2019
Posts: 1
Received Thanks: 0
Hi Guys, I'm playing this game called MU online. any suggestions on how to bypass their gameguard for me to be able to use macro?


atoran101 is offline  
Old 05/01/2019, 13:55   #288
 
elite*gold: 18
Join Date: Aug 2008
Posts: 573
Received Thanks: 51
Ich bin dabei ein Bot zu schreiben Funktion ist quasi im Code erklärt alle X millisekunden eine bestimmte Taste drücken. Doch kommen wir nun zum Problem. Ohne WinGetTitle Funktioniert es nicht. AHK script und Logitech G Tasten fuktionieren komplett nicht. Mein Autoit Script funktioniert nur unter umständen wenn ich in Game mit meiner Tastatur ALT oder mal Leertaste drücke oder die Maus bewege. Es braucht paar anläufe damit der wirklich Registriert das der Makro Enter drückt dann funktioniert es Problemlos. Die Hotkeys zum Start funktioniert im Spiel teilweise aber Stop und Ende funktioniert im Spiel garnicht. Fenstermodus und Vollbildmodus Probiert aber die Chancen im Fenstermodus sind höher...


Fenstername füge ich hinzu mit Autoit Windows Info.

€dit: Falls der Anlauf geklappt hat wird im Spiel die Taste ALT festgehalten so das ich mit den Hotkeys GeForce Experience Hotkeys öffnen oder auch etwaige andere Hotkeys in Windows. Echt etwas komisch alles ^^. Ich habe jetzt kein Fensternamrn eingegeben aus dem Grund das ich in anderen Spielen vor dem gleichen Problem hatte das teilweise sogar komplett keine Makro keys registriert wurden sind. Daher suche ich nun eine komplett Lösung vielleicht hat jemand eine Idee.

Danke für die Hilfe vorweg.
HacK. is offline  
Old 06/26/2019, 00:13   #289
 
elite*gold: 0
Join Date: Mar 2006
Posts: 15
Received Thanks: 0
Any help me for righ click, hold ctrl down
And send keys in while , up righ mous ctrl up
Sorry my inglés Is bag

#include <misc.au3>
Global $var = 1
Global $var2 = 1
While 1
If _IsPressed('02') Then
$var = 0

test()
While $var = 0
Sleep(20)
If _IsPressed('02') Then

Sleep(50)
Send("{h down}")

Send("{h up}")

Sleep(50)


Send("{u down}")
Sleep(50)
Send("{u up}")

$var = 1


EndIf
WEnd
EndIf

Wend


Func test()
If $var2 = 0 Then
Send ("{LCTRL down}")

Else
$var2 = 1
Send ("{LCTRL up}")

EndIf
EndFunc


ManKo is offline  
Reply



« Timer variable Autoit | Pixelsearch Event »

Similar Threads
AutoIt Script Requests
07/31/2008 - Dekaron - 10 Replies
Meh...bored with my scripts atm (releasing another tomorrow...), so I'm gonna ask you all what you want in a script. Post your ideas here.



All times are GMT +1. The time now is 04:59.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2020 elitepvpers All Rights Reserved.