Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help haulting script at a certain spot (continuation on chose your own ending game)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ecookman




PostPosted: Thu Oct 30, 2008 10:36 pm   Post subject: help haulting script at a certain spot (continuation on chose your own ending game)

ya sooo plz what is the command to tell the script to stop at a certain point i have made a uge underscore as to where i would like that command ot go for a quick reference


p.s yes this is last minuite it is due torrmrow at 8:30am and yes it is almost 12am srry is there are bad tags i thind i am going to pass out also srry for spelling mistakes



Turing:

var win : int := Window.Open ("graphics:700;550")
var choice1,choice2,choice3,choice4 : string
var cc : int
cc:=Rand.Int (20,103)
colorback (black)
cls
color (white)
locate (1,35)
put "SURVIVAL GAME"
locate (3,1)
color (42)
put "In this game you will have to follow a story line that every choice you make, could be your last!"
put "You will  play through as character named Link. He is just your every day farm-boy, but  when people are in need he becomes a legendary hero who has been  chosen "..
put "by the gods to protect the vast lands of Hyrule!"
locate (10,1)
put " SO SADDLE UP, WHAT ARE YOU WAITING FOR. AN ADVENTURE LIES AHEAD!!!"
delay (150)

 Music.PlayFileLoop ("hyrule field.wav")
 
 % window size

%color var
var c : int
for: 0..100
delay (100)
colorback (black)
cls
c := Rand.Int (63 ,103)
color (c)
put"                         _____            _____"
put"                        |00000|          |00000|"
put"                        |00000|          |00000|"
put"                        |000__|          |__000|"
put"                          |000|            |000|"
put"                         /0000|            |0000\\"
put"                        /00000|            |00000\\"
put"                       |0000000\\          /0000000|"
put"                       |00000000__________00000000|"
put"     __________________|00000000000000000000000000|"
put"    /00000000000000000000/0000  T H E    L E G E N D    O F"
put"   /00___________00000000__________________   _________        __"
put"  /0/            /00*00/ \\0000000000|\\0000/    \\000|\\00\\       \\0\\"
put" /_/            /00*00/   |00_____00| |00|      |00| \\00\\      /00\\"
put"               /0* *0/    |00|    \\0| |00|      |00|  \\00\\    /0000\\"
put"              /00*00/     |00|  /| \\| |00|      |00|   |00|  /0/\\000\\"
put"             /00000/      |00|__0|    |00|      |00|   |00| /0/  \\000\\"
put"            /00*00/       |00|__0|    |00|      |00|   |00|/00____0000\\"
put"           /0* *0/        |00|  \\|    |00|      |00|  /00//00 ____00000\\"
put"          /00* 0/         |00|     /| |00|   /| |00| /00//000/   \\000000\\"
put"         /00000/          |00======0| |00|___0| |00|/00//000/     \\000000\\"
put"        /00*00/           |000000000|/00000000|/000000//0000\\     /0000000\\"
put"       /0* *0/            //================================================\""
put"      /00*00/            //  /0000000000000000\\"
put"     /00*00/____________//  /000000000000000000\\"
put"    /0000000000000000000/  /0/   THE NOT SO FUN ADVENTURES OF LINK"
put"   /0000000000000000000/   \\| /00000| |000000\\"
put"                             \\/0000| |00000\\/"
put"                                 |00| |00|"
put"                                 |00| |00|"
put"                                 |00| |00|"
put"                                 |00| |00|"
put"                                  ==   =="
end for

cls

put ""
put ""
put ""
put ""
put ""
put ""
put ""
put ""
put ""
put ""

put " It was a clear and sunny day when the goblins came to attack the village."..
put "It was       pillaged, and some people were kindapped."..


put "The only person in the village, strong and    brave enough to face the gobblins horrible and evil leader, Zant was link."..
put "After comming back from defending a small village out-post, Link was told the horrible news."..
put "Within  minuites he set out to find the gobblins that kidnapped the villagers and slay the evil Zant."..

put "While you are riding through Hyrule Field you find piece of clothing, do you want to investigate? (yes or no)"
get choice1

loop
if choice1 not = "yes" or choice1 not= "no" then
   
   
   put "yes or no"
   get choice1

exit when choice1="yes" or choice1 = "no"
end if
end loop
put ""
put""
put""
if choice1 = "yes" then
color (cc)
    put "hmm it appears to be a piiece of one of the villager's clothing,  They must have gone through here!"
  end if
 
