Results 1 to 4 of 4

Thread: a way to look if..

  1. #1
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default a way to look if..

    ..a NPC is in a fight
    ....

  2. #2
    Join Date
    Sep 2007
    Location
    British Columbia, Canada
    Posts
    4,047
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Off my clan war fighter.

    Simba Code:
    Function Fighting( T: Tpoint): Boolean;
    //Finds If hp bar is present around the given point 'T', I use it to check If other is in fight.
    Var
      OFX, OFY: Tpoint;
      HPMod: Integer;
    Begin
      HPMod := 100 * ( T.Y - MSCY) / MSY2;
      OFX := IntToPoint( T.X - 25, T.X + 25);
      OFY := IntToPoint( T.Y - ( 100 + HPMod), T.Y);
      If OFX.X < 0 Then
        OFX.X := 0;
      If OFY.X < 0 Then
        OFY.X := 0;
      Result := FindColorSpiralTolerance( T.X, T.Y, 52606, OFX.X, OFY.X, OFX.Y, OFY.Y, 39) OR FindColorSpiralTolerance( T.X, T.Y, 327842, OFX.X, OFY.X, OFX.Y, OFY.Y, 25);
    End;

    It look for hp bar around the possible areas for a monster that equal or smaller than a normal player, (so if you have like a corp beast or jad it wouldn't work that well).

    The color might still work, if not just update it with the current color of the green and red (in hp bar).
    Last edited by Main; 12-13-2011 at 09:52 PM.
    Oh Hai Dar

  3. #3
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by sjlou View Post
    ..a NPC is in a fight

    Simba Code:
    InFight

    It's in Misc/Fighting.scar

    Although I suggest you to create own function for this.


    ~Home

  4. #4
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    srl_inFight?

    EDIT: 'd
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


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
  •