sync on:sync rate 100:sync
set display mode 500,256,16
cls
set window on
set window layout 0,0,0
`net join "127.0.0.1"
`repeat
`receive = net receive(1)
`until receive = 1
`playernum# = net pop float()
`load the images
set dir "images"
load image "update.bmp",1,1
load image "bar.bmp",2,1
load image "blank.bmp",3,1
set dir ".."
set dir "music and sounds"
`load background music
load music "music and sounds/marching on.mp3",1
`loop the music
loop music 1
barx# = 0
string$ = "Looking for updates..."
do
cls
`make the blank mouse sprite
sprite 1,mousex(),mousey(),3
hide sprite 1
`paste the update screen
paste image 1,0,0
text 17,175,string$
sync
`make update bar
sprite 2,25,120,2
stretch sprite 2,barx#,100
inc barx#,0.5
if barx# => 100
barx# = 100
endif
`connect to my ftp server
ftp connect "192.168.0.211","Dom","dom2005"
ftp set dir "UPDATES"
set dir ".."
set dir "UPDATES"
if checkupdates() = 1
string$ = "Updates found, downloading..."
`wait key
downloadupdate()
else
text 17,190,"No Updates found"
text 17,205,"Updates completed...press any key to continue"
delete file "loa_updates.upd"
rename file "loa_updates2.upd","loa_updates.upd"
`wait key
login()
ftp disconnect
endif
if file exist("loa_update.exe")
text 17,205,"Updates completed...press any key to continue"
execute file "loa_update.exe","","",1
delete file "loa_update.exe"
end
`login()
endif
text 400,15,"V.0.1"
sync
loop
Main Source Code.
Exit Prompt "Please run game through updater to ensure your game is up to date","Please run game through updater"
function login()
flush video memory
sync on:sync rate 100:sync
cls
set window on
set window layout 0,0,0
`net join "127.0.0.1"
`repeat
`receive = net receive(1)
`until receive = 1
`playernum# = net pop float()
`set dir "images"
`load image "login.bmp",1,1
`load image "login-button.bmp",2,1
`load image "reg-button.bmp",3,1
`load image "login-down.bmp",4,1
`load image "reg-down.bmp",5,1
`load image "blank.bmp",6,1
do
cls
`background image
`paste image 1,0,0
`make the blank mouse sprite
`sprite 1,mousex(),mousey(),6
`hide sprite 1
`
text 0,0,"MouseX: "+str$(mousex())
text 0,15,"MouseY: "+str$(mousey())
text 0,30,"CLIENT APP WORKING BECAUSE IT WAS RUN THROUGH THE UPDATER!"
sync
loop
endfunction
Login function Code
"A book. I hate books. book is stupid." -- Some lame idiot
Formerly Saberdude --DFStudios--