Advertisement
Ramaraunt1

Untitled

May 25th, 2017
123
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. funkytown()
  2. {
  3. funkytime;
  4.  
  5. func bool randChance()
  6. {
  7. return(tobol(selectstring("true","false")));
  8. };
  9. }
  10.  
  11. def Grammar(verb.indrect, "goto")
  12. {
  13. init()
  14. {
  15. this.terms = {"goto", "travel to", "walk to", "jog to", "move to"};
  16. this.termsPast = {"went to", prev, prev, prev, prev};
  17. };
  18. action()
  19. {
  20. if(target.isRoom && listContainsStruct(1, getRoomOfObject(player).connections,target))
  21. {
  22. print("You " + termUsed + " to the" + target.name);
  23. moveObject(player, target);
  24. }
  25. else()
  26. {
  27. print("You cannot " + termUsed + " that!");
  28. };
  29. };
  30. };
  31.  
  32. def Grammar(verb.indrect, "take")
  33. {
  34. init()
  35. {
  36. this.terms = {"take", "pick up", "pickup", "pick-up"};
  37. this.termsPast = {"took", "picked up", prev, prev};
  38. };
  39. action()
  40. {
  41. if(target.isobject && target.isTakable)
  42. {
  43. print("You " + termUsed + " " + target.name);
  44. moveObject(target, player.inventory);
  45. }
  46. else()
  47. {
  48. print("You cannot " + termUsed + " that!");
  49. };
  50. };
  51. };
  52.  
  53. def Thing(Room , "Center Room")
  54. {
  55. init()
  56. {
  57. this.connections.add(Room("Left Room"), Direction("west"));
  58. this.connections.add(Room("Right Room"), Direction("east"));
  59. this.connections.add(def Thing(Room , "North Room"){}, north);
  60. this.description = "This room is very boring, with yellow walls and a black ceiling. The floor is made of cement.";
  61. };
  62. override(verb.indrect, "goto")
  63. {
  64. if(target.name == "North Room")
  65. {
  66. print("You cannot go that way. The passage is blocked off.");
  67. }
  68. else
  69. {
  70. Inherited();
  71. }
  72. }
  73. };
  74.  
  75. def Thing(Room, "Left Room")
  76. {
  77. init()
  78. {
  79. this.connections.add(Room("Center Room", Direction("east"));
  80. };
  81. };
  82.  
  83. def Thing(Room, "Right Room")
  84. {
  85. init()
  86. {
  87. this.connections.add(Room("Center Room", Direction("west"));
  88. };
  89. };
Advertisement
RAW Paste Data Copied
Advertisement