Jump to content




Zoroark and Co.


  • You cannot reply to this topic
9 replies to this topic

#1 Zoroark173

  • Members
  • 22 posts

Posted 18 October 2012 - 06:23 AM

Hello everybody! Here is Zoroark173 with my first released program! I plan on making a multitude of programs, but I shall start you all of with a game that I have made! Note, this is the very first version of the game, so there are many features in it that might be missing that I will add over time!

Installation: To install any of my games, open your computer in game and type in:
pastebin get {pastebin id} {program name}
This will allow you to use pastebin to get any of my programs automagically uploaded to your computer!
Or you can do it the manual wat buy making the .text file in your computers file in your worlds save folder...

SwordQuest v1.1!
In the game SwordQuest, you travel across the land, fighting deadly monsters while trying to stay alive!
Pastebin ID: dpxaV7s9

Manual code:
Spoiler

Changelog:
Spoiler

Note:
You may use my program on your own world or a server, but please do not claim the program as your own, include it in an OS, or use it to make money (eg. adf.ly) without my permission.
People with permssion so far: @NDFJay - in the NDF-OS

#2 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 18 October 2012 - 08:25 AM

Make an else for when you type in 1, 2, or 3 because then if you type 4. It doesn't do anything. Make it restart then and give an error message.

#3 Zoroark173

  • Members
  • 22 posts

Posted 25 December 2012 - 12:24 AM

Version 1.1 is out! Read the changelog for info (Also, a secret Christmas Easter Egg :3 )

#4 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 25 December 2012 - 01:17 AM

For when you get a random monster, these lines can be changed into two simple lines with a table:
var = math.random(1,6)
if var==1 then
  monster = "Goblin"
elseif var==2 then
  monster = "Giant Spider"
elseif var==3 then
  monster = "Dragon Hatchling"  
elseif var==4 then
  monster = "Possessed Santa Clause"
elseif var==5 then
  monster = "Zombie"
elseif var==6 then
  monster = "Skeleton"
end
to this:
t_monsters = {"Goblin", "Giant Spider", "Dragon Hatchling", "Possessed Santa Clause", "Zombie", "Skeleton"}
monster = t_monsters[math.random(1, #t_monsters)]


#5 nutcase84

  • Members
  • 711 posts
  • LocationIn My Lonely Little Computer Corner

Posted 15 January 2013 - 06:35 AM

Screenies? And please put spoilers on your code.

#6 Zoroark173

  • Members
  • 22 posts

Posted 20 January 2013 - 02:32 PM

View PostremiX, on 25 December 2012 - 01:17 AM, said:

For when you get a random monster, these lines can be changed into two simple lines with a table:
var = math.random(1,6)
if var==1 then
  monster = "Goblin"
elseif var==2 then
  monster = "Giant Spider"
elseif var==3 then
  monster = "Dragon Hatchling"  
elseif var==4 then
  monster = "Possessed Santa Clause"
elseif var==5 then
  monster = "Zombie"
elseif var==6 then
  monster = "Skeleton"
end
to this:
t_monsters = {"Goblin", "Giant Spider", "Dragon Hatchling", "Possessed Santa Clause", "Zombie", "Skeleton"}
monster = t_monsters[math.random(1, #t_monsters)]
Thanks RemiX, but I like the way I have it, because it makes it super easy for someone to change it up, and implement their own monsters, without getting a bit confused, especially novice coders.

#7 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 20 January 2013 - 02:35 PM

View PostZoroark173, on 20 January 2013 - 02:32 PM, said:

Thanks RemiX, but I like the way I have it, because it makes it super easy for someone to change it up, and implement their own monsters, without getting a bit confused, especially novice coders.
To add new monsters with remiX's solution it is actually easier to change it meaning less chance for issues arising from them missing to say change the 6 in math.random to add however many they added... to add a new monster to remiX's this is all you have to change
t_monsters = {"Goblin", "Giant Spider", "Dragon Hatchling", "Possessed Santa Clause", "Zombie", "Skeleton", "Some new mob" }
its that easy, there is nothing else to change because the math.random is dynamic to the size of the monsters table...

#8 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 20 January 2013 - 08:35 PM

Yeah, all you have to do is add another string to the table of a new mob's name and it will work 100%. But don't let us force you, you can do it your way if you want :)

#9 Getalife

  • Members
  • 6 posts

Posted 20 January 2013 - 10:24 PM

Tables are always useful for situations like this :)

#10 Skullblade

  • Members
  • 470 posts
  • LocationThe Big Apple, NY

Posted 21 January 2013 - 05:56 AM

Bug:
when you exit you get the error"bios:133: Expected number"





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users