Results 1 to 3 of 3

Thread: What is my bonfire script doing wrong?

  1. #1
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default What is my bonfire script doing wrong?

    Simba Code:
    program FalBonfire;
    {$Define SMART}
    {$I SRL/SRL.Simba}
    {$I Sps/Sps.Simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Pin  :=''
      Players[0].Active:=True;
    end;

    procedure Bank2Spot;
    var
      myPath:TPointArray;

    begin
      SetupSRL;
      writeLn('Walking to the burning spot - SPS');
      SPS_Setup(RUNESCAPE_SURFACE, ['8_7']);
      myPath := [Point(3582, 3131), Point(3576, 3124), Point(3575, 3115), Point(3576, 3106)];
      SPS_WalkPath(myPath);
    end;

    procedure Spot2Bank;
    var
      myPath:TPointArray;

    begin
      writeLn('Walking to the bank - SPS');
      SPS_Setup(RUNESCAPE_SURFACE, ['8_7']);
      myPath := [Point(3576, 3105), Point(3578, 3115), Point(3580, 3123), Point(3584, 3131)];
      SPS_WalkPath(myPath);
    end;

    procedure Light;
    begin
    InvMouse(1, mouse_right)
      WaitOption('ight', 500);
      Wait(1500);
        InvMouse(2, mouse_left);
        MMouse(366,234,2,2); // Add logs to bonfire popup.
        ClickMouse2(mouse_left);
        Wait(50000);
        Spot2Bank;
    end;

    procedure Bank;
    var
      t: integer;

    begin
      t := (getSystemTime + 10000);

      repeat
        OpenBankFast('fwb');
        WriteLn('Opening the Falador East Bank');
      until(bankScreen or pinScreen or (getSystemTime > t));

      if (getSystemTime > t) then
        begin
          Bank2Spot;
        end;

      if(PinScreen) then
        begin
          InPin(Players[0].Pin);
        end;

      if (BankScreen) then
        if InvCount > 0 then depositAll; // Just to empty out your pocket as a failsafe
        MouseBankSlot(1, mouse_Right);
        if (WaitOption('ithdraw-All', 500)) then
        Writeln('Got logs');

      if (invFull) then
        CloseBank;
        Bank2Spot;
    end;

    begin
      SMART_FIXSPEED := True;
      SRL_SixHourFix:= True;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;

      repeat
        Bank;
        Bank2Spot;
        Light;
        Spot2Bank;
      until (false);
    end.

    Its a Falador west bank firemaking script. The thing is that it doesn't do anything, can someone tell me what I'm doing wrong? I'm new to scripting and was getting around to the skeleton of my script. Any help would be appreciated

  2. #2
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Simba Code:
    program FalBonfire;
    {$Define SMART}
    {$I SRL/SRL.Simba}
    {$I Sps/Sps.Simba}


    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Pin  :=''
      Players[0].Active:=True;
    end;

    procedure paths;  //renamed
    var
      path1, path2:TPointArray;

    begin           {Think this might be it....you don't need to call SetupSRL twice and try calling SPS in your mainloop}
                    {Just my little bit of info}
      //SetupSRL;
      writeLn('Walking to the burning spot - SPS');
      //SPS_Setup(RUNESCAPE_SURFACE, ['8_7']);
      path1 := [Point(3582, 3131), Point(3576, 3124), Point(3575, 3115), Point(3576, 3106)];
      path2 := [Point(3576, 3105), Point(3578, 3115), Point(3580, 3123), Point(3584, 3131)];
      //SPS_WalkPath(myPath);
    end;

    function WhereToGo(Which: string): boolean;
    begin
      case Lowercase(Which) of
        'area1':
       begin
         paths;
         if SPS_WalkPath(path1) then
         //blah blah
       end;
       'area2':
        begin
         paths;
         if SPS_WalkPath(path2) then
         //blah blah
        end;
    end;


    //blah blah

    begin //end of script

    SetupSRL;
    //ClickNorth(SRL_ANGLE_HIGH);

    sps_setup(runescape_surface,['8_7']);
    writeln(sps_getmypos);
    end.

    Wrote this in browser so might not compile but that should help, also if you get -1,-1 sps position
    then your paths are messed up.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  3. #3
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Quote Originally Posted by Element17 View Post
    Simba Code:
    program FalBonfire;
    {$Define SMART}
    {$I SRL/SRL.Simba}
    {$I Sps/Sps.Simba}


    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Pin  :=''
      Players[0].Active:=True;
    end;

    procedure paths;  //renamed
    var
      path1, path2:TPointArray;

    begin           {Think this might be it....you don't need to call SetupSRL twice and try calling SPS in your mainloop}
                    {Just my little bit of info}
      //SetupSRL;
      writeLn('Walking to the burning spot - SPS');
      //SPS_Setup(RUNESCAPE_SURFACE, ['8_7']);
      path1 := [Point(3582, 3131), Point(3576, 3124), Point(3575, 3115), Point(3576, 3106)];
      path2 := [Point(3576, 3105), Point(3578, 3115), Point(3580, 3123), Point(3584, 3131)];
      //SPS_WalkPath(myPath);
    end;

    function WhereToGo(Which: string): boolean;
    begin
      case Lowercase(Which) of
        'area1':
       begin
         paths;
         if SPS_WalkPath(path1) then
         //blah blah
       end;
       'area2':
        begin
         paths;
         if SPS_WalkPath(path2) then
         //blah blah
        end;
    end;


    //blah blah

    begin //end of script

    SetupSRL;
    //ClickNorth(SRL_ANGLE_HIGH);

    sps_setup(runescape_surface,['8_7']);
    writeln(sps_getmypos);
    end.

    Wrote this in browser so might not compile but that should help, also if you get -1,-1 sps position
    then your paths are messed up.
    Seems to be working when I took out that SetupSRL- thanks a lot!

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
  •