Quantcast XP Math - Forums - View Single Post - Game! (TI83 Program)
View Single Post
Old 05-05-2007   #8
Scion

 
Join Date: Nov 2006
Posts: 437
Default subprograms

things enclosed in{} are notes.
This is program disp

PHP Code:
:disp "1)sword"
:disp "2)punch"
:disp "3)fire"
:disp "4)ice"
:Prompt F 
program sword

PHP Code:
:If f=1
:then
:x{will be explained in main game}-randint(.5B,.97B)>x
:disp "hp:"
:disp x
:if x<0
:prgrm menu{will be same thing as regular game except different monsters.
:
A-5>A
:Disp "U Hp:"
:Disp A
:End{end is only used for when the then functipon has 2 or more lines of coding after it
Program punch

PHP Code:
:If f=2
:then x-.6B>x
:disp :Hp:"
:disp x
:if x<0
:prgrm menu
:A-5>A
:disp "
U Hp:"
:disp a
:end 
program fire

PHP Code:
:If f=3
:x-randint(.53C,.98C)>x
:disp "hp:"
:disp x
:if x<0
:prgrm menu
:A-5>A
:Disp "u hp:"
:disp a
:end 
program ice

PHP Code:
:If f=4
:then x-.76c>x
:disp "hp:"
:disp x
:if x<0
:prgrm menu
:a-5>a
:Disp "u hp:"
:disp a
:end 
__________________

Last edited by Scion; 05-05-2007 at 04:03 PM..
Scion is offline