Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 15:57

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

Advertisement



IF Colordetection

Discussion on IF Colordetection within the AutoIt forum part of the Coders Den category.

Reply
 
Old 02/01/2010, 20:44   #16
 
Xereon's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 793
Received Thanks: 366
zB
Code:
While 1
Xereon is offline  
Old 02/01/2010, 21:08   #17
 
elite*gold: 0
Join Date: Aug 2004
Posts: 333
Received Thanks: 46
Code:
#include <GUIConstantsEx.au3> 
GUICreate("AutoIT", 335, 100) 
GUISetState(@SW_SHOW) 

If WinExists("***") Then
	WinActivate("***")
	WinWaitActive("***")
EndIf

While 1
	fight()
WEnd
Func fight()  
	If PixelGetColor (560, 70) = 0xFFFFFF Then             
		Send("1")             
	Else
		Do
		$zahl = 0
		$zahl = $zahl + 1
		Sleep (1000)
		Send("3")
		Sleep (1000)
		Send("2")
		until $zahl = 1
	EndIf 
EndFunc
so kommt kein fehler mehr, aber er hört trotzdem nach einmal "3" und "2" nicht auf, sondern macht immer weiter mit den beiden zahlen ... zum mäuse melken, ich versteh es einfach nicht. bis zur 4ten klasse stand auf meinem zeugniss immer "kann sehr gut logisch denken" ... aber als höhere mathematik kam war das alles plötzlich weg ... ich steig da einfach nicht mehr durch
Alucard is offline  
Old 02/01/2010, 21:11   #18
 
elite*gold: 1
Join Date: Oct 2008
Posts: 1,078
Received Thanks: 276
xD sry , hab vermutet das du nen anderes Anwendungsegebiet meintest
das Run lässt sich natürlich durch jede beliebige Funktion ersetzen :P
.nAno is offline  
Old 02/01/2010, 22:04   #19
 
AutoItDude's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 93
Received Thanks: 315
Quote:
Originally Posted by Alucard View Post
when i get u the adress, can u write me the code i need? i am new to autoit as u can see

4bit

061C3188

0 is standing
1 is sitting
first of all, it is very likely this not the address you were looking for. it will change when you close and restart your game - if im right, you need to find a pointer and offset for the correct address. only then you can execute memory functions. if you don't know how to find a pointer you can learn it from CE tutorial.

This is how you use it:
Code:
#include <_NomadMemory.au3>
#include <Misc.au3>

Global $PID=ProcessExists("target.exe")		; find PID
Global $PROC=_MemoryOpen($PID)			; open process for memory functions
Global $POINTER_ADDRESS=0x00000000		; define pointer address
Global $MEM_BASEADDR=0				; store pointer value
Global $MEM_CHAR_STATE=0x0000			; offset value

$MEM_BASEADDR=getPointer($POINTER_ADDRESS)

While 1
	If _IsPressed("24") Then MsgBox(0,"CPlayer_GetState",CPlayer_GetState())
	If _IsPressed("23") Then CPlayer_SetState()
WEnd



Func CPlayer_GetState()
	Return _MemoryRead($MEM_BASEADDR+$MEM_CHAR_STATE,$PROC,"DWORD")
EndFunc

Func CPlayer_SetState()
	Local $STATE=CPlayer_GetState()
	$STATE=Not $STATE
	_MemoryWrite($MEM_BASEADDR+$MEM_CHAR_STATE,$PROC,$STATE,"DWORD")
EndFunc

Func getPointer($vADDR,$vPROC=$PROC)
	Return _MemoryRead($vADDR,$vPROC,"DWORD")
EndFunc
fill code with correct values, process name, run script, now:
- press HOME to read current value.
- press END switch value 0/1 (this should make your char sit down, stand up)

have fun
Attached Files
File Type: rar _NomadMemory.rar (2.7 KB, 1 views)
AutoItDude is offline  
Old 02/03/2010, 14:48   #20
 
elite*gold: 0
Join Date: Aug 2004
Posts: 333
Received Thanks: 46
i cant get the pointer ... everytime i try to get the pointer adress, the game crashes.
Alucard is offline  
Reply




All times are GMT +1. The time now is 15:58.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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