Shyin
New Member
Posts: 6
|
Post by Shyin on Oct 13, 2004 16:25:48 GMT -5
Ok, currently I am working off of the fishing bot w/ extras bye Hzzy. I'm trying to convert it into 1280.x1024, I've gathered some of the screenshots I'll need...the only problem is, I can't find the Pixel color. I opened it in paint, and I can see the location of the Pixels, for example, 239, 1001 is the pixel at the bottom of the exlamtion point in hook! But I can't find the pixel color. If PixelGetColor(239,1001)=?
|
|
|
Post by TinyTerror on Oct 13, 2004 16:37:37 GMT -5
Here is how I do it. First, use the screen shots to find the coordinates of the pixels you want to check. Then make a script that checks those pixels, and echos the results to your FFXI chat log. Get into position for the check, and run the script. The code would look like this:
$MyColor=PixelGetColor($x,$y); Send("/echo "); Send($MyColor); Send("{Enter}");
Just write down the number this spits out. And now you have your pixel value, exactly as it appears in game. I will leave the mechanics of starting and stopping this script to you. This same method works for capturing checksum values.
|
|
Shyin
New Member
Posts: 6
|
Post by Shyin on Oct 13, 2004 16:39:12 GMT -5
Ok, thanks.
|
|
|
Post by squall on Oct 14, 2004 12:33:55 GMT -5
In addition to Tiny's method you can also use photoshop and use the "eyedropper" command on that specific pixel. I think it might only give you the hex code but there are calculators out there to convert it to decimal.
|
|
metalo
Junior Member
Posts: 50
|
Post by metalo on Oct 14, 2004 13:10:22 GMT -5
You can also use the Eye dropper in MS Pait, however it gives you the RGB value. You can convert the RGB value for example white is
FFFFFF or in MS PAINT it's 255 255 255
So how do we get 16777215 number? Easy, load up your handy dandy calculator, put it in scientific, put in 255, then click on Hex, should be FF. So you know you got FFFFFF then right for 255 255 255.
Kewl if you know the Hex, and you do, now put in FFFFFF while in hex, and switch the calculator to Decimal. You get the Decimal value of FFFFFF, which is 16777215.
Or you could just load up photoshop or adobe, but hey, if ya think in Hex and binary like me, hook it with the calculator.
OOOOOOOOR you could use the following little peice of code
; Returns an array with element1=RED, element2=GREEN, element3=BLUE Func PixelGetRGB($x, $y) $hex = Hex(PixelGetColor($x, $y), 6) $r = Dec(StringRight($hex, 2)) & "|" $g = Dec(StringMid($hex, 3,2)) & "|" $b = Dec(StringLeft($hex, 2)) Return StringSplit($r & $g & $b, "|") EndFunc
You call it like this
$pix1=PixelGetRGB(28,997);
And you check it like this If $pix1[1] = 255 AND $pix1[2] = 255 AND $pix1[3] = 255 Then ; wheee do something cause we saw white at 28,997 ^^ EndIf
Metalo
|
|
|
Post by instableoxymoron on Nov 6, 2004 10:35:01 GMT -5
My understanding is that FFACT is up and running now. Does this mean there is an easier way for me to get text information rather than checking pixel colors?
|
|
|
Post by TinyTerror on Nov 7, 2004 13:10:56 GMT -5
FFACT has some basic support for reading the chatlog and menu/description texts. The chat logging functions are being improved in the next version, which will be out soon. AutoTerror will fully suport the new FFACT text related functions.
|
|
|
Post by Darkblaze on Nov 19, 2004 14:37:35 GMT -5
I got how to find pixelcolor and coordinates , but i dont understand what pixel is unique to nm's , do i take a pixel from their name, body what? I took a pixel from a bunnie outside sandy and put the info in my bot, nothing. it just keeps scanning. (does it matter that the bunnie isnt an nm??) help me out plz.
|
|
|
Post by TinyTerror on Nov 19, 2004 15:03:09 GMT -5
You take pixel values from the target box. Try to get pixels withing the letters of the monster's name.
|
|
|
Post by Darkblaze on Nov 20, 2004 3:21:58 GMT -5
Im using this voke/fight bot :
Global $x = 0 ; X-coordinate for pixel Global $y = 0 ; Y-coordinate for pixel Global $yellow = 0 ; Normal, unclaimed color. Most important. (RGB Decimal value) Global $red = 0 ; Color when player has claimed. (RGB Decimal value) Global $purple = 0 ; Color when claimed by another. (RGB Decimal value) Global $orange = 0 ; Color when mob has been "called-for-help" on. (RGB Decimal value) Global $provoke = "^8" ; Provoke macro Global $vokenum = 20 ; Number of times to spam provoke macro Global $up = "w" ; The 'Up' or 'Forward' key Global $wskill = "!4" ; Weaponskill macro Global $seconds = 300 ; Number of seconds to spam weaponskill macro
WinWaitActive("FFXiApp")
While 1
While 1
FindTarget()
Provoke()
Engage()
If CheckClaim() = 1 Then ExitLoop
WEnd
Approach()
Screenshot()
Wskill()
WEnd
Func FindTarget() AutoItSetOption("SendKeyDelay", 0) While 1 Send("{TAB}") If PixelGetColor($x,$y) = $yellow Then ExitLoop WEnd EndFunc
Func Provoke() Local $i = 0 While $i <= $vokenum send($provoke) WEnd EndFunc
Func Engage() AutoItSetOption("SendKeyDelay", 100) Sleep(1000) Send("/a <bt>{ENTER}") EndFunc
Func CheckClaim() AutoItSetOption("SendKeyDelay", 60) While 1 Send("{TAB}") Select Case PixelGetColor($x,$y) = $red Send("/dance{ENTER}/echo **** Target acquired at>>{ENTER}/clock{ENTER}/echo **** Terminating. . .{ENTER}") return (1) Case PixelGetColor($x,$y) = $purple Send("/angry motion{ENTER}/echo **** Target lost at>>{ENTER}/clock{ENTER}/echo **** Reseting. . .{ENTER}") return (0) Case PixelGetColor($x,$y) = $orange Send("/angry motion{ENTER}/echo **** Target called-for-help'd at>>{ENTER}/clock{ENTER}/echo **** Attempting to reclaim. . .{ENTER}") return (0) Case Else Send("/echo **** Error. Target Lost at>>{ENTER}/clock{ENTER}/echo **** Reseting. . .{ENTER}") return (0) EndSelect WEnd EndFunc
Func Approach() Sleep(1000) Send("{" & $up & " down}") Sleep(5000) Send("{" & $up & " up}") Sleep(1000) EndFunc
Func Screenshot() Send("]") Sleep(1000) Send("[") Sleep(4000) Send("]") EndFunc
Func Wskill() Local $i = 0 While $i <= $seconds Send($wskill) Sleep(1000) $i = $i + 1 WEnd EndFunc
But i dont have provoke, im a blm , Is it ok to just replace (/ja "provoke" <t>) to (/magic "Stun" <t>) in the ingame macroes. One more thing Tiny, can you look over this script and se if everything checks out ? I was tryin it out earlier on a tunnel worm outside sandy , put in all nessecary pixels and still it just kept scanning. What do i have to do to get the script to respond to the pixels i put in?
|
|
|
Post by Darkblaze on Nov 20, 2004 10:49:26 GMT -5
I wanted to test it so i went and got screenshots of a Tunnel Worm outside sandy in all statuses (Unclaimed, claimed, claimed by me, call for help), i decided on using a pixel located in the targetbox @ X:1199 and Y:76, i used the droptool and got these three colors for the most important (Unclaimed) status.
245,242,207 l l l F5 F2 CF
Then i put the hex-values in the calc (F5F2CF) and pressed decimal. I got this which sounds about right : 16118479. I put this number in the script along with the numbers for claimed by me... etc. I made all the necessary In-game macroes, and ran the game......nothing , it just keeps scanning . It didnt seem like it could find my pixel. Plz tell me what im doing wrong.
|
|
|
Post by TinyTerror on Nov 20, 2004 11:26:34 GMT -5
Using pixel values to do anything is an unreliabke process. Alot of the time, pixel values are unique to a specific computer due to video card and driver differences. I wish I could help you more, but without actually being there and messing with it on your computer, there isnt a whole lot I can do for you. You may want to take a look at FFXI helper. It has support for getting the name of the your target as a text string. This method is 100% reliable as well as very fast. Good luck.
|
|
|
Post by Darkblaze on Nov 21, 2004 3:29:45 GMT -5
Tiny, i think i know what I've been doing wrong , i cant get pixels from a screenshot i have to get them through /echo , could you explain how i can do that? Do i use FFXI_Helper? plz lemme know.
ty
|
|
|
Post by TinyTerror on Nov 21, 2004 10:12:00 GMT -5
The code to do this is in the second post on this thread.
|
|
|
Post by Darkblaze on Nov 21, 2004 14:37:19 GMT -5
Iv'e seen it but Im a n00b that has just started with scripting so i have no idea how to write the beginning or end to that code + i have no idea how to use the code to reciecieve the pixel i want. That i why i asked for you to explain to me step by step. I know you'r probably busy , so ill understand if you dont bother. thank you
|
|