Results 1 to 3 of 3
  1. #1
    Mezmaa's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    76
    Reputation
    10
    Thanks
    15
    My Mood
    Cynical

    How to compare a value and execute a key

    Hello, I would like some help with knowing how to compare a value in a game, for example, health. I already have the offset for the health. I want to read this value, and say if it is below 20% of the max value, I would like it to use a health potion, or if it were simpler, just press the key that the health potion is assigned to. I was thinking this should be done with something like AHK, but I don't know how I could read a value and then execute the AHK script. Thanks for your help!

  2. #2
    RoPMadM's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    __asm
    Posts
    226
    Reputation
    12
    Thanks
    251
    My Mood
    Cynical
    You can use nearly any language with read and write functions even node.js is possible.
    There are several ways to do it.


    1. Hook a game function wich gets called often enough, and execute your code there.

    2. Create a codecave with your own timer, and execute your code.

    3. Create a external programm with timer and read the health and then simulate a key press.




    Since you aren't in a specific language sub forum you will not likely get any pasta code

  3. #3
    Mezmaa's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    76
    Reputation
    10
    Thanks
    15
    My Mood
    Cynical
    Quote Originally Posted by RoPMadM View Post
    You can use nearly any language with read and write functions even node.js is possible.
    There are several ways to do it.


    1. Hook a game function wich gets called often enough, and execute your code there.

    2. Create a codecave with your own timer, and execute your code.

    3. Create a external programm with timer and read the health and then simulate a key press.




    Since you aren't in a specific language sub forum you will not likely get any pasta code
    I don't want any pasta code! I'm most fluent with Python and I might actually try to make this with Python. I'll probably go with your third option and read my health and simulate a key press once my health gets low. Thank you! :-)

Similar Threads

  1. [Solved] Could anyone teach how to find the ce values and adress so i can gun add?
    By Hunter in forum Alliance of Valiant Arms (AVA) Help
    Replies: 6
    Last Post: 04-28-2014, 08:50 AM
  2. [Tutorial] How to put a bunnyhop script and execute it in css
    By Dusicyon in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 22
    Last Post: 09-22-2013, 12:51 PM
  3. How do Hack Addie's And Change Value?
    By monkkiller in forum Visual Basic Programming
    Replies: 3
    Last Post: 12-19-2009, 01:43 PM
  4. Need Values And Tips For Making Trainer
    By jokuvaan11 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 06-06-2007, 11:37 AM
  5. war rock hacks: how u get them up and running?
    By loopdedoo1 in forum WarRock - International Hacks
    Replies: 6
    Last Post: 05-22-2007, 04:05 PM