TGC Codebase Backup



Hi by BluEarth Software

2nd Jan 2006 18:36
Summary

A simple program for beginners, made by beginners!



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    HIDE MOUSE
rem ------------------------
rem Hi-Lo, a random number generator
rem ------------------------
rem Created by StartGames
rem ------------------------
rem Programed By Kevin Micol
rem ------------------------
rem start question
register:
dim ValidKey$(15)

 ValidKey$(0)="NO KEY"
 ValidKey$(1)="you can put product keys in this field, "
 ValidKey$(2)="if you have more than 10 keys, then "
 ValidKey$(4)="copy ValidKey$( )=" " and put in the next"
 ValidKey$(5)="number in the ( )"
 ValidKey$(6)=""
 ValidKey$(7)=""
 ValidKey$(8)=""
 ValidKey$(9)=""
ValidKey$(10)=""


gosub CheckKey
wait key
end


CheckKey:
`print ValidKey$(rnd(14))
If File Exist("prokey.INI")=0
  Input "Enter Product Key> ";key$
  key$=upper$(key$)
Else
  ` Read key file
  Open To Read 1,"prokey.INI"
   Read String 1,key$
 Close File 1
Endif
IF file eXist("prokey.INI")=0
`key$=ValidKey$(rnd(14))
cls
  ` Read the proper CD Keys from ValidKey$()
 for t=0 to 14
  if key$=ValidKey$(t)
   ` Write the key file if the key is valid
   Open To Write 1,"prokey.INI"
    Write String 1,key$
   Close File 1
   return
  endif
 next t
  print "Product Key is incorrect."
  Print "You entered: ";key$
  wait key
  goto demo
	end
endif
prestart:
load sound "Start-up.wav",2
Load Music "Dodge This.mid",5
play sound 2
cls
Load Bitmap "LOGO 3.bmp"
PRINT "PRODUCT IS REGISTERED."
wait (5*1000)
cls
play music 5
loop music 5
rem start actual game
start:
guessMe  = RND(100)
rem clear screen and print title
cls
Print "HI-LO"
Print "Product is Registered."
Print
Print "I have decided on a number between 1 and 100"
Print "And I want you to guess what the number is"
print
print "I will tell you to guess higher or lower and well count up"
print "the number of guesses you use"
print
ask:
rem Ask the user to guess the number
Input "What is your guess";guess
cls
`math section
count = count + 1
if guess = 159753 then goto Cheater
if guess = guessMe then goto win
if guess < guessMe then gosub Higher
If guess > guessMe then gosub lower
set window title "HI-LO; Pick a number between 1 and 100"
goto ask
`For the Cheaters!
Cheater:
print guessMe
Print "You Cheated!! and that's Very, Very, Bad!!"
goto reset
`Winner's circle
win:
if count>1 then print "You win!  It took "; count; " guess(es)."
if count=1 then print "Wow! Your good at this!"
`end program question
reset:
count = 0
Print "Press E to exit, press enter to continue."
`what do you want to do?
if:
if inkey$()="e" then end
if returnkey()=1 then goto start
goto if

`If guess is higher	
	Higher:
	Print "Guess Higher"
	Print "Last Guess ";guess
	return
`If guess is lower
	Lower:
	Print "Guess Lower"
	Print "Last Guess ";guess
	return

demo:
rem Demo--Hi-Lo---------------
dsetwindow:
set window on
set window title "HI-LO; A random number generator"
set window position 75,60
set window size 640,480
rem Load stuff
dprestart:
load sound "Start-up.wav",2
play sound 2
cls
Load Bitmap "LOGO 3.bmp"
load music "Dodge This.mid",5
wait (5*1000)
CLS
rem 30 simple and clean.wma
cls
rem start actual game
play music 5
loop music 5
dstart:
guessMe  = RND(100)
rem clear screen and print title
cls
PRint "Loading Code..."
wait (10*1000)
cls
Print "HI-LO"
Print "DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO--DEMO"
Print
Print "I have decided on a number between 1 and 100"
Print "And I want you to guess what the number is"
print
print "I will tell you to guess higher or lower and well count up"
print "the number of guesses you use"
print
dask:
rem Ask the user to guess the number
Input "What is your guess";guess
cls
`math section
count = count + 1
if guess = 159753 then goto dCheater
if guess = guessMe then goto dwin
if guess < guessMe then gosub dHigher
If guess > guessMe then gosub dlower
set window title "HI-LO; Pick a number between 1 and 100; DEMO VERSION"
goto dask
`For the Cheaters!
dCheater:
print guessMe
Print "You Cheated!! and that's Very, Very, Bad!!"
goto dreset
`Winner's circle
dwin:
if count>1 then print "You win!  It took "; count; " guess(es)."
if count=1 then print "Wow! Your good at this!"
`end program question
dreset:
count = 0
Print "Press E to exit, press enter to continue."
`what do you want to do?
dif:
if inkey$()="e" then end
if returnkey()=1 then goto dstart
goto dif

`If guess is higher	
	dHigher:
	Print "Guess Higher"
	Print "Last Guess ";guess
	suspend for key
	Print "NOT REGISTERED"
	PRINT "DEMO MODE"
	PRINT "REGISTER PRODUCT TO REMOVE SCREEN"
   suspend for key
	PRINT "Press R to register. Press C to continue"
	dqe:
	if inkey$()="r" then goto register
	if inkey$()="c" then return
	goto dqe
	return
`If guess is lower
	dLower:
	Print "Guess Lower"
	Print "Last Guess ";guess
	suspend for key
	Print "NOT REGISTERED"
	PRINT "DEMO MODE"
	PRINT "REGISTER PRODUCT TO REMOVE SCREEN"
   suspend for key
	PRINT "Press R to register. Press C to continue"
	ldqe:
	if inkey$()="r" then goto register
	if inkey$()="c" then return
	goto ldqe
	return