Results 1 to 11 of 11

Thread: How to get script to know when monster is dead

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default How to get script to know when monster is dead

    Hi guys, I'm making an AIO fighting script at the moment. I've done the eating, prayer and somewhat prayer. The abilities are annoying to script, using momentum with it spamming a couple abilities to get it to momentum. Anyone know a method to get the script to know when the monster is dead?

    Thank you greatly

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    You could try:
    Simba Code:
    repeat
       Wait(100);
    until(not SRL_InFight);

    It was pretty good for knowing when the fight was over when I used it before EOC, don't know if it needs updating though.

  3. #3
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Idk if i should tell you a helpful secret... But I'll allude to it

    If you go to the combat tab when you're in a fight it tells you the monsters name. When the monster is dead, it immediately changes to the default "no target" or similar.

  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    ^To make it more obvious: Use a DTM

  5. #5
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    ^To make it more obvious: Use a DTM
    NO. the shadow of the text is a specific static color. You can ensure 100% accuracy if you use GetColor at a specific coordinate. Don't over complicate things you don't need to

    KISS(keep it simple stupid)

  6. #6
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by footballjds View Post
    NO. the shadow of the text is a specific static color. You can ensure 100% accuracy if you use GetColor at a specific coordinate. Don't over complicate things you don't need to

    KISS(keep it simple stupid)
    Alright, you're right, that would be simpler.

    And yeah, I remember KISS from Man vs Wild

  7. #7
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    2,254
    Mentioned
    21 Post(s)
    Quoted
    238 Post(s)

    Default

    Nice catch with the static colour football! Finding that one specific colour vs a DTM is also going to be substantially faster than a DTM and easier on your CPU (if that matters to you).

  8. #8
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by cause View Post
    Nice catch with the static colour football! Finding that one specific colour vs a DTM is also going to be substantially faster than a DTM and easier on your CPU (if that matters to you).
    Thank you thank you

    and yes, CPU matters a lot to me. This 5 yr old laptop

  9. #9
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    You may want to also have it search above the monster for a red health bar, unless you want it to wait for the monster to disappear before trying to attack another monster. If you have it to detect you're out of a fight when it says "no target" then it may click the dying monster. If you can detect the health bar above it that means its dying and to not click that monster.
    Currently: Playing OSRS legit until I get bored

  10. #10
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Just thought of another possible way: when the monster dies you receive xp, so you could check for that.

  11. #11
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    Just thought of another possible way: when the monster dies you receive xp, so you could check for that.
    This is what I did and verify it works Thanks to all the others who commented as well.

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
  •