Hello!
I used to use autohotkey, but since it is not possible to use on the server I play, i have found autoit. It is completely new for me. After few days of reading I have created my own script where
1)pixel should be read at given coordinates
2)if pixel is not there F4 should be sent
Script should be working over and over. Unfortunately for me -
script is not doing anything.
If i use "Not @error" then it is pressing f4 all the time even I'm 100% sure pixel is there.
To explain what this script should do - use mana potion in Lineage2 when mp gets lower.
Can anybody please guide me through the wrong part of my code?
Code:
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
_WinWaitActivate("Lineage*II * ","")
HotKeySet("{ESC}", "Terminate")
While 1
PixelSearch( 234, 54, 0, 0, 0x234B88)
If @error Then
Send("{F4}")
Sleep (500)
EndIf
WEnd
Func Terminate()
Exit 0
EndFunc
While True
$bPixel = PixelSearch( 234, 54, 0, 0, 0x234B88)
If $bPixel = 0 Then
Send("{F4}")
Sleep (500)
Else
Sleep(50)
EndIf
WEnd
Sorry, didn't use Scite to write this, but this should actually work out.
As far as I know, Pixelsearch does not throw @error, if the pixel is not found, but simply returns 0.
Thanks for your input, but most of the sources says that @error should work.
I just tried your version and again, it just keeps spamming F4.
Looks like I have to find better way how to determine x,y and color of Lineage II client. Maybe the problem is in x, y, and color itself?!
[SCRIPT] P.E.T. Auto-Kamikaze (working in background, no mouse clicks) 01/16/2012 - DarkOrbit - 88 Replies With the new version client of darkorbit 5.x, this tool is not working anymore, if an update will be I will post here
Short info:
This script will auto-repair, auto-start, auto-select kamikaze. Is all working in background so it wont use your mouse as coordinates, so you can battle easy in PvP or use on cubikons.
Also you can have multiple modules and still working like a charm.
Download and use:
PET Kamikaze 1.3
Must do to work:
Server time script(A very easy java script) 12/22/2008 - CO2 Private Server - 4 Replies Put this in ur body tag
<table>
<td>
<span id="liveclock" style="position:absolute;Change this to left or right:1;change this to bottom or top:1;"></span>
<script language="JavaScript">
<!--