Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- funkytown()
- {
- funkytime;
- func bool randChance()
- {
- return(tobol(selectstring("true","false")));
- };
- }
- def Grammar(verb.indrect, "goto")
- {
- init()
- {
- this.terms = {"goto", "travel to", "walk to", "jog to", "move to"};
- this.termsPast = {"went to", prev, prev, prev, prev};
- };
- action()
- {
- if(target.isRoom && listContainsStruct(1, getRoomOfObject(player).connections,target))
- {
- print("You " + termUsed + " to the" + target.name);
- moveObject(player, target);
- }
- else()
- {
- print("You cannot " + termUsed + " that!");
- };
- };
- };
- def Grammar(verb.indrect, "take")
- {
- init()
- {
- this.terms = {"take", "pick up", "pickup", "pick-up"};
- this.termsPast = {"took", "picked up", prev, prev};
- };
- action()
- {
- if(target.isobject && target.isTakable)
- {
- print("You " + termUsed + " " + target.name);
- moveObject(target, player.inventory);
- }
- else()
- {
- print("You cannot " + termUsed + " that!");
- };
- };
- };
- def Thing(Room , "Center Room")
- {
- init()
- {
- this.connections.add(Room("Left Room"), Direction("west"));
- this.connections.add(Room("Right Room"), Direction("east"));
- this.connections.add(def Thing(Room , "North Room"){}, north);
- this.description = "This room is very boring, with yellow walls and a black ceiling. The floor is made of cement.";
- };
- override(verb.indrect, "goto")
- {
- if(target.name == "North Room")
- {
- print("You cannot go that way. The passage is blocked off.");
- }
- else
- {
- Inherited();
- }
- }
- };
- def Thing(Room, "Left Room")
- {
- init()
- {
- this.connections.add(Room("Center Room", Direction("east"));
- };
- };
- def Thing(Room, "Right Room")
- {
- init()
- {
- this.connections.add(Room("Center Room", Direction("west"));
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement