Results 1 to 12 of 12

Thread: Emptiest World

  1. #1
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default Emptiest World

    After getting annoyed with using Prisoner's random world procedure (not because of the procedure itself) returning fairly full worlds. With that in mind, I remember seeing a function previously that returned the least populated world, thus I decided to make a function that did the same thing. Now, I have had a look around (tried a search, but it came up with pretty much every script thread and quite a lot of help ones too) and couldn't find it, so it could be the exact same code or it could be completely different, either way all I know is it works So here it is
    SCAR Code:
    function EmptiestWorld(members, prefix: Boolean): string;
    var
      website: string;
    begin
      case members of
        False: website := GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=0&order=MPLAW');
        True: website := GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=0&order=mPLAW');
      end;
      Delete(website, 1, Pos('function e(w,m,s,a,dt,h,p,l) ', website) + 50);
      case prefix of
        False: Result := Between(' e(', ',', website);
        True:
        begin
          Delete(website, 1, Pos('",', website) + 3);
          Result := Between(',"', '",', website);
        end;
      end;
    end;
    members: true for members and false for free world
    prefix: true to return a prefix and false for a world number (depending on if you want to use it with SmartSetup or SmartSetupEx).

    Enjoy! (and if you want to criticise, I have a handy report link in my sig)
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  2. #2
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    awsum!!..rep+ this can come handy!

  3. #3
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this is really cool, but maybe a nice thing you could do is somehow get a random like 1 - 10 emptiest worlds?
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  4. #4
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    function EmptiestWorld(members: Boolean): string;
    var
      i: Integer;
      website: string;
      worlds: array of string;
    begin
      case members of
        False: website := GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=0&order=MPLAW');
        True: website := GetPage('http://www.runescape.com/slj.ws?lores.x=1&plugin=0&order=mPLAW');
      end;
      Delete(website, 1, Pos('function e(w,m,s,a,dt,h,p,l) ', website) + 50);
      while GetArrayLength(worlds) < 10 do
      begin
        SetArrayLength(worlds, GetArrayLength(worlds) + 1);
        Delete(website, 1, Pos('",', website) + 3);
        worlds[GetArrayLength(worlds) - 1] := Between(',"', '",', website);
        Delete(website, 1, Pos('",', website) + 3);
      end;
      Result := worlds[Random(10)];
    end;
    That should work Drizzt, though I thought I might as well take out the world number part as it's much more reliable to use the world prefix anyway and it takes too much effort to code the same thing twice
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  5. #5
    Join Date
    Dec 2007
    Location
    Williston, ND
    Posts
    3,106
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    well this looks pretty good...and I have you rep +, not because of this code, but because you rick rolled me...thanks...
    Proud owner of "Efferator" my totally boted main account!
    "You see, sometimes, science is not a guess" -Xiaobing Zhou (my past physics professor, with heavy Chinese accent)

  6. #6
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Brain View Post
    well this looks pretty good...and I have you rep +, not because of this code, but because you rick rolled me...thanks...
    thats why you look at the links before you click them RickRoll/Rickroll.php should give off some warning signs
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  7. #7
    Join Date
    Dec 2007
    Location
    Williston, ND
    Posts
    3,106
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Yeah I suppose so, but a good rick roll always makes me laugh a little
    Proud owner of "Efferator" my totally boted main account!
    "You see, sometimes, science is not a guess" -Xiaobing Zhou (my past physics professor, with heavy Chinese accent)

  8. #8
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I would've gone for a more complex rick roll link so people who did check it out would still go on it, but I'm lazy and I reckon people would complain too much Anyway, I've gotten 5 people rep me for this in just over a day, which is probably the highest rep to time ratio I've had in a long time and I practically lived in the help section when I first started getting into Scar, which makes this very weird... Ahwell, thanks for the rep anyway
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  9. #9
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Ogod. You own.

    I can use tihs in my skript?
    w´hithh credit åffcorse.

  10. #10
    Join Date
    Apr 2007
    Posts
    994
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice! Would this count toward negative for a srl-member application, because I did not make it myself? Anyway, nice function.

    Btw, how about Report Me Here!!!

    And you rickroll seems to be down. =/
    [QUOTE]<GoF`> oh no its Raymooond
    <Raymooond> Heya
    <GoF`> is it ray or some other ray?
    <LeeLokHin> No idea
    <LeeLokHin> Raymond, what's the game you like the most?
    <Raymooond> Runescape
    <-- LeeLokHin has kicked Raymooond from #srl (Faker.)[/QUOTE]

  11. #11
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Nah his RickRoll worked for me.

    I dotn get the RickRolled though? And I hate you for making me spend 5 minutes trying to click the "X" :P
    Jus' Lurkin'

  12. #12
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I hate you for trying to report me.
    Anyway, @EvilChickin, go for it, I don't mind if you use it
    @leelokhin, it won't count negatively unless you claim ownership of it and get found out. Just make sure you read a couple of tuts about applying for members before you do so you can increae your chance of getting in
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. hello world
    By hello world in forum Who Are You ? Who ? Who ?
    Replies: 10
    Last Post: 02-18-2009, 12:40 AM
  2. Hello world
    By marpis in forum Who Are You ? Who ? Who ?
    Replies: 3
    Last Post: 09-08-2008, 01:33 PM
  3. Why the world is going to end
    By bobng in forum Discussions & Debates
    Replies: 23
    Last Post: 07-14-2008, 04:43 AM
  4. hello world!
    By thewhiteguy in forum Who Are You ? Who ? Who ?
    Replies: 0
    Last Post: 02-03-2007, 05:51 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
  •