Results 1 to 3 of 3

Thread: WhiteKnightKiller!!!!!

  1. #1
    Join Date
    Dec 2007
    Location
    Canada
    Posts
    187
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default WhiteKnightKiller!!!!!

    Ok I am stumped and I dont see why after my character dies it logs out cuz its just supposed to repeat the loop, here just look at it its not very big and plz post back ASAP !!!!!

    SCAR Code:
    program CrazyKiller;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include SRL/SRL.scar}

    var
    x,y,loads,tries: integer;

    const
    SmartWorld= 39; //set this to world you wanna log in on.
    LampLevel= 'Prayer'; //Set the skill you want a lamp to do.
    weaponcolor= 6247744; //Set the color of the weapon in your inventory.
    ArmourColor1= 9737632;      //Set this to one of your armour peices inv color.
    ArmourColor2= 725594;      //Set this to another of your armour peices inv color.

    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: DoEmote(400 +Random(90));
        3: BoredHuman;
      end;
    end;

    Procedure AntiRandoms;
    begin
      FindNormalRandoms;
      FindLamp((LampLevel));
      SolveNonTalkingRandoms;
    end;

    procedure DeclarePlayers;
    begin

      HowManyPlayers:= 5;              // How many players are you using, feel free to use as many as you want.
      CurrentPlayer:= 0;               // Don't touch this.
      NumberOfPlayers(HowManyPlayers); // Don't touch this.


      Players[0].Name := '';             // Username.
      Players[0].Pass := '';             // Password.
      Players[0].Nick := '';             // 2-4 letters of Username (that are not capital letters or numbers).
      Players[0].Active := True;         // Don't touch this.


      Players[1].Name := '';
      Players[1].Pass := '';
      Players[1].Nick := '';
      Players[1].Active := False;


      Players[2].Name := '';
      Players[2].Pass := '';
      Players[2].Nick := '';
      Players[2].Active := False;


      Players[3].Name := '';
      Players[3].Pass := '';
      Players[3].Nick := '';
      Players[3].Active := False;


      Players[4].Name := '';
      Players[4].Pass := '';
      Players[4].Nick := '';
      Players[4].Active := False;
    end;

    {------------------------------DO NOT TOUCH BELOW------------------------------}

    Procedure ItemWield;
    begin
      if (FindColorTolerance(x, y,(weaponcolor),MIX1, MIY1, MIX2, MIY2,15)) then
      Mouse(x,y,1,1,true);
      if (FindColorTolerance(x, y,(ArmourColor1),MIX1, MIY1, MIX2, MIY2,15)) then
      Mouse(x,y,1,1,true);
      if (FindColorTolerance(x, y,(ArmourColor2),MIX1, MIY1, MIX2, MIY2,15)) then
      Mouse(x,y,1,1,true);
    end;

    function InFight: Boolean;
    var
      x, y : Integer;
    begin
      Result := (FindColor(x, y, 65280, 230, 130, 280, 180) or FindColor(x, y, 255,
        230, 130, 280, 180))
    end;

    Procedure FightKnight1;
    begin
      AntiRandoms;
      if(FindColorTolerance(x, y, 923498, MSX1, MSY1, MSX2, MSY2, 15))
      then
      begin
        Mouse(x,y,1,1, false);
        ChooseOption('Attack');
        repeat
        begin
          case Random(4) of
          1:  MakeCompass('N');
          2:  MakeCompass('E');
          3:  MakeCompass('S');
          4:  MakeCompass('W');
          end;
        end;
        wait(1000)
        until(not(InFight))
      end;
    end;
     
    Procedure FightKnight2;
    begin
      AntiRandoms;
      if(FindColorTolerance(x, y, 1955801, MSX1, MSY1, MSX2, MSY2, 15))
      then
      begin
        Mouse(x,y,1,1, false);
        ChooseOption('Attack');
        repeat
        begin
          case Random(4) of
          1:  MakeCompass('N');
          2:  MakeCompass('E');
          3:  MakeCompass('S');
          4:  MakeCompass('W');
          end;
        end;
        wait(1000)
        until(not(InFight))
      end;
    end;

     

    begin
      SmartSetUpEx(SmartWorld,False, True);
      While Not (SmartReady) Do
      Wait(100);
      SetTargetDC(SmartGetDC);
      If Not (LoggedIn) Then
      Wait(100);
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      AntiBan;
      repeat
      SetAngle(true)
      ItemWield;
      FightKnight1;
      FightKnight2;
      until(false)
    end.
    I'm baaaack

  2. #2
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try and but LoginPlayer in the repeat section
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  3. #3
    Join Date
    Dec 2007
    Location
    Canada
    Posts
    187
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    umm if i did that wouldnt it just automatically log my player out after the loop (which takes like 5 seconds) just wasting a lot of time?

    EDIT1: ok well it doesnt do what i thought it would above but it now it will say current player inactive and i have no clue why because my character should not b going inactive in the first place because nowhere in the script did i put a funtion for that.

    EDIT 2: ok nvm i figured it out, this is for any other people that have this problem and have to waste time pondering it lol if your making a fighting script that doesnt matter if you die then you need to change your anti-randoms SCAR function because in the function findnormalrandoms; it includes FindDead; in this function if your character dies it will log him out and make him inactive!!!!! im not deleting this thread so other noobs can read this
    I'm baaaack

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
  •