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

Thread: Guide on the Many Statements in Simba!

  1. #1
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default Guide on the Many Statements in Simba!

    Guide on the Many Statements in Simba!
    For Beginners to Intermediates.

    To understand this tutorial, you need to understand English, decently, as well as have some simple Simba scripting knowledge and some heavier for the later examples.

    2. Table of Contents:

    This is a large tutorial. To find something specific please use Ctrl + F or the Search Tutorial button at the top.


    1. Introduction
    2. Table of Contents
    3. Simba Basics
    4. Conditions
      • General Rules
      • Boolean Variables
      • Integer Checks
      • String Checks
    5. If..Then..Else Statements
      • Breakdown of the Statement
      • Examples
    6. Cases
      • Breakdown of the Statement
      • Uses
      • Why use a case?
      • Examples
    7. Loops
      • Different Types of Loops
      • Repeat..Until Loops
        • Breakdown of the Statement
        • Examples
      • While..do Loops
        • Breakdown of the Statement
        • Examples
      • For..to..do Loops
        • Breakdown of the Statement
        • Examples
    8. Conclusion
    9. Useful Links
    10. Acknowledgements


    3. Simba Basics:

    Well, I said you needed to know some basics, here is what I will be using and won't be taught. You need to know what everything listed is:

    Simba Code:
    begin
    end;

    var

    Integer
    String
    Boolean
    Extended

    //Symbols:
    = + - > < <> , ;
    If anything listed above is confusing to you, please read other tutorials before continuing with this one.

    4. Conditions:

    In this tutorial, I will use three different conditions which always are Booleans. They are:
    1. Boolean variables
    2. Integer checks
    3. String checks


    General Rules:

    If you use a condition which is a combination of several conditions, it is much better practice to put the more Computer Intensive condition first in the series. This is due to a system known as short-circuit evaluation. A series of conditions is something like:
    Simba Code:
    (FindColor(x, y, 65536) or (GetColor(x, y) = 0) and (z = 10))

    Notice how I placed the most Computer Intensive function first, FindColor, then I placed GetColor and finally an integer check (more on these later).

    Boolean Variables:


    These are very easy to understand. This is because any condition is actually a boolean, so when you use an actual boolean variable, it just eliminates the thinking. Although, this can be harder. When using a function like IsUpText(Text: string): boolean you need to treat it as a variable. It sets itself as true or false and Simba will read it as a variable.

    Integer Checks:

    A harder boolean . Integer checks are math, they use things like =, >, <, and <>. Any math function is either true or false. Something like: 1 + 1 = 2, would be true; but 1 + 1 = 3 would be false. Using this thinking we can set up conditions to create true and false answers.

    String Checks:

    String checks are even harder conditions. They use things like = and <> but they also have many other harder parts.

    With strings, one must remember that they ARE case-sensitive when used as a condition. There are some very handy built-in Simba functions to help us beat this problem. String functions are listed on this page: http://docs.villavu.com/simba/scriptref/string.html. The documentation is fairly incomplete, please feel free to contribute or ask questions.

    Several of the functions are self explanatory. The most used are: Lowercase, Uppercase, and Pos. Lowercase and Uppercase simply make it so that the scripter does not have to worry about Case changes in the string. Pos is a very helpful text function, although sometimes hard to understand.

    Pos searches in the inputted string for another string. If it finds it, it returns the number of characters from the left which the string is found inside the string, 0 being not found at all. This is helpful in using if..then..else statements because it easily can tell you whether a string is in another and can be called like so:
    Simba Code:
    if (Pos(str, str2) <> 0) then

    If you need more explanation on the previous, please, feel free to ask. I apologize for the brevity.

    5. If..Then..Else Statements:

    If..Then..Else statements are the core to any script. They are the building block of a good fail-safe-filled script. They, simply put, tell the script to check if one thing occurs, if it does then preform this action, if it does not, then preform a different one. The actual condition of the statement must return a boolean. Now, any integer check can return a boolean, as well as any boolean-returning function. As this is an easier statement to understand, I will directly move into the examples.

    Breakdown of the Statement:

    IF (Condition) THEN
    begin
    Action1
    end ELSE
    begin
    Action2;
    end;

    IF: The beginning…
    (Condition): The boolean condition which declares whether Action1 is run.
    THEN: then Final or Middle part of this statement.
    Action1: The Action which is completed if the condition is as the user set it.
    ELSE: Final part, used if scripter would like to use an alternative to Action1 aka Action2.
    Action2: Self explanatory.

    Examples:

    Using different types of conditions, all of which are still booleans.
    Simba Code:
    procedure IfThenElseStatements;
    var
      i : integer;
      str : string;
      Bool : boolean;
    begin
      i := 5;
      if (i = 5) then
      begin
        Writeln('i = 5!');
      end else
      begin
        Writeln('i <> 5');
      end;
     
      Bool := false;
      if not(bool = false) then
        Writeln('bool is true!')
      else
        Writeln('bool is false!');
      str := 'I like big buttox!';
      if (str = 'I like big buttox!') then
        Writeln('He likes big buttox!')
      else
        Writeln('He doesn''t like big buttox.');
    end;

    Now, there was a lot thrown into that. Lets break down these examples.

    After every If..Then you must have a begin, IF there is more than one line to the action which you are doing. So although this is correct:
    Simba Code:
    if (i = 5) then
      begin
        Writeln('i = 5!');
      end else
      begin
        Writeln('i <> 5');
      end;
    This is better because it uses up fewer lines making it a smaller file size as well as easier to read:
    Simba Code:
    if (i = 5) then
        Writeln('i = 5!')
      else
        Writeln('i <> 5');
    NOTE: You must remember to not put a ; after the first line if you are including an else part, and you must put one after the last part of your If..Then..Else statement.

    6. Cases:

    After a length explaination of If..Then..Else statements, here is a much smaller read, but even more useful statement in Simba. Cases are used to replace things like this long and confusing code:
    Simba Code:
    begin
      if Lowercase(Str) = 'apple' then
        Writeln('apple');
      if Lowercase(Str) = 'orange' then
        Writeln('orange');
      if Lowercase(Str) = 'pear' then
        Writeln('pear');
      if Lowercase(Str) = 'grape' then
        Writeln('grape');
      if Lowercase(Str) = 'banana' then
        Writeln('banana');
      if Lowercase(Str) = 'cumquat' then
        Writeln('cumquat');
      if Lowercase(Str) = 'blueberry' then
        Writeln('blueberry');
    end;
    With a much easier and simpler to read:
    Simba Code:
    begin
      case Lowercase(str) of
        'apple': Writeln('apple');
        'orange': begin
                    Writeln('orange');
                  end;
        'pear': Writeln('pear');
        'grape': Writeln('grape');
        'cumquat': Writeln('cumquat');
        'banana': Writeln('banana')
        'blueberry': Writeln('blueberry');
        else
          Writeln('Not one of the regular fruits! :)');
      end;
    end;
    Cool right? Super hard? No, not really!

    Note: the latter case could be replaced with: WriteLn(Lowercase(str));

    Breakdown of Statement:

    CASE (Condition) OF

    Option1:
    Action1;
    Option2:
    Action2;
    ELSE
    Action3;
    END;

    CASE: Declares the statement.
    (Condition): The boolean condition which declares whether an Action is run.
    OF: Finishes declaration of statement.
    Option: Options which the case can be true for.
    ELSE: Failsafe, completes action after it if none of the Options are met.
    END;: Ends the entire statement.

    Why Use a Case?

    Frankly, the answer is simple, clean code and versatility. Cases allow you to place many options in fewer lines with more options to use! In our example, we had seven different fruits, and if it wasn’t any of them, the if statements would do NO action. With the case statement, not only does it look nicer, easier to read, it gave us an ELSE option. This ELSE option allows the function to do an action if the condition isn’t true with ANY of the options in the case. This is very useful.

    Examples:

    Here is an example of a Random Integer case which is the most common case it seems used in anti-ban procedures.
    Simba Code:
    procedure RandomIntegerCase;

    begin
      case Random(10) of
        0: Writeln('Hi');
        1: Writeln('G''bye.');
        2, 3, 4, 5: Writeln('Nava2 is a cool cat!');
        6..9: Writeln('I''m a poopy poop! ;)');
      end;
    end;

    Okay, easy enough. There are a few new things in there. One, its with integers which are no different. Two, it uses ‘,’s and ‘..’s! Both of these are very useful. Now, with using ,’s you can tell a script to do the same thing if two different answers come up. The ‘..’ is the same thing, only instead of writing out every number in between the first and second numbers, you can use the ‘..’ for it. So, 6..9 is really 6, 7, 8, 9! Also, although rarely useful, the .. can be used in such things as A..z meaning from Capital A to lowercase z. In other words, any character (remember characters are just smaller integers)!

    For more information or different information please check the Useful Links Section.

    7. Loops:

    Loops are a key part of any script written for RuneScape as well as any for another program. In Simba, we have several different types of loops they are:
    • repeat..until
    • while..do
    • for..to..do


    Repeat loops are the simplest kind of loops, and in being so, are considered rather simple to use as well as less useful. (Sorry if that was redundant) While..Do loops are the same as repeat loops, only set up differently. For..To..Do loops are extremely useful for both simple functions, to advanced functions.

    It is important to remember, that with ALL LOOPS, they will continue till they are done if they are not told to stop. That is why they are called Loops, they repeat.

    Control Commands:

    While we are in a loop, we can use several Loop Specific commands. They are:
    • Continue;
    • Break;
    • Exit;


    First off, Continue;. Continue is a relatively useful command, when you need it. When called, it will force a loop to return to the beginning of the loop and continue through.

    Secondly, Break;. Break; is the most useful Loop command. It, as you might think, breaks out of the loop. When called it will stop the loop, not do anything else in the loop, and continue with the script.

    Lastly, Exit;. Exit; is not Loop Specific, but I mention it here so people are not confused. Exit; will stop the ENTIRE function where it is and move on in the script. It will exit the loop and the running function itself.

    Repeat..Until Loops:


    Breakdown of Statement:

    REPEAT
    Action;
    UNTIL (Conditions);

    REPEAT: The beginning of the loop
    Action: The action(s) to be completed every time the loop is repeated.
    UNTIL: The end of the loop
    (Conditions): The conditions which will end a loop when met at the end of running the Action

    The Repeat..Until loop is the most common loop used in Simba scripting. It lets a loop progress until the conditions are met.

    Here is an example of a Repeat..Until Loop:
    Simba Code:
    a := Seconds * 100;
    repeat
      Wait(a);
      Inc(b);
    until (b = 10);

    In the example, you can see the script waits for a certain amount of time and each time it Increases the variable b. When b is 10, the script will stop the loop and continue through the script.

    Note: Inc(var x: integer); is a faster way of doing x := x + 1.

    While..Do Loops:

    Breakdown of the Statement:

    WHILE Negative(Condition) DO
    begin
    Action;
    end;

    WHILE: Begins statement.
    (Condition): This is just like any other condition but it must be NEGATIVE to what you want. So, if you want the loop to break when the condition is true you would put: not(true).
    DO: Ends statement.
    Action: action to do while the condition is still true.

    The While..Do loop could be considered more advanced thatn that of the Repeat..Until. It is far from necessary in scripts, but can be useful. The biggest difference in the loops is that it checks that the condition at the beginning of Loop is still true as compared to at the end of the loop. Small difference, but it means that if the condition isn’t true when the loop is first called, then the loop won’t run at all. (Thanks Metagen for clearing a bit of that up for me)

    Example:

    Simba Code:
    begin
      while (z <> 10) do
        Inc(z);
    end;

    This just shows the negative at work in the condition. You must remember, with a while statement, if you are doing more than one action after the statement, you need a begin and an end.

    For..To..Do Loops:

    For..To..Do Loops are a little more complicated than the previous. The For..To..Do loop increases the inputted variable by one each time at the beginning of the loop. They are extremely useful when using arrays, as well as when just counting how many loops to run though. WARNING: THERE ARE SOME ADVANCED EXAMPLES HERE.

    Breakdown of the Statement:

    FOR (Start Integer/Var Assignment) TO (Final Integer) DO
    begin
    Action;
    end;

    FOR: Begins statement
    (Start Integer/Var Assignment): Integer to start counting from, must be a variable assigned. Example:
    Simba Code:
    i := 0
    TO: Statement Part saying the loop will count upwards, can be changed to DownTo, which will count downwards.
    (Final Integer): When your variable assigned in the start integer reaches this number, the loop will continue on but at the end of the actions the loop will end.
    DO: End of statement.
    Action;: Action to complete on each cycle through the loop.

    The For..To..Do statement is the most useful loop in my opinion. It is used in every TPA function as well as in general other functions. For this section, I’m going to show examples and explain them.

    Examples:

    Simba Code:
    for i := 0 to 10 do
    begin
      WriteLn(IntToStr(i));
      if (GetColor(x, y) = 0) then
        Break;
    end;

    Here, I have had the script WriteLn the variable i every time the loop repeats. Although the if statement is probably useless, it will check if (x, y) is black, if it is, then the loop will break. Remember, with for..to..do statements, the variable is increased by one each time. The equivalent repeat..until loop is the following:
    Simba Code:
    i := 0;
    repeat
      Writeln(IntToStr(i));
      Inc(i);
      if (GetColor(x, y) = 0) then
        Break;
    Until (i = 10);

    The for..to..do statement works the same as the previous function, but faster and cleaner.

    Now for a more complex example, a TPA function! .
    Simba Code:
    Function TreeDown: Boolean;
    var
      colors1 : TPointArray;
      colors2 : TIntegerArray;
    begin
      if Not LoggedIn then Exit;
      Wait(RandomRange(50, 650));
      FindColorsSpiralTolerance(x, y, colors1, treecolor, MSx1, MSy1, MSx2, MSy2, 10);

      for i := 0 to High(Colors1) do
        Colors2[i] := GetColor(Colors1[i].x, Colors1[i].y);
     
      repeat
        Wait(100+random(25));
        for i := 0 to High(Colors1) do
          if (not(Colors2[i] = GetColor(Colors1[i].x, Colors1[i].y)) )then
          begin
            result := true;
            break;
          end;
      until result;
      if (Result) then WriteLn('Tree down.');
    end;

    This was a function I wrote for IllKillTill; for his new woodcutter. Now, I am unsure if it works, but it is simple and a good example of loops. Now, assuming that you have knowledge of arrays, you can see that the For..To..Do loop runs through each piece of the array Colors2 getting the color with its corresponding TPoint. Using a loop is a lot faster than doing Colors2[0] := GetColor(Colors1[0].x, Colors1[0].y); and then rewriting it for each number. Would take ages to write out as well, it uses mass amounts of code.

    8. Conclusion:

    Well, this has been my longest and most intensive guide. I hope that you learned a lot about a lot of things or a lot about a few things. Either way, please feel free to message me on IRC (navatwo), post here, or message me via PM if you have further questions!

    9. Useful Links:

    Note: May be outdated.

    Great Beginners Guide to SCAR:
    A brief tutorial on scar. ~ by i pro leechin’
    Note: May be outdated, most logic will apply to Simba, as well.

    A Guide I use just too much:
    A brief lesson on fixing annoying errors :P ~ by JAD

    A less in-depth guide on a similar topic:
    A lesson on If-then's, For, While, and Cases! ~ by The[Cheese]


    10. Acknowledgements:

    Bullzeye95: Old Unofficial editor of my scripts/anything I write for Simba scripting.
    Metagen: Firmed up some facts!

    Thanks for reading!
    Last edited by Nava2; 11-07-2011 at 05:59 AM. Reason: removed some scary things..
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  2. #2
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Holey ****!

    Nice tut!

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

    Default

    Great tut! for beginners!

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Any suggestions?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Jun 2008
    Posts
    0
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    great tuto

  6. #6
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Add math and boolean statements please.

    e.g. Mod, Xor, etc.


    Great tut by the way.

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by lordsaturn View Post
    Add math and boolean statements please.

    e.g. Mod, Xor, etc.


    Great tut by the way.
    I mentioned booleans, everything I mentioned revolves around them. But, I think I might add in the math part. Although, I did say that it is assumed you know the basic maths.

    Also, Xor is hard to explain as a beginner.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  8. #8
    Join Date
    Aug 2008
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for your hardworking , It's great one ^^

  9. #9
    Join Date
    Mar 2007
    Posts
    1,700
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    I mentioned booleans, everything I mentioned revolves around them. But, I think I might add in the math part. Although, I did say that it is assumed you know the basic maths.

    Also, Xor is hard to explain as a beginner.

    Just a suggestion, because you asked for them.

  10. #10
    Join Date
    Apr 2007
    Location
    Laguna Beach, California
    Posts
    231
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great beginner tut... detailed but simple
    Check out my SVC - here - It got me a scipters cup

  11. #11
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by lordsaturn View Post
    Just a suggestion, because you asked for them.
    I didn't mean to shoot it down. I will add that actually, I just need to get up the motive.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  12. #12
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Small typo.

    Bool := false;
    if not(bool = false) then
    Writeln('bool is true!')
    else
    Writeln('bool is true!');


  13. #13
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Xor isn't that hard it will check if one side of the statement is true e.g.
    SCAR Code:
    run = true Xor run1 = false; xor results true;
    run = false Xor run1 = true; xor results true;
    run = true Xor run1 = true; xor results false //as no side is 'true'
    run = false Xor run1 = false; xor results false //as no side is 'true'

    But anyway good job.

  14. #14
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Xor isn't that hard it will check if one side of the statement is true e.g.
    SCAR Code:
    run = true Xor run1 = false; xor results true;
    run = false Xor run1 = true; xor results true;
    run = true Xor run1 = true; xor results false //as no side is 'true'
    run = false Xor run1 = false; xor results false //as no side is 'true'

    But anyway good job.
    Your code there is confusing. But, all it does is make sure that ONLY one of the specified conditions is true, correct?

    Quote Originally Posted by tarajunky View Post
    Small typo.

    SCAR Code:
    Bool := false;
      if not(bool = false) then
        Writeln('bool is true!')
      else
        Writeln('bool is true!');
    Whoops, is it obvious I copy and pasted a bit?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  15. #15
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Yes thats all it does, It's used in 'SetRun' which is pretty efficient .

  16. #16
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Yes thats all it does, It's used in 'SetRun' which is pretty efficient .
    Hmm, I might do a tutorial on math in scar. SIMPLE math. :P. I'm no good with trig functions, and when to apply them. I know trig well, just not how it gets applied here.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  17. #17
    Join Date
    Dec 2007
    Location
    New Zealand
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    A really handy one I use all the time is forwarding, Had a quick scan through but didn't see it in there

    Otherwise that's really good, when I first started I had trouble with all the Pascal statements.

    Thanks to SonsOfSheep for the Great Siggy ^^


  18. #18
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Meh.. Xor isn't really necessary to know o.O
    Verrekte Koekwous

  19. #19
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by mastaraymond View Post
    Meh.. Xor isn't really necessary to know o.O
    Yeah, honestly, I have never used it . It just kinda makes a function longer, IMO, I haven't found a really good use for it.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  20. #20
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Yeah, honestly, I have never used it . It just kinda makes a function longer, IMO, I haven't found a really good use for it.

    Meh.. I learned it from Raymond, just nice to know.

  21. #21
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I even have xor in a science book and still dont know what it means.

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  22. #22
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Xor returns true if the 2 booleans are different.

    Like
    SCAR Code:
    True xor False = true
     true xor true = false
     false xor true = true
     false xor false = false
    ~Hermen

  23. #23
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Yes, now, how would you go about using that for three different things etc. There is a way.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  24. #24
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    So.. when did this get stickied.. :<
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  25. #25
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    So.. when did this get stickied.. :<
    When we started moving the tuts around probably... Why the sad face? Do you want it unstickied?

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)

Similar Threads

  1. if then statements
    By Bobzilla69 in forum Java Help and Tutorials
    Replies: 9
    Last Post: 06-11-2008, 11:52 AM
  2. For DownTo / To Do [Statements]
    By Special Ed in forum Outdated Tutorials
    Replies: 7
    Last Post: 12-26-2007, 06:33 AM
  3. If statements
    By Its Miller Time in forum OSR Help
    Replies: 2
    Last Post: 06-08-2007, 06:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •