ID:269843
 
Ok. I want to create a tital screen which the host will host. On this title screen you can start your own game. When you click this it opens Dream Demean and connects you to the server. It also comes up in a list when you click join game. Also when you start the world a box comes up asking you for the number of players. It then sends this back to the main server. Now I am a bit stuck with this. This is the code ive come up with so far. Im using verbs for testing.

var/list
worldsrunning = list()
worldsplayernum = list()
worldsipaddress = list()
mob
verb
StartGame()
var/name = input("What shall you name your world") as text
var/netadd = startup('The Guy from Hell.dmb',0)
worldsrunning += name
worldsipaddress += netadd
world.Export("[netadd]#idnum")
usr << link(netadd)
JoinGame()
var/list/listgames = list()
for(var/l in worldsrunning)
var/d = worldsrunning.Find(l)
listgames += "[worldsrunning[d]]" + "Players - [worldsplayernum[d]]"
var/whatgame = input("Choose a game to play") in list(listgames)
var/ippos = listgames.Find(whatgame)
usr << link(worldsipaddress[ippos])

world/Topic(Topic)
if(Topic == "p1")
worldsplayernum += "1"
if(Topic == "p2")
worldsplayernum += "2"
if(Topic == "p3")
worldsplayernum += "3"
if(Topic == "p4")
worldsplayernum += "4"

Would someone be able to guide me to how to complete the rest of my objectives. Thanks!