loki
New Member
Posts: 2
|
Post by loki on Jan 21, 2006 14:27:08 GMT -5
Hello,
trying to make my own macro in which one part of it requires me to cancel my utusumi shadows. I dont know much about scripting and the stuff i got together i kinda made by copy pasting from an old fishing script i had on my PC and where i kinda understood what half of the lines were doing. Anyways the problem i am having is how i get Autoit to hit the + button in the game. As said i dont know jack and therefor it would be nice if someone could give me the right syntax for it.
Tried this ....
AutoItSetOption("SendKeyDelay", 0235); AutoItSetOption("SendKeyDownDelay", 0100); Send ("+"); Sleep(0250); Send ("+"); Sleep (0250); Send ("{ENTER}"); sleep(0250); Send ("{ESCAPE}"); sleep(0250);
and instead of "+" also "{PLUS}" since that is how i saw it on already mentioned old fishing script.
Thanks in advance ^^ and nice to meet everyone here. Seems like an interesting forum
|
|
loki
New Member
Posts: 2
|
Post by loki on Jan 24, 2006 6:49:20 GMT -5
Kinda sad to see nobody has posted yet .... did i ask something wrong? >>;
|
|
|
Post by TinyTerror on Jan 24, 2006 9:26:00 GMT -5
No, its fine. The problem is that autoit is pretty much a dead language when it comes to scripting for FFXI. Now people use AC tools or windower plugins to do this kind of thing.
|
|
|
Post by deathravin on Jan 24, 2006 10:06:19 GMT -5
how do you know you'll be canceling utususemi?
You will probabaly cancel protect, or shell, or barfira, or something.
|
|
|
Post by Jimmytime on Jan 24, 2006 10:41:33 GMT -5
I have no idea if the GetPixelColor function works, but I could see this working if it did:
First you'd replace your normal shadow icon with a slightly modified one, with a watermark of sorts in one of the corners, something like a 4 pixel square that is always the same 4 colors in a certain pattern. Then you use the keypresses to access the status icons, and check each one after you press the right button. You might have to watermark each type of icon to know when you've looped around once (in case the shadows already dropped) to keep from cycling. There's already an icon pack so its defintiely possible to give shadows a unique icon.
The above is just my random thought on the idea, open to correction if I missed an easier way to accomplish this.
|
|
|
Post by TinyTerror on Jan 24, 2006 11:01:38 GMT -5
Yeah, you could do it like that.
|
|
|
Post by DarkAquaus on Jan 24, 2006 14:42:21 GMT -5
um another idea is take a pic of each with the square highlighting the box so you know whichone is selected since they are not simi transparent this will work first use the square as a check (one that is selected then the text that shows do a checksum or a 4-5 pix combo that doesnt match any of the icons (you will need a list of every buff and debuff) once the program finds it then it can jump to it quicker for instance that would be the 2nd check after it checks the 1st one)
|
|
|
Post by poromaru on Feb 25, 2006 0:47:19 GMT -5
To get around color semi-transparancey, check out this function I wrote:
#Include "Color.au3" ; this should come with your autoit-v3 already
Func colordistance ( $colorA , $colorB ) $redA = _ColorGetRed( $colorA ) $greenA = _ColorGetGreen( $colorA ) $blueA = _ColorGetBlue( $colorA )
$redB = _ColorGetRed( $colorB ) $greenB = _ColorGetGreen( $colorB ) $blueB = _ColorGetBlue( $colorB )
return ( Abs($redA - $redB) + Abs($greenA - $greenB) + Abs($blueA - $blueB) ) EndFunc
Use a script like this one:
colorcheck.au3
; set mouse and colors to relative AutoItSetOption ( "PixelCoordMode", 0 ) AutoITSetOption ( "MouseCoordMode", 0 )
$title = "FFXiApp - Windower Enabled" ; I use the namechanger plugin :-p
WinWaitActive($title) MsgBox(0, "ColorChecker", "Target the mouse on the color you wish to check.")
WinWaitActive($title)
$pos = MouseGetPos() ;$pos[0] = 759 ;$pos[1] = 122 $color = PixelGetColor ( $pos[0], $pos[1] )
MsgBox(0, "The color is...", "Mouse x,y (" & String($pos[0]) & "," & String($pos[1]) & ") color is " & String($color) & ".") ;MsgBox(0, "AutoIt Example", "The color of ("m & $pos[0] x,y) is"+String($color)+".")
Take a sample of a pixel with different lightning conditions and backgrounds, and then figure out the average color. Then if the colordistance returns a value less than your sensitivity level, it's acceptable.
With these methods I've written code that can read chat log text and parse for commands! Imagine how happy I was when I found Lunar's super-cool chat functions.. string comparisons are a lot easier to perform than dozens of pixel color distances ;D
----
Regarding the OP's script idea, you can do it! Just check a pixel of the utsusemi icon in each of the first 6-8 buff spots, and depending on where you find it you'll know how many times to go to the next buff icon. Good luck!
|
|