Results 1 to 18 of 18

Thread: Help Trying To Make A Script

  1. #1
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Unhappy Help Trying To Make A Script

    I really need help this is my first time scripting and i have no freaking idea how to do this some help would really be appreciated. Im trying to make the player fish in the fishing guild (Lobsters) Thank bank and repeat this is what i got so far. Any help would be great !



    program GuildFisherLobbs
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    const
    {==========Smart Setup==========}
    World = 0; // Input the runescape world number right here for it to select. You may leave it as 0 if you would like it to select a random world.
    MEMBERS = False; // Select False if you are not a member. Select True if you are a member.
    SIGNED = True; // Select True if you are using single account. Select False if not.
    {===============================}
    procedure DeclarePlayers;
    begin
    HowManyPlayers := 1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;

    Players[0].Name := ''; //Your Runescape username goes right here.
    Players[0].Pass := ''; //Your Runescape password goes right here.
    Players[0].Active := True; //Set to True if you want to use this player. Set to False to disable this player.
    Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
    end;
    procedure Cage;
    var x, y: integer;
    begin
    if FindObj(x, y,)'in'8482403, 10),then //This will have the script find an object of your choice
    begin
    Mouse(x, y, 0, 0, true);
    ChooseOption('ine');
    wait(1500+random(1000)); // This will make the script wait for a certain time
    until (InvFull);
    end;
    procedure WalkToBank;
    begin
    if (InvFull) then
    begin
    SetupSRL;
    SPS_Setup(RUNESCAPE_SURFACE, ['0_0']);
    ToBank := [Point(253, 153), Point(184, 161)];
    SPS_WalkPath(ToBank);
    end;
    procedure BankRawLobster;
    begin
    WriteLn('Looking for bank.'); // Writes in the Debug Box
    if FindBank('vwb') then // Finds the bank
    begin
    WriteLn('We have found the bank.');
    if OpenBank('vwb', False, True) then // Opens the bank
    begin
    WriteLn('Proceeding to bank Lobs');
    DepositAll; // Deposits All items in Inventory
    CloseBank; // Closes the bankscreen
    WriteLn('Banking completed. Proceeding to Rest.');
    RestUntil(100); // Rests character
    end;
    end;
    end;

  2. #2
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Please someone help.

  3. #3
    Join Date
    May 2012
    Location
    Chaaaaiir
    Posts
    376
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    If you could actually tell someone what's wrong, that'd help.

  4. #4
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Please post the code in Simba tabs, it makes it much easier to read.

    What problems are you having?

  5. #5
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    MANY compiling issues. i would recommend skimming through the beginner tut section for all of these fixes. us just telling you them wont teach u anything, and u will keep on making the same mistakes

  6. #6
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I did i followed this - http://villavu.com/forum/showthread.php?t=84726
    Theres compiling errors that I dont even know.

  7. #7
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    if FindObj(x, y,)'in'8482403, 10),then //This will have the script find an object of your choice
    syntax error. Thats just one of the mistakes..

  8. #8
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Fixed punctuation, syntax and standards. U still need to work out the mainloop.
    Simba Code:
    program GuildFisherLobbs;                //missing semicolon
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    {const
    {==========Smart Setup==========}

    {World = 0; // Input the runescape world number right here for it to select. You may leave it as 0 if you would like it to select a random world.
    MEMBERS = False; // Select False if you are not a member. Select True if you are a member.
    SIGNED = True; // Select True if you are using single account. Select False if not.
    {===============================}

    //dont really need these, just set them at the mainloop, wont affect anything anyway.

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

      Players[0].Name := ''; //Your Runescape username goes right here.
      Players[0].Pass := ''; //Your Runescape password goes right here.
      Players[0].Active := True; //Set to True if you want to use this player. Set to False to disable this player.
      Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
    end;

    procedure Cage;
    var x, y: integer;
    begin
      repeat                //u need a repeat if u want to do a loop
        if FindObj(x, y,'in',8482403, 10) then //This will have the script find an object of your choice
        begin
          Mouse(x, y, 0, 0, true);
          ChooseOption('ine');
          wait(1500+random(1000)); // This will make the script wait for a certain time
        end;                //and a end if u have a begin
      until (InvFull);
    end;

    procedure WalkToBank;
    var
      ToBank: TPointArray;   //declare ur variables
    begin
      if (InvFull) then
      begin
        //SetupSRL;    do it once at the start
        SPS_Setup(RUNESCAPE_SURFACE, ['0_0']);
        ToBank := [Point(253, 153), Point(184, 161)];
        SPS_WalkPath(ToBank);
      end;
    end;

    procedure BankRawLobster;
    begin
      WriteLn('Looking for bank.'); // Writes in the Debug Box
      if FindBank('vwb') then // Finds the bank
      begin
        WriteLn('We have found the bank.');
        if OpenBank('vwb', False, True) then // Opens the bank
        begin
          WriteLn('Proceeding to bank Lobs');
          DepositAll; // Deposits All items in Inventory
          CloseBank; // Closes the bankscreen
          WriteLn('Banking completed. Proceeding to Rest.');
          RestUntil(100); // Rests character
        end;
      end;
    end;

    begin
      Smart_Server := 1;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;
      LogInPlayer;
      //the rest of ur procedures here
    end.

  9. #9
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Any time you post code on SRL please use [ SIMBA ] PUT YOUR CODE IN HERE [/ SIMBA ] this will make it 100 times easier for those trying to help you read (no spaces between the simba and the square brackets).

    Now, I haven't looked through your whole code, but I would start off by recommending you read alot more tutorials from the beginner and maybe even the intermediates section to try and get a grasp on what it is you are actually doing with each line.

    For example -
    if FindObj(x, y,)'in'8482403, 10),then

    For every open parenthesis ( or [ there should be a closed parenthesis ) or ]
    No more and no less.
    Between each variable stated in the function (the function being FindObj in this case) there needs to be a comma , to distinguish between them.
    There need be no extra commas after the function or anywhere else on the line apart from separating variables.

    should be -
    Simba Code:
    if FindObj(x, y, 'in', 8482403, 10) then

    I didn't scan the rest of the code but I assume there will be other similar errors and that this isn't just a one-off.

    Have a look at these tutorials, they helped me out a great deal when I was starting out and they might be able to help you, too. I found myself reading these along with a few others several times before I had my first compiling script that I completely understood what was happening line-by-line.

    The Beginners Simba Tutorial and SRL/Simba Standards

  10. #10
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok now how do i make it constantly repeat that and i get another error while compiling. I press compile then a new tab comes up this to be exact-

    {$DEFINE SRL_SMART}
    {$DEFINE SMART};
    {.loadlib libsmart}

    function IsKeyDown(C:Byte): Boolean;
    begin
    Result := SmartIsKeyDown(C);
    end;

    procedure MoveMouse(x, y: Integer);
    begin
    SmartMoveMouse(x, y);
    end;

    procedure HoldMouse(x, y: Integer; button : integer);
    begin
    if button = mouse_left then
    SmartHoldMousePlus(x,y,1)
    else if button = mouse_middle then
    SmartHoldMousePlus(x,y,2)
    else if button = mouse_right then
    SmartHoldMousePlus(x,y,3)
    else
    raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMousePlus');
    end;

    procedure ReleaseMouse(x, y: Integer; button : integer);
    begin
    if button = mouse_left then
    SmartReleaseMousePlus(x,y,1)
    else if button = mouse_middle then
    SmartReleaseMousePlus(x,y,2)
    else if button = mouse_right then
    SmartReleaseMousePlus(x,y,3)
    else
    raiseexception(ercustomerror,'Unknown mouse button in SmartReleaseMousePlus');
    end;

    procedure KeyUp(key: Byte);
    begin
    If Key = 13 Then
    Key := 10;
    SmartReleaseKey(key);
    end;

    procedure KeyDown(key: Byte);
    begin
    If Key = 13 Then
    Key := 10;
    SmartHoldKey(key);
    end;

    procedure SendKeys(S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer);
    begin
    SmartSendKeys(S);
    end;

    function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
    var
    T : TSysProcArr;
    I : Integer;
    begin
    T := GetProcesses;
    for I := High(T) downto 0 do
    if Pos(TitlePrefix, T[I].Title) <> 0 then
    begin
    Result := True;
    if SetAsTarget then SetTarget(T[I]);
    Exit;
    end;
    end;

    procedure GetRealMousePos(var X, Y : Integer);
    var
    KMTarget, ITarget : Integer;
    begin
    KMTarget := GetKeyMouseTarget;
    ITarget := GetImageTarget;
    FindAndSetTarget('Public SMART', True);
    GetTClient.IOManager.GetMousePos(X, Y);
    FreeTarget(GetImageTarget);
    SetKeyMouseTarget(KMTarget);
    SetImageTarget(ITarget);

    // These are not universial offsets, but works somewhat for some Windows themes.
    X := X - 8;
    Y := Y - 25;
    end;

    procedure GetMousePos(var x, y: Integer);
    begin
    SmartGetMousePos(x, y);
    end;

    function IsRealMouseInBox(B : TBox): Boolean;
    var
    P : TPoint;
    begin
    GetRealMousePos(P.X, P.Y);
    Result := PointInBox(P, B);
    end;

    function GetColor(x, y: Integer): Integer;
    begin
    result:= SmartGetColor(x, y);
    end;

    procedure SmartSetTarget;
    begin
    SetTargetArray(SmartImageArray, 765,503);
    end;

    function FindWindow(Title: String): Boolean;
    begin
    result:= true;
    end;

    procedure ActivateClient;
    begin
    end;

    function FindWindowBySize(Width, Height: Integer): Boolean;
    begin
    result:= true;
    end;

    {procedure SmartSaveSettings(v: TVariantArray);
    var
    i: Integer;
    ts: TStringArray;
    begin
    ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/misc/smartINI.ini'];
    for i := 0 to 4 do
    WriteINI('SMART', ts[i], v[i], ts[5]);
    end; }

    procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
    var
    prefix: string;
    begin
    prefix := ReadINI('World' + IntToStr(Server), 'Prefix', IncludePath + 'SRL/SRL/misc/worlds.ini');
    if(prefix = '')then
    begin
    writeln('Invalid world number or corrupted world list. Please review your settings');
    TerminateScript;
    end;
    SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503, 's');
    //SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
    end;

    {function SmartLastSettings: TStringArray;
    var
    i: Integer;
    ts: TStringArray;
    begin
    ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/Misc/smartINI.ini'];
    SetLength(Result, 5);
    for i := 0 to 4 do
    Result[i] := ReadINI('SMART', ts[i], ts[5]);
    end; }


    It says-[Error] C:\Simba\Includes\SRL/SRL/misc/smart.simba(3:16): 'BEGIN' expected at line 2
    Compiling failed.

  11. #11
    Join Date
    Apr 2012
    Posts
    3,356
    Mentioned
    34 Post(s)
    Quoted
    218 Post(s)

    Default

    put it like this:
    Simba Code:
    {$DEFINE SRL_SMART}
    {$DEFINE SMART};
    {.loadlib libsmart}

    function IsKeyDown(C:Byte): Boolean;
    begin
    Result := SmartIsKeyDown(C);
    end;

    procedure MoveMouse(x, y: Integer);
    begin
    SmartMoveMouse(x, y);
    end;

    procedure HoldMouse(x, y: Integer; button : integer);
    begin
    if button = mouse_left then
    SmartHoldMousePlus(x,y,1)
    else if button = mouse_middle then
    SmartHoldMousePlus(x,y,2)
    else if button = mouse_right then
    SmartHoldMousePlus(x,y,3)
    else
    raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMousePlus');
    end;

    procedure ReleaseMouse(x, y: Integer; button : integer);
    begin
    if button = mouse_left then
    SmartReleaseMousePlus(x,y,1)
    else if button = mouse_middle then
    SmartReleaseMousePlus(x,y,2)
    else if button = mouse_right then
    SmartReleaseMousePlus(x,y,3)
    else
    raiseexception(ercustomerror,'Unknown mouse button in SmartReleaseMousePlus');
    end;

    procedure KeyUp(key: Byte);
    begin
    If Key = 13 Then
    Key := 10;
    SmartReleaseKey(key);
    end;

    procedure KeyDown(key: Byte);
    begin
    If Key = 13 Then
    Key := 10;
    SmartHoldKey(key);
    end;

    procedure SendKeys(S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer);
    begin
    SmartSendKeys(S);
    end;

    function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
    var
    T : TSysProcArr;
    I : Integer;
    begin
    T := GetProcesses;
    for I := High(T) downto 0 do
    if Pos(TitlePrefix, T[I].Title) <> 0 then
    begin
    Result := True;
    if SetAsTarget then SetTarget(T[I]);
    Exit;
    end;
    end;

    procedure GetRealMousePos(var X, Y : Integer);
    var
    KMTarget, ITarget : Integer;
    begin
    KMTarget := GetKeyMouseTarget;
    ITarget := GetImageTarget;
    FindAndSetTarget('Public SMART', True);
    GetTClient.IOManager.GetMousePos(X, Y);
    FreeTarget(GetImageTarget);
    SetKeyMouseTarget(KMTarget);
    SetImageTarget(ITarget);

    // These are not universial offsets, but works somewhat for some Windows themes.
    X := X - 8;
    Y := Y - 25;
    end;

    procedure GetMousePos(var x, y: Integer);
    begin
    SmartGetMousePos(x, y);
    end;

    function IsRealMouseInBox(B : TBox): Boolean;
    var
    P : TPoint;
    begin
    GetRealMousePos(P.X, P.Y);
    Result := PointInBox(P, B);
    end;

    function GetColor(x, y: Integer): Integer;
    begin
    result:= SmartGetColor(x, y);
    end;

    procedure SmartSetTarget;
    begin
    SetTargetArray(SmartImageArray, 765,503);
    end;

    function FindWindow(Title: String): Boolean;
    begin
    result:= true;
    end;

    procedure ActivateClient;
    begin
    end;

    function FindWindowBySize(Width, Height: Integer): Boolean;
    begin
    result:= true;
    end;

    {procedure SmartSaveSettings(v: TVariantArray);
    var
    i: Integer;
    ts: TStringArray;
    begin
    ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/misc/smartINI.ini'];
    for i := 0 to 4 do
    WriteINI('SMART', ts[i], v[i], ts[5]);
    end; }


    procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
    var
    prefix: string;
    begin
    prefix := ReadINI('World' + IntToStr(Server), 'Prefix', IncludePath + 'SRL/SRL/misc/worlds.ini');
    if(prefix = '')then
    begin
    writeln('Invalid world number or corrupted world list. Please review your settings');
    TerminateScript;
    end;
    SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503, 's');
    //SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
    end;

    {function SmartLastSettings: TStringArray;
    var
    i: Integer;
    ts: TStringArray;
    begin
    ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/Misc/smartINI.ini'];
    SetLength(Result, 5);
    for i := 0 to 4 do
    Result[i] := ReadINI('SMART', ts[i], ts[5]);
    end; }

  12. #12
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    {$DEFINE SRL_SMART}
    {$DEFINE SMART};
    {.loadlib libsmart}

    function IsKeyDown(C:Byte): Boolean;
    begin
    Result := SmartIsKeyDown(C);
    end;

    procedure MoveMouse(x, y: Integer);
    begin
    SmartMoveMouse(x, y);
    end;

    procedure HoldMouse(x, y: Integer; button : integer);
    begin
    if button = mouse_left then
    SmartHoldMousePlus(x,y,1)
    else if button = mouse_middle then
    SmartHoldMousePlus(x,y,2)
    else if button = mouse_right then
    SmartHoldMousePlus(x,y,3)
    else
    raiseexception(ercustomerror,'Unknown mouse button in SmartHoldMousePlus');
    end;

    procedure ReleaseMouse(x, y: Integer; button : integer);
    begin
    if button = mouse_left then
    SmartReleaseMousePlus(x,y,1)
    else if button = mouse_middle then
    SmartReleaseMousePlus(x,y,2)
    else if button = mouse_right then
    SmartReleaseMousePlus(x,y,3)
    else
    raiseexception(ercustomerror,'Unknown mouse button in SmartReleaseMousePlus');
    end;

    procedure KeyUp(key: Byte);
    begin
    If Key = 13 Then
    Key := 10;
    SmartReleaseKey(key);
    end;

    procedure KeyDown(key: Byte);
    begin
    If Key = 13 Then
    Key := 10;
    SmartHoldKey(key);
    end;

    procedure SendKeys(S: String; keywait{$IFNDEF SIMBAMAJOR980}, keymodwait{$ENDIF}: integer);
    begin
    SmartSendKeys(S);
    end;

    function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
    var
    T : TSysProcArr;
    I : Integer;
    begin
    T := GetProcesses;
    for I := High(T) downto 0 do
    if Pos(TitlePrefix, T[I].Title) <> 0 then
    begin
    Result := True;
    if SetAsTarget then SetTarget(T[I]);
    Exit;
    end;
    end;

    procedure GetRealMousePos(var X, Y : Integer);
    var
    KMTarget, ITarget : Integer;
    begin
    KMTarget := GetKeyMouseTarget;
    ITarget := GetImageTarget;
    FindAndSetTarget('Public SMART', True);
    GetTClient.IOManager.GetMousePos(X, Y);
    FreeTarget(GetImageTarget);
    SetKeyMouseTarget(KMTarget);
    SetImageTarget(ITarget);

    // These are not universial offsets, but works somewhat for some Windows themes.
    X := X - 8;
    Y := Y - 25;
    end;

    procedure GetMousePos(var x, y: Integer);
    begin
    SmartGetMousePos(x, y);
    end;

    function IsRealMouseInBox(B : TBox): Boolean;
    var
    P : TPoint;
    begin
    GetRealMousePos(P.X, P.Y);
    Result := PointInBox(P, B);
    end;

    function GetColor(x, y: Integer): Integer;
    begin
    result:= SmartGetColor(x, y);
    end;

    procedure SmartSetTarget;
    begin
    SetTargetArray(SmartImageArray, 765,503);
    end;

    function FindWindow(Title: String): Boolean;
    begin
    result:= true;
    end;

    procedure ActivateClient;
    begin
    end;

    function FindWindowBySize(Width, Height: Integer): Boolean;
    begin
    result:= true;
    end;

    {procedure SmartSaveSettings(v: TVariantArray);
    var
    i: Integer;
    ts: TStringArray;
    begin
    ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/misc/smartINI.ini'];
    for i := 0 to 4 do
    WriteINI('SMART', ts[i], v[i], ts[5]);
    end; }

    procedure SmartSetupEx(Server: integer; members, signed, superdetail: boolean);
    var
    prefix: string;
    begin
    prefix := ReadINI('World' + IntToStr(Server), 'Prefix', IncludePath + 'SRL/SRL/misc/worlds.ini');
    if(prefix = '')then
    begin
    writeln('Invalid world number or corrupted world list. Please review your settings');
    TerminateScript;
    end;
    SmartSetup('http://'+prefix+'.runescape.com/', 'plugin.js?param=o0,a' + IntToStr((Integer(not(Signed)) + 1) * Integer(not((SuperDetail and Signed)))) + ',m' + IntToStr(Integer(Members)), 765, 503, 's');
    //SmartSaveSettings([Server, Members, Signed, SuperDetail, SmartGetDC]);
    end;

    {function SmartLastSettings: TStringArray;
    var
    i: Integer;
    ts: TStringArray;
    begin
    ts := ['server', 'members', 'signed', 'sd', 'DC', IncludePath + 'SRL/SRL/Misc/smartINI.ini'];
    SetLength(Result, 5);
    for i := 0 to 4 do
    Result[i] := ReadINI('SMART', ts[i], ts[5]);
    end; }
    -[Error] (3:16): 'BEGIN' expected at line 2
    Compiling failed..
    Help? Please try compiling it yourself and see if its working because this is just throwing me off completely

  13. #13
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Please post the actual code you have written here since editing it (i assume you implemented my suggestion throughout the code?) I can run through the script and edit your standards and fix up lines of code like in my last post, but if you read the tutorials I linked you to you will be able to do it yourself.

    So far you are posting the include that the script is having an error with, post your script instead as I'm sure the include is not the problem

  14. #14
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    All the codes u posted have no mainloop, i have added it for u in Post#8 but u did not use it.
    A mainloop is...the most crucial part of ur script that determines what ur script is going to do, and in what order, it looks like this:

    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}

    procedure a;
    begin
      action1;
    end;

    procedure b;
    begin
      action2;
    end;

    //and so on...
    //all ur tons of procedures must be placed in between the program and the mainloop

    begin  //here is the mainloop, notice that the mainloop does not have a "procedure name", it begins with a "begin".
      Smart_Server := 1;
      Smart_Members := True;
      Smart_Signed := True;                 //all these are basic procedures that almost every script has
      Smart_SuperDetail := False;          //and is added at the start of the main loop
      SetupSRL;
      DeclarePlayers;
      LogInPlayer;

      repeat    //after all the basic procedures, put ur custom procedures in the order that u want it to perform
        b;
        a;
      until (AllPlayersInactive);

    end.    //and it ends with a fullstop rather than semicolon

  15. #15
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is so complicated lol i dont know how you guys do this XD. I am so confused.

  16. #16
    Join Date
    Feb 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    So is everything i did wrong because all i wanted is for the script to fish lobsters than drop.....

  17. #17
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    well everything was fixed for u above by riwu. now u have to finish the script (main loop).

  18. #18
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Your script is a bit primitive in that it has no failsafes really. Also you shouldn't SetupSPS in a function like that.
    SetupSPS after SetupSRL; That way it doesn't keep setting up if you placed that function in a loop.

    To use Simba tags type [ Simba] Place your code here.. then type [/Simba ]. Remove the Spaces inbetween the Simba brackets. These are BBCodes.

    Simba Code:
    procedure Cage;
    var x, y: integer;
    begin
      repeat                //u need a repeat if u want to do a loop
        if FindObj(x, y,'in',8482403, 10) then //This will have the script find an object of your choice
        begin
          Mouse(x, y, 0, 0, true);
          ChooseOption('ine');
          wait(1500+random(1000)); // This will make the script wait for a certain time
        end;                //and a end if u have a begin
      until (InvFull);
    end;

    procedure WalkToBank;
    var
      ToBank: TPointArray;   //declare ur variables
    begin
      if (InvFull) then
      begin
        ToBank := [Point(253, 153), Point(184, 161)];
        SPS_WalkPath(ToBank);
      end;
    end;

    procedure BankRawLobster;
    begin
      WriteLn('Looking for bank.'); // Writes in the Debug Box
      if FindBank('vwb') then // Finds the bank
      begin
        WriteLn('We have found the bank.');
        if OpenBank('vwb', False, True) then // Opens the bank
        begin
          WriteLn('Proceeding to bank Lobs');
          DepositAll; // Deposits All items in Inventory
          CloseBank; // Closes the bankscreen
          WriteLn('Banking completed. Proceeding to Rest.');
          RestUntil(100); // Rests character
        end;
      end;
    end;

    begin
    Smart_Server := 1;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      SPS_Setup(RUNESCAPE_SURFACE, ['0_0']);
      DeclarePlayers;
      LogInPlayer;

      Repeat
        //Place all the functions you want to run over and over here.. This is known as the main loop.
        Cage;
        WalkToBank;
        BankRawLobster;
      Until(AllPlayersInActive);
    end.
    I am Ggzz..
    Hackintosher

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
  •