Hi, Thanks for the replys.
We already have the basic set up
sync rate 60
set display mode 1280,1024,32
load bitmap "background.jpg",0
` Notes
print "Welcome to Chat Room!"
` ---------------------------------------------------------------------------------------------------
set display mode 1280,1024,32
load bitmap "background.jpg",0
`CONNECT TO TCP/IP CONNECTION.
print
print
print
print
print
print
print
print
print "Searching for connections..."
perform checklist for net connections
for i=1 to checklist quantity()
if checklist string$(i)="Internet TCP/IP Connection For DirectPlay" then netsel=i
next i
print " connection found"
print ""
input "Please enter ip address of server: ",ip$
print ""
print "Connecting..."
set net connection netsel,ip$
print " connected"
print ""
print "Searching for server..."
`CHECK IF ANY SERVERS EXIST DISPLAY THEM AND ASK USER TO JOIN OR CREATE A NET GAME.
perform checklist for net sessions
print " server found" : cls
print "[ ",checklist quantity()," ] SERVERS FOUND"
for i=1 to checklist quantity()
print i,". ",checklist string$(i)
next i
print "" : input "(1)JOIN / (2)CREATE: ",netsel
set display mode 1280,1024,32
load bitmap "background.jpg",0
`IF JOINING A CURRENT GAME.
if netsel=1
host=0 : flag=1
input "Join which server?: ",s
input "Nick name: ",name$
join net game s,name$
print "Joining..."
endif
set display mode 1280,1024,32
load bitmap "background.jpg",0
`IF STARTING A NET GAME.
if netsel=2
host=1
input "Server name: ",s$
input "Nick name: ",name$
input "Max # of chatters: ",num
endif
print
joined$ = name$ +" has joined."
send net message string 0,joined$
print joined$
print
` Start loop
do
gosub _recieve
gosub _write
loop
` Recieve and Print Text
_recieve:
if net message exists()=1
get net message
if net message type()=3
incoming$ = net message string$()
print incoming$
endif
endif
return
` End of recieve
` Write message
_write:
input name$ +" says: ", say$
send$ = name$ +" says: "+ say$
send net message string 0, send$
return
` End of Writing
` End program
end
Thanks to help from all the chat room stuff in the codebase.