detecting that you're stuck walking against tree? menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    boomingranny's Avatar Member
    Reputation
    4
    Join Date
    Mar 2009
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I measure the change in my position compaired to my end goal.
    I will start out with a variable called "progress" and set it to 10.

    so if i am at x=3, y=3 and i want to go goalx=1, goaly=2,
    i calculate the distance to my goal.
    then every say 200ms i check the change in my distance.
    i add the "progress" toward my goal, then subtract the change in time.

    ie.
    progress += distancetogoal-olddistancetogoal
    progress -= (a value * how much time has passed)

    so if you were running up a hill then falling back down, you arn't making progress, so your progress will get lower and lower.

    i will then run a "stuck" function based on how many times i have been stuck:

    function stuck( how many times)

    if stuck=0 then jump
    if stuck=1 then strafe
    if stuck=2 then reverse up, turn then walk forward
    ...
    Last edited by boomingranny; 04-12-2009 at 09:07 PM.

    detecting that you're stuck walking against tree?
  2. #17
    BoogieManTM's Avatar Active Member
    Reputation
    52
    Join Date
    May 2008
    Posts
    193
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by g3gg0 View Post
    wrong...
    imagine running up a wall where you climb up some pixels and fall down again.
    location changes, you have a (low and changing) run speed but you are still stuck.

    so you have to calculate the speed over a long period of time (~1sec or more)
    and check it for being lower than some 0,x coors per second.
    checking for "if ( speed == 0 )" will still fail in some cases since you move.
    not much but you move forward and backward at a small scale.
    the pseudo code was just an example of a very primitive and quickfix solution to running into an immovable object. checking the distance you DID travel, and the distance you SHOULD have traveled to figure out if you're stuck in more complex situations is a much better route, as I said.. That should catch MUCH MUCH more than 10% as you claim.. If you're expected to run 7 meters in a second (which is standard run speed), and you only run 2.. you know something is wrong.

  3. #18
    rootguy's Avatar Member
    Reputation
    3
    Join Date
    Aug 2008
    Posts
    36
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know this is an old thread but TraceLine is well worth the bump. It's a must have bot function, beats any other anti stuck detection by far hell you can implement smart waypoint pathing with it.
    Here's how to use it (credits to the WoWX people):


    bool TraceLine(WOWPOS* pstart, WOWPOS* pend, WOWPOS* presult, float* distance, unsigned long flag, WOWPOS* poption) {
    typedef bool (__attribute__((cdecl))*tTraceLine)(WOWPOS*, WOWPOS*, WOWPOS*, float*, unsigned long, WOWPOS*);
    tTraceLine pTraceLine = (tTraceLine)0x00505730;
    return pTraceLine(pstart, pend, presult, distance, flag, poption);
    }

    unsigned long flag = 0x40F300FF; // values passed seem to check way too much for my intents and purposes (0x1000124, 0x120171, 0x20000)
    float distance = 1.0; // make sure it's not 0!

    TraceLine(&ppos, &tpos, &presult, &dist, flag, 0);

  4. #19
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use TraceLine to check line of sight. Really... REALLY helpful to filter out 'bad' targets.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Thats the world of warcraft that you play
    By virus200 in forum Screenshot & Video Showoff
    Replies: 2
    Last Post: 06-15-2007, 04:03 PM
  2. TWINKS - incredible level 60 leg enchants that you can get!
    By Liania in forum World of Warcraft Exploits
    Replies: 44
    Last Post: 03-05-2007, 07:50 AM
  3. Music that you listen to while playing wow
    By Suds in forum World of Warcraft General
    Replies: 45
    Last Post: 02-19-2007, 04:36 PM
  4. Get any kind of mount that you want lv40+
    By Hounro in forum World of Warcraft Exploits
    Replies: 10
    Last Post: 01-26-2007, 07:47 AM
All times are GMT -5. The time now is 12:48 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search