Results 1 to 4 of 4

Thread: Question about specific world log in

  1. #1
    Join Date
    Nov 2011
    Location
    Puerto Rico
    Posts
    905
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Question about specific world log in

    Is there a way to add to a script so it logs into a specified world and if so would someone be able to tell me what i have to add to the code please and thank you ahead of time.

  2. #2
    Join Date
    Dec 2011
    Location
    Ontario, Canada
    Posts
    1,735
    Mentioned
    5 Post(s)
    Quoted
    89 Post(s)

    Default

    Something like this?:
    Simba Code:
    (*
    SelectWorld
    ~~~~~~~~~~~~~~~

    .. code-block:: pascal

        Function SelectWorld(W: Integer): Boolean;

    Switches to the specified world. Returns true if successful.

    ..note::

        by Narcle & ZephyrsFury

    Example:

    .. code-block:: pascal

    *)

    function SelectWorld(W: integer): boolean;
    var
      x, y, xx, yy, T, CurW: integer;
      WRec: TWorld;
    begin
      if OpenWorldScreen then
      begin
        T := GetSystemTime + 60000;
        Repeat
          Wait(100+random(100));
        until InRange(CountColorTolerance(SRL_WS_ARROWCOLOR, 0, 0, 716, 240, 1), 550, 650) or (GetSystemTime > T);
        if (GetSystemTime > T) then
        begin
          Writeln('World screen did not load after a minute, please refreash.');
          Exit;
        end;
        WS_CurrentWorld(CurW);
        if (W = CurW) then
        begin
          Result := True;
          WriteLn('Already on world ' + IntToStr(W));
          Exit;
        end;

        if FindWorld(W) then
        begin
          wait(100+random(100));
          if GetWorldInfo(W, WRec) then
          begin
            Writeln('World: '+inttostr(WRec.Number)+', Players: '+inttostr(WRec.PlayerNo)+', Members: '+Booltostr(WRec.Members)+', PvP: '+Booltostr(WRec.PVP));
            if FindText(x, y, ' '+inttostr(W)+' ', StatChars, 84, 134, 140, 440) then
            begin
              MMouse(x, y, 500, 4);
              GetMousePos(x, y);
              wait(400+random(100));
              if FindColor(xx, yy, 6316128, x-20, y-2, x+20, y+2) then
              begin
                GetMousePos(x, y);
                Mouse(x, y, 0, 0, mouse_left);
                if FindColor(xx, yy, 19890, x-20, y-2, x+20, y+2) then
                begin
                  Writeln('World '+inttostr(W)+' selected.');
                  Result := true;
                end;
              end;
            end;
          end else
            if WRec.PlayerNo = -2 then
              WriteLn('World ' + IntToStr(W) + ' is FULL.')
            else
              WriteLn('World ' + IntToStr(W) + ' is OFFLINE.')
        end else
          WriteLn('Failed to find World ' + IntToStr(W) + '!');
        if (not(Result)) then TypeByte(vk_Escape);
      end;
    end;

    I would figure you would call for this during the login procedure. You may have to declare it depending on how your script or the script is written.

    For more functions like this refer to the function list incuded with simba. Just search it or if you wish to do it the long way go to includes, worldswitcher then there is a list to choose from.
    Last edited by kevin33; 02-08-2012 at 12:11 AM.
    FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!! "WITH A NEW QUESTION COMES A NEW CHALLENGE"
    Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc

  3. #3
    Join Date
    Nov 2011
    Location
    Puerto Rico
    Posts
    905
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ill see what i can do lol i got no scripting experience lets see how it goes

  4. #4
    Join Date
    Dec 2011
    Location
    Ontario, Canada
    Posts
    1,735
    Mentioned
    5 Post(s)
    Quoted
    89 Post(s)

    Default

    Neither do I
    Good luck and make sure you ask questions when you get stuck.
    FEEL FREE TO PM ME ABOUT ANYTHING! Will help over Teamviewer...just ask!! "WITH A NEW QUESTION COMES A NEW CHALLENGE"
    Silentcore's AIO Service team !!! Pm me if you want questing done or service done or post on thread ofc

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
  •