Results 1 to 15 of 15

Thread: Hey, Can you Check this code ?

  1. #1
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Hey, Can you Check this code ?

    Hey, So does this check all Randoms ? Or does it Check one random and then fucks up ?

    I need to know does this check all randoms, like boxes and stuff
    ( SRL is still new to me, but i'm LEARNING )

    SCAR Code:
    procedure FindRandoms;
    begin

     if (not(LoggedIn)) then
      Exit;
     if InBlack then
     begin
      Players[CurrentPlayer].loc:='InBlack';
      Logout;
      Exit;
     end;
     Wait(1);
     if NoGameTab then
     begin
      Players[CurrentPlayer].loc:='GameTab';
      begin
       if (FindBeeKeeper) then
        BKSetup;
       if (BeeKeeper) then
       begin
        Exit
       end;
       Players[CurrentPlayer].loc:=
        'No GameTab';
       Logout;
       Exit;
      end;
      FindNormalRandoms;
     end;
    end;

  2. #2
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It'll check one then "fuck up", as you said.

    Use else statements.
    I guess the holidays are over - no sig for now.

  3. #3
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Thanks Man ! I write other code later on night, when my Gf ( Lovely Vilma) Is sleeping

    Now going out for buying some ( Something )

    EDIT: Can you fix it.. I am kinda.. Uhm.. Please if you can !


    Your Friend,

    ~Home

    P.S Sorry about that " Fuck Up " i didn't mean it in any bad way

  4. #4
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nevermind, I just realized what you wanted the script to do. YOu only missed one part, and I fixed that for you. If I'm not wrong again, you want it to check all of them, not use else, right? But I haven't optimized the code, sorry. I think if someone had the time, else would be a much better choice, maybe even case. But this'll work.

    SCAR Code:
    procedure FindRandoms;
    begin
     
     if (not(LoggedIn)) then
      Exit;
     if InBlack then
     begin
      Players[CurrentPlayer].loc:='InBlack';
      Logout;
      Exit;
     end;
     if NoGameTab then
     begin
      Players[CurrentPlayer].loc:='GameTab';
      begin
       if (FindBeeKeeper) then
        begin
         BKSetup;
         if (BeeKeeper) then
         Exit
        end;
       Players[CurrentPlayer].loc:=
        'No GameTab';
       Logout;
       Exit;
      end;
      FindNormalRandoms;
     end;
    end;
    I guess the holidays are over - no sig for now.

  5. #5
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Here View Post
    It'll check one then "fuck up", as you said.

    Use else statements.
    It doesn't mess up at all, seems fine to me?

  6. #6
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    But it won't check them all :/

    EDIT; Will it check FindNormalRandoms; because some people says it won't solve some stuff :/.. So am i wrong :/

  7. #7
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    It doesn't mess up at all, seems fine to me?
    Check the post above yours. I realized that, to my idiocy.
    I guess the holidays are over - no sig for now.

  8. #8
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, I think this is a little off topic, but I have a quick question about my findrandoms procedure

    SCAR Code:
    Procedure NoRan;
      Begin
        FindFastRandoms;
        FindNormalRandoms;
      End;

    I have WT-Fakawi's FindFastRandoms function earlier on in my script.

    Will this only check if randoms are there, or will this react to the randoms by running away? If It doesn't, then should I do this;

    SCAR Code:
    Procedure NoRan;
      Begin
        If (FindFastRandoms) then
          Begin
            RunAway(RandomDir);
            Wait(2000+random(3000));
            RunBack;
          End;
        FindNormalRandoms;
      End;


    BTW, here is my RandomDir func;
    SCAR Code:
    Function RandomDir: String;
      Begin
        Case (random(4)) of;
          0: Result:='n';
          1: Result:='s';
          2: Result:='e';
          3: Result:='w';
        End;
      End;
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  9. #9
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Why would you run away if you find a random? It'll just follow you.

    If(FindFight)then...

    But I believe FindFastRandoms already does that?
    Interested in C# and Electrical Engineering? This might interest you.

  10. #10
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Then would I log out? What would I do if findfastrandoms is true?
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  11. #11
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Make a sound go off ? Ring bells ? Write in the debug ? Nothing special ..
    Administrator's Warning:


  12. #12
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sumilion View Post
    Make a sound go off ? Ring bells ? Write in the debug ? Nothing special ..
    I thought it would make Mickey Mouse dance all over the screen shouting "I FOUND A RANDOM!"
    I guess the holidays are over - no sig for now.

  13. #13
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ugh, I don't think I'm being very clear (My fault).
    Here's what I'm trying to say; How would you use an antirandom's procedure?
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  14. #14
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rotflmfwao View Post
    ugh, I don't think I'm being very clear (My fault).
    Here's what I'm trying to say; How would you use an antirandom's procedure?
    When you use an anti-random procedure like FindFastRandoms OR FindNormalRandoms, it will, either a: Find a talking random, and RESPOND, or b: find a fighting random and RUN AWAY. There is no need for other code, you just need FindFastRandoms, and FindNormalRandoms. But make sure to call them often!

  15. #15
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Home View Post
    Hey, So does this check all Randoms ? Or does it Check one random and then fucks up ?

    I need to know does this check all randoms, like boxes and stuff
    ( SRL is still new to me, but i'm LEARNING )

    SCAR Code:
    procedure FindRandoms;
    begin

     if (not(LoggedIn)) then
      Exit;
     if InBlack then
     begin
      Players[CurrentPlayer].loc:='InBlack';
      Logout;
      Exit;
     end;
     Wait(1);
     if NoGameTab then
     begin
      Players[CurrentPlayer].loc:='GameTab';
      begin
       if (FindBeeKeeper) then
        BKSetup;
       if (BeeKeeper) then
       begin
        Exit
       end;
       Players[CurrentPlayer].loc:=
        'No GameTab';
       Logout;
       Exit;
      end;
      FindNormalRandoms;
     end;
    end;
    Looked fine to me, and then I was assured when Wizzup said so.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do you code?
    By Wrycu in forum C/C++ Help and Tutorials
    Replies: 17
    Last Post: 10-27-2008, 02:10 PM
  2. What is the code...
    By Boonce in forum OSR Help
    Replies: 13
    Last Post: 01-13-2008, 01:38 PM
  3. Code Box
    By Bam Bam in forum News and General
    Replies: 2
    Last Post: 08-15-2006, 10:45 AM

Posting Permissions

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