| % Bryan's World Of FF06
var numFrames : int := Pic.Frames ("M:/TIK/11.gif")
 var pics, pics1 : array 1 .. 16 of int
 var delayTime, delayTime1 : int
 var keys : array char of boolean %using keys
 var x, x1, y1, y, xSize, ySize : int
 var font, font2 : int
 var position : int
 var name : int
 var number1, number2, number3, number4 : int
 var characterHP, character2HP, character2MP, characterMP, characterTP, character2TP : int
 characterHP := 9999
 character2HP := 9999
 characterMP := 100
 character2MP := 100
 characterTP := 100
 character2TP := 100
 x := 10
 y := 10
 x1 := 10
 y1 := 10
 xSize := 10
 ySize := 10
 number1 := Rand.Int (50, 100)
 number2 := Rand.Int (800, 1500)
 
 
 font := Font.New ("serif:15")
 font2 := Font.New ("serif:85")
 
 View.Set ("offscreenonly")
 put "**********************************************************************"
 put "** Welcome to the World Of Final Fantasy 06.                        **"
 put "** The game you are about to play is based on the 11 Final Fantasy. **"
 put "** The Main story line for this is Cloud is looking for Magus the   **"
 put "** bad end boss on his way he must fight and level his way throught **"
 put "** different areas.                                                 **"
 put "** hit 'o' if your a new player                                     **"
 put "**********************************************************************"
 
 Draw.Text ("Final Fantasy", 20, 170, font2, black)
 View.Update
 delay (6000)
 cls
 
 
 % var picID : int
 % var x2, y2 : int
 %
 % picID := Pic.FileNew ("M:/TIK/worldmap.gif")
 % for i : 1 .. 50
 %     x2 := Rand.Int (0, maxx)
 %     y2 := Rand.Int (0, maxy)
 %     Pic.Draw (picID, x2, y2, picCopy)
 % end for
 % Pic.Free (picID)
 % delay (8000)
 
 % Load the picture
 
 Pic.FileNewFrames ("M:/TIK/11.gif", pics, delayTime)
 %Pic.FileNewFrames ("C:/Documents and Settings/Mom_2/Desktop/Turing/cloud.gif", pics, delayTime)
 Pic.FileNewFrames ("M:/TIK/cloud.gif", pics1, delayTime1)
 %Pic.FileNewFrames ("C:/Documents and Settings/Mom_2/Desktop/Turing/magus.gif", pics1, delayTime1)
 % Draw the background black
 Draw.FillBox (0, 0, maxx, maxy, green)
 
 % Create the sprite
 var sprite, sprite1 : int
 sprite := Sprite.New (pics (1))
 sprite1 := Sprite.New (pics1 (1))
 Sprite.SetPosition (sprite, 0, 100, false)
 Sprite.SetPosition (sprite1, 0, 100, false)
 Sprite.Show (sprite)
 Sprite.Show (sprite1)
 
 
 
 loop
 loop
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 
 Draw.Oval (280, 222, 10, 10, green)
 Draw.Oval (88, 222, 10, 10, white)
 %Move the sprite across the screen
 Sprite.Hide (sprite)
 
 Sprite.SetPosition (sprite, +x1 + 50, y1 + 100, false)
 Sprite.SetPosition (sprite1, +x + 250, y + 100, false)
 
 Sprite.Show (sprite1)
 Sprite.Show (sprite)
 
 Input.KeyDown (keys)
 drawfilloval (42, 60, 5, 5, blue)
 drawfilloval (42, 85, 5, 5, blue)
 Draw.FillBox (638, 400, 458, 303, white)     %TP window
 Draw.FillBox (638 + 8, 400 + 8, 458 + 8, 303 + 8, blue)     %TP window
 Draw.FillBox (0, 0, maxx, maxy div 4 + 8, white)     %select window
 Draw.FillBox (8, 8, maxx - 10, maxy div 4, blue)     %select window
 Draw.ThickLine (170, 100, 170, 5, 5, white)
 if keys (KEY_UP_ARROW) then
 drawfilloval (42, 60, 5, 5, blue)
 drawfilloval (42, 85, 5, 5, white)
 position := 1
 end if
 if keys (KEY_DOWN_ARROW) then
 drawfilloval (42, 85, 5, 5, blue)
 drawfilloval (42, 57, 5, 5, white)
 position := 2
 end if
 
 if keys (KEY_RIGHT_ARROW) then
 drawfilloval (42, 85, 5, 5, blue)
 drawfilloval (42, 57, 5, 5, blue)
 drawfilloval (26, 40, 5, 5, white)
 position := 3
 end if
 
 if keys (KEY_LEFT_ARROW) then
 drawfilloval (42, 85, 5, 5, blue)
 drawfilloval (42, 57, 5, 5, blue)
 drawfilloval (26, 40, 5, 5, blue)
 drawfilloval (42, 25, 5, 5, white)
 position := 4
 end if
 
 
 if keys (KEY_ENTER) then
 if position = 1 then
 character2HP := character2HP - number1
 characterTP := characterTP + 10
 
 View.Update
 
 Draw.ThickLine (255, 117, 307, 188, 10, black)
 Draw.ThickLine (255, 117, 307, 188, 10 - 5, brightred)
 delay (800)
 Draw.ThickLine (310, 115, 250, 176, 10, black)
 Draw.ThickLine (310, 115, 250, 176, 10 - 5, brightred)
 Draw.Text (intstr ((number1)), 265, 203, font, white)
 delay (800)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 exit
 elsif characterHP < 1 then
 Draw.Text ("Game Over", 350, 280, font, white)
 exit when character2HP < 1
 exit
 elsif position = 2 and characterMP > 1 then
 character2HP := character2HP - number2
 characterMP := characterMP - 10
 exit when character2HP < 1
 delay (200)
 View.Update
 Draw.FillOval (285, 145, 50, 50, black)
 Draw.FillOval (285, 145, 50 - 10, 50 - 10, purple)
 delay (800)
 Draw.ThickLine (285, 145, 288, 106, 5, black)
 delay (100)
 Draw.ThickLine (285, 145, 240, 150, 5, black)
 delay (100)
 Draw.ThickLine (285, 145, 326, 148, 5, black)
 delay (100)
 Draw.ThickLine (285, 145, 283, 194, 5, black)
 delay (100)
 Draw.ThickLine (285, 145, 317, 119, 5, black)
 delay (100)
 Draw.ThickLine (285, 145, 245, 123, 5, black)
 delay (100)
 Draw.ThickLine (285, 145, 252, 180, 5, black)
 delay (100)
 Draw.ThickLine (285, 145, 315, 180, 5, black)
 Draw.Text (intstr ((number2)), 265, 203, font, white)
 delay (1000)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 View.Update
 exit
 
 
 elsif characterHP < 1 then
 Draw.Text ("Game Over", 350, 280, font, white)
 exit when character2HP < 1
 exit
 
 
 elsif position = 3 and characterTP > 99 then
 character2HP := character2HP - characterTP * 10
 characterTP := characterTP - characterTP
 Draw.Text (intstr ((characterTP * 10)), 350, 280, font, white)
 delay (800)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 View.Update
 elsif characterHP < 1 then
 Draw.Text ("Game Over", 350, 280, font, white)
 exit when character2HP < 1
 Draw.ThickLine (255, 117, 307, 188, 10, black)
 Draw.ThickLine (255, 117, 307, 188, 10 - 5, brightred)
 delay (800)
 Draw.ThickLine (310, 115, 250, 176, 10, black)
 Draw.ThickLine (310, 115, 250, 176, 10 - 5, brightred)
 delay (800)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 exit
 
 elsif position = 4 and characterMP > 0 then
 characterHP := characterHP + 1000
 characterMP := characterMP - 15
 
 Draw.Text ("+1000", 60, 203, font, white)
 delay (800)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 exit
 
 end if
 end if
 
 var width : int := Font.Width ("Attack", font)
 var height, ascent, descent, internalLeading : int
 Draw.Text ("Attack", 50, 80, font, white)
 Draw.Text ("Magic", 50, 57, font, white)
 Draw.Text ("Weapon Skill", 38, 37, font, white)
 Draw.Text ("Healing", 50, 18, font, white)
 Draw.Text ("Magus", 250, 80, font, white)
 Draw.Text ("HP", 310, 80, font, white)     %HP
 Draw.Text ("HP", 310, 57, font, white)     %HP
 Draw.Text (intstr (characterHP), 350, 80, font, white)
 Draw.Text ("Cloud", 250, 57, font, white)
 Draw.Text ("/9999", 400, 80, font, white)
 Draw.Text (intstr (character2HP), 350, 57, font, white)
 Draw.Text ("/9999", 400, 57, font, white)     %end of HP
 Draw.Text ("MP", 550, 57, font, white)     %MP
 Draw.Text ("MP", 550, 80, font, white)     %MP
 Draw.Text (intstr (character2MP), 470, 57, font, white)
 Draw.Text ("/100", 500, 80, font, white)
 Draw.Text (intstr (characterMP), 470, 80, font, white)
 Draw.Text ("/100", 500, 57, font, white)     %end of MP
 Draw.Text ("/100", 600, 380, font, white)     %end of TP
 Draw.Text ("/100", 600, 339, font, white)     %end of TP
 Draw.Text ("Cloud", 490, 380, font, white)
 Draw.Text ("Magus", 490, 340, font, white)
 Draw.Text (intstr (characterTP), 570, 380, font, white)     %TP
 Draw.Text (intstr (character2TP), 570, 339, font, white)     %TP
 View.Update
 var x6, y6, button : int
 
 Mouse.Where (x6, y6, button)
 Text.Locate (1, 1)
 if button = 0 then
 put x6 : 4, "  ", y6 : 4, "  button up"
 else
 
 
 end if
 
 end loop
 
 loop
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 
 Draw.Oval (88, 222, 10, 10, green)
 Draw.Oval (280, 222, 10, 10, white)
 %Move the sprite across the screen
 Sprite.Hide (sprite)
 
 Sprite.SetPosition (sprite, +x1 + 50, y1 + 100, false)
 Sprite.SetPosition (sprite1, +x + 250, y + 100, false)
 
 Sprite.Show (sprite1)
 Sprite.Show (sprite)
 
 Input.KeyDown (keys)
 drawfilloval (42, 60, 5, 5, blue)
 drawfilloval (42, 85, 5, 5, blue)
 Draw.FillBox (638, 400, 458, 303, white)     %TP window
 Draw.FillBox (638 + 8, 400 + 8, 458 + 8, 303 + 8, blue)     %TP window
 Draw.FillBox (0, 0, maxx, maxy div 4 + 8, white)     %select window
 Draw.FillBox (8, 8, maxx - 10, maxy div 4, blue)     %select window
 Draw.ThickLine (170, 100, 170, 5, 5, white)
 if keys (KEY_UP_ARROW) then
 drawfilloval (42, 60, 5, 5, blue)
 drawfilloval (42, 85, 5, 5, white)
 position := 1
 end if
 if keys (KEY_DOWN_ARROW) then
 drawfilloval (42, 85, 5, 5, blue)
 drawfilloval (42, 57, 5, 5, white)
 position := 2
 end if
 if keys (KEY_RIGHT_ARROW) then
 drawfilloval (42, 85, 5, 5, blue)
 drawfilloval (42, 57, 5, 5, blue)
 drawfilloval (26, 40, 5, 5, white)
 position := 3
 end if
 
 if keys (KEY_LEFT_ARROW) then
 drawfilloval (42, 85, 5, 5, blue)
 drawfilloval (42, 57, 5, 5, blue)
 drawfilloval (26, 40, 5, 5, blue)
 drawfilloval (42, 25, 5, 5, white)
 position := 4
 end if
 
 if keys ('o') then
 put "Welcome to FF2006, using your up arrow key to attack, down to use magic, right to use tp moves, and left to heal yourself"
 end if
 
 if keys (KEY_ENTER) then
 if position = 1 then     %atttack
 characterHP := characterHP - number1
 character2TP := character2TP + 10
 delay (200)
 View.Update
 Draw.ThickLine (57, 116, 121, 173, 10, black)
 Draw.ThickLine (57, 116, 121, 173, 10 - 5, brightred)
 delay (800)
 Draw.ThickLine (120, 114, 51, 175, 10, black)
 Draw.ThickLine (120, 114, 51, 175, 10 - 5, brightred)
 Draw.Text (intstr ((number1)), 60, 203, font, white)
 delay (800)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 exit
 
 elsif characterHP < 1 then
 Draw.Text ("Game Over", 350, 280, font, white)
 exit when characterHP < 1
 elsif position = 2 and character2MP > 1 then
 characterHP := characterHP - number2
 character2MP := character2MP - 10
 exit when characterHP < 1
 delay (200)
 View.Update
 Draw.FillOval (88, 140, 35, 35, white)
 Draw.FillOval (88, 140, 35 - 10, 35 - 10, blue)
 delay (800)
 Draw.FillOval (46, 173, 23, 23, white)
 Draw.FillOval (46, 173, 23 - 5, 23 - 5, blue)
 delay (800)
 Draw.FillOval (130, 150, 23, 23, white)
 Draw.FillOval (130, 150, 23 - 5, 23 - 5, blue)
 delay (800)
 Draw.FillOval (60, 130, 23, 23, white)
 Draw.FillOval (60, 130, 23 - 5, 23 - 5, blue)
 delay (800)
 Draw.Text (intstr ((number2)), 60, 203, font, white)
 delay (1000)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 exit
 elsif character2HP < 1 then
 Draw.Text ("Game Over", 350, 280, font, white)
 exit when characterHP < 1
 View.Update
 
 
 elsif position = 3 and character2TP > 99 then
 characterHP := characterHP - characterTP * 10
 character2TP := character2TP - character2TP
 Draw.Text (intstr ((character2TP * 10)), 60, 203, font, white)
 delay (800)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 View.Update
 elsif character2HP < 1 then
 Draw.Text ("Game Over", 350, 280, font, white)
 exit when character2HP < 1
 delay (200)
 exit
 
 elsif position = 4 and character2MP > 0 then
 character2HP := character2HP + 1000
 character2MP := character2MP - 15
 Draw.Text ("+1000", 265, 203, font, white)
 delay (800)
 Draw.FillBox (0, 0, maxx, maxy, green)
 Draw.FillOval (57, 322, 55, 50, white)
 Draw.FillOval (110, 322, 55, 50, white)
 Draw.FillOval (240, 322, 55, 50, white)
 Draw.FillOval (240 + 70, 322, 55, 50, white)
 exit
 
 end if
 end if
 
 var width : int := Font.Width ("Attack", font)
 var height, ascent, descent, internalLeading : int
 Draw.Text ("Attack", 50, 80, font, white)
 Draw.Text ("Magic", 50, 57, font, white)
 Draw.Text ("Weapon Skill", 38, 37, font, white)
 Draw.Text ("Healing", 50, 18, font, white)
 Draw.Text ("Magus", 250, 80, font, white)
 Draw.Text ("HP", 310, 80, font, white)     %HP
 Draw.Text ("HP", 310, 57, font, white)     %HP
 Draw.Text (intstr (characterHP), 350, 80, font, white)
 Draw.Text ("Cloud", 250, 57, font, white)
 Draw.Text ("/9999", 400, 80, font, white)
 Draw.Text (intstr (character2HP), 350, 57, font, white)
 Draw.Text ("/9999", 400, 57, font, white)     %end of HP
 Draw.Text ("MP", 550, 57, font, white)     %MP
 Draw.Text ("MP", 550, 80, font, white)     %MP
 Draw.Text (intstr (character2MP), 470, 57, font, white)
 Draw.Text ("/100", 500, 80, font, white)
 Draw.Text (intstr (characterMP), 470, 80, font, white)
 Draw.Text ("/100", 500, 57, font, white)     %end of MP
 Draw.Text ("/100", 600, 380, font, white)     %end of TP
 Draw.Text ("/100", 600, 339, font, white)     %end of TP
 Draw.Text ("Cloud", 490, 380, font, white)
 Draw.Text ("Magus", 490, 340, font, white)
 Draw.Text (intstr (characterTP), 570, 380, font, white)     %TP
 Draw.Text (intstr (character2TP), 570, 339, font, white)     %TP
 View.Update
 var x6, y6, button : int
 
 
 
 Mouse.Where (x6, y6, button)
 Text.Locate (1, 1)
 if button = 0 then
 put x6 : 4, "  ", y6 : 4, "  button up"
 else
 
 
 end if
 end loop
 
 end loop
 
 
 |