View.Set ("graphics:max,max") % Max Screen Resolution 1011 x 669
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
var place : array 1 .. 6 of int := init (0, 0, 0, 0, 0, 0) % Place Of The Horse
 
var paymoney : array 1 .. 4 of real % The Money Being Paid Or Lost After The Race
 
var bet : array 1 .. 4 of int  % The Money Each Player Placed Down
 
var names : array 1 .. 6 of string := init ("1. SantaBlue", "2. SantaGreen", "3. SantaOrange", "4. SantaPurple", "5. SantaRed", "6. SantaYellow") % Name Of The Horses For Users' Reference
 
var BetOn : array 1 .. 6 of int % The Horse Players Choose To Bet On
 
var advance : int % :=1000
 
var whichHorse : int
 
var fontID := Font.New ("Ariel:20x10:Italic")
 
var capital  : array 1 .. 4 of real:=init( 5000,5000,5000,5000)
 
var betMoney :real
 
var players:string
 
var user:array 1..4 of string := init( "1. Kamoi", "2. Krad", "3. Authrun", "4. Kami-Sama")
 
% user(1) : =  Pic.FileNew ("horsecharacter_01.jpg")
 
% user(2) : =  Pic.FileNew ("horsecharacter_02.jpg")
 
% user(3) : =  Pic.FileNew ("horsecharacter_03.jpg")
 
% user(4) : =  Pic.FileNew ("horsecharacter_04.jpg")
 
var mx, my, mb : int
 
buttonchoose ("multibutton")
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
var HorseID : array 1 .. 6 of int
 
 
HorseID (1) := Pic.FileNew ("santablue.jpg")
 
HorseID (2) := Pic.FileNew ("santagreen.jpg")
 
HorseID (3) := Pic.FileNew ("santaorange.jpg")
 
HorseID (4) := Pic.FileNew ("santapurple.jpg")
 
HorseID (5) := Pic.FileNew ("santared.jpg")
 
HorseID (6) := Pic.FileNew ("santayellow.jpg")
 
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 
% Pic.ScreenLoad ("HorseRacebg.jpg", 0, 0, picMerge) % Background
 
 
% Pic.ScreenLoad ("santablue.jpg", 0, 75, picMerge) % HorseID1
 
% Pic.ScreenLoad ("santagreen.jpg", 0, 150, picMerge) % HorseID2
 
% Pic.ScreenLoad ("santaorange.jpg", 0, 225, picMerge) % HorseID3
 
% Pic.ScreenLoad ("santapurple.jpg", 0, 300, picMerge) % HorseID4
 
% Pic.ScreenLoad ("santared.jpg", 0, 375, picMerge) % HorseID5
 
% Pic.ScreenLoad ("santayellow.jpg", 0, 450, picMerge) % HorseID6
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 
process HoushinEngi
 
    % loop
 
    Music.PlayFile (" HoushinEngi_Will-SeiyuuVersion.mp3")
 
    % end loop
 
end HoushinEngi
 
 
 
 % GET USER NAMES
 
/* Pic.ScreenLoad ("horseraceintro.jpg", 0, 0, picCopy)
 
 
put "Choose Your Character"
 
 
     Pic.ScreenLoad ("horsecharacter_01.jpg", 150,0,picCopy)
 
     Pic.ScreenLoad ("horsecharacter_02.jpg", 350,0,picCopy)
 
     Pic.ScreenLoad ("horsecharacter_03.jpg", 550,0,picCopy)
 
*/ % Pic.ScreenLoad ("horsecharacter_04.jpg", 750,0,picCopy)
 
 
 
% procedure betting (names : array 1.. 4 of string, var money : array 1 .. 4 of real, var BetOn : array 1 .. 4 of int)
 
loop
 
    for i : 1 .. 4
 
 
    Pic.ScreenLoad("HorseRaceNextButton.jpg", maxx, 0, picCopy)
 
 Pic.ScreenLoad ("HorseBettingBG.jpg", 0, 0, picCopy)
 
 Draw.Text (user (1), 0, maxy - 100, fontID, 5)
 
  Draw.Text (user (2), 0, maxy - 250, fontID, 5)
 
  Draw.Text (user (3), 0, maxy - 400, fontID, 5)
 
  Draw.Text (user (4), 0, maxy - 550, fontID, 5)
 
  Pic.ScreenLoad ("horsecharacter_01.jpg", 0,460,picCopy)
 
     Pic.ScreenLoad ("horsecharacter_02.jpg", 0,310,picCopy)
 
     Pic.ScreenLoad ("horsecharacter_03.jpg", 0,160,picCopy)
 
     Pic.ScreenLoad ("horsecharacter_04.jpg", 0,10,picCopy)
 
     get user(i)
 
      end for
 
     cls
 
  for i : 1 .. 4  % for each bettor
 
        Draw.Text (user(i) + " Which Horse Will You Bet On?", 0, maxy - 85, fontID, 5)
 
        Draw.Text (names (1), 0, maxy - 135, fontID, 5)
 
        Draw.Text (names (2), 0, maxy - 185, fontID, 5)
 
        Draw.Text (names (3), 0, maxy - 235, fontID, 5)
 
        Draw.Text (names (4), 0, maxy - 285, fontID, 5)
 
        Draw.Text (names (5), 0, maxy - 335, fontID, 5)
 
        Draw.Text (names (6), 0, maxy - 385, fontID, 5)
 
 get names(i)
 
        % get players
 
       % get BetOn (i)
 
        Draw.Text ("Place Your Bet But You Have $" + realstr(capital(i),7), 0, maxy - 435, fontID, 5)
 
        locatexy( 0, maxy - 465)
 
        get betMoney
 
        capital(i) := capital(i) - betMoney
 
        % paymoney (i) := paymoney (i) - bet (i)
 
 
    end for
 
cls
 
    % end betting
 
    for i : 1 .. 6
 
        Pic.Draw (HorseID (i), place (i), 75 * i, picCopy)
 
    end for
 
 
    % Pic.Draw (HorseID7, place(7),0,525)
 
 
    Pic.ScreenLoad ("HorseRacebg.jpg", 0, 0, picMerge) % Background
 
    View.Set ("offscreenonly") 
 
    loop
 
        randint (whichHorse, 1, 6)
 
        randint (advance, 5, 10)
 
        place (whichHorse) := place (whichHorse) + advance
 
        Pic.Draw (HorseID (whichHorse), place (whichHorse), 75 * whichHorse, picMerge)
 
        % delay (10)
 
        exit when place (whichHorse) >= maxx - 310
 
        View.Update
 
    end loop
 
    View.Set ("nooffscreenonly") 
 
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
cls
 
   betMoney := betMoney * 6
 
   put "You Now Have $", betMoney
 
 
     % if names = BetOn then
 
    % paymoney : = paymoney * 6
 
    % put "You Now Have $", paymoney
 
    % else
 
    % put "You Now Have $", paymoney
 
    % end if
 
end loop
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  |