VERSION 1.4.1 THREAD testthread.txt [PLAYGAME]{ print("Welcome to my game!") PAUSE("ENJOY!") QUIT() } [COUNTER]{ ::cloop:: sleep(1000) secs_played=secs_played+1 if secs_played==60 then GOTO("secs")|SKIP(0) if mins_played==60 then GOTO("mins")|GOTO("cloop") ::secs:: secs_played=0 mins_played=mins_played+1 GOTO("cloop") ::mins:: mins_played=0 hours_played=hours_played+1 GOTO("cloop") } [START]{ secs_played=0 mins_played=0 hours_played=0 newThread("COUNTER") bgm_song=loadSong("Audio/Collapse.mp3") snd_select=loadSong("Audio/select.mp3") playSong(bgm_song) setFancyForm("left") LOAD("savedata.dat") write("Name: ") name=getInput() clear() if name=="" then SKIP(-4)|SKIP(0) "So your name is $name$, thats cool!" pos=1 sleep(200) ::loop:: SAVE("savedata.dat") writeAt("",0,0) setFG(Color_Blue) fancy(" What to do $name$? Time played $hours_played:00$:$mins_played:00$:$secs_played:00$,/l, Play Game, View Stats, View Credits, Quit Game") keyUP=isDown("{UP}") keyDOWN=isDown("{DOWN}") keyENTER=isDown("{ENTER}") if keyUP==true then setVarPlay("pos",pos-1)|SKIP(0) if keyDOWN==true then setVarPlay("pos",pos+1)|SKIP(0) if keyENTER==true then GOTO("choicemade")|SKIP(0) writeAt("->",1,pos+2) sleep(25) GOTO("loop") ::choicemade:: playSong(snd_select) sleep(200) if pos==1 then JUMP("PLAYGAME")|SKIP(0) if pos==2 then print("You Pressed Stats")|SKIP(0) if pos==3 then print("You Pressed Credits")|SKIP(0) if pos==4 then QUIT()|SKIP(0) PAUSE("Tests done (Press Enter!)") QUIT() } [PAUSE:function(msg)]{ write(msg) ::loop:: keyENTER=isDown("{ENTER}") if keyENTER==true then SKIP(0)|GOTO("loop") print(" ") } [testfunc:function(testing)]{ "" } [setVarPlay:function(var,val)]{ setVar(var,val) if pos<1 then GOTO("toolittle")|SKIP(0) if pos>4 then GOTO("toomuch")|SKIP(0) beep() GOTO("end") ::toolittle:: setVar("pos",4) GOTO("end") ::toomuch:: setVar("pos",1) ::end:: }