Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 46
  1. #31
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    well, i know how to do that, the problem is, what if i don't want to do yew trees anymore. Is there a way i can code it so that i can set a range of pixels like 20 pixel range for the variable? That was my problem since the beginning. Btw, thanks why06 and hd.

  2. #32
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    What I did was take a picture or 3 of the same tree in different angles, then cut out only the tree(no floor etc visible) and save them as 24bit BMP, then load it in a C# application that would determine the lowest RGB code used, highest RGB code used, and it gave me the average difference in colors between every pixel next to eachother(continuing from the last picture I loaded). I had those saved to a text file in the format lr_lg_lb_hr_hg_hb_ar_ag_ab

    Then I started another application for which I took 100 pics(of which 40 contained the tree I wanted, and 60 contained random locations in runescape that could seem similar to the tree i wanted to cut). With these 100 pictures I further trained the bot to recognize only trees by clicking the yes or no button, yes if the drawn rectangle was around a tree, no if it had it wrong, then it would increase lowRGB, decrease highRGB, or decrease averagediff. Once that was done it would determine the lowest amount of recognized pixels left and the average distance between them(with 25% lower or higher allowed).

    Finally I used a 3rd app that would use the results of app 1 and 2 but in a live enviroment just walk around and watch it tag all the trees. if it got one wrong I just clicked edit then click on the rectangle that was wrong and it'd adjust the formulas in such a way it wouldnt detect that object anymore.

    It was a gigantic project but fun to do, over a year ago tho before I upgraded to win7 so no longer have the code
    Ah we-a blaze the fyah, make it bun dem!

  3. The Following 2 Users Say Thank You to Hell_Demon For This Useful Post:

    'Bruno (02-16-2011),why06 (02-16-2011)

  4. #33
    Auxilium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,518
    Reputation
    445
    Thanks
    609
    My Mood
    Happy
    Quote Originally Posted by 258456 View Post
    Idk y but this part of my code isn't working. I spent a while trying to figure this out but never did. I want it to check the color of coordinate one and nine. It will then compare the colors of those coordinates to screen_now which is the color of the spot right now. If it does not match the colors then i want it to start rs_event_alert.exe. The problem is that it starts rs_event_alert.exe anyway, even if the statement is true. Here is the code:

    Code:
    COLORREF tree = RGB(r_pixel_one, g_pixel_one, b_pixel_one);
    		COLORREF background = RGB(r_pixel_two, g_pixel_two, b_pixel_two);
    		
    		int r_2,g_2,b_2;
    		int r_3, g_3, b_3;
    		int r_4, g_4, b_4;
    		pixel3 = GetPixel(hdc, one.x, one.y);
    		r_3 = GetRValue(pixel3);
    		g_3 = GetGValue(pixel3);
    		b_3 = GetBValue(pixel3);
    		COLORREF screen_now = RGB(r_3, g_3, b_3);
    		if(screen_now != tree || background){system("START rs_event_alert.exe"); system("PAUSE");}
    		pixel2 = GetPixel(hdc, eight.x, eight.y);
    		r_2 = GetRValue(pixel2);
    		g_2 = GetGValue(pixel2);
    		b_2 = GetBValue(pixel2);
    		if(r_2 == r_targetpix && g_2 == g_targetpix && b_2 == b_targetpix){ autodump();   } 
    		Sleep(1500);
    never seen uglier code, darn winapi

  5. #34
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Damn . :/

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  6. #35
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    i just threw it together really fast, lol, ya it's extremely messy.

  7. #36
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Original pic:


    What to train from:


    After it adjusted its filters a few time it gave me this result(autoadjusted filters by checking if there were more then x white pixels directly against eachother, if there were it would adjust the maximum or minimum):


    Which I manually narrowed down to:


    Final values:
    Max: 75,77,40
    Min: 50,60,30

    Now I can do some loops and determine how wide and long it would be on screen based on maximum distance from previous pixels that it detected and draw a rectangle around it or something.
    Ah we-a blaze the fyah, make it bun dem!

  8. The Following 2 Users Say Thank You to Hell_Demon For This Useful Post:

    'Bruno (02-16-2011),why06 (02-16-2011)

  9. #37
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    More epicness, HD. What values did your bot adjust to identify a tree. was it like avg color, density of color, etc?

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  10. #38
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by why06 View Post
    More epicness, HD. What values did your bot adjust to identify a tree. was it like avg color, density of color, etc?
    Converted RGB to HSL(Hue/Saturation/Luminance), then compared Luminance of the avg color at white solid parts to Luminance of (min+max)/2, then adjust min or max based on that
    Last edited by Hell_Demon; 02-16-2011 at 10:11 AM.
    Ah we-a blaze the fyah, make it bun dem!

  11. The Following 3 Users Say Thank You to Hell_Demon For This Useful Post:

    'Bruno (02-16-2011),258456 (02-16-2011),why06 (02-16-2011)

  12. #39
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    HOLY CRAP. I would probably never figure that out. Do you guys have any ideas on a method that i could use to detect if i am still in my right place, other than my failed method in this thread. Thanks. Btw crazy logic HD.

  13. #40
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    ok, nevermind the last post guys i have another idea. I will test it and report back if it works and i will reveal the method.

  14. #41
    258456's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    ghjghj
    Posts
    1,222
    Reputation
    18
    Thanks
    300
    My Mood
    Relaxed
    Ok I solved the problem using the same method. Instead of gettin the color of the tree and the background I found that it was just necessary to get the background color and then I set up an if statement sorta like this:

    Code:
     if(! (r_3 >= r_pixel_two - 20 ............)){}
    So thx so much for ur guys' help cuz now my bot runs while I m at skool and I receive status updates via txt messages from the bot. It is so legit, lol.

  15. #42
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by 258456 View Post
    So thx so much for ur guys' help cuz now my bot runs while I m at skool and I receive status updates via txt messages from the bot. It is so legit, lol.
    Next on the list: Have it send an MMS with a screenshot of what it's currently doing :P
    Ah we-a blaze the fyah, make it bun dem!

  16. #43
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Quote Originally Posted by Hell_Demon View Post
    Next on the list: Have it send an MMS with a screenshot of what it's currently doing :P
    LOL. I wonder how you'd do that.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  17. #44
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by master131 View Post
    LOL. I wonder how you'd do that.
    easy to get it as bitmap, all thats left to figure out is how to attach the bitmap to the MMS(which if its like emailing, shouldnt be too hard)
    Ah we-a blaze the fyah, make it bun dem!

  18. #45
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Quote Originally Posted by Hell_Demon View Post
    easy to get it as bitmap, all thats left to figure out is how to attach the bitmap to the MMS(which if its like emailing, shouldnt be too hard)
    Get a free online MMS service.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

Page 3 of 4 FirstFirst 1234 LastLast