Results 1 to 19 of 19

Thread: Detecting If Player Is In Combat

  1. #1
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Question Detecting If Player Is In Combat

    I am looking for a method that can accurately detect if the character is currently fighting. The player is located in a highly populated area where many other fights occur at the same time. Also, the inventory tab must stay open at all times.

    If anyone is aware of a detection method please let me know.

    Thanks


    Edit: This is for EOC not 07
    Last edited by ekips88; 04-15-2013 at 10:51 PM.

  2. #2
    Join Date
    Jan 2012
    Location
    127.0.0.1
    Posts
    702
    Mentioned
    11 Post(s)
    Quoted
    76 Post(s)

    Default

    have you tried pixelshift for the your character, this would work as your player will always visually dominate the square you are on, so set the confines of the pixelshift detection to that area

  3. #3
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

  4. #4
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by kevin View Post
    is this eoc or 07?
    eoc

  5. #5
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    EOC is pretty easy. You have several methods that are all valid.
    Simba Code:
    InFight;//Returns true if in a fight, located in {$i SRL/SRL/Skill/Fighting.Simba}
    or you can check the combat tab if your target has a health bar by counting the color green in that slot (that's what I do).
    or you can check the combat tab for a target name (lasts slightly longer than the fight occasionally)
    Simba Code:
    if(pos('Target',GetTextAtExWrap(595, 220, 660, 230, 0, 50, 10, 3111603, 10, 'UpChars')) = 0)then//'NoTarget' is shown when there is no target.

  6. #6
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Enslaved View Post
    have you tried pixelshift for the your character, this would work as your player will always visually dominate the square you are on, so set the confines of the pixelshift detection to that area

    The issue I'm finding is that often there are other players fighting in the same game square as me (or extremely close). This has thrown off every method I am familiar with (with that exception of the combat tab, but that is not an option).

    To the extent of my knowledge, this would also cause problems when using pixleshift. Please let me know if I am wrong.

  7. #7
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Out of curiosity, why must the script always stay on the inventory tab?

  8. #8
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    EOC is pretty easy. You have several methods that are all valid.
    Simba Code:
    InFight;//Returns true if in a fight, located in {$i SRL/SRL/Skill/Fighting.Simba}
    or you can check the combat tab if your target has a health bar by counting the color green in that slot (that's what I do).
    or you can check the combat tab for a target name (lasts slightly longer than the fight occasionally)
    Simba Code:
    if(pos('Target',GetTextAtExWrap(595, 220, 660, 230, 0, 50, 10, 3111603, 10, 'UpChars')) = 0)then//'NoTarget' is shown when there is no target.

    Due to the nature of the script using the combat tab is not an option. I will try the InFight function, however, I believe that one picks up mainscreen HP bars which would not be accurate in a densely populated combat zone. But, I am not fully familiar with the function so I may be wrong.

  9. #9
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    Out of curiosity, why must the script always stay on the inventory tab?

    It does not have to be on the inventory at all times, just during combat. But, the script must frequently check if it is in combat and I feel it would not be entirely human-like to rapidly switch between tabs. While I doubt it would raise too many red flags, I plan to use this script with my near-maxed account and the less risk the better.
    Last edited by ekips88; 04-15-2013 at 11:16 PM.

  10. #10
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Have you tried making the area for PixelShift so that it only focuses on your square? As your character will always be on top on your screen, limiting it to just the square your character is on should hopefully get things working.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  11. #11
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Oops, sorry, I didn't take note of the inventory requirement.
    If within a densely populated combat zone AND not allowing for a separate tab (why is that, btw?), then I would have to recommend a world hopper to remove combat density.

    Edit: why is it necessary to view your inventory between each kill?

  12. #12
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    Oops, sorry, I didn't take note of the inventory requirement.
    If within a densely populated combat zone AND not allowing for a separate tab (why is that, btw?), then I would have to recommend a world hopper to remove combat density.

    Edit: why is it necessary to view your inventory between each kill?

    My mistake, meant to say during combat (switches between weapons during fight)

  13. #13
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Doesn't switching weapons mid fight harm your ability to fight in EOC pretty hardcore? What exactly are you fighting that requires this, tormented demons?

  14. #14
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    Doesn't switching weapons mid fight harm your ability to fight in EOC pretty hardcore? What exactly are you fighting that requires this, tormented demons?

    Grotworms, but I didn't think of that. To tell you the truth, I've haven't played much recently so I'm still leaning how EOC works.

  15. #15
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Quote Originally Posted by ekips88 View Post
    Grotworms, but I didn't think of that. To tell you the truth, I've haven't played much recently so I'm still leaning how EOC works.
    Oh, I have a grot bot myself
    Just stick with one form of combat, they fall over easy to melee just fine, if you want faster tags then use ranged. You don't need to switch weapons ever for them, I promise. I use the color count I mention on them and it works fine.

  16. #16
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    Oh, I have a grot bot myself
    Just stick with one form of combat, they fall over easy to melee just fine, if you want faster tags then use ranged. You don't need to switch weapons ever for them, I promise. I use the color count I mention on them and it works fine.

    Alright, thanks very much for the help

  17. #17
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    As a side note, there may be additional issues you don't quite see yet/speed up opportunities. If you run across them, feel free to PM me and I'll share what I've learned in respect to them.

    Oh yeah and if someone else kills your target, while you get the drops, the green doesn't go away for a few seconds. Add a check for exp change to discover faster kills in those scenarios.

  18. #18
    Join Date
    Oct 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Kevin View Post
    As a side note, there may be additional issues you don't quite see yet/speed up opportunities. If you run across them, feel free to PM me and I'll share what I've learned in respect to them.

    Oh yeah and if someone else kills your target, while you get the drops, the green doesn't go away for a few seconds. Add a check for exp change to discover faster kills in those scenarios.

    Thanks again

  19. #19
    Join Date
    Mar 2007
    Posts
    393
    Mentioned
    1 Post(s)
    Quoted
    98 Post(s)

    Default

    I've searched for health bars put these stay there little pit after fight and if adrenaline starts to drain you have to wait alot. This combat tab checking seems to be pretty good for me, thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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