petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Oct 18, 2005 8:26:25 GMT -5
Okiedokie, first thread, and post outside the "Welcome new people" forum. Currently, when I'm done with AP homework, and algebra II homework, I have a hobby of programming. So eh, get to the point here, I'm gonna start to build a bot, and I could have specific questions: "How do you make *** do ***** ?" andd yeah.... First bot for FFXI as well. Side note: Oh, this is not a blatent sort of post making a request for a fishbot. I don;t want someone to hand it to me. I want it to come with my own sweat and blood. If you catch the expression, I will ask questions, and if you don't want to share the information.... well Other forums haven't been forgiving, and others have been jerks. Pardon me if I may have simple questions. thanks for time If you would as well.... Please, I would like to know some programming aquaintances on this site forum, aside from tiny, he may grow tired of the simple stuff I;m asking him... If you would...
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Oct 18, 2005 8:30:24 GMT -5
I like to make a format, of what the bot should do, before I do it.... so eh Am I going the right way for a pixel-reading-fishbot? Oh, I'm just using the Windower thing, I'm pretty sure AutoIT should still run with that thing active... So I'm checking this. Am I going on the right track with the pixel-checking bot? I'm making thing it'll do first, not in code yet, but I wanna know if I got the right idea. I'll try to to work on my bot things after school, when I don't have AP, if you don't mind.... could you gimme a hand with this sort-of-thing? this is very vauge, I fuigure I'll find out the real script in drama or.... naa not today. Tomorrow in Core tech I'll be posting, and in uhh. maybe todays lunch. I'll try to get the stats straight here.
|
|
|
Post by TinyTerror on Oct 18, 2005 10:25:50 GMT -5
So you are reading the red levels in a 100 pixel line on the fish stamina bar? Yeah, that should work. Just keep in mind that pixel checking is a relatively slow operation, and that checking 100 pixels may take as long as 50 to 100 ms.
|
|
|
Post by TinyTerror on Oct 18, 2005 10:35:38 GMT -5
Also, I thought this might be useful:
$MyPixel=PixelGetColor (x,y); $RedLevel=Dec(StringLeft(Hex($MyPixel,StringLen($MyPixel)),2));
This code stores the red level of the pixel at (x,y) in $RedLevel as an integer value between 0 and 255. I haven't tested it, and its been a while since I wrote any autoIT, so it might not be exactly right, but it should be close enough.
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Oct 18, 2005 14:54:01 GMT -5
Thanks tiny again. Advisory time, Got drama packet to do... >.> Anywho, thought about it today in PE.
I wanna know if this type of Pixelread would work... Or if there;s a better way. Cause this would be alot of script to make, providint I would do one for every pixel on the line of FishStamina
$PixRng100 = PixelGetColor( x , y ) ; The Fish stamina bar when it is at its most. I'll say Position 100, just for an even number
$PixRng99 = PixelGetColor( x - 1 , y ) ; X-1 symbolises the one lesser pixel of the inital pixelcheck
$PixelRng98 = PixelGetColor( x - 2 , y ) ; Get where I'm going with this? I would do this down to PixelRng 0 which means fish is dead.
IF $PixRng100 = ; Color for red ;
Send( "{NUMPAD4}" ) ; I'd have numlock off at this time
IF $PixRng100 = ; Color for red ;
Send( "{NUMPAD6}" ) Send( "{NUMPAD6}" ) Send( "{NUMPAD6}" ) Send( "{NUMPAD6}" ) Send( "{NUMPAD6}" )
IF $PixRng99 = ; Color for red .... Goes for a long time... ;
Anywho, I think this Could work. ... But It would be a long script, and long scripts mean long loading time. (Oh, and how would I be able to divide this up into Functions, so it wouldnt be as complex in the body of the script?)
Do long scripts mean long loading time, and long reaction time?
|
|
|
Post by TinyTerror on Oct 18, 2005 16:08:34 GMT -5
This wouldn't really be a long script if you used a loop to check the red levels insted of 100 or so individual commands. something like this might work:
$Stamina=100 $RedLevel=0 $Threshold=128 Do $MyPixel=PixelGetColor ($x+$Stamina,$y); $RedLevel=Dec(StringLeft(Hex($MyPixel,StringLen($MyPixel)),2)); $Stamina=$Stamina-1; Until $RedLevel >= $Threshold OR $Stamina == 0
Assuming the stamina bar has 100 pixels (it may have more or less), this loop will run until it finds the first pixel along the bar from right to left that has a redlevel over 128, or until the fish stamnia is zero. Once the loop is done, $Stamina will hold the current value of the fish's life bar.
And no, long scripts don't have a noticably longer load time. It all depends on what you do with your script when trying to figure out how fast or slow it will run.
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Oct 18, 2005 19:45:20 GMT -5
Ok wow. That was nice.... I get the script in a nutshell, but there's no way I could think of anything like that myself.....
But I don't really see how that would work with the new fishing system..... I want it to fight the fish for me... Unless that went into your side of the fish-fighting and did it really really fast, but I think GM's would notice that....
Thanks for the scripting blurb, but I don't really understand how that would fight the fish for me....
I'm a little new to this, and this is my first language after C++ and C++ was just working with MSDOS prompt.... so this is totally new for me. Umm..... Could you kind of explain how that would function?
|
|
|
Post by TinyTerror on Oct 18, 2005 20:27:07 GMT -5
That code wont fight the fish. Thats your job. All it does is tell you how much stamina the fish has.
|
|
Rzn
Junior Member
Posts: 55
|
Post by Rzn on Oct 18, 2005 20:59:38 GMT -5
there is faster way to fight the fish but you have to use ffact. ffact will tell you your targets hp%. That should get you started if you want actool code expl. send me a pm.
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Oct 18, 2005 21:12:52 GMT -5
That code wont fight the fish. Thats your job. All it does is tell you how much stamina the fish has. Thanks tiny. I'll post more on the bot as I progress on it. On another note: Tiny, from what the other guy posted, he said there was another way to derive the Hpp from the strict game code. I've heard that alot around this forum... what is that program? (Will look into it as soon as I'm done with Pixel Check Bot.)
|
|
|
Post by TinyTerror on Oct 18, 2005 21:15:50 GMT -5
And it won't work unless you set x,y and stamina correctly. (x,y) should be the first pixel in the middle of the stamina bar starting on the left. (x+stamina,y) should be the last pixel in the middle of the bar on the right. I'll leave it to you to figure out what those numbers are.
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Oct 18, 2005 21:19:53 GMT -5
And it won't work unless you set x,y and stamina correctly. (x,y) should be the first pixel in the middle of the stamina bar starting on the left. (x+stamina,y) should be the last pixel in the middle of the bar on the right. I'll leave it to you to figure out what those numbers are. wow. that's insane how much that just helped me. Oh, is there a way to check text directly, because I don't want the fishbot to be reeling in stuff that will snap a 20k rod of mine. I've read it around here somewhere... and I know it's possible for sure! Just I don't know how
|
|
petar113507
Full Member
Damn Straight. I Am the king of waffelagia.
Posts: 166
|
Post by petar113507 on Oct 19, 2005 8:38:51 GMT -5
Okiedokie. Almost done with the bot script. Just gotta program, and test to make sure it works fine.
One quick question tiny, I think I can set up an IF statement with the PixelGetColor, How would I be able to compare the Hex, or Dec, whichever I would use (I have both the values) , just I don't know how to put it in this "IF equasion" so to speak.
|
|
|
Post by TinyTerror on Oct 19, 2005 8:50:13 GMT -5
|
|
|
Post by DarkAquaus on Oct 19, 2005 10:28:25 GMT -5
hmm that is a iteresting idea with the hp% >.> just might work .... shit I totally forgot about the hpp% being shown using the windower lol that my little code could interpet after i teach it the number possiblitys x.x lets see it is er... 100... 99... 98 /cry hmm maybe 0-9 might work... hmm donno if id be fast enough to react to the fish x.x basicly my text reader code works on the basis of white or black and shades of gray... it is pritty advanced for this area but if nothing else it gives you some ideas and btw it is only about 60 pix not 100 for that bar depends on res best way to find out is download the new windower tell it to run in fullscreen mode so the colors dont get fucked up on u then take a snapshot of your screen then open it in MS Paint or Photoshop CS or what ever... then count your pix but i know for sure it is less than 75 (pix check will take about >.> 10ms to 20ms with a 1.5ghz processer the faster your ram, bus, and processer the faster your script can run Favorite Quote: SEFFXI must die then /ma "Tractor" SEFFXI <ENTER>
|
|