|
Post by jeison on Nov 23, 2004 21:05:40 GMT -5
I can't get hotkeyset function to work. I press the button, but nothing happends in FFXI. It works fine outside FFXI though. I use Windows xp.
Heres the script I wrote.
$echo = 0 $filewrite = 1 $i = 0 hotkeyset("{INSERT}","get_coords"); while 1 sleep(100); wend
func get_coords() $i = $i + 1 $pos = MouseGetPos(); $color = PixelGetColor($pos[0],$pos[1]); if $echo then send("/echo " & $i & ":" & $pos[0] & "/" & $pos[1] & "," & $color & "{enter}"); endif if $filewrite then FileWrite("C:/FFXI/coords.txt", $i & ":" & $pos[0] & "/" & $pos[1] & "," & $color & "{enter}"); endif endfunc
|
|
|
Post by TinyTerror on Nov 23, 2004 22:57:22 GMT -5
Its possible that FFXI is hooking the keyboard and preventing that keystroke from hitting windows where AutoIT is. Have you tried this with another key?
|
|
|
Post by jeison on Nov 24, 2004 0:09:05 GMT -5
I've tryed it with some of the F keys and alt combinations. Using alt would be bad even if it did work since the cursor moves to the upper left.
Which key do you use?
|
|
|
Post by TinyTerror on Nov 24, 2004 7:10:10 GMT -5
Try and find something that FFXI doesnt use. ALT and CTRL keys arent a good idea, and niether are the low F keys. The only keys I can think of that arent used by FFXI are the windows key, and the menu selection key (the other windows specific key next to the windows key). I dont know if AutoIT can use those, but they might work.
|
|
|
Post by Darkblaze on Nov 28, 2004 13:23:49 GMT -5
Can someone plz post a working pixelfinding script, there are a few on this thread but none seem to work.
thank you
|
|
|
Post by TinyTerror on Nov 30, 2004 8:53:44 GMT -5
The code snippet that I posted here works fine.
|
|
|
Post by carpsoft on Nov 30, 2004 12:27:34 GMT -5
For those of you that don't want to write a script to find the pixel colors, I'll post a small tutorial soon. I found a very good way of finding the colors with a screencap program and the GIMP.
|
|
|
Post by TinyTerror on Nov 30, 2004 12:40:56 GMT -5
The screenshot you take will be the same resolution as your in game resolution. This means that pixel (100,200) in the screenshot will be the same pixel as (100,200) in game. The color might be different than the screenshot, but what appears there will be the same.
|
|
|
Post by Talonn on Nov 30, 2004 12:48:45 GMT -5
This hurts my head. Im sure its alot less complicated than we're making it out to be but seriously wtf is going on here? If im making a bot for Leaping Lizzy do i need a screenshot of her or can i use any picture of a lizard. do i take the coordinates of the name or of the lizard? and do i need coordinates of unclaimed, claimed, etc?
|
|
|
Post by TinyTerror on Nov 30, 2004 13:18:58 GMT -5
The coordinates that you are looking at should be the ones in the target box with the name of the monster.
|
|
|
Post by carpsoft on Nov 30, 2004 13:27:10 GMT -5
What you'll need: 1. A good drawing/painting program (I recommend the GIMP) 2. Screen capture program so you can take accurate shots of your in-game screen ( Cipper is a good one) 3. Lastly, a Hex-to-Decimal calculator/converter if you don't have on already ( Hexit) Now, let's get to work. The first thing you want to do is set up Clipper to get a screen shot. So open up Clipper, and select "Bitmap" from the dropdown menu. This will give you the most accurate position and color of pixels so you don't make a mistake with the x,y positions and color codes. After you do that, select "Hide" from the other dropdown menu so that Clipper goes into your systray. Next open up FFXI and get in place of the NM. When you see it, (remember to select it so you see it's name in the bottom right of the screen, above your name) just press the PrtScrn button on your keyboard, and Clipper will save a bitmap image into it's folder for you to work with later. Now that that's out of the way. Exit FFXI and get ready to open up the GIMP or your painting program of choice. You'll want to open the screenshot that you took with Clipper and look at the name of the mob in the bottom right corner. Zooming in usually helps me, as the pixels can be quite small and you want to be 100% accurate doing this. Find any 2 or 3 pixels (I'll be working with 2) and write down the x,y position that the painting program gives you (these are exact values, no need to change them). Next, use the eyedropper tool to get the Hex value (6 numbers and letters) of the color at the 2 points you chose. Write those down. Now open up Hexit, and enter each Hex value separately, taking down the Decimal coverted value of those. You should now have the x,y coordinates of 2 points, and an 8-digit decimal values for each point. From here, you should be able to enter them into your "PixelGetColor" calls in your code. Good luck.
|
|