Results 1 to 1 of 1
  1. #1
    pastpain
    pastpain is offline
    Guest pastpain's Avatar
    Join Date
    2014 Aug
    Posts
    2
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    AHK Pixel Detection

    Now this tutorial will be very minimal as i cant post images or anything to help you along yet.

    In this tutorial we will be making a simple autopotion for a game.

    You will need to download AHK if you done have it already (Mod please add link to AHK's website as i cant)

    Step 1:
    You will need to run the AutoIt3 Window Spy that comes with the AHK package or download it seperately if for some reason it didnt come with AHK.

    Step 2:
    • Go into your game and make sure you have a full hp bar.
    • Put the cursor over the spot on the hp bar where you would like the potion to activate at.
    • Look in window spy and write down the information for that position.



    Example
    Code:
    In Active Window: 1680, 449
    Color:	0xF0F0CE  (Blue=F0 Green=F0 Red=CE)

    Step 3:
    In a new script we will use PixelGetColor, OutputVar, X, Y, COLOR to detect when our hp bar falls below the point you chose earlier.


    Example:
    Code:
    PixelGetColor, HPBAR, 1680, 499, 0xF0F0CE

    Step 4:
    Now that we have the code looking for that pixel lets do something with it when it changes. Put your potion on your hotbar. For this tutorial we will assume the potion is assigned to the "2" hotkey in game.


    Example:
    Code:
    if HPBAR >< 0xF0F0CE
    {
    send {2 down};Sends the 2 key down
    sleep 25 ;Adds a delay because some games ignore input if it doesnt have one
    send {2 up} ;Sends the 2 key up
    sleep 1000 ;Delays the next key send for 1 seconds
    }
    Code:
    
    
    Step 5:
    Add a trigger.

    This step is completely up to you, you can trigger this is probably 100 different ways but for this tutorial we will loop it and assign it to the hotkey numberpad 4

    Code:
    loop{
    PixelGetColor, HPBAR, 1680, 499, 0xF0F0CE
    if HPBAR >< 0xF0F0CE
    {
    send {2 down};Sends the 2 key down
    sleep 25 ;Adds a delay because some games ignore input if it doesnt have one
    send {2 up} ;Sends the 2 key up
    sleep 1000 ;Delays the next key send for 1 seconds
    }
    }
    
    numpad4::
    Pause
    return
    Hopefully you found this useful and helpful. Ill gladly answer any questions you may have.

Similar Threads

  1. Remove Cheat Engine Detection
    By Nausicaa in forum Soul Saver
    Replies: 6
    Last Post: 2013-06-20, 08:12 PM
  2. [Info] Avoiding Hack Detection
    By SAEBUR in forum Anti-Cheat Systems
    Replies: 0
    Last Post: 2012-08-27, 04:13 AM
  3. [Source] C# Memory-Pixel Bot for World of Warcraft
    By Grooguz in forum WoW Bots, Hacks, Cheats
    Replies: 0
    Last Post: 2012-06-04, 08:32 AM
  4. Dekaron Global Unpacked / debug detection bypass
    By Enigma in forum 2Moons / Dekaron
    Replies: 3
    Last Post: 2011-10-01, 03:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •