Results 1 to 2 of 2

Thread: Function InFight - No Gametab switches!

  1. #1
    Join Date
    Aug 2007
    Location
    Emo-land
    Posts
    1,109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Function InFight - No Gametab switches!

    SCAR Code:
    {*******************************************************************************
    Function InFight: Boolean;
    By: FrÕzÑ_§ÕµL, based on FindFight by Stupid3ooo.
    Description: Checks for fights without changing game tabs.
    *******************************************************************************}

    Function InFight: Boolean;
    var
      x, y : Integer;
      ColorSign : String;

    Begin
      if FindColor(x, y, 65280, 217, 129, 297, 209) then
        if Players[CurrentPlayer].Integers[4] > GetMMLevels('hp', ColorSign) then
        Begin
          Result := True;
          WriteLn('***** FOUND FIGHTING RANDOM *****');
          WriteFileString(TheFile, '***** FOUND FIGHTING RANDOM *****' + Chr(13));
          TakeScreen('Found Fight');
          Inc(Fights);
        end;
    end;

    Code:
     
    NextPlayer(True);   //An example
    Players[CurrentPlayer].Integers[4] := GetSkillInfo('hitpoints', False);
    ^^ Put the above bit in your scripts setup or if using multiple players when they switch .

    What it does is get the HP level when your character logs in, and then when it finds the green health bar above your character it checks to see if the HP next to the MM is lower than the one recorded at script start.

    Just tested and works well.

    Enjoy all

  2. #2
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Or you could just look at the colorsign.. If Colorsign <> 'green' then Result := True;

    Closed this one.

    Refer to: http://www.villavu.com/forum/showthr...=24856?t=27169
    Verrekte Koekwous

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. New InFight function (using TPA)
    By marpis in forum Research & Development Lounge
    Replies: 5
    Last Post: 01-09-2009, 12:10 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
  •