Here is the final posting for the time being of puzzles from my Merlin's Wide and Wonderful World of Mystical Magic series. I hope that at least some of you have enjoyed them. Two for the price of one this time
remstart
-------------------------------------------------------
Puzzles from my Merlin's Wide and Wonderful
World of Mystical Magic series
***********************
Author: gearce - January 2007
***********************
This is Puzzle Number 16 from my Merlin's Wide and
Wonderful World of Mystical Magic series but without
all the bitmaps, images, special effects etc
-------------------------------------------------------
remend
` This command will hide the mouse pointer
hide mouse
` Declare array/s
dim die$(3)
` Set text style and size
set text font "arial"
set text size 16
set text to bold
th=text height("arial")
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Hello! My name is Merlin. |Allow me to show you some "
message$=message$+"of my Mystical Magic with Puzzle Number 16 from my Wide "
message$=message$+"and Wonderful World of Mystical Magic series, but "
message$=message$+"without all the bitmaps, images, special effects etc. "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Magic with Puzzle Number 16 from my Wide ")/2
across=320-tw:down=192
wide=across+text width("Magic with Puzzle Number 16 from my Wide ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Start of programme
start:
` Clear screen
cls
` A small pause
wait 1000
` Set new text size
set text size 21
` -------------------------------------------
` Roll three dice and make numbers
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Roll three dice, put them in a row and write down the "
message$=message$+"three values shown to make a three-digit number. |"
message$=message$+"Append to the three-digit number the values on the "
message$=message$+"bottom of the dice, in the same order, to make a "
message$=message$+"six-digit number and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("values on the bottom of the dice, in the same ")/2
across=320-tw:down=177
wide=across+text width("values on the bottom of the dice, in the same ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Divide by 111 and key result
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Divide your answer by 111 and key in the result "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Divide your answer by 111 and key in the result ")/2
across=320-tw:down=219
wide=across+text width("Divide your answer by 111 and key in the result ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Set cursor
set cursor 300,244
` Input the result
input "> ";answer#
` Clear screen
cls
` A small pause
wait 1000
` --------------------------------------------------
` Here's the magic
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Now here's the magic ... *Watch this "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Now here's the magic ... *Watch this ")/2
across=320-tw:down=219
wide=across+text width("Now here's the magic ... *Watch this ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` Go to subroutine to reveal mystical magic and ask play again
gosub reveal
` End of programme
the_end:
end
` ---------------------------------------------------------------------
` Functions
` ---------------------------------------------------------------------
` --------------------------------------------------
` Function to write words to screen
` --------------------------------------------------
function writewords(across,down,message$,tw,wide)
` Go through all the letters in the message
for t=1 to len(message$)
` Add one letter from message$ to nextword$
nextword$=nextword$+mid$(message$,t)
` Check if that letter is a space or |
if mid$(message$,t)=" " or mid$(message$,t)="|" or mid$(message$,t)="*"
` Check if the current across coordinate + the size of the
` word will go beyond the designated width
if across+text width(nextword$)>wide
` and if it does, reset across and increase down coordinates
across=320-tw
inc down,text height(nextword$)
endif
if mid$(message$,t)="|"
across=320-tw
inc down,text height(nextword$)
` Go to this point to avoid writing this |
goto here
endif
if mid$(message$,t)="*"
wait 1000
` Go to this point to avoid writing this *
goto here
endif
` Print the text
text across,down,nextword$
` Increase the across coordinate by the size of the word
inc across,text width(nextword$)
` Come to this point to avoid writing this | or this *
here:
` Clear the current word to make a new word next loop
nextword$=""
` A small pause so you can see it working
wait 200
endif
next t
endfunction
` ---------------------------------------------------------------------
` Subroutines
` ---------------------------------------------------------------------
` -------------------------------------------------
` Subroutine to reveal mystical magic
` and ask play again
` -------------------------------------------------
` -------------------------------------------
` Reveal mystical magic ...
` -------------------------------------------
reveal:
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"You rolled "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("You rolled ")/2
across=320-tw:down=81
wide=across+text width("You rolled ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Set new text style and size
set text font "times new roman"
set text size 60
set text to bold
th=text height("times new roman")
tw=text width(".")
` Determine answer
answer#=(answer#-7)/9
answer$=str$(answer#)
` Determine each die
for d=1 to 3
die$(d)=mid$(answer$,d)
next d
` Draw dice
l=110:t=154:r=170:b=214
ink rgb(255,255,255),0
for x=1 to 3
inc l,90:inc r,90
box l,t,r,b
ink rgb(0,0,0),0
box l+1,t+1,r-1,b-1
ink rgb(255,255,255),0
next x
`---------------------------
` First die
`---------------------------
if die$(1)="6"
text 209,119,"."
text 209+tw*2.5,119,"."
text 209,140,"."
`text 209+tw*1.25,140,"."
text 209+tw*2.5,140,"."
text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="5"
text 209,119,"."
text 209+tw*2.5,119,"."
`text 209,140,"."
text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="4"
text 209,119,"."
text 209+tw*2.5,119,"."
`text 209,140,"."
`text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="3"
text 209,119,"."
`text 209+tw*2.5,119,"."
`text 209,140,"."
text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
`text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="2"
text 209,119,"."
`text 209+tw*2.5,119,"."
`text 209,140,"."
`text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
`text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="1"
`text 209,119,"."
`text 209+tw*2.5,119,"."
`text 209,140,"."
text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
`text 209,161,"."
`text 209+tw*2.5,161,"."
endif
`---------------------------
` Second die
`---------------------------
if die$(2)="6"
text 299,119,"."
text 299+tw*2.5,119,"."
text 299,140,"."
`text 299+tw*1.25,140,"."
text 299+tw*2.5,140,"."
text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="5"
text 299,119,"."
text 299+tw*2.5,119,"."
`text 299,140,"."
text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="4"
text 299,119,"."
text 299+tw*2.5,119,"."
`text 299,140,"."
`text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="3"
text 299,119,"."
`text 299+tw*2.5,119,"."
`text 299,140,"."
text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
`text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="2"
text 299,119,"."
`text 299+tw*2.5,119,"."
`text 299,140,"."
`text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
`text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="1"
`text 299,119,"."
`text 299+tw*2.5,119,"."
`text 299,140,"."
text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
`text 299,161,"."
`text 299+tw*2.5,161,"."
endif
`---------------------------
` Third die
`---------------------------
if die$(3)="6"
text 389,119,"."
text 389+tw*2.5,119,"."
text 389,140,"."
`text 389+tw*1.25,140,"."
text 389+tw*2.5,140,"."
text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="5"
text 389,119,"."
text 389+tw*2.5,119,"."
`text 389,140,"."
text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="4"
text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
`text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="3"
text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
`text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="2"
text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
`text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
`text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="1"
`text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
`text 389,161,"."
`text 389+tw*2.5,161,"."
endif
` A small pause
wait 1000
` -------------------------------------------
` ... and ask play again
` -------------------------------------------
` Set new text style and size
set text font "arial"
set text size 21
set text to bold
th=text height("arial")
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Correct? *Thank you "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Correct? *Thank you ")/2
across=320-tw:down=338
wide=across+text width("Correct? *Thank you ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Play again Yes or No "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Play again Yes or No ")/2
across=320-tw:inc down,(th*1)
wide=across+text width("Play again Yes or No ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Left click mouse for YES - right click mouse for NO "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Left click mouse for YES - right click mouse for NO ")/2
across=320-tw:inc down,(th*1)
wide=across+text width("Left click mouse for YES - right click mouse for NO ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Until mouse is clicked
do
if mouseclick()=1
goto start
exit
endif
if mouseclick()=2
goto the_end
exit
endif
` End loop
Loop
return
remstart
-------------------------------------------------------
Puzzles from my Merlin's Wide and Wonderful
World of Mystical Magic series
***********************
Author: gearce - January 2007
***********************
This is Puzzle Number 22 from my Merlin's Wide and
Wonderful World of Mystical Magic series but without
all the bitmaps, images, special effects etc
-------------------------------------------------------
remend
` This command will hide the mouse pointer
hide mouse
` Declare array/s
dim die$(3)
` Set text style and size
set text font "arial"
set text size 16
set text to bold
th=text height("arial")
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Hello! My name is Merlin. |Allow me to show you some "
message$=message$+"of my Mystical Magic with Puzzle Number 22 from my Wide "
message$=message$+"and Wonderful World of Mystical Magic series, but "
message$=message$+"without all the bitmaps, images, special effects etc. "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Magic with Puzzle Number 22 from my Wide ")/2
across=320-tw:down=192
wide=across+text width("Magic with Puzzle Number 22 from my Wide ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Start of programme
start:
` Clear screen
cls
` A small pause
wait 1000
` Set new text size
set text size 21
` -------------------------------------------
` Roll three dice and write down values
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Roll three dice, write down the three values shown "
message$=message$+"and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Roll three dice, write down the three ")/2
across=320-tw:down=229
wide=across+text width("Roll three dice, write down the three ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Multiply number on first die by 2
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Multiply the value of the first die by 2, "
message$=message$+"write down your answer and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Multiply the value of the first die by 2, write ")/2
across=320-tw:down=229
wide=across+text width("Multiply the value of the first die by 2, write ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Add 5 to the answer
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Add 5, write down your answer and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Add 5, write down your answer and click mouse ")/2
across=320-tw:down=240
wide=across+text width("Add 5, write down your answer and click mouse ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Multiply answer by 5
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Multiply by 5, write down your answer and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Multiply by 5, write down your answer ")/2
across=320-tw:down=229
wide=across+text width("Multiply by 5, write down your answer ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Add value of second die
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Add the value of the second die, write down your answer "
message$=message$+"and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Add the value of the second die, write ")/2
across=320-tw:down=229
wide=across+text width("Add the value of the second die, write ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Multiply answer by 10
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Multiply by 10, write down your answer "
message$=message$+"and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Multiply by 10, write down your answer ")/2
across=320-tw:down=229
wide=across+text width("Multiply by 10, write down your answer ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Add value of third die
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Add the value of the third die, write down your answer "
message$=message$+"and click mouse "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Add the value of the third die, write down ")/2
across=320-tw:down=229
wide=across+text width("Add the value of the third die, write down ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Wait for mouse click
suspend for mouse
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` -------------------------------------------
` Subtract 125 from answer
` -------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Subtract 125 and key in your answer "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Subtract 125 and key in your answer ")/2
across=320-tw:down=229
wide=across+text width("Subtract 125 and key in your answer ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Set cursor
set cursor 300,254
` Input the result
input "> ";answer#
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` --------------------------------------------------
` Here's the magic
` --------------------------------------------------
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Now here's the magic ... *Watch this "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Now here's the magic ... *Watch this ")/2
across=320-tw:down=219
wide=across+text width("Now here's the magic ... *Watch this ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Clear screen
cls
` A small pause
wait 1000
` Go to subroutine to reveal mystical magic and ask play again
gosub reveal
` End of programme
the_end:
end
` ---------------------------------------------------------------------
` Functions
` ---------------------------------------------------------------------
` --------------------------------------------------
` Function to write words to screen
` --------------------------------------------------
function writewords(across,down,message$,tw,wide)
` Go through all the letters in the message
for t=1 to len(message$)
` Add one letter from message$ to nextword$
nextword$=nextword$+mid$(message$,t)
` Check if that letter is a space or |
if mid$(message$,t)=" " or mid$(message$,t)="|" or mid$(message$,t)="*"
` Check if the current across coordinate + the size of the
` word will go beyond the designated width
if across+text width(nextword$)>wide
` and if it does, reset across and increase down coordinates
across=320-tw
inc down,text height(nextword$)
endif
if mid$(message$,t)="|"
across=320-tw
inc down,text height(nextword$)
` Go to this point to avoid writing this |
goto here
endif
if mid$(message$,t)="*"
wait 1000
` Go to this point to avoid writing this *
goto here
endif
` Print the text
text across,down,nextword$
` Increase the across coordinate by the size of the word
inc across,text width(nextword$)
` Come to this point to avoid writing this | or this *
here:
` Clear the current word to make a new word next loop
nextword$=""
` A small pause so you can see it working
wait 200
endif
next t
endfunction
` ---------------------------------------------------------------------
` Subroutines
` ---------------------------------------------------------------------
` -------------------------------------------------
` Subroutine to reveal mystical magic
` and ask play again
` -------------------------------------------------
` -------------------------------------------
` Reveal mystical magic ...
` -------------------------------------------
reveal:
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"You rolled "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("You rolled ")/2
across=320-tw:down=81
wide=across+text width("You rolled ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Set new text style and size
set text font "times new roman"
set text size 60
set text to bold
th=text height("times new roman")
tw=text width(".")
` Determine answer
answer#=answer#-125
answer$=str$(answer#)
` Determine each die
for d=1 to 3
die$(d)=mid$(answer$,d)
next d
` Draw dice
l=110:t=154:r=170:b=214
ink rgb(255,255,255),0
for x=1 to 3
inc l,90:inc r,90
box l,t,r,b
ink rgb(0,0,0),0
box l+1,t+1,r-1,b-1
ink rgb(255,255,255),0
next x
`---------------------------
` First die
`---------------------------
if die$(1)="6"
text 209,119,"."
text 209+tw*2.5,119,"."
text 209,140,"."
`text 209+tw*1.25,140,"."
text 209+tw*2.5,140,"."
text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="5"
text 209,119,"."
text 209+tw*2.5,119,"."
`text 209,140,"."
text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="4"
text 209,119,"."
text 209+tw*2.5,119,"."
`text 209,140,"."
`text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="3"
text 209,119,"."
`text 209+tw*2.5,119,"."
`text 209,140,"."
text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
`text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="2"
text 209,119,"."
`text 209+tw*2.5,119,"."
`text 209,140,"."
`text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
`text 209,161,"."
text 209+tw*2.5,161,"."
endif
if die$(1)="1"
`text 209,119,"."
`text 209+tw*2.5,119,"."
`text 209,140,"."
text 209+tw*1.25,140,"."
`text 209+tw*2.5,140,"."
`text 209,161,"."
`text 209+tw*2.5,161,"."
endif
`---------------------------
` Second die
`---------------------------
if die$(2)="6"
text 299,119,"."
text 299+tw*2.5,119,"."
text 299,140,"."
`text 299+tw*1.25,140,"."
text 299+tw*2.5,140,"."
text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="5"
text 299,119,"."
text 299+tw*2.5,119,"."
`text 299,140,"."
text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="4"
text 299,119,"."
text 299+tw*2.5,119,"."
`text 299,140,"."
`text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="3"
text 299,119,"."
`text 299+tw*2.5,119,"."
`text 299,140,"."
text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
`text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="2"
text 299,119,"."
`text 299+tw*2.5,119,"."
`text 299,140,"."
`text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
`text 299,161,"."
text 299+tw*2.5,161,"."
endif
if die$(2)="1"
`text 299,119,"."
`text 299+tw*2.5,119,"."
`text 299,140,"."
text 299+tw*1.25,140,"."
`text 299+tw*2.5,140,"."
`text 299,161,"."
`text 299+tw*2.5,161,"."
endif
`---------------------------
` Third die
`---------------------------
if die$(3)="6"
text 389,119,"."
text 389+tw*2.5,119,"."
text 389,140,"."
`text 389+tw*1.25,140,"."
text 389+tw*2.5,140,"."
text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="5"
text 389,119,"."
text 389+tw*2.5,119,"."
`text 389,140,"."
text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="4"
text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
`text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="3"
text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
`text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="2"
text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
`text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
`text 389,161,"."
text 389+tw*2.5,161,"."
endif
if die$(3)="1"
`text 389,119,"."
`text 389+tw*2.5,119,"."
`text 389,140,"."
text 389+tw*1.25,140,"."
`text 389+tw*2.5,140,"."
`text 389,161,"."
`text 389+tw*2.5,161,"."
endif
` A small pause
wait 1000
` -------------------------------------------
` ... and ask play again
` -------------------------------------------
` Set new text style and size
set text font "arial"
set text size 21
set text to bold
th=text height("arial")
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Correct? *Thank you "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Correct? *Thank you ")/2
across=320-tw:down=338
wide=across+text width("Correct? *Thank you ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Play again Yes or No "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Play again Yes or No ")/2
across=320-tw:inc down,(th*1)
wide=across+text width("Play again Yes or No ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` A small pause
wait 1000
` Define the string (a space is needed at the end
` to print the last word)
message$=""
message$=message$+"Left click mouse for YES - right click mouse for NO "
` Determine text width of longest message line
` and where to write text to screen.
tw=text width("Left click mouse for YES - right click mouse for NO ")/2
across=320-tw:inc down,(th*1)
wide=across+text width("Left click mouse for YES - right click mouse for NO ")
` Call the function to write words to screen
writewords(across,down,message$,tw,wide)
` Until mouse is clicked
do
if mouseclick()=1
goto start
exit
endif
if mouseclick()=2
goto the_end
exit
endif
` End loop
Loop
return
As usual, highlight the code, right click and copy into DBClassic
I would like to thank anyone who has taken the time to reply to my postings for their assistance and comments
gearce
LANG MAY YER LUM REEK