Results 1 to 10 of 10

Thread: If statements not working?

  1. #1
    Join Date
    Jun 2012
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default If statements not working?

    So i've been working on an auto alcher, and i've finished (for the most part) my multi-item alching part. In my Multi_Alch part, you'll notice an if statement that determines if the ALCH_STACKED is true or false, but even when i change ALCH_STACKED to true it still uses the procedure. I've added a statement in execute that determines it there using
    Else;

    but it gives me an identifier error like pascal does not use Else;
    Please help, here is my code (Note that i've changed a great deal to make it non-functioning, so that 12 year olds cant copy it and claim it's theirs.)
    Code:
    program Lukes_KickAss_Alcher;
    //*********************************************************************************//
    //                                                                                 //
    //                                                                                 //
    //                    WELCOME TO LUKE'S KICK ASS ALCHER!                           //
    //                 Made by Fredbear/RSisDead(Simba username)                       //
    //                     1. Fill out the setup                                       //
    //                     2. Hit "Run"!                                               //
    //                     3. Enjoy!                                                   //
    //                                                                                 //
    //                                                                                 //
    //*********************************************************************************//
    
      Alch_Count :extended;
    
    const
     ALCH_STACKED = True;  // If the item you are alching is stacked (I.E arrows, bolts etc,) change this to true!
      // If you are using a stacked item, place it in your second inventory slot, the first being your nature runes.
     NUMBER_OF_ALCHS = 500;  // Set this to the number of alchs you plan on casting (This prevents you from alching your santa hat.)
    
    procedure DeclarePlayers;
    begin
    
      HowManyPlayers := 1;   // Set this to one if you are not sure what you are doing.
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';       // Put your username in between the ''
      Players[0].Pass := '';         // Put your password in between the ''
      Players[0].Nick := '';
      Players[0].Member := True;    // Are you a member?
      Players[0].Active := True;
      Players[0].Pin := '';        // Put your pin in between the ''
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence']
      end;
    
      // Leave the rest of this alone unless you know what you are doing!
    Function Is_Done :boolean;
    begin
    if NUMBER_OF_ALCHS = Alch_count then;
    LogOut;
    Wait(randomrange(400, 500));
    TerminateScript;
    end;
    
    Function Banking :boolean;
    begin;
    Writeln('Banking...');
    ActivateClient;
    MakeCompass('E');
    SetAngle(SRL_ANGLE_HIGH);
    Mouse(251, 83, 0, 0, false);
    Wait(randomrange(800, 850));
    Mouse(238, 127, 0, 0, true);
    Wait(randomrange(800, 850));
    Mouse(51, 107, 2, 3, false);
    Wait(randomrange(800, 850));
    Mouse(85, 184, 0, 0, true);
    Wait(randomrange(800, 850));
    Mouse(489, 35, 1, 1, true);
    Wait(randomrange(800, 850));
    end;
    procedure Alch_Multislot;
    begin
    if ALCH_STACKED = False then;
    if Alch_Count < NUMBER_OF_ALCHS then;
    wait(100);
    MakeCompass('E');
    SetAngle(SRL_ANGLE_HIGH);
    Writeln('Alching...');
    Mouse(747, 189, 2, 2, true);
    Mouse(784, 190, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(571, 375, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(611, 226, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Mouse(565, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(662, 221, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(703, 228, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(576, 257, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(616, 265, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(656, 262, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(706, 268, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(580, 297, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(622, 297, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(657, 299, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(566, 377, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(698, 303, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(569, 341, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(627, 330, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(668, 331, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(702, 342, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(573, 370, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(624, 369, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(653, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(707, 373, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(574, 414, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(621, 407, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(656, 408, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(698, 408, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(573, 447, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(620, 439, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(660, 439, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(577, 368, 2, 2, true);
    wait(randomrange(400, 500));
    Mouse(702, 447, 2, 2, true);
    wait(randomrange(400, 500));
    Is_Done;
    Wait(200);
    Banking;
    Wait(randomrange(2000, 2200));
    Alch_Multislot;
    end;
    Procedure Alch_Singleslot;
    begin;
    If ALCH_STACKED = True then;
    Mouse(748, 187, 3, 3, true);
    Wait(randomrange(400, 500));
    Mouse(577, 376, 3, 4, true);
    wait(randomrange(400, 500));
    Mouse(613, 232, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Alch_Singleslot;
    end;
    Function Execute :Integer;
        begin
        smart_server := 91;
        smart_members := false;
        smart_signed :=true;
        smart_superdetail := false;
        SetupSRL;
        DeclarePlayers;
        LoginPlayer;
          end;
    
    begin
    Execute;
    end.

  2. #2
    Join Date
    Jun 2012
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've figured that part out, i needed the () around the condition, but it still isnt working. I'm using begin;, and the appropriate amount of end;'s. hmmmm.....

  3. #3
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    After your if alch stacked = false; you need to add a begin and somewhere an end. If you don't then it only affects the line directly after it. The way you have it right now since your if then isn't true then it doesn't perform the next line but performs all lines after.

    If X Then
    do blah blah blah

    but if you want the rest of it to be dependent you need

    If x Then
    Begin
    Do Blah
    Do Blah2
    Do Blah3
    end

    make sense?

  4. #4
    Join Date
    Jun 2012
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, now i have new problem
    So i took Alch_Multislot out of Execute, and instead in Alch_Singleslot i did this:
    Code:
    Procedure Alch_Singleslot;
    begin;
    If (ALCH_STACKED) = True then;
    begin;
    Mouse(748, 187, 3, 3, true);
    Wait(randomrange(400, 500));
    Mouse(577, 376, 3, 4, true);
    wait(randomrange(400, 500));
    Mouse(613, 232, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Alch_Singleslot;
    end else
    begin;
    Alch_Multislot;
    end;
    end;
    But it gives me an identifier error for end else even though it should work.

  5. #5
    Join Date
    Jul 2010
    Posts
    1,115
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by RSisDead View Post
    Yeah, now i have new problem
    So i took Alch_Multislot out of Execute, and instead in Alch_Singleslot i did this:
    Code:
    Procedure Alch_Singleslot;
    begin;
    If (ALCH_STACKED) = True then;
    begin;
    Mouse(748, 187, 3, 3, true);
    Wait(randomrange(400, 500));
    Mouse(577, 376, 3, 4, true);
    wait(randomrange(400, 500));
    Mouse(613, 232, 2, 2, true);
    Alch_Count:=Alch_Count+1;
    wait(randomrange(400, 500));
    Alch_Singleslot;
    end else
    begin;
    Alch_Multislot;
    end;
    end;
    But it gives me an identifier error for end else even though it should work.
    Simba Code:
    program Lukes_KickAss_Alcher;
    {$DEFINE SMART}
    {$i SRL\SRL.simba}
    {$i srl\srl\misc\online.simba}
    //*********************************************************************************//
    //                                                                                 //
    //                                                                                 //
    //                    WELCOME TO LUKE'S KICK ASS ALCHER!                           //
    //                 Made by Fredbear/RSisDead(Simba username)                       //
    //                     1. Fill out the setup                                       //
    //                     2. Hit "Run"!                                               //
    //                     3. Enjoy!                                                   //
    //                                                                                 //
    //                                                                                 //
    //*********************************************************************************//
     var
      Alch_Count :extended;

    const
     ALCH_STACKED = True;  // If the item you are alching is stacked (I.E arrows, bolts etc,) change this to true!
      // If you are using a stacked item, place it in your second inventory slot, the first being your nature runes.
     NUMBER_OF_ALCHS = 500;  // Set this to the number of alchs you plan on casting (This prevents you from alching your santa hat.)

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;   // Set this to one if you are not sure what you are doing.
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';       // Put your username in between the ''
      Players[0].Pass := '';         // Put your password in between the ''
      Players[0].Nick := '';
      Players[0].Member := True;    // Are you a member?
      Players[0].Active := True;
      Players[0].Pin := '';        // Put your pin in between the ''
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence']
      end;

      // Leave the rest of this alone unless you know what you are doing!
    Function Is_Done :boolean;
    begin
      if NUMBER_OF_ALCHS = Alch_count then
        LogOut;
      Wait(randomrange(400, 500));
      TerminateScript;
    end;

    Function Banking :boolean;
    begin;
      Writeln('Banking...');
      ActivateClient;
      MakeCompass('E');
      SetAngle(SRL_ANGLE_HIGH);
      Mouse(251, 83, 0, 0, false);
      Wait(randomrange(800, 850));
      Mouse(238, 127, 0, 0, true);
      Wait(randomrange(800, 850));
      Mouse(51, 107, 2, 3, false);
      Wait(randomrange(800, 850));
      Mouse(85, 184, 0, 0, true);
      Wait(randomrange(800, 850));
      Mouse(489, 35, 1, 1, true);
      Wait(randomrange(800, 850));
    end;
    procedure Alch_Multislot;
    begin
      if not ALCH_STACKED then
        if Alch_Count < NUMBER_OF_ALCHS then
          wait(100);
      MakeCompass('E');
      SetAngle(SRL_ANGLE_HIGH);
      Writeln('Alching...');
      Mouse(747, 189, 2, 2, true);
      Mouse(784, 190, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(571, 375, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(611, 226, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(565, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(662, 221, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(703, 228, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(576, 257, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(616, 265, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(656, 262, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(706, 268, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(580, 297, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(622, 297, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(657, 299, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(698, 303, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(569, 341, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(627, 330, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(668, 331, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(702, 342, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(573, 370, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(624, 369, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(653, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(707, 373, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(574, 414, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(621, 407, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(656, 408, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(698, 408, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(573, 447, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(620, 439, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(660, 439, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(702, 447, 2, 2, true);
      wait(randomrange(400, 500));
      Is_Done;
      Wait(200);
      Banking;
      Wait(randomrange(2000, 2200));
      Alch_Multislot;
    end;
    Procedure Alch_Singleslot;
    begin;
      If ALCH_STACKED then
        Mouse(748, 187, 3, 3, true);
      Wait(randomrange(400, 500));
      Mouse(577, 376, 3, 4, true);
      wait(randomrange(400, 500));
      Mouse(613, 232, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Alch_Singleslot;
    end;
    Function Execute :Integer;
    begin
      smart_server := 91;
      smart_members := false;
      smart_signed :=true;
      smart_superdetail := false;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;

    begin
      Execute;
    end.

    I fixed up the first post. you need to fix standards so its easy to read like this. If then statements need a begin right after it if you want to do multiple lines. if the statement is true it would only do the next line otherwise as i showed in the standards. it the line is indented, then it only happens if the above line is true. therefore im assuming you want begin then lots of those lines, then the end; also you dont need the ; after then. if you look at what i did you should see it, if you have more questions/issues ill help if you keep posting them here

  6. #6
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    I suggest you read through some tutorials, because it seems like you don't know how to use the if..then statements.
    http://villavu.com/forum/showthread.php?t=58935 <-- Read through the if..then part of this.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  7. #7
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think it's because of your extra ';' because this compiles.

    Simba Code:
    Procedure Alch_Singleslot;
    begin;
      If (ALCH_STACKED) = True then
      begin
        Mouse(748, 187, 3, 3, true);
        Wait(randomrange(400, 500));
        Mouse(577, 376, 3, 4, true);
        wait(randomrange(400, 500));
        Mouse(613, 232, 2, 2, true);
        Alch_Count:=Alch_Count+1;
        wait(randomrange(400, 500));
        Alch_Singleslot;
      end else
      begin
        Alch_Multislot;
      end;
    end;

  8. #8
    Join Date
    Jun 2012
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bolshak25 View Post
    Simba Code:
    program Lukes_KickAss_Alcher;
    {$DEFINE SMART}
    {$i SRL\SRL.simba}
    {$i srl\srl\misc\online.simba}
    //*********************************************************************************//
    //                                                                                 //
    //                                                                                 //
    //                    WELCOME TO LUKE'S KICK ASS ALCHER!                           //
    //                 Made by Fredbear/RSisDead(Simba username)                       //
    //                     1. Fill out the setup                                       //
    //                     2. Hit "Run"!                                               //
    //                     3. Enjoy!                                                   //
    //                                                                                 //
    //                                                                                 //
    //*********************************************************************************//
     var
      Alch_Count :extended;

    const
     ALCH_STACKED = True;  // If the item you are alching is stacked (I.E arrows, bolts etc,) change this to true!
      // If you are using a stacked item, place it in your second inventory slot, the first being your nature runes.
     NUMBER_OF_ALCHS = 500;  // Set this to the number of alchs you plan on casting (This prevents you from alching your santa hat.)

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;   // Set this to one if you are not sure what you are doing.
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';       // Put your username in between the ''
      Players[0].Pass := '';         // Put your password in between the ''
      Players[0].Nick := '';
      Players[0].Member := True;    // Are you a member?
      Players[0].Active := True;
      Players[0].Pin := '';        // Put your pin in between the ''
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence']
      end;

      // Leave the rest of this alone unless you know what you are doing!
    Function Is_Done :boolean;
    begin
      if NUMBER_OF_ALCHS = Alch_count then
        LogOut;
      Wait(randomrange(400, 500));
      TerminateScript;
    end;

    Function Banking :boolean;
    begin;
      Writeln('Banking...');
      ActivateClient;
      MakeCompass('E');
      SetAngle(SRL_ANGLE_HIGH);
      Mouse(251, 83, 0, 0, false);
      Wait(randomrange(800, 850));
      Mouse(238, 127, 0, 0, true);
      Wait(randomrange(800, 850));
      Mouse(51, 107, 2, 3, false);
      Wait(randomrange(800, 850));
      Mouse(85, 184, 0, 0, true);
      Wait(randomrange(800, 850));
      Mouse(489, 35, 1, 1, true);
      Wait(randomrange(800, 850));
    end;
    procedure Alch_Multislot;
    begin
      if not ALCH_STACKED then
        if Alch_Count < NUMBER_OF_ALCHS then
          wait(100);
      MakeCompass('E');
      SetAngle(SRL_ANGLE_HIGH);
      Writeln('Alching...');
      Mouse(747, 189, 2, 2, true);
      Mouse(784, 190, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(571, 375, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(611, 226, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(565, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(662, 221, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(703, 228, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(576, 257, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(616, 265, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(656, 262, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(706, 268, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(580, 297, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(622, 297, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(657, 299, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(566, 377, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(698, 303, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(569, 341, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(627, 330, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(668, 331, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(702, 342, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(573, 370, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(624, 369, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(653, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(707, 373, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(574, 414, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(621, 407, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(656, 408, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(698, 408, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(573, 447, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(620, 439, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(660, 439, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(577, 368, 2, 2, true);
      wait(randomrange(400, 500));
      Mouse(702, 447, 2, 2, true);
      wait(randomrange(400, 500));
      Is_Done;
      Wait(200);
      Banking;
      Wait(randomrange(2000, 2200));
      Alch_Multislot;
    end;
    Procedure Alch_Singleslot;
    begin;
      If ALCH_STACKED then
        Mouse(748, 187, 3, 3, true);
      Wait(randomrange(400, 500));
      Mouse(577, 376, 3, 4, true);
      wait(randomrange(400, 500));
      Mouse(613, 232, 2, 2, true);
      Alch_Count:=Alch_Count+1;
      wait(randomrange(400, 500));
      Alch_Singleslot;
    end;
    Function Execute :Integer;
    begin
      smart_server := 91;
      smart_members := false;
      smart_signed :=true;
      smart_superdetail := false;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;

    begin
      Execute;
    end.

    I fixed up the first post. you need to fix standards so its easy to read like this. If then statements need a begin right after it if you want to do multiple lines. if the statement is true it would only do the next line otherwise as i showed in the standards. it the line is indented, then it only happens if the above line is true. therefore im assuming you want begin then lots of those lines, then the end; also you dont need the ; after then. if you look at what i did you should see it, if you have more questions/issues ill help if you keep posting them here
    How do i get End Else;
    to work? It's giving me and identifier error...

  9. #9
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by RSisDead View Post
    How do i get End Else;
    to work? It's giving me and identifier error...

    It's because you are using a semicolon after then and begin I believe. Check my post above it compiles

  10. #10
    Join Date
    Jul 2010
    Posts
    1,115
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    just use
    begin
    blah
    blah
    end else
    begin
    blah
    blah
    end

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
  •