Results 1 to 3 of 3

Thread: World switch not working correctly or my script is wrong

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default World switch not working correctly or my script is wrong

    So I am trying to get my script to choose a random free or members world or both, so far I am testing out choosing the random free world.

    First, I have all of the worlds declared in arrays

    Simba Code:
    Procedure loadInts;
    begin
     world_free := [3, 7, 8, 11, 13, 17, 19, 20, 29, 33, 34, 38, 41, 43, 57, 61, 80, 81, 108, 120, 135, 136]
     world_members := [1, 2, 4, 5, 6, 9, 10, 12, 14, 15, 16, 18, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 35, 36, 37, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 27, 73, 74, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 96, 97, 98, 99, 100, 103, 104, 105, 106, 114, 115, 116, 117, 119, 123, 124, 134, 137, 138, 139]
     world_both := [3, 7, 8, 11, 13, 17, 19, 20, 29, 33, 34, 38, 41, 43, 57, 61, 80, 81, 108, 120, 135, 136, 1, 2, 4, 5, 6, 9, 10, 12, 14, 15, 16, 18, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 35, 36, 37, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 27, 73, 74, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 96, 97, 98, 99, 100, 103, 104, 105, 106, 114, 115, 116, 117, 119, 123, 124, 134, 137, 138, 139]
    end;

    Next, I have the worlds I want to not logon to in my declare variables procedure:

    Simba Code:
    Procedure DeclareVs;
    begin
     MineTimeout := 10000;    // timeout of mining rock
     Hop_mode := 'free';  // [free], [members], [both], [none]
     World_skip := [3, 7, 8, 11, 13]   // world you don't want to hop to
     player_count := 4; // number of players before hopping
     logout_message := ['to full','to many bots ffs']  // message to say if world is full
     message_odds := 1 // odds of saying the messages above [out of 1000]
     PSX1 := 251;
     PSY1 := 213;
     PSX2 := 264;
     PSY2 := 233;
    end;

    Next, I have my procedure that is supposed to hop worldsbut skip the ones you don't want to logon to)

    Simba Code:
    Case LowerCase(Hop_mode) of
        'free':
        begin
          o := high(world_free)
          k := random(o)
          for j := 0 to high(world_free) do
          begin
            if k = World_skip[v] then
            begin
              v := v+1
            end else
            ChangeWorld(K)
          end;
        end;


    I ran the script and it tried to logon to world 5 (members) and it continuously tries to logon to world 5

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Couldn't you just call,
    Simba Code:
    ChangeWorld(RandomWorld(false, false));

    This should change your world to a random free world, and not use any pvp free worlds.
    At least this is what I understand from your issue of logging into member worlds when trying to hop to random free worlds.

    Cheers
    Lj

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    Couldn't you just call,
    Simba Code:
    ChangeWorld(RandomWorld(false, false));

    This should change your world to a random free world, and not use any pvp free worlds.
    At least this is what I understand from your issue of logging into member worlds when trying to hop to random free worlds.

    Cheers
    Lj
    I also want to filter out high ping worlds though :/

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
  •