Advertisement
Ramaraunt1

complex scenario

May 16th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. define dverb "travel":
  2. has form "go down"
  3. has form "travel down"
  4. has form "take"
  5. has form "walk down"
  6. has form "explore"
  7. has action:
  8. if target is path
  9. if target isOpen
  10. travel path
  11. ;
  12. has failure:
  13. "You cannot %dverb %target!"
  14. ;
  15. has success:
  16. "You %dverb the %target(path)"
  17. ;
  18. ;
  19.  
  20. define dverb "travel to":
  21. has form "go to"
  22. has form "take path to"
  23. has form "explore"
  24. has action:
  25. if target (has path to curRoom)
  26. if path (from target to curRoom) isOpen
  27. travel path (from target to curRoom)
  28. ;
  29. has failure:
  30. "You cannot %dverb %target!"
  31. ;
  32. has success:
  33. "You %dverb the %target(path)"
  34. ;
  35. ;
  36.  
  37.  
  38. define actor "player":
  39. bool isplayer
  40. is in "center room"
  41. ;
  42.  
  43. define room "room1":
  44. name "north room"
  45. has path "south" "room5"
  46. ;
  47.  
  48. define room "room2":
  49. name "east room"
  50. has path "west" "room5"
  51. ;
  52.  
  53. define room "room3":
  54. name "south room"
  55. has path "north" "room5"
  56. ;
  57.  
  58. define room "room4":
  59. name "west room"
  60. has path "east" "room5"
  61. ;
  62.  
  63. define room "room5":
  64. has path "north" "room1"
  65. has path "east" "room2"
  66. has path "south" "room3"
  67. has path "west" "room4"
  68. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement