Page 1 of 2 12 LastLast
Results 1 to 25 of 28

Thread: Alot of help needed

  1. #1
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default Alot of help needed

    Hello

    In this thread, I'll post what I need help with as I'm trying to "discover" reflection.

    So I'll start :

    1) Is reflection working right now ?

    2) How should I get IDs / Tiles... etc ?

    3) If yes, how could I get the IDs of objects, Tiles and stuff printed out ?

    Simba Code:
    GetMyPos;

    Has its result as a TTile, how can I make the position put out by Writeln (same as inttostr but for tiles) ?

    4) objType, how should I define that when looking for IDs ?

    5) How do I put out the ID of the object I'm looking for by Writeln ?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Yes, MyLocationKTHX := GeyMyPos; Writeln(ToStr(MyLocationKTHX.x) + ', ' + ToStr(MyLocationKTHX.y)); or RSBot or TRiBot, previously stated, OBJECT_TYPE_INTERACTABLE (two others, not much use tbh, check Constants.simba), wat? You mean debug it so you know the ID? There's a function called DumpObjects or something. Read through the reflection include.

    Hope that helps.

  3. #3
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    I thought RSBot was shut down ?

  4. #4
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    powerbot.org (Ex RSBot)

    tribot.org (TRiBot)

  5. #5
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Tribot seems very nice, thanks i luffs yeww +rep (if you care about rep ).

    More questions might come.

  6. #6
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    No problem. If you wanna get quicker answers, we could talk on MSN.

    panic._@live.com

  7. #7
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Got another question :

    What should I put in the variable TInvItem when using the function :

    Simba Code:
    {*******************************************************************************
    function R_ItemIDExists(var Item: TInvItem; ID: Integer): Boolean;
    By: Drags111
    Description: Returns true if the ID is found at least once in the inventory.
                Also returns the first item found into the var Item.
    *******************************************************************************}

    ?
    Last edited by Dervish; 08-28-2010 at 08:27 PM.

  8. #8
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    It's a variable so you'd do something like

    Simba Code:
    var
      TehItem: TInvItem;

    begin
      if(R_ItemIDExists(TehItem, 1234))then
        Writeln('wat');
    end.

  9. #9
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    It's a variable so you'd do something like

    Simba Code:
    var
      TehItem: TInvItem;

    begin
      if(R_ItemIDExists(TehItem, 1234))then
        Writeln('wat');
    end.
    You are a god >.>

  10. #10
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Thanks. And check Inventory.simba to see all the information that a TInvItem stores if you want.

    (It stores item name, stack size, ID, and actions.)

  11. #11
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Simba Code:
    Procedure WalkToChurch;
    begin
      if (MeInBox(2943,3373,2949,3368)) then
      begin
        Players[CurrentPlayer].Loc := 'bank';
        ReportStatus('Position looks fine, checking runes');
        If not R_ItemIDExists(LawRune,563) then
        begin
          ReportStatus('No laws in inventory, checking bank.');
          Tries:=0;
          Repeat
            Case random(2) of
              0: R_OpenBankBooth('fwb');
              1: begin
                   if(FindNPC(6200,BankerNPC)) then
                   begin
                     ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                     Writeln('Found the banker..');
                     MMouse(ClickPoint.x,ClickPoint.y,2,2);
                     If (IsUpText('anker')) then
                     begin
                       GetMousePos(ClickPoint.x,ClickPoint.y);
                       Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                       ChooseOption('ank');
                     end;
                   end else;
                     Writeln('No banker found..');
                 end;
            end;
          Until((BankScreen) or (Tries = 20));
          If not (BankScreen) then
          begin
            ReportStatus('Tried to open the bank 20 times, stopping...');
            NextPlayer(False);
          end else;
          begin
            SearchBank('law');
            repeat
              If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
              begin
                ReportStatus('No laws in inventory nor bank...');
                Nextplayer(False);
              end else;
              begin
                if(Verify(x,y,'law')) then
                begin
                  GetMousePos(x,y);
                  Mouse(x,y,0,0,false);
                  Wait(200+random(100));
                  ChooseOption('All');
                  Wait(200+random(100));
                  CloseBank;
                end else;
                begin
                  Writeln('The item we thought we found was not a law rune.');
                  Inc(Tries);
                end;
              end;
            until((Tries = 20) or (not(bankscreen)));
            if (Tries = 20) then
            begin
              Writeln('Tried to find Law Runes 20 times, in vain.');
              NextPlayer(False);
            end;
          end;
        end else;
          Writeln('Law Runes in inventory, checking air rune supply');
        If not R_ItemIDExists(AirRune,556) then
        begin
          ReportStatus('No air runes in inventory, checking if staff is equipped.');
          Gametab(26);
          If not(IsEquippedID(1381)) then
          begin
            Reportstatus('No Staff equipped either, checking Bank.');
            Tries:=0;
            Repeat
              Case random(2) of
                0: R_OpenBankBooth('fwb');
                1: begin
                     if(FindNPC(6200,BankerNPC)) then
                     begin
                       ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                     Writeln('Found the banker..');
                     MMouse(ClickPoint.x,ClickPoint.y,2,2);
                     If (IsUpText('anker')) then
                     begin
                       GetMousePos(ClickPoint.x,ClickPoint.y);
                       Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                       ChooseOption('ank');
                     end;
                   end else;
                     Writeln('No banker found..');
                 end;
              end
            Until((BankScreen) or (Tries = 20));
            If not (BankScreen) then
            begin
              ReportStatus('Tried to open the bank 20 times, stopping...');
              NextPlayer(False);
            end else;
            begin
              SearchBank('air');
              If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
              begin
                ReportStatus('Found Staff of Air');
                Case random(2) of
                  0: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
                       begin
                         Mouse(x,y,2,2,true);
                         Wait(200+random(100));
                       end;
                     end;
                  1: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom(['staff of air',
                                               'air','taff of air',
                                             'of air']) then
                       begin
                         Mouse(x,y,2,2,false);
                         Wait(200+random(100));
                         ChooseOption('1');
                         Wait(200+random(100));
                       end;
                       Closebank;
                       FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
                       Mouse(x,y,1,1,true);
                     end;
                end;
              end else;
              begin
                Reportstatus('No staff, going for runes...');
                repeat
                  If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
                  begin
                    ReportStatus('No airs in inventory nor bank...');
                    Nextplayer(False);
                  end else;
                  begin
                    if(Verify(x,y,'air')) then
                    begin
                      GetMousePos(x,y);
                      Mouse(x,y,0,0,false);
                      Wait(200+random(100));
                      ChooseOption('All');
                      Wait(200+random(100));
                      CloseBank;
                    end else;
                    begin
                      Writeln('The item we thought we found was not an air rune.');
                      Inc(Tries);
                    end;
                  end;
                until((Tries = 20) or (not(bankscreen)));
                if (Tries = 20) then
                begin
                  Writeln('Tried to find Air Runes 20 times, in vain.');
                  NextPlayer(False);
                end;
              end;
              ReportStatus('Staff equipped.');
            end else;
            begin
              ReportStatus('It would seem you have both Air / Laws aviable.');
              ReportStatus('Starting walking procedure.');
              Makecompass('N');
            end;
        {walking here...}
        end;
      end;
    end;

    Please help me, I'm lost in the begins and end;s they aren't linked together correctly somewhere and I've been trying to find where for the past 10 minutes, in vain.

  12. #12
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    try this
    SCAR Code:
    Procedure WalkToChurch;
    begin
      if (MeInBox(IntToBox(2943,3373,2949,3368))) then
      begin
        Players[CurrentPlayer].Loc := 'bank';
        ReportStatus('Position looks fine, checking runes');
        If not R_ItemIDExists(LawRune,563) then
        begin
          ReportStatus('No laws in inventory, checking bank.');
          Tries:=0;
          Repeat
            Case random(2) of
              0: R_OpenBankBooth('fwb');
              1: begin
                   if(FindNPC(6200,BankerNPC)) then
                   begin
                     ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                     Writeln('Found the banker..');
                     MMouse(ClickPoint.x,ClickPoint.y,2,2);
                     If (IsUpText('anker')) then
                     begin
                       GetMousePos(ClickPoint.x,ClickPoint.y);
                       Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                       ChooseOption('ank');
                     end;
                   end else;
                     Writeln('No banker found..');
                 end;
            end;
          Until((BankScreen) or (Tries = 20));
          If not (BankScreen) then
          begin
            ReportStatus('Tried to open the bank 20 times, stopping...');
            NextPlayer(False);
          end else
          begin
            SearchBank('law');
            repeat
              If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
              begin
                ReportStatus('No laws in inventory nor bank...');
                Nextplayer(False);
              end else
              begin
                if(Verify(x,y,'law')) then
                begin
                  GetMousePos(x,y);
                  Mouse(x,y,0,0,false);
                  Wait(200+random(100));
                  ChooseOption('All');
                  Wait(200+random(100));
                  CloseBank;
                end else
                begin
                  Writeln('The item we thought we found was not a law rune.');
                  Inc(Tries);
                end;
              end;
            until((Tries = 20) or (not(bankscreen)));
            if (Tries = 20) then
            begin
              Writeln('Tried to find Law Runes 20 times, in vain.');
              NextPlayer(False);
            end;
          end;
        end else
          Writeln('Law Runes in inventory, checking air rune supply');
        If not R_ItemIDExists(AirRune,556) then
        begin
          ReportStatus('No air runes in inventory, checking if staff is equipped.');
          Gametab(26);
          If not(IsEquippedID(1381)) then
          begin
            Reportstatus('No Staff equipped either, checking Bank.');
            Tries:=0;
            Repeat
              Case random(2) of
                0: R_OpenBankBooth('fwb');
                1: begin
                     if(FindNPC(6200,BankerNPC)) then
                     begin
                       ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                       Writeln('Found the banker..');
                       MMouse(ClickPoint.x,ClickPoint.y,2,2);
                       If (IsUpText('anker')) then
                       begin
                         GetMousePos(ClickPoint.x,ClickPoint.y);
                         Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                         ChooseOption('ank');
                       end;
                     end else
                       Writeln('No banker found..');
                 end;
              end;
            Until((BankScreen) or (Tries = 20));
            If not (BankScreen) then
            begin
              ReportStatus('Tried to open the bank 20 times, stopping...');
              NextPlayer(False);
            end else
            begin
              SearchBank('air');
              If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
              begin
                ReportStatus('Found Staff of Air');
                Case random(2) of
                  0: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
                       begin
                         Mouse(x,y,2,2,true);
                         Wait(200+random(100));
                       end;
                     end;
                  1: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom(['staff of air',
                                               'air','taff of air',
                                             'of air']) then
                       begin
                         Mouse(x,y,2,2,false);
                         Wait(200+random(100));
                         ChooseOption('1');
                         Wait(200+random(100));
                       end;
                       Closebank;
                       FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
                       Mouse(x,y,1,1,true);
                     end;
                end;
              end else
              begin
                Reportstatus('No staff, going for runes...');
                repeat
                  If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
                  begin
                    ReportStatus('No airs in inventory nor bank...');
                    Nextplayer(False);
                  end else
                  begin
                    if(Verify(x,y,'air')) then
                    begin
                      GetMousePos(x,y);
                      Mouse(x,y,0,0,false);
                      Wait(200+random(100));
                      ChooseOption('All');
                      Wait(200+random(100));
                      CloseBank;
                    end else
                    begin
                      Writeln('The item we thought we found was not an air rune.');
                      Inc(Tries);
                    end;
                  end;
                until((Tries = 20) or (not(bankscreen)));
                if (Tries = 20) then
                begin
                  Writeln('Tried to find Air Runes 20 times, in vain.');
                  NextPlayer(False);
                end;
              end;
              ReportStatus('Staff equipped.');
            end else
            begin
              ReportStatus('It would seem you have both Air / Laws aviable.');
              ReportStatus('Starting walking procedure.');
              Makecompass('N');
            end;
        {walking here...}
        end;
      end;
    end;

    ~shut

  13. #13
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    try this
    SCAR Code:
    Procedure WalkToChurch;
    begin
      if (MeInBox(IntToBox(2943,3373,2949,3368))) then
      begin
        Players[CurrentPlayer].Loc := 'bank';
        ReportStatus('Position looks fine, checking runes');
        If not R_ItemIDExists(LawRune,563) then
        begin
          ReportStatus('No laws in inventory, checking bank.');
          Tries:=0;
          Repeat
            Case random(2) of
              0: R_OpenBankBooth('fwb');
              1: begin
                   if(FindNPC(6200,BankerNPC)) then
                   begin
                     ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                     Writeln('Found the banker..');
                     MMouse(ClickPoint.x,ClickPoint.y,2,2);
                     If (IsUpText('anker')) then
                     begin
                       GetMousePos(ClickPoint.x,ClickPoint.y);
                       Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                       ChooseOption('ank');
                     end;
                   end else;
                     Writeln('No banker found..');
                 end;
            end;
          Until((BankScreen) or (Tries = 20));
          If not (BankScreen) then
          begin
            ReportStatus('Tried to open the bank 20 times, stopping...');
            NextPlayer(False);
          end else
          begin
            SearchBank('law');
            repeat
              If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
              begin
                ReportStatus('No laws in inventory nor bank...');
                Nextplayer(False);
              end else
              begin
                if(Verify(x,y,'law')) then
                begin
                  GetMousePos(x,y);
                  Mouse(x,y,0,0,false);
                  Wait(200+random(100));
                  ChooseOption('All');
                  Wait(200+random(100));
                  CloseBank;
                end else
                begin
                  Writeln('The item we thought we found was not a law rune.');
                  Inc(Tries);
                end;
              end;
            until((Tries = 20) or (not(bankscreen)));
            if (Tries = 20) then
            begin
              Writeln('Tried to find Law Runes 20 times, in vain.');
              NextPlayer(False);
            end;
          end;
        end else
          Writeln('Law Runes in inventory, checking air rune supply');
        If not R_ItemIDExists(AirRune,556) then
        begin
          ReportStatus('No air runes in inventory, checking if staff is equipped.');
          Gametab(26);
          If not(IsEquippedID(1381)) then
          begin
            Reportstatus('No Staff equipped either, checking Bank.');
            Tries:=0;
            Repeat
              Case random(2) of
                0: R_OpenBankBooth('fwb');
                1: begin
                     if(FindNPC(6200,BankerNPC)) then
                     begin
                       ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                       Writeln('Found the banker..');
                       MMouse(ClickPoint.x,ClickPoint.y,2,2);
                       If (IsUpText('anker')) then
                       begin
                         GetMousePos(ClickPoint.x,ClickPoint.y);
                         Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                         ChooseOption('ank');
                       end;
                     end else
                       Writeln('No banker found..');
                 end;
              end;
            Until((BankScreen) or (Tries = 20));
            If not (BankScreen) then
            begin
              ReportStatus('Tried to open the bank 20 times, stopping...');
              NextPlayer(False);
            end else
            begin
              SearchBank('air');
              If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
              begin
                ReportStatus('Found Staff of Air');
                Case random(2) of
                  0: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
                       begin
                         Mouse(x,y,2,2,true);
                         Wait(200+random(100));
                       end;
                     end;
                  1: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom(['staff of air',
                                               'air','taff of air',
                                             'of air']) then
                       begin
                         Mouse(x,y,2,2,false);
                         Wait(200+random(100));
                         ChooseOption('1');
                         Wait(200+random(100));
                       end;
                       Closebank;
                       FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
                       Mouse(x,y,1,1,true);
                     end;
                end;
              end else
              begin
                Reportstatus('No staff, going for runes...');
                repeat
                  If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
                  begin
                    ReportStatus('No airs in inventory nor bank...');
                    Nextplayer(False);
                  end else
                  begin
                    if(Verify(x,y,'air')) then
                    begin
                      GetMousePos(x,y);
                      Mouse(x,y,0,0,false);
                      Wait(200+random(100));
                      ChooseOption('All');
                      Wait(200+random(100));
                      CloseBank;
                    end else
                    begin
                      Writeln('The item we thought we found was not an air rune.');
                      Inc(Tries);
                    end;
                  end;
                until((Tries = 20) or (not(bankscreen)));
                if (Tries = 20) then
                begin
                  Writeln('Tried to find Air Runes 20 times, in vain.');
                  NextPlayer(False);
                end;
              end;
              ReportStatus('Staff equipped.');
            end else
            begin
              ReportStatus('It would seem you have both Air / Laws aviable.');
              ReportStatus('Starting walking procedure.');
              Makecompass('N');
            end;
        {walking here...}
        end;
      end;
    end;

    ~shut
    Simba Code:
    Procedure CheckRuneSupplies;
    begin
      if (MeInBox(2943,3373,2949,3368)) then
      begin
        Players[CurrentPlayer].Loc := 'bank';
        ReportStatus('Position looks fine, checking runes');
      end else;
      begin
        Writeln('Player not in the bank.');
        NextPlayer(False);
      end;
      If not R_ItemIDExists(LawRune,563) then
      begin
        ReportStatus('No laws in inventory, checking bank.');
        Tries:=0;
        Repeat
          Case random(2) of
            0: R_OpenBankBooth('fwb');
            1: begin
                 if(FindNPC(6200,BankerNPC)) then
                 begin
                   ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                   Writeln('Found the banker..');
                   MMouse(ClickPoint.x,ClickPoint.y,2,2);
                   If (IsUpText('anker')) then
                   begin
                     GetMousePos(ClickPoint.x,ClickPoint.y);
                     Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                     ChooseOption('ank');
                   end;
                 end else;
                   Writeln('No banker found..');
               end;
          end;
        Until((BankScreen) or (Tries = 20));
        If not (BankScreen) then
        begin
          ReportStatus('Tried to open the bank 20 times, stopping...');
          NextPlayer(False);
        end else;
        begin
          SearchBank('law');
          repeat
            If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
            begin
                ReportStatus('No laws in inventory nor bank...');
                Nextplayer(False);
            end else;
            begin
              if(Verify(x,y,'law')) then
              begin
                GetMousePos(x,y);
                Mouse(x,y,0,0,false);
                Wait(200+random(100));
                ChooseOption('All');
                Wait(200+random(100));
                CloseBank;
              end else;
              begin
                Writeln('The item we thought we found was not a law rune.');
                Inc(Tries);
              end;
            end;
          until((Tries = 20) or (not(bankscreen)));
          if (Tries = 20) then
          begin
            Writeln('Tried to find Law Runes 20 times, in vain.');
            NextPlayer(False);
          end;
        end;
      end else;
        Writeln('Law Runes in inventory, checking air rune supply');
      If not R_ItemIDExists(AirRune,556) then
      begin
        ReportStatus('No air runes in inventory, checking if staff is equipped.');
        Gametab(26);
        If not(IsEquippedID(1381)) then
        begin
          Reportstatus('No Staff equipped either, checking Bank.');
          Tries:=0;
          Repeat
            Case random(2) of
              0: R_OpenBankBooth('fwb');
              1: begin
                   if(FindNPC(6200,BankerNPC)) then
                   begin
                     ClickPoint := TileToMS(BankerNPC.Tile, random(5));
                     Writeln('Found the banker..');
                     MMouse(ClickPoint.x,ClickPoint.y,2,2);
                     If (IsUpText('anker')) then
                     begin
                       GetMousePos(ClickPoint.x,ClickPoint.y);
                       Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
                       Wait(100+random(100));
                       ChooseOption('ank');
                     end;
                     end else;
                       Writeln('No banker found..');
                   end;
              end
            Until((BankScreen) or (Tries = 20));
            If not (BankScreen) then
            begin
              ReportStatus('Tried to open the bank 20 times, stopping...');
              NextPlayer(False);
            end else;
            begin
              SearchBank('air');
              If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
              begin
                ReportStatus('Found Staff of Air');
                Case random(2) of
                  0: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
                       begin
                         Mouse(x,y,2,2,true);
                         Wait(200+random(100));
                       end;
                     end;
                  1: begin
                       MMouse(x,y,2,2);
                       Wait(200+random(100));
                       If(IsUpTextMultiCustom(['staff of air',
                                               'air','taff of air',
                                             'of air']) then
                       begin
                         GetMousePos(x,y);
                         Wait(100+random(50));
                         Mouse(x,y,0,0,false);
                         Wait(200+random(100));
                         ChooseOption('1');
                         Wait(200+random(100));
                       end;
                       Closebank;
                       FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
                       Mouse(x,y,1,1,true);
                     end;
                end;
              end else;
              begin
                Reportstatus('No staff, going for runes...');
                Tries := 0;
                repeat
                  If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
                  begin
                    ReportStatus('No airs in inventory nor bank...');
                    Nextplayer(False);
                  end else;
                  begin
                    if(Verify(x,y,'air')) then
                    begin
                      GetMousePos(x,y);
                      Mouse(x,y,0,0,false);
                      Wait(200+random(100));
                      ChooseOption('All');
                      Wait(200+random(100));
                      CloseBank;
                    end else;
                    begin
                      Writeln('The item we thought we found was not an air rune.');
                      Inc(Tries);
                    end;
                  end;
                until((Tries = 20) or (not(bankscreen)));
                if (Tries = 20) then
                begin
                  Writeln('Tried to find Air Runes 20 times, in vain.');
                  NextPlayer(False);
                end;
              end;
              ReportStatus('Runes found and withdrawed from the bank.');
            end;
          end else;
            Writeln('You seem to have the staff of air equipped !');
        end else;
          Writeln('Runes in inventory found.');
        begin
          ReportStatus('It would seem you have both Air / Laws aviable.');
          ReportStatus('Starting walking procedure.');
          Makecompass('N');
        end;
    end;

    Fixed it up myself, i think it works the same way yours does.

    I need some more help though, i'm checking for errors and when I compile, I get :

    Progress Report:
    [Error] C:\Simba\Includes\Reflection\./Core/Core.simba(47:13): Unknown identifier 'SmartGetFieldInt' at line 46
    Compiling failed.


    Why is that ?

    I got latest SRL/reflection through the .sex extensions in SIMBA.

  14. #14
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  15. #15
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    add this above any other includes in your script
    SCAR Code:
    {$i srl/srl/misc/smart.scar}

    ~shut
    I love you shut but now I get :

    Progress Report:
    [Error] C:\Simba\Includes\srl/srl/misc/smart.scar(9:10): Duplicate identifier 'ISKEYDOWN' at line 8
    Compiling failed.

  16. #16
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Dr D. Dervish View Post
    I love you shut but now I get :

    Progress Report:
    [Error] C:\Simba\Includes\srl/srl/misc/smart.scar(9:10): Duplicate identifier 'ISKEYDOWN' at line 8
    Compiling failed.
    try restarting simba, most of the time it helps for me

    ~shut

    EDIT: what do you have for your includes?

  17. #17
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Simba Code:
    program WoZTG;
    {$i SRL/SRL.scar}
    {$i Reflection/Reflection.simba}
    {$i srl/srl/misc/smart.scar}

    Edit : fixed through reorganising the order of the includes.
    Last edited by Dervish; 08-29-2010 at 12:28 PM.

  18. #18
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  19. #19
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    this way round
    SCAR Code:
    program WoZTG;
    {$i srl/srl/misc/smart.scar}
    {$i SRL/SRL.scar}
    {$i Reflection/Reflection.simba}

    i shall quote myself here


    ~shut
    Sry for being blind >.<

    Also, how can I define a TBox for use in the Position check ?

  20. #20
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  21. #21
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    IntToBox(X1, Y1, X2, Y2)

    ~shut
    Is there a way to do it in the const ?

    Like :

    TBankBox = X1, Y1, X2, Y2; ?

    (I get ";" missing when trying that ^)

    I get '=' missing when I try :


    const
    TBankBox.x1 = 2943;
    TBankBox.y1 = 3373;
    TBankBox.x2 = 2949;
    TBankBox.y2 = 3368;
    Last edited by Dervish; 08-29-2010 at 12:43 PM.

  22. #22
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Dr D. Dervish View Post
    Is there a way to do it in the const ?

    Like :

    TBankBox = X1, Y1, X2, Y2; ?

    (I get ";" missing when trying that ^)
    as far as i am aware, no

    you would be best doing something like
    SCAR Code:
    var
      TBankBox: TBox;


      TBankBox:= IntToBox(X1, Y1, X2, Y2); // Stick this somewhere in the setup

    then you can use TBankBox


    ~shut
    Last edited by Shuttleu; 08-29-2010 at 12:47 PM.

  23. #23
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    as far as i am aware, no

    you would be best doing something like
    SCAR Code:
    var
      TBankBox: TBox;


      TBankBox:= IntToBox(X1, Y1, X2, Y2);

    then you can use TBankBox


    ~shut
    Successfully compiled, YES ! I love you shut and i luffs yeww !

  24. #24
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  25. #25
    Join Date
    Dec 2007
    Posts
    2,766
    Mentioned
    2 Post(s)
    Quoted
    37 Post(s)

    Default

    I've progressed quite far in the script and got to a point where i need to use WalkToTile but I do not know how to make it walk to the tiles I've chosen ?

    How can I make integers X and Y to a TTile needed in the function ?


    Also, how can I store data in an array ?

    What I want to do is to make it remember which worlds there are other people in and log to another but mark the one it was in as populated in order so that it will not pick it to log into.

Page 1 of 2 12 LastLast

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
  •