Fixed bugs Added new syntax to concat str="!" num=3 "Lets do this$str*3$" becomes "Lets do this!!!" you can even replace 3 for num
86 lines
1.9 KiB
Plaintext
86 lines
1.9 KiB
Plaintext
VERSION 1.2
|
|
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")
|
|
str="!"
|
|
"Lets do this$str*3$"
|
|
LOAD()
|
|
write("Name: ")
|
|
name=getInput()
|
|
clear()
|
|
if name=="" then SKIP(-4)|SKIP(0)
|
|
"So your name is $name$, thats cool!"
|
|
pos=1
|
|
sleep(200)
|
|
SAVE()
|
|
::loop::
|
|
clear()
|
|
SAVE()
|
|
setFG(Color_Blue)
|
|
fancy(" What to do $name$? Time plsyed $hours_played$:$mins_played$:$secs_played$,/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(50)
|
|
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(" ")
|
|
}
|
|
[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",1)
|
|
GOTO("end")
|
|
::toomuch::
|
|
setVar("pos",4)
|
|
::end::
|
|
} |