Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Ffxi Mouse Position And Color


  • Please log in to reply
15 replies to this topic

#1 Guest_kybela_*

Guest_kybela_*
  • Guests

Posted 24 January 2004 - 07:56 PM

i need help finding the mouse position and pixel color. i am working on a few different bots and need this information. i heard someone say to use the screenshots but i would like to know what programs you use and where you open the screenshots from.







#2 cmallett

cmallett

    Adventurer

  • Active Members
  • PipPip
  • 116 posts

Posted 25 January 2004 - 01:48 PM

This is a repost of some info that might be useful.

This is written for AutoHotkey but should be easy to translate into AutoIt3:

#z:: ; Win-Z hotkey
MouseGetPos, X, Y
; Move the cursor out of the way so that it doesn't block the pixel we want.
; Move the mouse slowly so that the game can keep up with it:
MouseMove, 0, 0, 3
PixelGetColor, color, %X%, %Y%
MouseMove, %X%, %Y%, 1 ; moving faster seems ok in this case
clipboard = %clipboard%`nX%X% Y%Y% Color = %color%
return

AutoHotkey's PixelSearch now supports shades of variation, which I have also found to be useful for games where the colors aren't always exactly the same (perhaps due to images being overlayed on different colored backgrounds). It might also be possible to use the shades-of-variation feature to write scripts that work regardless of whether it is in full screen or windowed mode.

#3 Guest_kybela_*

Guest_kybela_*
  • Guests

Posted 26 January 2004 - 07:07 AM

could anyone tell me maybe if there is a way to view a screenshot in the same size and resolution that you view the game in

#4 evl

evl

    Seeker

  • Active Members
  • 11 posts

Posted 26 January 2004 - 02:47 PM

I used Fraps [www.fraps.com]

#5 Guest_kybela_*

Guest_kybela_*
  • Guests

Posted 26 January 2004 - 03:26 PM

thnx

#6 ravenfyre

ravenfyre

    Wayfarer

  • Active Members
  • Pip
  • 77 posts

Posted 29 January 2004 - 02:28 AM

I seem to have problems with PixelGetColor. I tried to make the script to logoff my character if I got the "You cannot fish here." or "You can't fish without bait." error messages. I used fraps to take a screenshot and used adobe photoshop to get the EXACT coordinates of a pixel on the text and autoit window spy to get the color. Problem is it just doesn't work, I think the PixelGetColor command sees another color. What do you guys use to get the coordinates of a pixel?

For the "You cannot fish here" error:

If PixelGetColor(71,739) = 3235328 AND PixelGetColor(86,739) = 3235328 AND PixelGetColor(135,742) = 3235328 Then
$logtime = $logtime + 1;

For the "You can't fish without bait" error:

If PixelGetColor(28,735) = 0 AND PixelGetColor(86,735) = 0 AND PixelGetColor(334,745) = 0 Then
$logtime = $logtime + 1;

Edited by ravenfyre, 29 January 2004 - 02:32 AM.


#7 FFXI_Fisherman

FFXI_Fisherman

    Seeker

  • Active Members
  • 16 posts

Posted 29 January 2004 - 06:25 AM

Write a small script that looks at those locations and have it tell what color it sees, then use those colors.

#8 evl

evl

    Seeker

  • Active Members
  • 11 posts

Posted 29 January 2004 - 11:30 AM

The biggest problem I have is that on PixelGetColor It will not hit enter when the color matches. I have checked and rechecked the pixel colors and locations, Colors are default and even compared screenshots. So far I have stuck to the older "Left click" method of script but getting PixelGetColor to work properly would be much nicer.

#9 ravenfyre

ravenfyre

    Wayfarer

  • Active Members
  • Pip
  • 77 posts

Posted 29 January 2004 - 04:28 PM

Thanks FFXI Fisherman, that sounds like a good idea but I noticed the color seemed to change slightly of the text that says "You cannot fish here." I just came up with a different approach and now it works. Now my character logs out if I get either the "you cannot fish here" or "you can't fish without bait" error. I posted it in this post HERE

Edited by ravenfyre, 29 January 2004 - 04:29 PM.


#10 HBD

HBD

    Seeker

  • New Members
  • 7 posts

Posted 29 January 2004 - 11:05 PM

I don't understand the color codes. How can I find out what color "16777215" is, or what number default echo text color is?

Edit: Nevermind, I found it with AutoIt. :whistle:

Edited by HBD, 29 January 2004 - 11:15 PM.


#11 Josbe

Josbe

    Infrequent ghost ☺

  • Active Members
  • PipPipPipPipPipPip
  • 1,585 posts

Posted 30 January 2004 - 01:27 AM

Hi, I upload a script in Yahoo Group (AutoItList), will help you.
I also sometimes use software to capture color.
But, with AutoIt is possible. :whistle:

If you are registered in the Yahoo Group, download this file:
>> PixelColor.zip

Or copy this code,

The script code's looks so:

Plain Text         
;// GetPixColor ;// Desc: Capture a color screen's and returns the values in Hexadecimal & RGB formats (especially for webmasters). ;// NOTE: The time to response depend to machine speed's. (SplashText) ; Verify the version If StringReplace(@AutoItVersion, ".", "") < 3085 then    msgbox(0, "Error", "Some functions in this script aren't available for your installed version," & @LF & "Please install the latest version of AutoIt3.")    exit EndIf ;// You can end the process pressing the keys stored in "$ks". $ks= "^+Q" $End= 1 HotKeySet($ks, "ELoop") $width_splash= 120 $height_splash= 30 ;// A remainder msgbox(64, "Remember", "To end, press: " & VKEYS($ks)) while $END == 1   $pix = MouseGetPos()   $var = PixelGetColor( $pix[0], $pix[1])   $hex= hex($var, 6)  ;// Arranging the AutoIt output   $hexarr= stringright($hex, 2) & stringmid($hex, 3, 2) & stringleft($hex, 2) ;// Intelligent position, move the splash if not visible in Screen   If $pix[0] < @desktopwidth - $width_splash Then        $posX= $pix[0]+8   Else        $posX= $pix[0] - $width_splash - 8   EndIf   If $pix[1] < @desktopheight - $height_splash Then        $posY= $pix[1]+8   Else        $posY= $pix[1] - $height_splash - 8   EndIf   SplashTextOn("", "HEX= " & Chr(34) & "#"& $hexarr & Chr(34) & @LF & "RGB= " & RGB($hex), $width_splash, $height_splash, $posX, $posY, 1, "arial", "8", "") wend SplashOff() ;// Optional copy the values to clipboard $op= msgbox(4, "?", "Copy the values color's to clipboard?") If $op = 6 then ClipPut("HEX= " & Chr(34) & "#"& $hexarr & Chr(34) & " | RGB=" & RGB($hex)) exit ;; SMALL FUNCTIONS ;¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯' ;// This little ends the ''while'' loop Func ELoop()   $END= 0 EndFunc ;¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯' ; Returns the RGB (Red, Green, Blue) values Func RGB($hex) Local $val Local $rgb $val= StringLower($hex) Dim $v[7] For $i=0 to 6   $v[$i]= GDec(stringmid($val, $i+1, 1)) Next   $x= ($v[0] * 16) + $v[1]   $y= ($v[2] * 16) + $v[3]   $z= ($v[4] * 16) + $v[5] ;; arrange   $rgb= "(" & $z & ", " & $y & ", " & $x & ")" Return $rgb EndFunc ;¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯' ;// Convert HEX to DEC Func GDec($hex) Local $n Local $hex $n= $hex Select      Case $hex == "a"           $n= 10      Case $hex == "b"           $n= 11      Case $hex == "c"           $n= 12      Case $hex == "d"           $n= 13      Case $hex == "e"           $n= 14      Case $hex == "f"           $n= 15 EndSelect Return $n EndFunc ;¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯'¯' ;// Verify the keys and returns in text format. Func VKEYS($kstring) Local $tx Local $out Local $fout $fout= "" For $i=1 to StringLen($kstring)   $tx= StringMid($kstring, $i, 1)   $out = $tx   If $out == "!" then $out= "ALT"   If $out == "+" then $out= "SHIFT"   If $out == "^" then $out= "CTRL"   If $i <> StringLen($kstring) then      $fout= $fout & chr(34) & $out & chr(34) & " + "   else      $fout= $fout & chr(34) & $out & chr(34)   EndIF Next Return $fout EndFunc


Test and see if helps you. B)
Note: Remember this script is for Aut3 v3.0.85 and later.

#12 dervish

dervish

    Seeker

  • Active Members
  • 18 posts

Posted 30 January 2004 - 02:57 PM

To anyone having problems with seemingly "shifting" text colors, what kind of chatbox background are you using?

I'm mainly asking because when I first started to play the game I went to config and changed my chatbox background to #5, which is basically a transparent gray. However, I noticed that sometimes in really bright areas like Valkurm or Qufim the text color would get distorted, as the background lighting would bleed through. The same thing would happen in very dark areas as well.

Eventually I changed the background non-transparent scheme (like the stone/gray slate one) and it fixed the problem.

#13 cmallett

cmallett

    Adventurer

  • Active Members
  • PipPip
  • 116 posts

Posted 30 January 2004 - 07:59 PM

Possibly of interest: AutoHotkey's version of PixelSearch has a shades-of-variation feature that might help with finding colors that vary.

AutoHotkey is especially good for gamers because it allows any key to be a hotkey (even a mouse button if you're using WinNT, 2k, or XP). It may even be able to override game restrictions and built-in keys by use of the keyboard hook.

#14 ravenfyre

ravenfyre

    Wayfarer

  • Active Members
  • Pip
  • 77 posts

Posted 01 February 2004 - 07:00 AM

Ok even though I found a fix for my previous problem, it will not be good for my new script so I would like to followup on what FFXI Fisherman said.

I have written a script that looks at certain points now I wonder how can I make the script tell me what it sees. Onemethod would definitely be using msgbox, but is there any way to get the script to tell me in game by let's say something like

Send("/say $color1 $color2 $color4");

It doesn't work, would such a thing be possible or am I limited to msgbox?

Edited by ravenfyre, 01 February 2004 - 07:01 AM.


#15 evl

evl

    Seeker

  • Active Members
  • 11 posts

Posted 01 February 2004 - 09:09 PM

Maybe write it to a log file?
So that $color1 2 3 etc are all saved into a log.

#16 Jos

Jos

    ...

  • Developers
  • 23,224 posts

Posted 01 February 2004 - 09:42 PM

If you want to see a kind of status window with a message that you update constantly, you could do the following..

Add this function to your script:
Func ShowMenu($msg)    $Title = "test"    if winexists($Title,"") then       controlsettext($title, "", "Static1", $msg)    else       SplashTextOn($Title,$msg,300,100,1,1,4,"Courier",10,600)    endif EndFunc


Then call it at any place in your script like this:
ShowMenu("/say $color1 $color2 $color4")

Edited by JdeB, 01 February 2004 - 09:43 PM.

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users