gbear605 wrote:
type in ruby zork.exe
if that doesn't work type zork.exe
if that doesn't work type zork.rb
if that doesn't work, google it.
That opens up it in a text editor
Offline
ProgrammingFreak wrote:
into cmd of windows or like ruby.exe? (exe is the extension for Windows)
Could you save it as ruby.rb please, thank you. You can edit it in a text-editor like notepad, and then save it as .rb if you want.
Offline
ProgrammingFreak wrote:
gbear605 wrote:
type in ruby zork.exe
if that doesn't work type zork.exe
if that doesn't work type zork.rb
if that doesn't work, google it.That opens up it in a text editor
Did you try ruby zork.exe
Offline
gbear605 wrote:
ProgrammingFreak wrote:
into cmd of windows or like ruby.exe? (exe is the extension for Windows)
Could you save it as ruby.rb please, thank you. You can edit it in a text-editor like notepad, and then save it as .rb if you want.
change the Ruby interperter?
Offline
ProgrammingFreak wrote:
gbear605 wrote:
ProgrammingFreak wrote:
into cmd of windows or like ruby.exe? (exe is the extension for Windows)
Could you save it as ruby.rb please, thank you. You can edit it in a text-editor like notepad, and then save it as .rb if you want.
change the Ruby interperter?
I mean the thing you downloaded.
Offline
got to go.
heres what I finished:
if TypeOfMagic == "light"
#light tutoring
puts "You appear in a room that looks like it's on a cloud"
puts "Hello #{name.capitalize}. My name is #{Tutor}."
puts "My job is to teach you #{TypeOfMagic} magic."
puts "The mysterious thing about the light is that it"
puts "is everywhere. The dark are afraid of it."
puts "Unless their knoledge in magic is stronger."
puts "What would you like to learn first?"
puts "'Force' or 'spells'?"
firstlesson = gets.chomp
if firstlesson == "force"
puts "You have chosen #{firstlesson}"
if firstlesson == "spells"
else
puts "I did not understand that."Offline
Ok, from now on lets just post the code (the whole file) in a code box like you did before.
Offline
new:
#!/usr/bin/env ruby
#intro
puts "Welcome to Zork"
#puts "What version of zork would you like?"
#TypeOfZork = get.chomp
#if TypeOfZork ==
puts "What is your name?"
name = gets.chomp
puts "Okay, so, your name is #{name.capitalize}."
#going in
puts "You appear in front of a large tower. There is a sign saying it is the 'Tower of Magic'"
puts "Options: 'enter'"
x = gets.chomp
if x == "enter"
puts "You enter the building"
#choosing a tutor
puts "Two men appear. One has a staff and is bald. The other has a black goatee and black hair."
puts "Options: 'bald wizard' or 'goatee wizard'"
x = gets.chomp
if x == "bald wizard"
TypeOfMagic = "light"
Tutor = "Gunnar"
puts "The bald wizard use his staff to make you teleport away."
#choosing a kind of staff
puts "You appear in a wooded area. The wizard tells you to find a tree."
puts "Options: 'willow', 'maple', or 'oak'"
staffType = gets.chomp
puts "You choose a #{staffType} staff."
else
if x == "goatee wizard"
TypeOfMagic = "dark"
Tutor = "Krolax"
puts "The wizard with the goatee teleports you away with just his hands."
else
puts "You typed something that wasn't an answer!"
TypeOfMagic = "Fail"
end
end
else
puts "You typed something that wasn't an answer!"
TypeOfMagic = "Fail"
end
#end intro
#begin tutoring
if TypeOfMagic == "light"
#light tutoring
puts "You appear in a room that looks like it's on a cloud"
puts "Hello #{name.capitalize}. My name is #{Tutor}."
puts "My job is to teach you #{TypeOfMagic} magic."
puts "The mysterious thing about the light is that it"
puts "is everywhere. The dark are afraid of it."
puts "Unless their knowledge in magic is stronger."
puts "What would you like to learn first?"
puts "Options: 'force' or 'spells'?"
firstlesson = gets.chomp
if firstlesson != "force" || "spells"
if firstlesson == "force"
puts "You have chosen #{firstlesson}."
else
if firstlesson == "spells"
puts "You have chosen #{firstlesson}."
end
end
else
puts "I did not understand that."
end
else
if TypeOfMagic == "dark"
#dark tutoring
puts "You appear in a room with stones on all sides."
puts "Hello #{name.capitalize}. My name is #{Tutor}."
puts "My job is to teach you #{TypeOfMagic} magic."
puts "#{Tutor} summons an imp."
#some stuff about learning dark magic
end
end
#You exit the tower.
#Adventure stuff
#During this time you meet your tutor some more and learn new stuff.
#That's it so far.Offline
tell me where we are going with this!
Offline
ProgrammingFreak wrote:
tell me where we are going with this!
I think we should have some evil bad guy at the end. I'll start making him.
Offline
We now will have the most recent code on the first post.
Offline
No I mean what are we going to do in the story?
Offline
ProgrammingFreak wrote:
No I mean what are we going to do in the story?
I think in general we will make up the story as we go along. You can make it up if you want. I fail at stories myself.
Offline
puts "Spells contain of one word"
puts "such as 'Beloga'"
puts "Suddenly fire appeared."
puts "In battle these words will help."
puts "Now you are ready for a lesson of the force."put this after the if firstlesson == "spells" puts "You have chosen #{firstlesson}."
Offline
Heres the full text:
#!/usr/bin/env ruby
#intro
puts "Welcome to Zork"
#puts "What version of zork would you like?"
#TypeOfZork = get.chomp
#if TypeOfZork ==
puts "What is your name?"
name = gets.chomp
puts "Okay, so, your name is #{name.capitalize}."
#going in
puts "You appear in front of a large tower. There is a sign saying it is the 'Tower of Magic'"
puts "Options: 'enter'"
x = gets.chomp
if x == "enter"
puts "You enter the building"
#choosing a tutor
puts "Two men appear. One has a staff and is bald. The other has a black goatee and black hair."
puts "Options: 'bald wizard' or 'goatee wizard'"
x = gets.chomp
if x == "bald wizard"
TypeOfMagic = "light"
Tutor = "Gunnar"
puts "The bald wizard use his staff to make you teleport away."
#choosing a kind of staff
puts "You appear in a wooded area. The wizard tells you to find a tree."
puts "Options: 'willow', 'maple', or 'oak'"
staffType = gets.chomp
puts "You choose a #{staffType} staff."
else
if x == "goatee wizard"
TypeOfMagic = "dark"
Tutor = "Krolax"
puts "The wizard with the goatee teleports you away with just his hands."
else
puts "You typed something that wasn't an answer!"
TypeOfMagic = "Fail"
end
end
else
puts "You typed something that wasn't an answer!"
TypeOfMagic = "Fail"
end
#end intro
#begin tutoring
if TypeOfMagic == "light"
#light tutoring
puts "You appear in a room that looks like it's on a cloud"
puts "Hello #{name.capitalize}. My name is #{Tutor}."
puts "My job is to teach you #{TypeOfMagic} magic."
puts "The mysterious thing about the light is that it"
puts "is everywhere. The dark are afraid of it."
puts "Unless their knowledge in magic is stronger."
puts "What would you like to learn first?"
puts "Options: 'force' or 'spells'?"
firstlesson = gets.chomp
if firstlesson != "force" || "spells"
if firstlesson == "force"
puts "You have chosen #{firstlesson}."
puts "The force is a strong element"
puts "of magic. To use it, you must do so wisely."
puts "Much destruction comes from one who uses the force foolishley."
puts "To do the force, squeeze your hands (or for you from the other lands, type 'force')"
puts "Practice:"
prct = gets.chomp;
if prct == "force"
puts "Congratulations! You have used the force!"
puts "The force has moved a bowl."
end
else
if firstlesson == "spells"
puts "You have chosen #{firstlesson}."
puts "Spells contain of one word"
puts "such as 'Beloga'"
puts "Suddenly fire appeared."
puts "In battle these words will help."
puts "Now you are ready for a lesson of the force."
end
end
else
puts "I did not understand that."
end
else
if TypeOfMagic == "dark"
#dark tutoring
puts "You appear in a room with stones on all sides."
puts "Hello #{name.capitalize}. My name is #{Tutor}."
puts "My job is to teach you #{TypeOfMagic} magic."
puts "#{Tutor} summons an imp."
#some stuff about learning dark magic
end
end
#You exit the tower.
#Adventure stuff
#During this time you meet your tutor some more and learn new stuff.
#That's it so far.Offline
I put up a new version. It contains a progress thing.
Offline