Type Character Health as Integer Str as Integer Sta as Integer Agi as Integer Name as string Endtype Type Combat atk as integer def as integer dmg as integer Endtype Global Player as Character Global Enemy as Character Global Pl as Combat Global En as Combat Global PStyle as string Global EStyle as string Global typtxt as string Global tmptxt as string Global lstkey as string typtxt="":tmptxt="" `Rules Do Set Cursor 0,0 Print "This game is a typing combat game." Print "The faster you type the appropriate words," Print "the better you will do." Print Print "Press anykey to continue" t$=inkey$() if t$<>"" lstkey=t$ Exit Endif Sync Loop Cls Do cls Set Cursor 0,0 Print "You are not being timed now. But you will in a moment." Print "You will begin your character by typing your character's name." Print "When you finish typing your character's name - press [Enter]." Print "When you press [Enter], a new screen will come up." Print "Type the words on that screen as fast as you can and press [Enter]." Print "Continue until the character is completed and receive more instructions." Print "If you make a mistake, press [Backspace] to delete the last letter or" Print "Press [Enter] and start again. There is no additional penalties for" Print "mistakes other than lost time." Print Print "Type your character's name:" Typing() Print tmptxt If typtxt<>"" Exit Endif Sync Loop Player.name=typtxt typtxt="" Wait 250 `Health t1=Timer() Do cls Set Cursor 0,0 Print Player.name Print "You are now being timed for health!" Print "Type: "; Ink Rgb(50,50,255),0 Print ""An apple a day keeps the doctor away"" Ink Rgb(255,255,255),0 Print Timer()-t1 Print Typing() Print tmptxt If typtxt<>"" if lower$(typtxt)="an apple a day keeps the doctor away" t2=timer() exit endif typtxt="" Endif Sync Loop h#=t2-t1 h#=40*((20000-h#)/20000) If h#<5 then h#=5 Player.health=h# Print Print "Your health is ";Player.health Print Print "Next is strength." Print "Press any key." Wait key t1=Timer() Do cls Print Player.name Print "You are now being timed for strength!" Print "Type: "; Ink Rgb(50,50,255),0 Print ""I am as strong as an ox"" Ink Rgb(255,255,255),0 Print Timer()-t1 Print Typing() Print tmptxt If typtxt<>"" if lower$(typtxt)="i am as strong as an ox" t2=timer() exit endif typtxt="" Endif Sync Loop s#=t2-t1 s#=40*((20000-s#)/20000) If s#<5 then s#=5 Player.str=s# Print Print "Your health is ";Player.health Print "Your strength is ";Player.str Print Print "Next is stamina." Print "Press any key." Wait key t1=Timer() Do cls Print Player.name Print "You are now being timed for stamina!" Print "Type: "; Ink Rgb(50,50,255),0 Print ""I am solid like a rock"" Ink Rgb(255,255,255),0 Print Timer()-t1 Print Typing() Print tmptxt If typtxt<>"" if lower$(typtxt)="i am solid like a rock" t2=timer() exit endif typtxt="" Endif Sync Loop s#=t2-t1 s#=40*((20000-s#)/20000) If s#<5 then s#=5 Player.sta=s# Print Print "Your health is ";Player.health Print "Your strength is ";Player.str Print "Your stamina is ";Player.sta Print Print "Next is agility." Print "Press any key." Wait key t1=Timer() Do cls Print Player.name Print "You are now being timed for agilty!" Print "Type: "; Ink Rgb(50,50,255),0 Print ""I am agile like a tiger"" Ink Rgb(255,255,255),0 Print Timer()-t1 Print Typing() Print tmptxt If typtxt<>"" if lower$(typtxt)="i am agile like a tiger" t2=timer() exit endif typtxt="" Endif Sync Loop a#=t2-t1 a#=40*((20000-s#)/20000) If a#<5 then a#=5 Player.agi=a# Print Print "Your health is ";Player.health Print "Your strength is ";Player.str Print "Your stamina is ";Player.sta Print "Your agility is ";Player.agi Print Print "Prepare for combat." Print "Press any key." Wait key Print "When combat begins, you will see a list of combat words." Print "Type in the words as fast as you can. Each word changes" Print "your character's attack, defense, and damage." Function Typing() If ReturnKey() And tmptxt<>"" typtxt=tmptxt tmptxt="" Exitfunction Endif If Keystate(14) And tmptxt<>"" and asc(lstkey)<>14 tmptxt=left$(tmptxt,len(tmptxt)-1) lstkey=chr$(14) ExitFunction Endif t$=inkey$() if t$<>lstkey tmptxt=tmptxt+t$ endif lstkey=t$ Endfunction Function Attack() pa$="":Off=0:Def=0:Dmg=0 Restore attacks Do Read pa$ If pa$="end99" then Exit Read Off,Def,Dmg If pa$=PStyle Then Exit Loop if pa$<>"end99" Pl.atk=Rnd(Off+((Player.str+Player.agi)/2)) Pl.def=Rnd(Def+Player.agi) Pl.dmg=Rnd(Dmg+Player.str)-Enemy.sta If pl.dmg<0 Then pl.dmg=0 Endif ea$="":Off=0:Def=0:Dmg=0 Restore attacks Do Read ea$ If ea$="end99" then Exit Read Off,Def,Dmg If ea$=EStyle Then Exit Loop if ea$<>"end99" En.atk=Rnd(Off+((Enemy.str+Enemy.agi)/2)) En.def=Rnd(Def+Enemy.agi) En.dmg=Rnd(Dmg+Player.str)-Player.sta If En.dmg<0 Then En.dmg=0 Endif EndFunction attacks: Rem Word , Offense , Defense , Damage Data "hack", 8,8,14 Data "slash", 10,10,10 Data "thrust", 12,10,8 Data "kick", 14,8,8 Data "dodge", 5,20,5 Data "slam", 5,5,20 Data "parry", 10,15,5 Data "heal spell",0,5,0 Data "end99",0,0,0