Results 1 to 8 of 8

Thread: HELP My Script Doesn't Work!

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

    Default HELP My Script Doesn't Work!

    Ok i worked pretty hard on my new script ULTRA Shaft Maker 0,1 and it doesnt work.

    Its supposed to click a knife after it cut a full inventory of normal logs, then it should click make shafts. But for me when it cuts a full inventory it always sais this!
    SCAR Code:
    Successfully compiled
    SRL Compiled in 0 msec
    [Runtime Error] : Exception: Access violation at address 00722A2A in module 'scar.exe'. Read of address 65725020 in line 241 in script C:\Program Files\SCAR 3.13\Scripts\ULTRAShaftMaker0,1.scar

    Here is my script.
    SCAR Code:
    program ULTRAShaftMaker;
    {.Include SRL/SRL.Scar}
    ////////////////////////////////////////////////////////////////////////////////
    //This is version 0.1.
    ////////////////////////////////////////////////////////////////////////////////
    //1.Stand at an area thats full of trees.
    //2.Have your rune axe, knife, shafts at the first 3 inventory spots.
    //3.Set up const.
    //4.Run runescape in low detail very bright.
    //5.Drag the cross hair onto the runescape window then click the run button.
    //6.Sit back and enjoy.
    ////////////////////////////////////////////////////////////////////////////////

    var
    RuneAxe, Knife, LoadsDid, Log, Bans, X, Y: Integer;

    const
    Make = 10;//The amount of loads to try and do.
    DoAntiBan = True;//Do you want to use anti-ban.
    WhereToRun = 'N';//Where do you want to run in case of a fight.

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Active := True;
      Players[0].loc :='Trees';

    end;

    procedure LoadDTM;
    begin

      RuneAxe := DTMFromString('78DA63F4646260B8C30006CC108AC13122914' +
           '10E483302F17F20607403AAB985AAC63D3E0BAE06040056770896' +
           '');
           
      Knife := DTMFromString('78DA63CC64626078C90006CC108A21CC8A8B4' +
           '10E483302F17F2060CC03AA7980AAA62C2F17AE0604005A3708D2' +
           '');
           
      Log := DTMFromString('78DA63DCC7C4C0F08A010C982114437D92158' +
           '31C906604E2FF40C07808A8E621AA9AA6141BB81A1060DC81A966' +
           '7D7F008A1A0044420D1B');

    end;

    procedure CheckEverything;
    begin
     if(not(FindDTM(x, y, RuneAxe, MSX1, MSY1, MSX2, MSY2)))or
     (not(FindDTM(x, y, Knife, MSX1, MSY1, MSX2, MSY2)))then
    begin
      Exit;
     TerminateScript;
    end;
    end;

    procedure GetOutOfFight;
    begin
      if FindFight then
    begin
     RunTo(WhereToRun, True);
      Wait(15000+random(5000));
     RunBack;
    end;
    end;

    function FindFastRandoms: Boolean;    // By WT-Fakawi.
    var
      i: Integer;
    begin
      for i:=1 to 12 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:  if NoGameTab then
                 begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 end;
           8 : if RC then Result := True;

           9: if FindTalk then Result := True;

           10: if SolveChatRandom then Result := True;
           11: ClickToContinue;
        end;
        Wait(1);
      end;
    end;

    procedure AntiBan;
    begin
     if(DoAntiBan = True)then
    begin
     case Random(12)of

     0:begin
       MouseSpeed:=10;
       MMouse(0, 0, 350, 350);
       Wait(500+random(600));
       Bans:=Bans+1;
       end;

     1:begin
       Wait(1000+random(1000));
       MouseSpeed:=15;
       GameTab(1+random(13));
       Wait(1000+random(1000));
       GameTab(7);
       Bans:=Bans+1;
       end;

     2:begin
       MouseSpeed:=8;
       MMouse(100, 100, 250, 300);
       Wait(500+random(500));
       Bans:=Bans+1;
       end;

     3:begin
       GameTab(1+random(13));
       Wait(1000+random(1000));
       GameTab(7);
       Bans:=Bans+1;
       end;

     4:begin
       MouseSpeed:=20;
       MMouse(200, 200, 300, 310);
       Wait(500+random(1000));
       Bans:=Bans+1;
       end;

     5:begin
       Wait(200+random(800));
       GameTab(2);
       HoverSkill('random', False);
       Wait(500+random(2000));
       GameTab(7);
       Bans:=Bans+1;
       end;

     6:begin
       GameTab(1);
       Wait(200+random(300));
       GameTab(2);
       Wait(300+random(200));
       GameTab(3+random(2));
       Wait(500+random(650));
       GameTab(7);
       Bans:=Bans+1;
       end;

     7:begin
       MouseSpeed:=10;
       GameTab(5+random(5));
       Wait(1000+random(755));
       GameTab(7);
       Bans:=Bans+1;
       end;

     8:begin
       MouseSpeed:=25;
       MMouse(70, 130, 200, 320);
       Wait(200+random(900));
       Bans:=Bans+1;
       end;

     9:begin
       MouseSpeed:=16;
       Wait(100+random(100));
       GameTab(6+random(2));
       Wait(100+random(1000));
       GameTab(7);
       Bans:=Bans+1;
       end;

     10:begin
        Wait(500+random(5000));
        MMouse(100, 100, 211, 211);
        Wait(1000+random(1000));
        Bans:=Bans+1;
        End;

     11:begin;
        Wait(2000+random(2000))
        end;
    end;
    end;
    end;

    procedure WaitWhileShafting;
     begin
      repeat
      Wait(500+random(500));
      FindFastRandoms;
      GetOutOfFight;
     until(FindDTM(x, y, Log, MSX1, MSY1, MSX2, MSY2));
    end;

    procedure ULTRATreeChop(TheTreeName : String; TheTreeColor, TheTreeTolerance : Integer);
    begin
     if(FindObj(x, y, TheTreeName, TheTreeColor, TheTreeTolerance))then
      begin
       if(IsUpText(TheTreeName))then
       begin
        Mouse(x, y, 5, 5, True);
       end;
     end;
    end;

    procedure ClickChooseArrowShaftsRandom(a, b, randoma, randomb : Integer);
    begin
     Wait(100+random(400));
      Mouse(a, b, randoma, randomb, False);
       Wait(100+random(100));
        ChooseOption('e X');
        Wait(500+random(250));
       GameTab(1+random(9));
      Wait(1000+random(1000));
     GameTab(4);
    TypeSend('25');
     Wait(100+Random(500));
    end;

    procedure TheLoop;
     begin
      repeat
      ULTRATreeChop('ree', 481359, 5);
     Wait(2000+random(1000));
    FindFastRandoms;
      GetOutOfFight;
    until(InvFull);
     if(InvFull)then
      begin
       if(FindDTM(x, y, Knife, MSX1, MSY1, MSX2, MSY2))then
        Mouse(x, y, 1, 1, True);
         Wait(100+random(100));
        if(FindDTM(x, y, Log, MSX1, MSY1, MSX2, MSY2))then
       Mouse(x, y, 1, 1, True);
      ClickChooseArrowShaftsRandom(76, 407, 10, 10);
     WaitWhileShafting;
      FindFastRandoms;
       GetOutOfFight;
    LoadsDid:=LoadsDid+1;
    end;
    end;

    procedure Report;
    begin
     ClearDebug;
      begin
      WriteLn('ULTRA Shaft Maker Version 0.1.');
      WriteLn('--------------------------------------------------------------------');
      WriteLn('Loads Did: ' + IntToStr(LoadsDid) + '');
      WriteLn('Anti - Bans Did: ' + IntToStr(Bans) + '');
      WriteLn('--------------------------------------------------------------------');
     end;
    end;

    begin
     SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoadDTM;
     MouseSpeed:=15;
    begin
     repeat
      MouseSpeed:=15;
       CheckEverything;
      GetOutOfFight;
     FindFastRandoms;
      TheLoop;
        FindFastRandoms;
         GetOutOfFight;
       Report;
     until(LoadsDid = Make)or(LoadsDid > Make);
      if(LoadsDid = Make)or(LoadsDid > Make)then
       begin
        Report;
         Exit;
       TerminateScript;
      end;
     end;
    end.
    Please dont copy it anywhere else without my permission!!!

    Please help me fix this error!I want to release the script badly!
    Woot woot.

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    You didn't add DeclarePlayers..


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I know i didnt, but does it have to be there?

    EDIT: Ok i added it now what =(
    Woot woot.

  4. #4
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    You used Players[CurrentPlayer].loc := 'No GameTab'; So yeah, you need to say what the CurrentPlayer is. So it knows who to .Loc.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  5. #5
    Join Date
    Mar 2007
    Posts
    478
    Mentioned
    4 Post(s)
    Quoted
    4 Post(s)

    Default

    This might not be worth anything, but you might try 3.12, even though I think hy fixed the problem.
    Back from the dead.....

  6. #6
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It still sais the same god damn thing
    Woot woot.

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

    Default

    Somone P L Z help!
    Woot woot.

  8. #8
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    H E L P me
    Woot woot.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help getting this script to work
    By kollmann in forum OSR Help
    Replies: 3
    Last Post: 03-31-2008, 09:09 PM
  2. My script won't work???
    By Zeta in forum OSR Help
    Replies: 2
    Last Post: 08-07-2007, 07:32 AM
  3. cant get script to work
    By jones264 in forum OSR Help
    Replies: 1
    Last Post: 08-06-2007, 12:28 PM

Posting Permissions

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