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

Thread: Help with my fisher [SIMBA]

  1. #1
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with my fisher [SIMBA]

    Yes, I have read the tutorials.

    The problem is, I have no clue how to plug it all in.

    I am making a Catherby Fisher that supports all the different spots there.

    So far this is all I have:

    Simba Code:
    program WondersCatherbyFisher;
    {$DEFINE SMART}
    {$i srl\srl.scar}
    {$i reflection\reflection.simba}


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

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      Players[0].Pin := '';
      Integers[0] := '';
    end;


    procedure BankFishes;
    begin
      if not LoggedIn then
        Exit;
      if not BankScreen then
        R_OpenBankBooth('ctb');
      if PinScreen then
        InPin(Players[0].Pin);
      if BankScreen then
      begin
        DepositAll;
        Withdraw(1, 1, 27);
        Closebank;
      end;
    end;


    procedure SetupPlayer;
    var
      Me: TMe;
    begin
      Wait(1000+Random(1000));
      Me:= GetMe;
      Players[CurrentPlayer].Integers[2]:= Me.Levels[Skill_Fishing];
      Players[CurrentPlayer].Integers[3]:= Me.Experience[Skill_Fishing];
      SetAngle(True);
    end;


    Procedure WalkToBank;
    begin
    Walkpath([Tile(3614, 2791), Tile(3611, 2794), Tile(3609, 2798),
                  Tile(3606, 2798), Tile(3599, 2801), Tile(3593, 2802),
                  Tile(3586, 2803), Tile(3581, 2803), Tile(3575, 2802),
                  Tile(3570, 2801), Tile(3570, 2805)]);
    end;


    procedure WalkToFishingSpot;
    begin
    Walkpath([Tile(3570, 2801), Tile(3577, 2803), Tile(3592, 2803),
                  Tile(3597, 2800), Tile(3603, 2797), Tile(3609, 2795),
                  Tile(3613, 2791)]);
    end;

    function ClickTheSpot: Boolean;
    var
      NPCs: array of TNPC;
      x, y, i, j: Integer;
      SpotTile: TTile;
      SpotPoint: TPoint;
    begin
      NPCs := SortNPCs(GetNPCs);
      for i := 0 to High(NPCs) do
      begin
        if ((NPCs[i].Name = 'Fishing spot')) then
        begin
          for j := 0 to High(NPCs[i].Actions) do
          begin
            if (NPCs[i].Actions[j] = 'Cage') then
            begin
              SpotTile := NPCs[i].Tile
              Break;
            end;
          end;
        end;
      end;
      SpotPoint := TileToMS(SpotTile, 0);
      MMouse(SpotPoint.x, SpotPoint.y, 4, 4);
      if (r_WaitUpText('age', 800)) then
      begin
        ClickMouse2(False);
        Result := r_WaitOption('age', 800);
      end;
    end;


    procedure TypeOfFishing;
    begin
      case Players[CurrentPlayer].Integers[0] of
        0: Players[CurrentPlayer].Strings[0] := 'Cage';
        1: Players[CurrentPlayer].Strings[0] := 'Harpoon';
        2: Players[CurrentPlayer].Strings[0] := 'Net';
        3: Players[CurrentPlayer].Strings[0] := 'Lure';
        4: Players[CurrentPlayer].Strings[0] := 'Bait';
      end;
    end;


    begin
      Smart_Server := 32;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      SetupReflection;
      DeclarePlayers;
      LoginPlayer;
      SetupPlayer;
      WalkToBank;
      WalkToFishingSpot;
      ClickTheSpot;
      TypeOfFishing;
      CheckHarpoonSpotType;
    end.
    Last edited by wondersueak; 12-20-2010 at 10:54 PM.

  2. #2
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    usually i make a outline first such as:
    Simba Code:
    procedure FindFishes;

    Procedure Bank;

    Procedure Walk;

    //and so on... than you can move it around and plug in the code and be like

    Begin
    walk;
    bank;
    //and so on...
    end;

  3. #3
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, thanks! That helped. Now I at least no where to start....

    Edit:

    Good, or bad banking? Tips?:
    Simba Code:
    procedure BankFishes;
    begin
      if (not(LoggedIn)) then Exit;
      OpenBank('veb', True, True);
      if (PinScreen) then InPin('1337')
      if (bankscreen) then
        DepositAll;
      Withdraw(1, 1, 27);
      CloseBank;
    end;

    Edit edit:
    How do I get my characters position on a map? This is for the walking. I want to get the tile position. I've looked up the different types of walking, but I just want some simple tile walking.
    Last edited by wondersueak; 12-19-2010 at 08:09 AM.

  4. #4
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Since you are using reflection I recommend using R_OpenBankBooth('veb') to open bankbooth since color has problems sometimes. You don't need brackets after the if statements since you are using it test only one thing.

    Here is what I would use:
    Simba Code:
    procedure BankFishes;
    begin
      if not LoggedIn then
        Exit;
      if not BankScreen then
        R_OpenBankBooth('veb');
      if PinScreen then
        InPin(Players[0].Pin);
      if BankScreen then
      begin
        DepositAll;
        Withdraw(1, 1, 27);
        Closebank;
      end;
    end;

  5. #5
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, thanks. Yeah, I've seen color mess up big time when finding bank booths.

    Any advice on how to get my tile position, and then walk to the tile position I choose?

  6. #6
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Simba Code:
    procedure findme;
    var
      Me: TMe;
    begin
      Me := GetMe;
      writeln(ToStr(Me.Tile.x) + ', ' + ToStr(Me.Tile.y));
    this prints out your position on the mainmap, to walk somewhere use sumilions pathmaker.

    P.S. This uses reflection, so make sure to include reflection.simba in your script.

    Edit: Is this your first script? If it is then maybe you should script for other easy skills(eg: cooking or smithing/magic) Because I started out making out those scripts.
    Last edited by KingKong; 12-19-2010 at 08:32 AM.

  7. #7
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah, I just included it after I realized I only included srl and smart.

    Well, It is my first successfulish script. My real first one was really crappy and didn't even run... Heheheh, I've been observing scripts I use thinking... "Hmm... What does this do?" and trying to figure it out.

    The thing is, I really need a catherby fisher right now, and there isn't a lot of working fishers in the forums. Maybe one or two. (At least the forums I can access). Plus, I want this to reinforce everything into my head, and I'm the type of person who needs a challenge.

    When i went to download the pathmaker it opened up a bunch of files in my Winrar and I didn't know which one to open... How do I download and run it? I know where to download it from... but which file do I click to run it? where do I put the file?

  8. #8
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    run pathmaker.exe and load the map of runescape.

  9. #9
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It gives me:
    PathMaker.cfg
    PathMaker.dof
    PathMaker.dpr
    PathMaker.res

    but no cfg file.

  10. #10
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    looks like you downloaded the source.

  11. #11
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How do I download the actual program? I only found the source on the page.

    Gosh, I feel really noobish now :P

  12. #12
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I think this page might have actual program:
    http://simbareflection.googlecode.co...ols/PathMaker/

    but i forgot where i got it from(maybe from same place)

  13. #13
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, thanks so much. I can't work on it anymore tonight (Need sleep), but I'll work on it more in the morning.

  14. #14
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    walking to the fishing spots is super easy, all you need is a few radialwalks and autocolors. as for banking, openbankfast or openbanknpc works just as well, if not faster than reflection(plus it doesnt break every update )
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  15. #15
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks! I'll keep that in mind

    This is what I have so far:
    Simba Code:
    program WondersCatherbyFisher;
    {$ srl/srl/misc/smart.scar}
    {$ srl/srl.scar}
    {$ reflection/reflection.simba}


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

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      Players[0].Pin := '';
    end;


    procedure BankFishes;
    begin
      if not LoggedIn then
        Exit;
      if not BankScreen then
        R_OpenBankBooth('veb');
      if PinScreen then
        InPin(Players[0].Pin);
      if BankScreen then
      begin
        DepositAll;
        Withdraw(1, 1, 27);
        Closebank;
      end;
    end;


    procedure SetupPlayer;
    var
      Me: TMe;
    begin
      Wait(1000+Random(1000));
      Me:= GetMe;
      Players[CurrentPlayer].Integers[2]:= Me.Levels[Skill_Fishing];
      Players[CurrentPlayer].Integers[3]:= Me.Experience[Skill_Fishing];
      SetAngle(True);
      MarkTime(TimeSinceLastBreak);
    end;


    function LoadPath: TPointArray;
    begin
      SetLength(Result, 11);

      Result[0] := Point(3614, 2791);
      Result[1] := Point(3611, 2794);
      Result[2] := Point(3609, 2798);
      Result[3] := Point(3606, 2798);
      Result[4] := Point(3599, 2801);
      Result[5] := Point(3593, 2802);
      Result[6] := Point(3586, 2803);
      Result[7] := Point(3581, 2803);
      Result[8] := Point(3575, 2802);
      Result[9] := Point(3570, 2801);
      Result[10] := Point(3570, 2805);
    end;


    Procedure WalkToBank;
    Var
      I: Integer;
      Path: TPointArray;

    Begin
      Path := LoadPath;
      for i := 0 to High(Path) do
        Begin
           WalkToTile(Path[i], 3, 0);
        end;
          Wait(500+Random(300));
    end;


    begin
      Smart_Server := 32;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      SetupPlayer;
      WalkToBank;
    end.

    But, I get a compiling error at line:
    Simba Code:
    [Error] (10:3): Unknown identifier 'HowManyPlayers' at line 9
    Compiling failed.

    *And I know that it says 'veb' I'm going to change that*
    Last edited by wondersueak; 12-19-2010 at 11:32 PM.

  16. #16
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    change {$ srl/srl.scar} to {$include srl/srl.scar}
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  17. #17
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks! Can't, believe, I, made, that, mistake. :P

    Huh, now when I try to compile it opens the TileCore file and spits this out:

    [Error] C:\Users\Glenna\Documents\Simba\Includes\reflectio n\./Core/TileCore.simba(86:9): Unknown identifier 'SmartGetFieldObject' at line 85
    Compiling failed.
    Last edited by wondersueak; 12-20-2010 at 12:31 AM.

  18. #18
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    something is wrong with your plugins(most likley)

    how are you installing SRL, srl extension for simba, or svn?
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  19. #19
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Tip: Write setupreflection after you setupsrl
    As for your walking function, delete procedure walktobank. Then for all of your tpoints, remove everything before the tile coordinates and replace with tile. Eg:
    From Result[0] := Point(3614, 2791); to Tile(3614, 2791). After that Use WalkPath([Tile(x1, y1), Tile(x2, y2).....Tile(xn, yn)]); to walk flawlessly(or so its said)

  20. #20
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, okay. Thanks!

    I use SVN.

    I tried replacing my plugins, but I still get the same result.

    Could you give me yours?

    iroki and libsmart.

    Still get the errors with the SetupReflection under SetupSRL

  21. #21
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    replace your top three lines after program blahblah; with these lines
    {$DEFINE SMART}
    {$i srl\srl.scar}
    {$i reflection\reflection.simba}

  22. #22
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks.

    That gets rid of that tile error.

    is this right/are there any vars or integers I need to declare?:
    Simba Code:
    function LoadPath: TPointArray;
    begin
      SetLength(Result, 11);

      Result[0] := Point(3614, 2791); to Tile(3614, 2791);
      Result[1] := Point(3611, 2794); to Tile(3611, 2794);
      Result[2] := Point(3609, 2798); to Tile(3609, 2798);
      Result[3] := Point(3606, 2798); to Tile(3606, 2798);
      Result[4] := Point(3599, 2801); to Tile(3599, 2801);
      Result[5] := Point(3593, 2802); to Tile(3593, 2802);
      Result[6] := Point(3586, 2803); to Tile(3586, 2803);
      Result[7] := Point(3581, 2803); to Tile(3581, 2803);
      Result[8] := Point(3575, 2802); to Tile(3575, 2802);
      Result[9] := Point(3570, 2801); to Tile(3570, 2801);
      Result[10] := Point(3570, 2805); to Tile(3570, 2805);
    end;

    and could you give me an example of the: WalkPath([Tile(x1, y1), Tile(x2, y2).....Tile(xn, yn)])

    not quite sure what you mean there... ^^

  23. #23
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Looks like i didn't explain properly, but this is all you need to walk:

    Simba Code:
    Walkpath([Tile(3614, 2791), Tile(3611, 2794), Tile(3609, 2798),
                  Tile(3606, 2798), Tile(3599, 2801), Tile(3593, 2802),
                  Tile(3586, 2803), Tile(3581, 2803), Tile(3575, 2802),
                  Tile(3570, 2801), Tile(3570, 2805)]);

  24. #24
    Join Date
    Aug 2010
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, thanks.

    I get this error:
    [Hint] C:\Users\Glenna\Documents\Simba\Simba\Includes\SRL/SRL/core/gametab.scar(1513:3): Variable 'P' never used at line 1512
    [Error] (55:35): Identifier expected at line 54
    Compiling failed.

    line 54:
    Result[0] := Point(3614, 2791); to Tile(3614, 2791);
    Last edited by wondersueak; 12-20-2010 at 02:10 AM.

  25. #25
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    you have to actually remove the "Point(3614, 2791); to"
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •