marmots/haxor.py

58 lines
1.7 KiB
Python
Raw Normal View History

2011-03-19 00:10:02 +00:00
from engine import *
from basetoken import *
import telnet
class IntroTerm(Terminal):
def run(self):
self.newLine(3, 300)
self.type("Logon Please: ")
name = self.getLine()
self.newLine(2, 300)
self.typeLn("Welcome, " + name)
self.type("You have ")
self.wait(200)
self.typeLn("top security clearance.")
self.type("You are looking ")
self.wait(200)
self.typeLn("good to-day.")
while True:
self.typeLn("Would you like to download")
self.type("all secret files? [Y/N] ")
if (self.getPrintableKey().upper() == "Y"):
break
self.printSt("No")
self.newLine()
self.typeLn("But thou must!")
self.wait(500)
self.printSt("Yessir!")
self.newLine(2, 50)
self.type("Downloading... ")
spinner = self.newSpinner()
self.wait(3000)
spinner.die()
blnkScrn = Blinker(self.game, self.setColBg, [ansi.RED, ansi.BLUE])
self.newLine(2, 50)
self.typeLn("EXPERT HAX0R DETECTED")
self.typeLn("CODE RED CODE RED")
self.newLine(2, 400)
self.wait(500)
self.typeLn("OH SHIIIIIIIIIIIIIIIIT!")
self.wait(800)
blnkScrn.die()
self.setColBg(ansi.BLACK)
self.newLine(2, 50)
self.printSt("NO CARRIER")
self.newLine()
self.client.quit()
class Haxor(object):
def __init__(self):
self.game = GmSimple([AutoJoiner, IntroTerm])
def RunGame(self, client):
client.joinGame(self.game)
def RunServer(self):
telnet.RunServer(self.RunGame)
if __name__ == "__main__":
Haxor().RunServer()