Blockland Forums > Modification Help

What's the function RTB calls to get what server a player is at?

Pages: (1/2) > >>

adam savage:

/title

I looked through console trace and System_ReturnToBlockland and didn't find anything that helped.

Kalphiter:

There is none.

elm:

You can just read it off of the GUI, but it'll probably be hacky as it probably only is set as soon as you open the player info dialog or whatever. Or maybe not.

Edit: I found this, in this mod: http://forum.returntoblockland.com/dlm/viewFile.php?id=3835

function Connect2ChatConductor::GetOnlineFriends(%this)
{
   %Group = RTBCC_Roster.GetObject(0);
   
   %NameList = 0;
   
   if(IsObject(%Group))
   {
      %GroupCount = %Group.getCount();
      
      for(%i=0;%i<%groupCount;%i++)
      {
         %UserData = %Group.GetObject(%i);
         
         if(IsObject(%UserData))
         {
            if(%NameList $= "0")
            {
               %NameList = StrReplace(%UserData.Name," ","_");
            }
            else
            {
               %NameList = %NameList SPC StrReplace(%UserData.Name," ","_");
            }
         }
      }
   }
   return %NameList;
}

It looks like it only returns your friends names that are online. But maybe try dumping the group or maybe try dumping the %userdata object and see if it has any info. You can also try looking through the original mod but if that fails to help you, the only thing you can do is look through RTB itself (good luck).

Kalphiter:

It's all through the chat connection so you're not going to find a function.

elm:


--- Quote from: Kalphiter on June 13, 2012, 06:38:47 PM ---It's all through the chat connection so you're not going to find a function.

--- End quote ---

RTBCC_Roster.GetObject(0).getObject(0).dump(); It shows me the player's Ip and port of the server they are on.

Edit: Alternatively, you can do RTBCC_Roster.GetObject(0).getObject(0).info(); and read off of the info pane what server the player is on (as i previously said) etc.

Pages: (1/2) > >>

Go to full version