Results 1 to 13 of 13

Thread: Help with AntiRandom Adding

  1. #1
    Join Date
    Oct 2007
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with AntiRandom Adding

    Ok First I tryd to add antirandoms before with a whole procedure but that didnt work cause it wouldnt tell what FindNormalRandoms were. So i took ut the procedure and just put in FindNormalRandoms int he main begin. When i strated the script it gave me this error:
    Code:
    [Runtime Error] : Exception: Access violation at address 00721E61 in module 'scar.exe'. Read of address 00000000 in line 274 in script C:\Program Files\SCAR 3.12\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
    Then after that a tab pulled up witch is this:
    Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--               ยป AntiRandom Routines                         --//
    //-----------------------------------------------------------------//
    // * procedure SRLRandomsReport;                   // * by Starblaster100
    // * function FindMod: Boolean;                    // * by Stupid3ooo
    // * function FindFight: Boolean;                  // * by Stupid3ooo
    // * function InConvo: Boolean;                    // * by WT-Fakawi
    // * procedure DwarfItem;                          // * by Sumilion
    // * function FindLamp(skill: String): Boolean;    // * by Pups and Starblaster100
    // * function SolveGenie(skill: String): Boolean;  // * by Starblaster100 & Mutant Squirrle
    // * function FindDead: Boolean;                   // * by Stupid3ooo
    // * function FindMime: Boolean;                   // * by Stupid3ooo
    // * function FindMaze: Boolean;                   // * by Stupid3ooo
    // * procedure CreateScapeRune;                    // * by WT-Fawaki
    // * function FindScapeRune: Boolean;              // * by Dankness modifyed by WT-Fawaki
    // * function SolvePinball: Boolean;               // * by pups
    // * function FindPlant: Boolean;                  // * by ?
    // * function WeAreDead: Boolean;                  // * by Stupid3ooo
    // * function FindTrade: Boolean;                  // * by WT-Fakawi modified by Cheesehunk.
    // * function InBlack: Boolean;                    // * by WT-Fakawi
    // * function NoGameTab: Boolean;                  // * by WT-Fakawi
    // * function SolveTalkingRandom(RawMenuText: String): Boolean; // * by SRL Developers Team.
    // * function ChooseOptionGetMenuText(var RawMenuText: String; x, y: Integer; txt: String): Boolean; // * by Stupid3ooo, modded by WT-Fakawi.
    // * procedure SetScreenName(ScreenName: String);  // * by WT-Fakawi
    // * function FindTalk: Boolean;                   // * by Renax
    // * function FindInventoryRandoms: Boolean;       // * by The SRL Developers Team!... all time sexiness by Mutant
    // * function FindNonInventoryRandoms: Boolean;    // * by The SRL Developers Team!... all time sexiness by Mutant
    // * function FindNormalRandoms: Boolean;          // * by The SRL Developers Team!... all time sexiness by Mutant
    // * procedure BoredHuman;                         // * by WT-Fakawi
    // * procedure RandomMovement;                     // * by Krazy_Meerkat
    // * procedure Wait2(timetowait: Integer; Randoms: Boolean); // * by Krazy_Meerkat
    // * procedure FTWait(Time: Integer);              // * by WT-Fakawi
    
    
    {*******************************************************************************
    procedure SRLRandomsReport;
    by: Starblaster100
    Description: Displays Randoms Report.
    *******************************************************************************}
    
    Procedure SRLRandomsReport;
    Var
      i, CurrentInt: Integer;
      CurrentStr, Name: String;
    Begin
      ChangeReportWidth(280);
      ClearReport;
      AddToReport('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
      AddToReport('|     SRL 4 Randoms Report     |');
      AddToReport('|      www.srl-forums.com      |');
      AddToReport('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|');
      For i := 0 to 32 do
      Begin
        Case i of
          0: Begin CurrentInt := SRL_Logs; Name := '| SRL Logs         :'; end;
          1: Begin CurrentInt := Trades; Name := '| Trades Made      :'; end;
          2: Begin CurrentInt := NoTrades; Name := '| Trades Missed    :'; end;
          3: Begin CurrentInt := Fights; Name := '| Fights           :'; end;
          4: Begin CurrentInt := Talks; Name := '| Talks            :'; end;
          5: Begin CurrentInt := Dwarfs; Name := '| Dwarfs           :'; end;
          6: Begin CurrentInt := Ricks; Name := '| Ricks            :'; end;
          7: Begin CurrentInt := OldMen; Name := '| Old Men          :'; end;
          8: Begin CurrentInt := Jekylls; Name := '| Jekylls          :'; end;
          9: Begin CurrentInt := SandWiches; Name := '| Sandwiches       :'; end;
          10: Begin CurrentInt := NOSandWiches; Name := '| No Sandwiches    :'; end;
          11: Begin CurrentInt := NOForester; Name := '| No Foresters     :'; end;
          12: Begin CurrentInt := Lamps; Name := '| Lamps Solved     :'; end;
          13: Begin CurrentInt := NoLamps; Name := '| Lamps Missed     :'; end;
          14: Begin CurrentInt := Frogs; Name := '| Frog Solved      :'; end;
          15: Begin CurrentInt := NoFrogs; Name := '| Frog Missed      :'; end;
          16: Begin CurrentInt := Caps; Name := '| Capn Hand[s]     :'; end;
          17: Begin CurrentInt := Certers; Name := '| Certers Solved   :'; end;
          18: Begin CurrentInt := NoCerters; Name := '| Certers Missed   :'; end;
          19: Begin CurrentInt := Demons; Name := '| Demons Solved    :'; end;
          20: Begin CurrentInt := NewBoxes; Name := '| Boxes Solved     :'; end;
          21: Begin CurrentInt := NoNewBoxes; Name := '| Boxes Missed     :'; end;
          22: Begin CurrentInt := Mods; Name := '| Mods Found       :'; end;
          23: Begin CurrentInt := Mazes; Name := '| Mazes Found      :'; end;
          24: Begin CurrentInt := Mimes; Name := '| Mimes Found      :'; end;
          25: Begin CurrentInt := Deaths; Name := '| Death[s]         :'; end;
          26: Begin CurrentInt := Deaths; Name := '| Quiz[es] Found   :'; end;
    
          27: Begin CurrentInt := RodsFound; Name := '| Rods Found       :'; end;
          28: Begin CurrentInt := WhirlPools; Name := '| WhirlPools       :'; end;
          29: Begin CurrentInt := ScapeRunes; Name := '| ScapeRunes       :'; end;
    
          30: Begin CurrentInt := AxeAttaches; Name := '| Axes Fixed       :'; end;
          31: Begin CurrentInt := BirdsNest; Name := '| Birds Nest       :'; end;
          32: Begin CurrentInt := EntsAvoided; Name := '| Ents Found       :'; end;
        end;
    
        CurrentStr := IntToStr(CurrentInt);
        CurrentStr := '        ' +CurrentStr+ ' |';
        Delete(CurrentStr, 1, Length(IntToStr(CurrentInt)));
        If (CurrentInt > 0) then
          AddToReport(Name+ '  '+CurrentStr);
      end;
      AddToReport('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
      SendSRLReport;
    end;
    
    {*******************************************************************************
    function FindMod: Boolean;
    by: Stupid3ooo
    Description: Results True if a mod is found, then it waits 10-20 mins and logs back in
    *******************************************************************************}
    
    function FindMod: Boolean;
    var
      tx, ty: Integer;
    begin
      if not usefindmod then exit;
      if (not (GetColor(20, 434) = 0)) then Exit;
      Wait(100);
      if (BmpMod = 0) or (BmpAdmin = 0) then
        LoadSRLBitMaps;
      if (FindColorTolerance(tx, ty, 14737632, 1, 345, 110, 430, 15)) or
        (FindColorTolerance(tx, ty, 589815, 1, 345, 110, 430, 15)) then
        if (FindBitmapToleranceIn(bmpMod, tx, ty, 1, 345, 110, 430, 15)) or
          (FindBitmapToleranceIn(bmpAdmin, tx, ty, 1, 345, 110, 430, 15)) then
        begin
          Result := True;
          WriteLn('******** FOUND MOD ********');
          WriteFileString(TheFile, '******** FOUND MOD ********' + Chr(13));
          TakeScreen('Found mod');
          Mods := Mods + 1;
          SaveToChatLog;
          Players[CurrentPlayer].Rand := 'Found Mod';
          repeat
            Logout;
            Wait(1500 + Random(500));
          until not (LoggedIn);
          Wait((60000) + Random(60000));
          LoginPlayer;
        end;
    end;
    
    {*******************************************************************************
    function FindFight: Boolean;
    by: Stupid3ooo
    Description: Results True if in Fight
    *******************************************************************************}
    
    function FindFight: Boolean;
    var
      xf, yf: Integer;
    begin
      if (FindColor(xf, yf, 65280, 217, 129, 297, 209)) then
      begin
        if (CheckHpFirst = True) then
        begin
          GameTab(2);
          Wait(500 + Random(100));
          if (HpPercent < 100) then
          begin
            Result := True;
            WriteLn('******** FOUND FIGHTING RANDOM ********');
            WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
              Chr(13))
            TakeScreen('Found Fight');
            Fights := Fights + 1;
          end;
        end
        else
        begin
          WriteLn('******** FOUND FIGHTING RANDOM ********');
          WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
            Chr(13))
            Result := True;
          TakeScreen('Found Fight');
          Fights := Fights + 1;
        end;
        GameTab(4);
      end;
    end;
    
    {*******************************************************************************
    function FindFightEx: Boolean;
    by: Stupid3ooo
    Description: Results True if in Fight, doesn't goto inv after use
    *******************************************************************************}
    
    function FindFightEx: Boolean;
    var
      xf, yf: Integer;
    begin
      if (FindColor(xf, yf, 65280, 217, 129, 297, 209)) then
      begin
        if (CheckHpFirst = True) then
        begin
          GameTab(2);
          Wait(500 + Random(100));
          if (HpPercent < 100) then
          begin
            Result := True;
            WriteLn('******** FOUND FIGHTING RANDOM ********');
            WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
              Chr(13))
            TakeScreen('Found Fight');
            Fights := Fights + 1;
          end;
        end
        else
        begin
          WriteLn('******** FOUND FIGHTING RANDOM ********');
          WriteFileString(TheFile, '******** FOUND FIGHTING RANDOM ********' +
            Chr(13))
            Result := True;
          TakeScreen('Found Fight');
          Fights := Fights + 1;
        end;
        GameTab(4);
      end;
    end;
    
    
    {*******************************************************************************
    function InConvo: Boolean;
    by: WT-Fakawi
    Description: checks for presence of black separator line indicating a random is talking to us.
    *******************************************************************************}
    
    function InConvo: Boolean; // checks for black separator  line
    Var
       x, y: Integer;
    begin
      if ((not FindColor(x, y, 0, 21, 434, 21, 434)) and (not FindColor(x, y, 0,
        475, 434, 475, 434))) then
        Result := True;
    end;
    
    {*******************************************************************************
    procedure DwarfItem;
    by: Sumilion
    Description: Drops Items left by Dwarf
    *******************************************************************************}
    
    procedure DwarfItem;
    var
      Ix, Iy, Kebab, ItemMark, Beer: Integer;
    begin
      Kebab := BitmapFromString(8, 9, 'z78DA3330200DB88181011D752' +
        '103DAD93BB02A89570F00CD145629');
      Beer := BitmapFromString(8, 6, 'z78DA3330C00EDCC0C0800840BC' +
        '4A4AD42303031201257A01BC683A21');
      GameTab(4);
      MarkTime(ItemMark);
      while (FindBitmapMaskTolerance(Kebab, Ix, Iy, MIX1, MIY1, MIX2, MIY2, 0, 0) or
        FindBitmapMaskTolerance(Beer, Ix, Iy, MIX1, MIY1, MIX2, MIY2, 0, 0)) do
      begin
        Mouse(Ix, Iy, 5, 5, False);
        ChooseOption('rop');
        Wait(500 + Random(500));
        if (TimeFromMark(ItemMark) > 20000) then Break;
      end;
      FreeBitmap(Kebab);
      FreeBitmap(Beer);
    end;
    
    {*******************************************************************************
    function FindLamp(skill: String): Boolean;
    by: Pups and Starblaster100
    Description: handles Genie. Results True if lamp found and handled.
    skill: Skill to use with lamp eg. 'strength', 'attack', etc.
    *******************************************************************************}
    
    function FindLamp(skill: string): Boolean;
    var
      LampTime, x, y: Integer;
    begin
      GameTab(4);
      if FindColorTolerance(x, y, 1084300, 550, 200, 745, 465, 40) then
        if (FindBitmapSpiralTolerance(Lamp, x, y, 550, 200, 745, 465, 40)) then
        begin
          Result := True;
          TakeScreen('Lamp Random Solved');
          WriteLn('******** SOLVED LAMP RANDOM ********');
          WriteFileString(TheFile, '******** SOLVED LAMP RANDOM ********' + Chr(13));
          Lamps := Lamps + 1;
          Mouse(x, y, 1, 1, True);
          Wait(1500 + Random(500));
          MarkTime(LampTime);
          repeat
            case (LowerCase(Skill)) of
              'strength': Mouse(191, 134, 12, 12, True);
              'attack': Mouse(222, 136, 12, 12, True);
              'ranged': Mouse(256, 134, 12, 12, True);
              'magic': Mouse(289, 135, 12, 12, True);
              'defence': Mouse(319, 136, 12, 12, True);
              'hitpoints', 'hp': Mouse(176, 166, 12, 12, True);
              'prayer', 'pray': Mouse(208, 163, 12, 12, True);
              'agility': Mouse(239, 165, 12, 12, True);
              'herblore': Mouse(271, 165, 12, 12, True);
              'thieving', 'thief': Mouse(303, 164, 12, 12, True);
              'crafting', 'craft': Mouse(335, 164, 12, 12, True);
              'runecraft', 'runecrafting': Mouse(174, 193, 12, 12, True);
              'slayer', 'slay': Mouse(205, 195, 12, 12, True);
              'farming', 'farm': Mouse(239, 193, 12, 12, True);
              'mining', 'mine': Mouse(270, 194, 12, 12, True);
              'smithing', 'smith': Mouse(302, 194, 12, 12, True);
              'fishing', 'fish': Mouse(334, 192, 12, 12, True);
              'cooking', 'cook': Mouse(173, 220, 12, 12, True);
              'firemaking', 'fire': Mouse(206, 220, 12, 12, True);
              'woodcutting', 'wc': Mouse(240, 220, 12, 12, True);
              'fletching', 'fletch': Mouse(274, 220, 12, 12, True);
              'construction': Mouse(303, 220, 12, 12, True);
              'hunting', 'hunt': Mouse(335, 220, 12, 12, True);
            end;
            Wait(500 + Random(200) + Random(100));
            if (TimeFromMark(LampTime) > 30000) then
            begin
              Logout;
              Players[CurrentPlayer].Rand := 'Lamp';
              Exit;
            end;
          until (FindColorTolerance(x, y, 2303647, 155, 117, 370, 250, 0));
          Mouse(261, 277, 1, 1, True);
          Wait(500 + Random(150) + Random(150));
        end;
    end;
    
    {*******************************************************************************
    function SolveGenie(skill: String): Boolean;
    by: Starblaster100 & Mutant Squirrle
    Description: Returns true if the lamp is found and solved.
    *******************************************************************************}
    
    function SolveGenie(skill: string): Boolean;
    begin
      if (FindLamp(skill)) then
        Result := True;
    end;
    
    {*******************************************************************************
    function FindDead: Boolean;
    by: Stupid3ooo
    Description: Checks for text "Ow dear you are dead".
    Switches player if Reincarnate = True.
    *******************************************************************************}
    
    function FindDead: Boolean;
    begin
      Result := False;
      if (GetColor(34, 445) = 0) and (GetColor(134, 445) = 0) then
      begin
        Deaths := Deaths + 1;
        Result := True;
        SaveToChatLog;
        if Reincarnate then Exit
        else
        begin
          if ScreenShots then
            TakeScreen('Found Dead');
          repeat
            Wait(1000 + Random(1000));
          until (not (LoggedIn));
          Players[CurrentPlayer].Rand := 'Oh Dear You Are in Lumby';
          Players[CurrentPlayer].Active := False;
        end;
      end;
    end;
    
    {*******************************************************************************
    function FindMime: Boolean;
    by: Stupid3ooo
    Description: Checks for mime and switches player.
    *******************************************************************************}
    
    function FindMime: Boolean;
    var
      ax, ay: Integer;
    begin
      if (FindColor(ax, ay, 11503238, 10, 350, 479, 433)) then
      begin
        Mimes := Mimes + 1;
        Result := True;
        TakeScreen('Found Mime');
        Players[CurrentPlayer].Rand := 'Mime';
        Players[CurrentPlayer].Active := False;
        Logout;
      end;
    end;
    
    {*******************************************************************************
    function FindMaze: Boolean;
    by: Stupid3ooo
    Description: Checks for Maze and switches player.
    *******************************************************************************}
    
    function FindMaze: Boolean;
    var
      ax, ay: Integer;
    begin
      if (FindColorTolerance(ax, ay, 15395562, 129, 34, 129, 34, 4)) and
        (FindColorTolerance(ax, ay, 15395562, 378, 39, 378, 39, 4)) then //by Ghost
      begin
        Mazes := Mazes + 1;
        TakeScreen('Found Maze');
        Result := True;
        Players[CurrentPlayer].Rand := 'Maze';
        Players[CurrentPlayer].Active := False;
        Logout;
      end;
    end;
    
    {*******************************************************************************
    Function srl_TrollsInGoodPos: Boolean;
    by: Wizzup?
    Description: Used in Solve Pinball Below.
    *******************************************************************************}
    
    Function srl_TrollsInGoodPos: Boolean;
    Var
       TrPoint: TPointArray;
    Begin
      ColorToleranceSpeed(2);
      FindColorsTolerance(TrPoint, 7040112, 105, 210, MSX2, MSY2, 25);
      //WriteLn('Troll: ' + IntToStr(GetArrayLength(TrPoint)));
      Result := GetArrayLength(TrPoint) > 1500;
    End;
    
    {*******************************************************************************
    function SolvePinball: Boolean;
    by: Wizzup? and pups
    Description: Solves the pinball random.
    *******************************************************************************}
    
    function SolvePinball: Boolean;
    var
       mydtm2, m, c, t, x, y: integer;
       angle: extended;
    begin
     if ((GetColor(83, 431) = 0) and (GetColor(88, 418) = 0)) or
        ((GetColor(83, 430) = 0) and (GetColor(88, 417) = 0)) or
        ((GetColor(151, 426) = 0) and (GetColor(470, 393) = 0) and
        (GetColor(372, 370) = 128)) then
        WriteLn('Found pinball random, solving...')
      else
        Exit;
      m := mousespeed;
      mousespeed := 1;
      c := GetColorToleranceSpeed;
      MakeCompass('N');
      HighestAngle;
      if ((GetColor(151, 426) = 0) and (GetColor(470, 393) = 0) and (GetColor(372,
        370) = 128)) then
        repeat
          if not LoggedIn then Break;
          Wait(500 + Random(250));
        until not ClickToContinue;
      t := GetSystemTime;
      mydtm2 := DTMFromString('78DA63E460646070604001BE27E3188481342' +
           '394CF08526385AA26EA6426A61A1F543589E78B50D50800596AA8' +
           '6AC236A7C0D5FC07020022820B78');
      Result := False;
      repeat
        Wait(10);
        if not LoggedIn then
        begin
          Result := False;
          mousespeed := m;
          ColorToleranceSpeed(c);
          Exit;
        end;
        If srl_TrollsInGoodPos Then
        Begin
          colortolerancespeed(0);
          if finddtmrotated(mydtm2, x, y, MSX1, MSY1, MSX2, MSY2,
           -Radians(90), Radians(90), 0.05, Angle) then
          Begin
            mouse(x, y, 0, 0, True);
            WriteLn('Found a Pillar.');
            Wait(5000);
          End;
        End;
        if GetColor(378, 258) = 65535 then
        begin
          Result := True;
          Break;
        end;
      until GetSystemTime - t > 10 * 60 * 1000;
      FreeDTM(mydtm2);
      colortolerancespeed(c);
      mousespeed := m;
      if Result then
      begin
        MakeCompass('s');
        SendArrowSilentWait(2, 1000 + Random(300));
        Mouse(278, 58, 20, 20, True);
        Wait(2000 + Random(200));
        t := GetSystemTime;
        repeat
          x := (MSX1 + MSX2) div 2 + Random(200) - 100;
          y := Random(40) + 2;
          if FindColorSpiralTolerance(x, y, 8491891, MSX1, MSY1, MSX2, MSY2, 20) then
          begin
            MMouse(x, y, 0, 0);
            if IsUpText('Exit') or IsUpText('Talk') then
            begin
              Mouse(x, y, 0, 0, False);
              if ChooseOption('Exit') then
                Break;
            end;
          end;
        until GetSystemTime - t > 60 * 1000;
        if GetSystemTime - t > 60 * 1000 then
          Result := False;
      end
        if not Result then
        begin
          Players[CurrentPlayer].Rand := 'PinBall';
          Logout;
          mousespeed := m;
          colortolerancespeed(c);
          Exit;
        end;
      TakeScreen('Solved Pinball');
      MakeCompass('N');
      SendArrowSilentWait(0, 1000 + Random(300));
      Wait(5000 + Random(1000));
    end;
    
    {*******************************************************************************
    function InBlack: Boolean;
    by: WT-Fakawi
    Description: Checks for the existence of 4 blackdots in MM indicating a random event has occured.
    Checks MMpixels Upper N-E-S-W USE WITH CARE: DONT USE IN DUNGEONS I.E. MININGGUILD.
    *******************************************************************************}
    
    function InBlack: Boolean; // random detector. Checks for 4 black dots in MM.
    begin
      if  (GetColor(650, 155) = 0) then
      begin
        if ((GetColor(650, 145) = 0)  and
            (GetColor(650, 135) = 0)  and
            (GetColor(650, 125) = 0)) then
        begin
          Result := True;
          Exit;
        end
        else
          Result := False;
      end
      if  (GetColor(650, 15) = 0) then
      begin
        if ((GetColor(650, 25) = 0)  and
            (GetColor(650, 35) = 0)  and
            (GetColor(650, 45) = 0)) then
        begin
          Result := True;
          Exit;
        end
        else
          Result := False;
      end
      if (GetColor(580, 82) = 0)  then
      begin
        if ((GetColor(590, 82) = 0)  and
            (GetColor(600, 82) = 0)  and
            (GetColor(610, 82) = 0)) then
        begin
          Result := True;
          Exit;
        end
        else
          Result := False;
      end
      if  (GetColor(714, 82) = 0) then
      begin
        if ((GetColor(704, 82) = 0) and
            (GetColor(694, 82) = 0) and
            (GetColor(684, 82) = 0)) then
        begin
          Result := True;
          Exit;
        end
        else
          Result := False;
      end
    end;
    
    //----------------------------------------------------------------------------//
    //---       Checks for the existence of GameTab 4 in relation to the       ---//
    //---     non-existence of GameTab 3 (Quests) and Gametab 12 (controls)    ---//
    //----------------------------------------------------------------------------//
    {*******************************************************************************
    function NoGameTab: Boolean;
    by: WT-Fakawi
    Description: Checks for missing GameTabs.
    *******************************************************************************}
    
    function NoGameTab: Boolean;
    var i,Count: Integer;
    begin
      for i := 1 to 14 do
       if not TabExists(i) then
       begin
         Wait(1000);
         Count:=Count+1;
         if Count>1 then
         begin
           Result := True;
           Exit;
         end;
       end;
    end;
    
    {*******************************************************************************
    function SolveTalkingRandom(RawMenuText: String): Boolean;
    By: SRL Developers Team.
    Description: Talking Random Handler. Called by FindTalkingRandom. (FindTalk)
    *******************************************************************************}
    
    function SolveTalkingRandom(RawMenuText: string): Boolean;
    var
      IC, FI: Byte;
    begin
      TakeScreen('Solving Talking Random - '+RawMenuText);
    // Security Guard Handler
      if (Pos('uard', RawMenuText) <> 0) or (Pos('ecur', RawMenuText) <> 0) then
      begin
        for IC := 1 to 2 do
        begin
          Wait(1000 + Random(500));
          ClickToContinue;
          Wait(50 + Random(50));
        end;
        case Random(5) of
          0: TypeSend('stupid guard');
          1: TypeSend('so many randoms now..');
          2: TypeSend('bye security guard');
          3: TypeSend('dumb random');
          4: TypeSend('sigh');
        end;
        Result := True;
        SGuard := SGuard + 1;
        SRLRandomsReport;
        Exit;
      end;
    
    // Freaky Forrester Handler.
    
      if (Pos('reak', RawMenuText) <> 0) or (Pos('orest', RawMenuText) <> 0) then
      begin
        CloseWindow;
        Players[CurrentPlayer].Rand := 'Forester';
        Logout;
        NOForester := NOForester + 1;
        Result := False;
        SRLRandomsReport;
        Exit;
      end;
    
    // Sandwich Lady Handler.
    
      if (Pos('ady', RawMenuText) <> 0) or (Pos('ich', RawMenuText) <> 0) then
      begin
        if (not (UseSandwichSolver)) then
        begin
          CloseWindow;
          Players[CurrentPlayer].Rand := 'Sandwich Lady';
          Logout;
          NOSandWiches := NOSandWiches + 1;
          Result := False;
          SRLRandomsReport;
          Exit;
        end;
    
        ClickToContinue;
        Wait(500 + Random(500));
        SetupSandWich;
        if SolveSandWich then
        begin
          SandWiches := SandWiches + 1;
          Result := True;
          CloseWindow;
          ReleaseSandWich;
          case Random(5) + 1 of
            1: TypeSend('nice. a ' + SRL_SandItemText[SRL_SandAnswer]);
            2: TypeSend('wow. got me a ' + SRL_SandItemText[SRL_SandAnswer] + ' =]');
            3: TypeSend('thanks for the ' + SRL_SandItemText[SRL_SandAnswer] + ' =]');
            4: TypeSend('stupid sandwichlady');
            5: TypeSend('sigh.');
          end;
          SRLRandomsReport;
          Exit;
        end
        else
        begin
          NOSandWiches := NOSandWiches + 1;
          CloseWindow;
          Result := False;
          ReleaseSandWich;
          Players[CurrentPlayer].Rand := 'Sandwich Lady';
          Logout;
          SRLRandomsReport;
          Exit;
        end;
      end;
    
      // Genie Handler.
    
      if (Pos('Geni', RawMenuText) <> 0) or (Pos('enie', RawMenuText) <> 0) then
      begin
        Wait(1000 + Random(500));
        if SolveGenie(LampSkill) then
        begin
          Lamps := Lamps + 1;
          SRLRandomsReport;
          Exit;
        end
        else
        begin
          NOLamps := NOLamps + 1;
          WriteLn('lamp missed');
          SRLRandomsReport;
          Exit;
        end;
      end;
    
      // Certer Handler
    
      if (Pos('ile', RawMenuText) <> 0) or (Pos('iles', RawMenuText) <> 0) then
      begin
        Wait(1000 + Random(500));
        if FindCerter then
        begin
          Certers := Certers + 1;
          ClickToContinue;
          Wait(1000 + Random(500));
          case Random(5) + 1 of
            1: TypeSend('hurrah. 320 coins.');
            2: TypeSend('bye iles.');
            3: TypeSend('thanks for coins =]');
            4: TypeSend('stupid certer');
            5: TypeSend('sigh.');
          end;
          SRLRandomsReport;
          Exit;
        end
        else
        begin
          NOCerters := NOCerters + 1;
          Players[CurrentPlayer].Rand := 'Certer';
          WriteLn('Certer Missed');
          Logout;
          SRLRandomsReport;
          Exit;
        end;
      end;
    
      // Frog Handler
    
      if (Pos('rog', RawMenuText) <> 0) or (Pos('Fro', RawMenuText) <> 0) then
      begin
        if SolveFrog then
        begin
          Frogs := Frogs + 1;
          case Random(5) + 1 of
            1: TypeSend('yeah a token...');
            2: TypeSend('ribbit =]');
            3: TypeSend('i kissed the queen =]');
            4: TypeSend('stupid frogs');
            5: TypeSend('sigh.');
          end
          SRLRandomsReport;
          Exit;
        end
        else
        begin
          for FI := 0 to 3 do
            ClickToContinue;
          Wait(10000);
          if DetectFrogCave then if SolveFrogSwamp then
            begin
              Frogs := Frogs + 1;
              Exit;
            end
            else
            begin
              NOFrogs := NOFrogs + 1;
              WriteLn('Frogs Missed Twice');
              Players[CurrentPlayer].Rand := 'Frog';
              Logout;
              SRLRandomsReport;
              Exit;
            end;
        end
      end;
    
      // Rick Handler
    
      if (Pos('ick', RawMenuText) <> 0) or (Pos('urpen', RawMenuText) <> 0) then
      begin
        Wait(1000 + Random(500));
        ClickToContinue;
        Ricks := Ricks + 1;
        case Random(5) + 1 of
          1: TypeSend('go away rick turpentine...');
          2: TypeSend('yeah, rick gave me 160 coins');
          3: TypeSend('bye rick');
          4: TypeSend('stupid rick');
          5: TypeSend('sigh.');
        end;
        SRLRandomsReport;
        Exit;
      end;
    
      // Dwarf Handler. (Might add: DwarfItem)
    
      if (Pos('runk', RawMenuText) <> 0) or (Pos('warf', RawMenuText) <> 0) then
      begin
        Wait(1000 + Random(500));
        ClickToContinue;
        Dwarfs := Dwarfs + 1;
        case Random(5) + 1 of
          1: TypeSend('hurrah. a beer.');
          2: TypeSend('yuk. evil kebab.');
          3: TypeSend('thanks for the beer =]');
          4: TypeSend('stupid dwarf');
          5: TypeSend('sigh.');
        end;
        SRLRandomsReport;
        Exit;
      end;
    
      // Cap 'n Hand (ler).
    
      if (Pos('Cap ', RawMenuText) <> 0) or (Pos('Hand', RawMenuText) <> 0) then
      begin
        Wait(1000 + Random(500));
        ClickToContinue;
        Caps := Caps + 1;
        case Random(5) + 1 of
          1: TypeSend('ayay, captain');
          2: TypeSend('yeah 320 coins =]');
          3: TypeSend('ow boy capn hand =]');
          4: TypeSend('stupid captain');
          5: TypeSend('sigh.');
        end;
        SRLRandomsReport;
        Exit;
      end;
    
      // Mysterious Old Man Handler.
    
      if (Pos('yste', RawMenuText) <> 0) or (Pos('rious', RawMenuText) <> 0) then
      begin
        Wait(1000 + Random(500));
        ClickToContinue;
        Oldmen := Oldmen + 1;
        case Random(5) + 1 of
          1: TypeSend('yeah 320 coins');
          2: TypeSend('yeah 320 coins =]');
          3: TypeSend('stupid old man');
          4: TypeSend('bye bye mysterious old man');
          5: TypeSend('sigh.');
        end;
        SRLRandomsReport;
        Exit;
      end;
    
      //Dr Jekyll Handler
    
      if (Pos('eky', RawMenuText) <> 0) or (Pos('kyll', RawMenuText) <> 0) then
      begin
        for IC := 1 to 4 do
        begin
          Wait(1000 + Random(500));
          ClickToContinue;
        end;
        case Random(5) of
          0: TypeSend('potion...');
          1: TypeSend('Cya Jekyll');
          2: TypeSend('Dumb Potion');
          3: TypeSend('Gah');
          4: TypeSend('Theres too many randoms now...');
        end;
        Jekylls := Jekylls + 1;
      end;
    end;
    
    {*******************************************************************************
    function ChooseOptionGetMenuText(var RawMenuText: String; x, y: Integer; txt: String): Boolean;
    By: Stupid3ooo, modded by WT-Fakawi.
    Description: Finds Popup menu, then clicks on it, returns text next to txt
    *******************************************************************************}
    
    function ChooseOptionGetMenuText(var RawMenuText: string; x, y: Integer; txt:
      string): Boolean;
    var
      cx, cy, x1, y1, x2, y2, LeftCorner, RightCorner: Integer;
    begin
      LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
        '411A600064715CEA914500CACE13F0');
      RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
        'C5200D30002E35F8C501C9C013F0');
      if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
      begin
        if (FindText(cx, cy, txt, upchars, x1, y1, x2, 502)) then
        begin
          Result := True;
          RawMenuText := GetTextAtEx(cx, cy, 0, upchars, True, True, 0, 0, -1, 25,
            False, tr_NormalChars);
          Mouse(cx + Length(txt) * 3, cy + 3, 2, 2, True);
        end
        else if (FindText(cx, cy, 'Cancel', upchars, x1, y1, x2, 502)) then
          Mouse(cx + 9, cy + 3, 2, 2, True);
      end;
      FreeBitmap(LeftCorner);
      FreeBitmap(RightCorner);
    end;
    
    {*******************************************************************************
    procedure SetScreenName(ScreenName: String);
    by: WT-Fakawi
    Description: Sets screenname for use with FindTalk and one Player.
    *******************************************************************************}
    
    procedure SetScreenName(ScreenName: string);
    begin
      NickNameBMP := CreateBitmapMaskFromText(ScreenName, upchars);
    end;
    
    {*******************************************************************************
    function FindTalk: Boolean;
    by: Lorax - (Old FindTalk = Renax)
    Description: Searches screen for NickName and handles ALL Talking Randoms
     to use the new FT use LoraxFTW := True; in your script
    *******************************************************************************}
    
    
    const gTalkOldComputer = False;
    const gTalkSaveBitmap = False;
    
    var
      gtalksBox, YelSkipBoxs: array of TBox;
      gTalksCount: Integer;
    
    function FindTalk: Boolean;
    var
      ax, ay, yCount, zCount, Count2, x1, y1, x2, y2, Count1, bmpScreen: Integer;
      RawMenuText: string;
    begin
      Result := False;
      if (GetArrayLength(Players) < 1) then Exit;
    
      if FindColor(ax, ay, 65535, 0, 0, 515, 334) then
      begin
    
        SetArrayLength(gtalksBox, 0);
        SetArrayLength(YelSkipBoxs, 0);
    
        while FindColorSkipBoxArray(ax, ay, 65535, 0, 0, 515, 334, YelSkipBoxs) do
        begin
    
          y1 := ay;
          if ( ( ay + 5 ) > 334 ) then y2 := 334 else y2 := ay + 5;
    
          x1 := ax; x2 := x1;
          zCount := 0;
    
          repeat
            if FindColor(ax, ay, 65535, x2, y1 + 2, x2 + 3, y2 + 3) then
              zCount := 0
            else
              zCount := zCount + 1;
    
            if ( zCount = 4 ) then Break;
            x2 := x2 + 3;
          until ( x2 + 3 > 515 );
    
          if ( x2 + 3 <= 515 ) then x2 := x2 - 12;
    
          if (x2 - x1 >= length(Players[CurrentPlayer].Nick) * 4) then
          begin
    
            x1 := x1 - 8;
            y1 := y1 - 8;
            x2 := x2 + 8;
            y2 := y2 + 8;
    
            if ( x1 < 0 ) then x1 := 0;
            if ( y1 < 0 ) then y1 := 0;
            if ( x2 > 515 ) then x2 := 515;
            if ( y2 > 334 ) then y2 := 334;
    
            Count2 := Count2 + 1;
            Count1 := Count1 + 1;
            SetArrayLength(gtalksBox, Count2);
            gtalksBox[Count2 - 1].x1 := x1;
            gtalksBox[Count2 - 1].y1 := y1;
            gtalksBox[Count2 - 1].x2 := x2;
            gtalksBox[Count2 - 1].y2 := y2 + 6;
    
            SetArrayLength(YelSkipBoxs, Count1);
            YelSkipBoxs[Count1 - 1].x1 := x1;
            YelSkipBoxs[Count1 - 1].y1 := y1;
            YelSkipBoxs[Count1 - 1].x2 := x2;
            YelSkipBoxs[Count1 - 1].y2 := y2;
    
          end else
          begin
            y1 := y1 - 2;
            y2 := y2 + 8;
            x1 := x1 - 5;
            x2 := x2 + 5;
            if ( x1 < 0 ) then x1 := 0;
            if ( y1 < 0 ) then y1 := 0;
            if ( x2 > 515 ) then x2 := 515;
            if ( y2 > 334 ) then y2 := 334;
    
            Count1 := Count1 + 1;
            SetArrayLength(YelSkipBoxs, Count1);
            YelSkipBoxs[Count1 - 1].x1 := x1;
            YelSkipBoxs[Count1 - 1].y1 := y1;
            YelSkipBoxs[Count1 - 1].x2 := x2;
            YelSkipBoxs[Count1 - 1].y2 := y2;
          end;
        end;
    
        if ( GetArrayLength(gtalksBox) <> 0 ) then
        begin
          for yCount := 0 to GetArrayLength(gtalksBox) - 1 do
          begin
            if FindBitmapMaskTolerance(NickNameBMP, ax, ay, gtalksBox[yCount].x1, gtalksBox[yCount].y1, gtalksBox[yCount].x2, gtalksBox[yCount].y2, 0, 40) then
            begin
              WriteLn('Found NickName');
              ax := (gtalksBox[yCount].x2 + gtalksBox[yCount].x1) shr 1;
              ay := gtalksBox[yCount].y2 - 2;
    
              if gTalkSaveBitmap then
              begin
                bmpScreen := BitmapFromString(515, 334, '');
                CopyClientToBitmap(bmpScreen, 1, 1, 515, 334);
    
                if ( gtalksBox[yCount].x1 = 0 ) then x1 := 1 else x1 := gtalksBox[yCount].x1;
                if ( gtalksBox[yCount].y1 = 0 ) then y1 := 1 else y1 := gtalksBox[yCount].y1;
    
                gTalksCount := gTalksCount + 1;
                for Count1 := -1 to 1 do
                  for Count2 := -1 to 1 do
                    FastSetPixel(bmpScreen, Count1 + x1, Count2 + y1, 255);
    
                if ( gtalksBox[yCount].x2 = 515 ) then x1 := 515 else x1 := gtalksBox[yCount].x2;
                if ( gtalksBox[yCount].y2 = 334 ) then y1 := 334 else y1 := gtalksBox[yCount].y2;
    
                for Count1 := -1 to 1 do
                  for Count2 := -1 to 1 do
                    FastSetPixel(bmpScreen, Count1 + x1, Count2 + y1, 255);
    
                for Count1 := -1 to 1 do
                  for Count2 := -1 to 1 do
                    FastSetPixel(bmpScreen, Count1 + ax, Count2 + ay, 255);
                SaveBitmap(bmpScreen, ScriptPath + 'FTalk' + IntToStr(gTalksCount) + '.bmp');
                FreeBitmap(bmpScreen);
              end;
    
              MMouse(ax, ay, 0, 0);
              Wait(100 + Random(50));
              if IsUpTextMulti('Talk', 'lk-to', 'uard') then
              begin
                Mouse(ax, ay, 0, 0, False);
                Wait(300 + Random(100));
    
                if ( ChooseOptiongetMenuText(RawMenuText, ax, ay, 'Talk')) then
                begin
                  WriteLn('******** FOUND TALKING RANDOM TEXT********: ' + RawMenuText);
                  WriteFileString(TheFile, '******** FOUND TALKING RANDOM TEXT********: ' + RawMenuText +Chr(13))
                  Talks := Talks + 1;
                  Flag;
                  Wait(1000 + Random(500))
                  SolveTalkingRandom(RawMenuText);
                  Result := True;
    
                  Exit;
                end;
              end;
            end;
            if gTalkOldComputer then
              Wait(1);
    
          end;
        end;
      end;
    end;
    
    {*******************************************************************************
    function FindInventoryRandoms: Boolean;
    by: The SRL Developers Team!
    Description: Searches for the common Inventory randoms: Lamp and Box.
    *******************************************************************************}
    
    function FindInventoryRandoms: Boolean;
    var
      CurTab:Integer;
    begin
      CurTab := GetCurrentTab;
      GameTab(4);
      if FindLamp(LampSkill) then
        Result := True;
      if FindBox then SolveBox;
      GameTab(CurTab);
    end;
    
    {*******************************************************************************
    function FindNonInventoryRandoms: Boolean;
    by: The SRL Developers Team!... all time sexiness by Mutant
    Description: Searches for the common NON-Inventory randoms: Wont switch to GameTab(4)!
    *******************************************************************************}
    
    function FindNonInventoryRandoms: Boolean;
    var
      i: Integer;
    begin
      for i := 0 to 11 do
      begin
        case I of
          0: if SolveChatRandom then
              Result := True;
          1: if ClickContinue(True, True) then
              Result := True;
          2: Respond;
          3: if FindTalk then
              Result := True;
          4: if FindDead then
              Result := True;
          5: if FindMod then
              Result := True;
          6: if FindMime then
              Result := True;
          7: if FindMaze then
              Result := True;
          8: if FindQuiz then
              Result := True;
          9:
            begin
              if NoGameTab then
              begin
                Wait(3000 + Random(300));
                if SolveChatRandom then
                begin
                  Result := True;
                  Exit;
                end;
                Result := True;
                Logout;
                Exit;
              end;
            end;
          10: if RC then
              Result := True;
          11: Respond;
        end;
        if Result then
          Break;
        Wait(1);
      end;
    end;
    
    {*******************************************************************************
    function FindNormalRandoms: Boolean;
    by: The SRL Developers Team!... all time sexiness by Mutant
    Description: Calls the 'normal' random checks.
    *******************************************************************************}
    
    function FindNormalRandoms: Boolean;
    var
      i: Integer;
    begin
      for i := 1 to 13 do
      begin
        case I of
          1: if SolveChatRandom then
              Result := True;
          2: Respond;
          3: if FindTalk then
              Result := True;
          4: if FindDead then
              Result := True;
          5: if FindMod then
              Result := True;
          6: if FindMime then
              Result := True;
          7: if FindMaze then
              Result := True;
          8: if FindQuiz then
              Result := True;
          9: if FindTalk then // Call it twice
              Result := True;
          10: if FindLamp(LampSkill) then // Maybe we missed it?
              Result := True;
          11: if (FindBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleBox;
            end;
          12:
            begin
              if NoGameTab then
              begin
                Wait(3000 + Random(300));
                if SolveChatRandom then
                begin
                  Result := True;
                  Exit;
                end;
                Result := True;
                Logout;
                Exit;
              end;
            end;
          13: if RC then
              Result := True;
        end;
        if Result then
          Break;
        Wait(1);
      end;
    end;
    
    {*******************************************************************************
    procedure FTWait(Time: Integer);
    By: WT-Fakawi
    Description: Performs Wait and FindTalk. Time is multiple of 250 msec, so FTWait(4)
    waits approx 1 sec and performs 4 FindTalks;
    *******************************************************************************}
    
    function FTWait(Time: Integer): Boolean;
    var
      t: Integer;
    begin
      for T := 1 to Time do
      begin
        Wait(200 + Random(50));
        if FindTalk then
          Result := True;
      end;
    end;
    In there are a whole bunch of stuff witch i think i know what they are and most of them are functions. When i tred one on my script witch happened ot be:
    Code:
    function FindMod: Boolean;
    var
      tx, ty: Integer;
    begin
      if not usefindmod then exit;
      if (not (GetColor(20, 434) = 0)) then Exit;
      Wait(100);
      if (BmpMod = 0) or (BmpAdmin = 0) then
        LoadSRLBitMaps;
      if (FindColorTolerance(tx, ty, 14737632, 1, 345, 110, 430, 15)) or
        (FindColorTolerance(tx, ty, 589815, 1, 345, 110, 430, 15)) then
        if (FindBitmapToleranceIn(bmpMod, tx, ty, 1, 345, 110, 430, 15)) or
          (FindBitmapToleranceIn(bmpAdmin, tx, ty, 1, 345, 110, 430, 15)) then
        begin
          Result := True;
          WriteLn('******** FOUND MOD ********');
          WriteFileString(TheFile, '******** FOUND MOD ********' + Chr(13));
          TakeScreen('Found mod');
          Mods := Mods + 1;
          SaveToChatLog;
          Players[CurrentPlayer].Rand := 'Found Mod';
          repeat
            Logout;
            Wait(1500 + Random(500));
          until not (LoggedIn);
          Wait((60000) + Random(60000));
          LoginPlayer;
        end;
    end;
    \

    But the problem with that is it gave me this error:

    Failed when compiling
    Code:
    Line 88: [Error] (14769:10): Duplicate identifier 'FINDMOD' in script C:\Program Files\SCAR 3.12\Scripts\AutoTalker V.4.scar
    First, what is a function? Why is it different from?

    Second, Why do i keep getting that errors? How do I fix them?

    Third, Do I have to add an include for function?
    http://bux.to/?r=jvwarrior Get Free Money For RunescapeGP/Membership!

    http://www.AWSurveys.com/HomeMain.cfm?RefID=jvwarrior Get More Money For Runescape GP/Membership Free! I Mean woa!

    http://i34.servimg.com/u/f34/11/52/00/62/hasdfs10.jpg

  2. #2
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You put in all the rite vars and that?
    [IMG]file:///C:/Documents%20and%20Settings/damn/My%20Documents/My%20Pictures/Vluv.html[/IMG]

  3. #3
    Join Date
    Dec 2006
    Location
    UK!!
    Posts
    910
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    for find fast randoms use this.. most ppls do

    SCAR Code:
    Function FindFastRandoms: Boolean;    // By WT-Fakawi.

    Var
      i: Integer;

    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;
           2:  If FindMod Then
                 Result := True;
           3:  If FindMime Then
                 Result := True;
           4:  If FindMaze Then
                 Result := True;
           5:  If FindQuiz Then
                 Result := True;
           6:  If FindDemon Then
                 Result := True;
           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;
           8 : If RC Then
                 Result := True;
           9 : If FindFight Then
                  Begin
                    Result := True;
                    RunTo(RunDir, True);
                  End;
           10: If FindTalk Then
                 Result := True;
           11: If HandleTrade Then
                 Result := True;
           12: If InBlack then
                  begin
                    Result :=true;
                    Players[CurrentPlayer].loc := 'InBlack';
                    Logout;
                    Exit;
                  end;
                end;
            end;
         End;
      Wait(1);
    End;

    putthat somewhere in th script.... then after any thing like
    SCAR Code:
    wait(2000);
    FindFastRandoms;
    where ever u feel it necesary put that FindFastRandoms;


    spaz

  4. #4
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Actually you can just call FindNormalRandoms; in SRL 4 Rev #6 and you'll be able to detect every random event. Just type FindNormalRandoms; during any procedure or function where a random event could happen and you should be covered.
    :-)

  5. #5
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    358
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yup, FindNormalRandoms; is where its at now days. Combined with FindTalk; in between click and such basically has you covered.

  6. #6
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Your problem is that you are redeclaring a function name. You cant copy the function into your script. Include SRL
    SCAR Code:
    {.include srl/srl.scar}
    and then do what they said.
    SCAR Code:
    FindNormalRandoms;

    And dont forget to use this at the beginning of your program
    SCAR Code:
    SetupSRL;
    ~ Metagen

  7. #7
    Join Date
    Oct 2007
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    everytime i try to put in a function it gives me errors,

    Im just gonna show the entire script some of it wont make sense cause im still adding things.

    Code:
    {     LevExidus AutoTalker V.4 B.P         ]
    [             By Jvwarrior                 ]
    [__________________________________________]
    [               Credits:                   ]
    [            Makers Of SCAR                ]
    [          hey321 for editing              ]
    [         Metho D for anti help            ]
    [__________________________________________]
    [                Fix's                     ]
    [ V.1: Basic one word AutoTalker.          ]
    [ V.2: Allowed mulitple words.             ]
    [ V.3: Randomized sentences.               ]
    [ V.3.2: CountDown Added.                  ]
    [ V.4: Anti-Randoms,Not LoggedIn Stop      ]
    [__________________________________________]
    [           Instructions:                  ]
    [1. Ok First As You See                    ]
    [ There Are Talk, Say, Talk2, Say2,        ]
    [ TalkAgain.                               ]
    [ First Fill In What You Want It           ]
    [ To Say In The (' ') Marks.               ]
    [ If You Want To Only Have Say,            ]
    [ Two Of The Talk, Say, Talk2, Say2,       ]
    [ TalkAgain Just Leave The                 ]
    [ FieldsEmpty.                             ]
    [                                          ]
    [2. After Done With That Start Up          ]
    [ Runescape (Better If Game Client),       ]
    [ Go To Login Screen, Dont Log In!         ]
    [ Specifie The RS Window By                ]
    [ ClickingThe Specifie Mark Thingy.        ]
    [                                          ]
    [3. Then Log In Normaly Once Logged        ]
    [ In Press SCAR And Run The Script.        ]
    [ Right After You Run The Script           ]
    [ Click On Runescape Again                 ]
    [ And Begin Playing Normally.              ]
    [                                          ]
    [4. Just Walk Around And Watch SCAR        ]
    [ Do All The Hard Typing For You. Enjoy =) ]
    [__________________________________________]
    [                Chat Effects              ]
    [                                          ]
    [                *Color Effects*           ]
    [                    glow1                 ]
    [                    glow2                 ]
    [                    flash1                ]
    [                    flash2                ]
    [                    flash3                ]
    [                    red                   ]
    [                    green                 ]
    [                    cyan                  ]
    [                    white                 ]
    [                                          ]
    [                *Special Effect*          ]                      ]
    [                     shake:               ]
    [                     scroll:              ]
    [                     wave:                ]
    [                     slide:               ]
    [__________________________________________]
    // I have made it Noob friendly for people who want to know whats going on. Feel free to use this in future scripts of yours.
     // if you want to only have a certain
      //amount of text just keep them blank.
      //to prevent you from being detected i suggest
      //you dont change the TWait. For better
      //protection make it higher.
    program AutoTalker;
    {.Include SRL/SRL.Scar}
    
    {================= EDIT YOUR TEXT IN HERE ======================}
    const
      Talk = 'Input All Text Between ('') Those Marks!'; //what to say
      TWait = 1000; //time to wait after typing
      Say = 'If You Want One Not To Be Used Just Keep Them Empty'; // Second Text
      Talk2 = 'Be Sure To Insert Things Between The ('') Marks'; //Third text
      Say2 = 'Insert Your Other Sentences Here'; // Fourth Text
      TalkAgain = 'More Text To Be Insterted Here'; // Last Text (Fifth)
      
      Procedure DeclarePlayers;
    begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
    
        Players[0].Name := 'Usernamehere';  //place your username here
        Players[0].Pass := 'Passwordhere';  //place your password here
        Players[0].Nick := 'Nicknamehere'; //3 - 4 letters of YOUR username, example: sern
        Players[0].Active :=True;
    end;
    
    {===================== NO MORE TOUCHING! =================================}
    procedure NickMaker;
    begin
    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    end;
    
    Function FindFastRandoms: Boolean;    // By WT-Fakawi.
    
    Var
      i: Integer;
    
    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;
           2:  If FindMod Then
                 Result := True;
           3:  If FindMime Then
                 Result := True;
           4:  If FindMaze Then
                 Result := True;
           5:  If FindQuiz Then
                 Result := True;
           6:  If FindDemon Then
                 Result := True;
           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;
           8 : If RC Then
                 Result := True;
           9 : If FindFight Then
                  Begin
                    Result := True;
                    RunTo(RunDir, True);
                  End;
           10: If FindTalk Then
                 Result := True;
           11: If HandleTrade Then
                 Result := True;
           12: If InBlack then
                  begin
                    Result :=true;
                    Players[CurrentPlayer].loc := 'InBlack';
                    Logout;
                    Exit;
                  end;
                end;
            end;
         End;
      Wait(1);
    End;
    
    procedure Announce;
    begin
      Writeln(' Welcome To LevExidus AutoTalker V.4!');
      Wait(1900);
      Writeln(' Thank You For Starting My Script!');
      Wait(900);
      Writeln(' Enjoy My Script.');
      Wait(500);
      Writeln(' *============ LevExidus AutoTalker V.4 ============*')
      Writeln(' *===========       By Jvwarrior         ===========*')
    end;
    
    procedure Beginning;
    begin
      Writeln('Initializing');
      Wait(2000);
      Writeln('Starting');
      Wait(1000);
      Writeln('3');
      Wait(1000);
      Writeln('2');
      Wait(1000);
      Writeln('1');
      Wait(1500);
      Writeln('Beginning Script');
      Wait(1600);
      Writeln('You May Now Click On Your Runescape Windows');
      Wait(1500);
    end;
    
    procedure TalkOn;
    begin
      Wait(TWait + random(700));
      case Random(5) of
        1: typesend(Talk);
    
        2: typesend(Say);
    
        3: typesend(Talk2);
    
        4: typesend(Say2);
    
        5: typesend(TalkAgain);
      end;
    end;
    
    begin // begins the script
    SetupSRL;
    ClearDebug;
      Announce;
      Beginning;
      repeat //Repeats The Foloing after ths until the until():
        NickMaker;
        TalkOn; // Does everything in procedure TalkOn;
      until (false) // False = keeps going Forever.. Ends Repeat.
    end. //End of entire Script
    everytime I try the:
    Code:
    Function FindFastRandoms: Boolean;    
    
    Var
      i: Integer;
    
    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;
           2:  If FindMod Then
                 Result := True;
           3:  If FindMime Then
                 Result := True;
           4:  If FindMaze Then
                 Result := True;
           5:  If FindQuiz Then
                 Result := True;
           6:  If FindDemon Then
                 Result := True;
           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;
           8 : If RC Then
                 Result := True;
           9 : If FindFight Then
                  Begin
                    Result := True;
                    RunTo(RunDir, True);
                  End;
           10: If FindTalk Then
                 Result := True;
           11: If HandleTrade Then
                 Result := True;
           12: If InBlack then
                  begin
                    Result :=true;
                    Players[CurrentPlayer].loc := 'InBlack';
                    Logout;
                    Exit;
                  end;
                end;
            end;
         End;
      Wait(1);
    End;
    It gives me this error:

    Code:
    Failed when compiling
    Line 132: [Error] (14813:7): Unknown identifier 'RunDir' in script C:\Program Files\SCAR 3.12\Scripts\AutoTalker V.4.scar

    While Im here asking ill just ask this:

    When I try to run the scipt without the thing i added it gives me this error about the NickMaker Procedure:
    Code:
    [Runtime Error] : Out Of Range in line 94 in script C:\Program Files\SCAR 3.12\Scripts\AutoTalker V.4.scar
    Line 94 happens to be :
    Code:
    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    http://bux.to/?r=jvwarrior Get Free Money For RunescapeGP/Membership!

    http://www.AWSurveys.com/HomeMain.cfm?RefID=jvwarrior Get More Money For Runescape GP/Membership Free! I Mean woa!

    http://i34.servimg.com/u/f34/11/52/00/62/hasdfs10.jpg

  8. #8
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Don't use FindFastRandoms.

    Use FindNormalRandoms;

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  9. #9
    Join Date
    Oct 2007
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok i got FindNormalRandoms; Working But When I Try To Use This:

    Code:
    NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    It Gives me a Runtime error that is this:
    Code:
    [Runtime Error] : Out Of Range in line 94 in script C:\Program Files\SCAR 3.12\Scripts\AutoTalker V.4.scar
    http://bux.to/?r=jvwarrior Get Free Money For RunescapeGP/Membership!

    http://www.AWSurveys.com/HomeMain.cfm?RefID=jvwarrior Get More Money For Runescape GP/Membership Free! I Mean woa!

    http://i34.servimg.com/u/f34/11/52/00/62/hasdfs10.jpg

  10. #10
    Join Date
    Oct 2007
    Location
    Florida, USA
    Posts
    486
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you call for it in line # 6?

  11. #11
    Join Date
    Oct 2007
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nah never mind i got it working the finished script is available in the junior scripts in cloaking
    http://bux.to/?r=jvwarrior Get Free Money For RunescapeGP/Membership!

    http://www.AWSurveys.com/HomeMain.cfm?RefID=jvwarrior Get More Money For Runescape GP/Membership Free! I Mean woa!

    http://i34.servimg.com/u/f34/11/52/00/62/hasdfs10.jpg

  12. #12
    Join Date
    Oct 2007
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea you probably just forgot to do 'DeclarePlayers' in your main program part. I used to forget all the time too.

  13. #13
    Join Date
    Oct 2007
    Posts
    63
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea
    http://bux.to/?r=jvwarrior Get Free Money For RunescapeGP/Membership!

    http://www.AWSurveys.com/HomeMain.cfm?RefID=jvwarrior Get More Money For Runescape GP/Membership Free! I Mean woa!

    http://i34.servimg.com/u/f34/11/52/00/62/hasdfs10.jpg

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AntiBan and AntiRandom Help?
    By 1337N3SS in forum OSR Help
    Replies: 13
    Last Post: 10-19-2008, 09:39 PM
  2. Antirandom and antilogout
    By haxal in forum RS3 Outdated / Broken Scripts
    Replies: 0
    Last Post: 05-05-2008, 02:32 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
  •