Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define dverb "travel":
- has form "go down"
- has form "travel down"
- has form "take"
- has form "walk down"
- has form "explore"
- has action:
- if isPath(target)
- {
- if isOpen(target)
- {
- print(path_get_travel_message(target))
- travel target
- }
- else
- {
- print(path_get_blocked_message(target))
- }
- }
- else
- {
- print(That makes no sense!)
- }
- ;
- ;
- define dverb "travel to":
- has form "go to"
- has form "take path to"
- has form "explore"
- has action:
- if isRoom(target)
- {
- if path_to_room_from_room_exists(curRoom,target)
- {
- if isOpen(get_path_from_room_to_room(curRoom,target))
- {
- print(path_get_travel_message(get_path_from_room_to_room(curRoom,target)))
- travel get_path_from_room_to_room(curRoom,target)
- }
- else
- {
- print(path_get_blocked_message(get_path_from_room_to_room(curRoom,target)))
- }
- }
- else
- {
- print(That is impossible!)
- }
- }
- else
- {
- print(That makes no sense!)
- }
- ;
- ;
- define actor "player":
- bool isplayer
- is in "room5"
- ;
- define room "room1":
- name "north room"
- has path "south" "room5"
- ;
- define room "room2":
- name "east room"
- has path "west" "room5"
- ;
- define room "room3":
- name "south room"
- has path "north" "room5"
- ;
- define room "room4":
- name "west room"
- has path "east" "room5"
- ;
- define room "room5":
- has path "north" "room1"
- has path "east" "room2"
- has path "south" "room3"
- has path "west" "room4"
- ;
Advertisement
Add Comment
Please, Sign In to add comment