if choice1 = "no" then
color(cc)   
        put" With no other leads you continue to search. The next day you find your self going throuhg a cave when the entrance caves in. You are trapped"
        delay(2000)
        put" After spending two days in the cave something is on the other side of the rubble you yell for help. you hear rocks being moved, and then some light. But this was then end. A herd of gobblins had found you and they throw bombs thrugh the hole they made."
       
       
       delay (5000)
       cls
       
       locate (15,35)
       color (brightgreen)
     
       put "GAME OVER"
       Window.Close (win)
       ____________________________________________________________________________________________________________
       end if
       
 
% Chapter 2______________________________________________________________
put "As you are running you find a strange looking wall, one that has never been there before."
put "Do you want to touch it(yes ro no)"
 get choice2

loop
if choice1 = "yes" or choice1 = "no" then
   
   
   put "yes or no"
   get choice2
   exit when choice2="yes" or choice2 = "no"
end if
end loop

put ""
put""
put""
if choice2 = "yes" then
color (cc)
    put "you are warped into another dimention before you lies a small rock."
   
  end if
 
if choice2 = "no" then
color(cc)   
        put"as you turn arround you can see an arrow comming straight for your head it is comming to fast you can't doge it"
       
       
   
       delay (5000)
       cls
       
       locate (15,35)
       color (brightgreen)
     
       put "GAME OVER"
       
         Window.Close (win)
         ____________________________________________________________________________________
       end if
       
%chapter3 PREboss battle________________________________________________________
put " do you want to pick it up (yes nor no)"
get choice3

loop
if choice3 = "yes" or choice3 = "no" then
   
   
   put "yes or no"
   get choice3
   exit when choice3="yes" or choice3 = "no"
end if
end loop

put ""
put""
put""
if choice3 = "no" then
color (cc)
put "you continue walking and then you come across a door. Out from the door Comes the evil Zant!"
    delay (1000)
put "THE EPIC BATTLE BEGINS"
   
  end if
 
if choice3 = "yes" then
color(cc)   
        put"the rock was a bomb. As you pick it up it explpdes you are thrown off a cliff into a pit od spikes"
       
       
   
       delay (5000)
       cls
       
       locate (15,35)
       color (brightgreen)
     
       put "GAME OVER"
        Window.Close (win)
        _______________________________________________________________________________
       end if
 
       
       
%boss battle

var playerhp, monsterhp : int
var playerattk, monsterattk : int
var playerdef: int
var onetwo : int
var monsterchoice: int

randint (playerhp,10,15)
randint (monsterhp,75,250)

loop
randint (playerattk,1,10)
randint (monsterattk,1,20)
randint (playerdef,1,15)
randint (monsterchoice,1,2)

delay(2000)

%player attack or defend
cls
locate (10,1)
put "your hp is ",playerhp
locate (11,1)
put "the monster's hp is ",monsterhp


locate (3,1)

put "press 1 to attack or press 2 to defend"
get onetwo
if onetwo = 1 then
    %player attacks
    put "you hit a ",playerattk
    monsterhp := monsterhp-playerattk
   
    %monster decides what to do - attack or defend
        if monsterchoice = 1 then
            put "the monster attked and hit a ",monsterattk
            playerhp := playerhp-monsterattk
        end if
end if

if onetwo = 2 then
    %player defends
    put "your defence is ",playerdef
    playerhp:=playerhp+playerdef
    %monster decides what to do - attack or defend
        if monsterchoice= 1 then
        put "the monster attked and hit a ",monsterattk
          playerhp := playerhp-monsterattk   
       
           
        end if
end if
if monsterhp<=0 then
cls
locate (13,30)
put "you win"
locate (13,30)
put "you rescue the kidnapped children and return to the village.The world is safe once again"
exit       
elsif playerhp<=0 then
cls
color (brightgreen)
locate (15,35)
       
put "GAME OVER"
exit
end if
end loop











Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Oct 30, 2008 11:39 pm   Post subject: RE:help haulting script at a certain spot (continuation on chose your own ending game)

you are probably looking for quit or return
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
ecookman




PostPosted: Fri Oct 31, 2008 7:08 am   Post subject: RE:help haulting script at a certain spot (continuation on chose your own ending game)

so apply that how???
Tony




PostPosted: Fri Oct 31, 2008 9:34 am   Post subject: RE:help haulting script at a certain spot (continuation on chose your own ending game)

Just use either command in place of "[h]uge underscore"s. They end the program in slightly different ways, so you might want to look up the documentation in the Turing's help file.

Either command can be used directly, without arguments.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
ecookman




PostPosted: Sat Nov 01, 2008 11:43 am   Post subject: RE:help haulting script at a certain spot (continuation on chose your own ending game)

woot it worked

thank you
ecookman




PostPosted: Sat Nov 01, 2008 11:45 am   Post subject: RE:help haulting script at a certain spot (continuation on chose your own ending game)

making new topic called

game almost done final touches need to be applyed
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: