Results 1 to 10 of 10

Thread: Ranging Script, Detect if monster is out of range.

  1. #1
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    233
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Ranging Script, Detect if monster is out of range.

    I've noticed the lack of decent ranger scripts in the ranger section. So I need help with some fighting procedures for my ranging script.
    I'm trying to figure out how, if the character is standing at a safespot, to determine whether a monster is too far away. If a monster is out of range of the ranged weapon, and the character attacks it, the character runs around to get to the monster (in order to get in ranged). However, I don't want that. Theoretically, the point is to stay at the safespot so that the bot can auto-range forever without the need to heal.

    Thanks for your help in advance,
    ~L3ss Than 33
    RS Simple Solution to Wilderness, Click Here!
    Use Run Energy Efficiently in Scripts, Click Here!
    ---------------------------------------------------
    Make some magic happen.
    ---------------------------------------------------



    http://www.fenjer.com/adnan/SRLStats/3839.png

  2. #2
    Join Date
    Dec 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, this would be hard cuz u dont get a message saying that ur out of range from the monster, but it is doeble with somekind of squre [the thing u stand on in rs] counter, u just need to go into rs urself and try getting out of range and then put that in the script, how to do this procedure/function is out of my range

  3. #3
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    233
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm... I was thinking of just restricting where my mouse can click to attack monsters to a specific area. But that would be kind of hard considering it wouldn't work unless my camera angle could be directly overhead the character. Then all I'd have to do is restrict my mouse to attacking within a specific diameter circle.

    ~L3ss Than 33
    RS Simple Solution to Wilderness, Click Here!
    Use Run Energy Efficiently in Scripts, Click Here!
    ---------------------------------------------------
    Make some magic happen.
    ---------------------------------------------------



    http://www.fenjer.com/adnan/SRLStats/3839.png

  4. #4
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by L3ss Than 33 View Post
    Hmm... I was thinking of just restricting where my mouse can click to attack monsters to a specific area. But that would be kind of hard considering it wouldn't work unless my camera angle could be directly overhead the character. Then all I'd have to do is restrict my mouse to attacking within a specific diameter circle.

    ~L3ss Than 33
    That would be my solution. All you have to do is highest angle. Don't use the longest range possible since a monster may move, you'll want some wiggle room.

    You could always just find a different spot to range from that won't let your character run... Or figure out a way to get back to the safe-spot if you aren't there.
    -You can call me Mick-



  5. #5
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    233
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by mickaliscious View Post
    That would be my solution. All you have to do is highest angle. Don't use the longest range possible since a monster may move, you'll want some wiggle room.

    You could always just find a different spot to range from that won't let your character run... Or figure out a way to get back to the safe-spot if you aren't there.
    There aren't any safespots that won't let your character run (except maybe p2p caged animals). I'm making the script for f2p. And it is pretty hard to get back to the safespots because they're usually just 1 specific square. =[
    I'm still testing to see what works best.
    RS Simple Solution to Wilderness, Click Here!
    Use Run Energy Efficiently in Scripts, Click Here!
    ---------------------------------------------------
    Make some magic happen.
    ---------------------------------------------------



    http://www.fenjer.com/adnan/SRLStats/3839.png

  6. #6
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It depends what you're trying to attack and if you want to be able to pick up your ammo again. You could try the old favorite, lesser demon in wizards tower. Or maybe the white knights or barbarian village.
    -You can call me Mick-



  7. #7
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    233
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lesser demon=too crowded
    Knights or Barbarians I could give a try...

    My current script isn't going to pick up ammo. Just buy tons of bronze arrows, but it should be able to go on indefinitely without the need for food.
    RS Simple Solution to Wilderness, Click Here!
    Use Run Energy Efficiently in Scripts, Click Here!
    ---------------------------------------------------
    Make some magic happen.
    ---------------------------------------------------



    http://www.fenjer.com/adnan/SRLStats/3839.png

  8. #8
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ...If you're not picking up ammo then just to be impressive you could make a mager/ranger combo.. (Its all the same thing except instead of checking if out of arrows, you check if out of runes. You'd also want a check to make sure the spell was set to auto-cast though.)

    That'd be fancy.
    -You can call me Mick-



  9. #9
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function MonsterTooFar(MonsterX, MonsterY : integer) : boolean;
    var Monster : TPointArray;
    var PlayerPoint : TPoint;
    begin
      SetArrayLength(Monster, 1);
      Monster[0].x := MonsterX;
      Monster[0].y := MonsterY;
      PlayerPoint.X := MSCX;
      PlayerPoint.Y := MSCY;
      Result := NearbyPointInArray(PlayerPoint,50,Monster); //50 is example.
    end;

    As I said 50 is example, I don't know real range...if it's more than 50 pixels then it returns true

    Credit if you use
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  10. #10
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    233
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Negaal View Post
    SCAR Code:
    function MonsterTooFar(MonsterX, MonsterY : integer) : boolean;
    var Monster : TPointArray;
    var PlayerPoint : TPoint;
    begin
      SetArrayLength(Monster, 1);
      Monster[0].x := MonsterX;
      Monster[0].y := MonsterY;
      PlayerPoint.X := MSCX;
      PlayerPoint.Y := MSCY;
      Result := NearbyPointInArray(PlayerPoint,50,Monster); //50 is example.
    end;

    As I said 50 is example, I don't know real range...if it's more than 50 pixels then it returns true
    Credit if you use
    Thanks a lot! I'll remember to credit you =]

    @mickaliscious I'll make it a mager too, that shouldn't be that hard =]. The pixel range will just change.
    RS Simple Solution to Wilderness, Click Here!
    Use Run Energy Efficiently in Scripts, Click Here!
    ---------------------------------------------------
    Make some magic happen.
    ---------------------------------------------------



    http://www.fenjer.com/adnan/SRLStats/3839.png

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Best Monster to range with?
    By Claymore in forum OSR Help
    Replies: 9
    Last Post: 12-04-2008, 08:55 PM
  2. ranging script
    By weby in forum RS3 Outdated / Broken Scripts
    Replies: 10
    Last Post: 11-27-2008, 11:16 PM
  3. Ranging script
    By Doggie in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 10-30-2008, 03:48 AM
  4. Script Problem, How can you detect if fishing?
    By pianoman933 in forum OSR Help
    Replies: 11
    Last Post: 05-15-2008, 11:36 AM

Posting Permissions

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