Results 1 to 2 of 2

Thread: Random World Procedure

  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Random World Procedure

    There should be a procedure that randomly chooses a random world from either non-members, members or both. This could then be run before a new player logs in, this way there will be no more people reporting macroing who watch 5 players log in and out after long periods of silence.

    The procedure could reload SMART altogether or just change the world from inside the client.

    I'd try to make but I'm struggling to make my first script and don't want to tackle something like this yet.

    Feedback?

  2. #2
    Join Date
    Oct 2007
    Location
    brooklyn, new york
    Posts
    258
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    function RandomWorld(Members, PvP: Boolean): Integer;
    by: Narcle & mixster
    Description: Returns a random world by paramaters.
    *******************************************************************************}

    function RandomWorld(Members, PvP: Boolean): Integer;
    var
      i, H: integer;
      wArray: TWorldArray;
    begin
      if Length(WorldArray) < 1 then
       LoadWorldArrays;
      H := High(WorldArray);
      for i := 0 to H do
        if (WorldArray[i].Members = Members) and (WorldArray[i].PvP = PvP) then
        begin
          SetArrayLength(wArray, Length(wArray)+1);
          wArray[High(wArray)] := WorldArray[i];
        end;
      Result := wArray[random(High(wArray)+1)].Number;
    end;

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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