Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- MUD Alpha Test
- -- Player Table
- player = {}
- player.x = 1
- player.y = 1
- -- Location Table
- loc = {}
- loc.x = 1
- loc.y = 1
- loc.dir = "spawn"
- -- Location Data
- locDat = {}
- locDat.spawn = "You are newly spawned into the game."
- locDat.bear = "You turn around to a standing bear. *pwn* *fucksyouup* *dead*."
- locDat.forestA = "You're in a fairly humid forest, and you think that you hear another person talking nearby."
- locDat.forestB = "You're in a very humid forest, and you hear small forest creatures creeping around as you trek through the forest."
- locDat.forestC = "You're in a very humid forest."
- locDat.swamp = "You're in a very muddy, humid swamp."
- locDat.tavern = "You're at the tavern. :D. HAPPY-FUN-TIME-BITCHES."
- locDat.ditch = "You trip on a rock and roll into a ditch filled with mud. Smooth move."
- locDat.trap = "You fell in a hole. Full of spikes and creepers. And the occasional hypodermic needle."
- locDat.admin = "How in the hell did you get here?"
- --ditch - trap - swamp
- --forestB - forestC - tavern
- --spawn - bear - forestA
- -- Main Function
- function mainMenu()
- print("Welcome to the Despair Alpha Test")
- print("A >> Play Game")
- print("B >> Enter a Cheat Code")
- print("C >> Quit")
- input = read()
- if input == "A" then initGame() end
- if input == "B" then initCheat() end
- if input == "C" then initQuit() end
- end
- function moveNorth()
- if loc.dir == "spawn" then loc.dir = "forestB" end
- if loc.dir == "bear" then loc.dir = "forestC" end
- if loc.dir == "admin" then loc.dir = "spawn" end
- if loc.dir == "forestA" then loc.dir = "tavern" end
- if loc.dir == "forestB" then loc.dir = "ditch" end
- if loc.dir == "forestC" then loc.dir = "trap" end
- if loc.dir == "tavern" then loc.dir = "swamp" end
- if loc.dir == "ditch" then loc.dir = "spawn" end
- if loc.dir == "trap" then loc.dir = "bear" end
- if loc.dir == "swamp" then loc.dir = "forestA" end
- mainGame()
- end
- function moveSouth()
- if loc.dir == "spawn" then loc.dir = "ditch" end
- if loc.dir == "bear" then loc.dir = "trap" end
- if loc.dir == "admin" then loc.dir = "spawn" end
- if loc.dir == "forestA" then loc.dir = "swamp" end
- if loc.dir == "forestB" then loc.dir = "spawn" end
- if loc.dir == "forestC" then loc.dir = "bear" end
- if loc.dir == "tavern" then loc.dir = "forestA" end
- if loc.dir == "ditch" then loc.dir = "forestB" end
- if loc.dir == "trap" then loc.dir = "forestC" end
- if loc.dir == "swamp" then loc.dir = "tavern" end
- mainGame()
- end
- function moveEast()
- if loc.dir == "spawn" then loc.dir = "bear" end
- if loc.dir == "bear" then loc.dir = "forestA" end
- if loc.dir == "admin" then loc.dir = "spawn" end
- if loc.dir == "forestA" then loc.dir = "spawn" end
- if loc.dir == "forestB" then loc.dir = "forestC" end
- if loc.dir == "forestC" then loc.dir = "tavern" end
- if loc.dir == "tavern" then loc.dir = "forestB" end
- if loc.dir == "ditch" then loc.dir = "trap" end
- if loc.dir == "trap" then loc.dir = "swamp" end
- if loc.dir == "swamp" then loc.dir = "ditch" end
- mainGame()
- end
- function moveWest()
- if loc.dir == "spawn" then loc.dir = "forestA" end
- if loc.dir == "bear" then loc.dir = "spawn" end
- if loc.dir == "admin" then loc.dir = "spawn" end
- if loc.dir == "forestA" then loc.dir = "bear" end
- if loc.dir == "forestB" then loc.dir = "tavern" end
- if loc.dir == "forestC" then loc.dir = "forestB" end
- if loc.dir == "tavern" then loc.dir = "forestC" end
- if loc.dir == "ditch" then loc.dir = "swamp" end
- if loc.dir == "trap" then loc.dir = "ditch" end
- if loc.dir == "swamp" then loc.dir = "trap" end
- mainGame()
- end
- function mainGame()
- if loc.dir == "spawn" then print(locDat.spawn) end
- if loc.dir == "bear" then print(locDat.bear) end
- if loc.dir == "admin" then print(locDat.admin) end
- if loc.dir == "forestA" then print(locDat.forestA) end
- if loc.dir == "forestB" then print(locDat.forestB) end
- if loc.dir == "forestC" then print(locDat.forestC) end
- if loc.dir == "tavern" then print(locDat.tavern) end
- if loc.dir == "ditch" then print(locDat.ditch) end
- if loc.dir == "trap" then print(locDat.trap) end
- if loc.dir == "swamp" then print(locDat.swamp) end
- print("Enter the direction to move in (N, S, E or W):")
- input = read()
- if input == "N" then moveNorth() end
- if input == "S" then moveSouth() end
- if input == "E" then moveEast() end
- if input == "W" then moveWest() end
- if input == "n" then moveNorth() end
- if input == "s" then moveSouth() end
- if input == "e" then moveEast() end
- if input == "w" then moveWest() end
- end
- function wrongCmd()
- print("Wrong Command")
- mainMenu()
- end
- function initGame()
- print("Welcome to the Alpha Test of the Game :D. Please send anything that you find or want to Sledger721.")
- mainGame()
- end
- function initCheat()
- print("Please enter your cheat code")
- -- Cheating for a cheat? Bitchass :3
- input = read()
- if input == "721" then cheatA()
- if input == "sledger721kicksass" then cheatB()
- else print("Incorrect Code.")
- end
- end
- mainMenu()
- end
- function initQuit()
- os.exit()
- end
- function cheatA()
- print("Nice, but I have nothing to add yet :p")
- sleep(2)
- print("Bitch Please")
- end
- function cheatB()
- print("Nice, but I have nothing to add yet :p")
- sleep(2)
- print("Bitch Please")
- end
- function startUp()
- term.clear()
- mainMenu()
- end
- startUp()
Add Comment
Please, Sign In to add comment