Results 1 to 13 of 13

Thread: or, or end else, or... what?

  1. #1
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default or, or end else, or... what?

    well, this is what i'm having a problem with.. this is my procedure..


    Code:
    procedure SelectArmor;
    begin
     if (Gloves = True) then
     begin
      repeat
      Status('Crafting your Gloves.');
      Mouse(315, 264,3,3,False);
      ClickOption('ake 10 pairs of', 1);
      until InChatMulti('have','run out','leather');
    
      or
    
     if (Boots = True) then
     begin
      repeat
      Status('Crafting your Boots.');
      Mouse(440,265,3,3,False);
      ClickOption('ake 10 pairs of', 1);
      until
    
      or
      
     if (Cowl = True) then
     begin
      repeat
      Status('Crafting your Cowl.');
      Mouse(508, 396,3,3,False);
      ClickOption('ake 10 pairs of', 1);
      until InChatMulti('have','run out','leather');
    
      or
      
     if (Vambraces = True) then
     begin
      repeat
      Status('Crafting your Vambraces.');
      Mouse(573, 268,3,3,False);
      ClickOption('ake 10 pairs of', 1);
      until InChatMulti('have','run out','leather');
    
      or
    
     if (Body = True) then
     begin
      repeat
      Status('Crafting your Body.');
      Mouse(198, 265,3,3,False);
      ClickOption('ake 10 pairs of', 1);
      until  InChatMulti('have','run out','leather');
      
    end;
    this is in my const..

    Code:
      Gloves          =     False;
      Boots           =      True;
      Cowl            =     False;// make sure for all these you make the ones
      Vambraces       =     False;// that you arent using false, and other true.
      Body            =     False;

    now, is their a more efficient way to do this? or am i just making it really hard on myself and it's simple..?

    please and thankyou

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well, if theres an SRL command for crafting, I'd make constant for what you want it to craft, then have it click on whatever that constant is. or you could do something like clicktext(WhatYouWantToCraft) IDK if thats even a command 'clicktext' but theres something like that I'm sure. just look around in the SRL manual.

  3. #3
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    alright, i totaly forgot about the skills folder, i'll check it out, but anyone else got any ideas?

  4. #4
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    for if then statements you dont need 'or's
    this should work...
    oh and i dont know if you have alreayd but in the instructions you should put that they should only make 1 true the rest false, or strange things will probably happen

    SCAR Code:
    procedure SelectArmor;
    begin
     if (Gloves = True) then
      begin
       repeat
        Status('Crafting your Gloves.');
        Mouse(315, 264,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Boots = True) then
      begin
       repeat
        Status('Crafting your Boots.');
        Mouse(440,265,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Cowl = True) then
      begin
       repeat
        Status('Crafting your Cowl.');
        Mouse(508, 396,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Vambraces = True) then
      begin
       repeat
        Status('Crafting your Vambraces.');
        Mouse(573, 268,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Body = True) then
      begin
       repeat
        Status('Crafting your Body.');
        Mouse(198, 265,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until  InChatMulti('have','run out','leather');
      end;
    end;
    STOP PM'ING ME

  5. #5
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i did make it, check my const in the first post, after the // it says it.


    thanks a lot hobbit, you always seem to be helping my ass

  6. #6
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    oh i didnt see that

    lol i like helping...it seems im tweeking other peoples scripts mroe than im makign my own...but im fine with that i like helping
    STOP PM'ING ME

  7. #7
    Join Date
    Jan 2007
    Posts
    248
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wasn't quick enough to help you 2day :P

  8. #8
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Thick As Blood View Post
    i did make it, check my const in the first post, after the // it says it.


    thanks a lot hobbit, you always seem to be helping my ass
    yeah and I'm not helping your ass like a english teacher's wife j/k (you probably wouln't get that joke, hobbit will because me and him are burning each other in another topic )

  9. #9
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    i dont even get it....

    thick hows ur tanner goin? did u get the walking back to bank fixeD?
    STOP PM'ING ME

  10. #10
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yea i used a bitmap, to find that damn rock but i kinda dropped that project, and decided to make something that DOSENT walk, like this crafter. it's basicaly done, this procedure just wont work.. the one that you fixed for me hobbit, i have Boots, declared in my const as true, all my other const as false, and it just skips that procedure entirely and continues on to bank agian..

    here's what i have for that procedure..


    Code:
    procedure SelectArmor;
    begin
     if (Gloves = True) then
      begin
       repeat
        Status('Crafting your Gloves.');
        Mouse(315, 264,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Boots = True) then
      begin
       repeat
        Status('Crafting your Boots.');
        Mouse(315, 108,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Cowl = True) then
      begin
       repeat
        Status('Crafting your Cowl.');
        Mouse(508, 396,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Vambraces = True) then
      begin
       repeat
        Status('Crafting your Vambraces.');
        Mouse(573, 268,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end;
     if (Body = True) then
      begin
       repeat
        Status('Crafting your Body.');
        Mouse(198, 265,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until  InChatMulti('have','run out','leather');
      end;
    end;
    this is my entire const.

    Code:
    const
      SoftLeather     =     True; //false if crafting hardleather.
      BankBoothColor  =  5929096;
      Gloves          =     False;
      Boots           =      True;
      Cowl            =     False;// make sure for all these you make the ones
      Vambraces       =     False;// that you arent using false, and other true.
      Body            =     False;

    this is my main loop for now, until i add how many leathers to turn into armor, i dont know how to do that yet.. kkeep in mind guys, i've only been scriping for about 2 weeks..

    Code:
    begin
     SetUpSRL;
     Credits;
     DeclarePlayers;
     MouseSpeed:=12;
    if (not(LoggedIn)) Then
     LoginPlayer;
      repeat
      FindNormalRandoms;
      OpenBanky;
      LeatherSelection;
      AntiBanz;
      Crafty;
      FindNormalRandoms;
      AntiBanz;
      until(false);
    end.

    any help, is appreciated


    Thanks agian

  11. #11
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    i dont see the select armor procedure in the main loop...or is it in the crafty procedure?
    STOP PM'ING ME

  12. #12
    Join Date
    Feb 2006
    Location
    Under a rock.
    Posts
    1,351
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Else statements make it faster..

    Code:
    procedure SelectArmor;
    begin
     if (Gloves = True) then
      begin
       repeat
        Status('Crafting your Gloves.');
        Mouse(315, 264,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end else
     if (Boots = True) then
      begin
       repeat
        Status('Crafting your Boots.');
        Mouse(315, 108,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end else
     if (Cowl = True) then
      begin
       repeat
        Status('Crafting your Cowl.');
        Mouse(508, 396,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end else
     if (Vambraces = True) then
      begin
       repeat
        Status('Crafting your Vambraces.');
        Mouse(573, 268,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until InChatMulti('have','run out','leather');
      end else
     if (Body = True) then
      begin
       repeat
        Status('Crafting your Body.');
        Mouse(198, 265,3,3,False);
        ClickOption('ake 10 pairs of', 1);
       until  InChatMulti('have','run out','leather');
      end else
      begin
        WriteLn('Uhh, not planning on crafting with this script, or what?');
        TerminateScript;
      end;
    end;
    SRL Developer
    ◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘◘

  13. #13
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ahhh thank you very much cheesehunk, that's exactly what i needed, i tried end else, before, but i only had one "begin" at the begining, and i forgot to put them along the other "end else"s in the script.

    i understand how to use end else now, thanks a ton. thanks to all the other people that helped also
    Thick As Blood

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
  •