1 ;;----------------------------------------------------------------------------
3 ;;----------------------------------------------------------------------------
5 ;;----------------------------------------------------------------------------
8 ;; The schedule below is for the place "Trigrave"
9 ;;----------------------------------------------------------------------------
10 (kern-mk-sched 'sch_gwen
11 (list 0 0 trigrave-gwens-bed "sleeping")
12 (list 8 0 trigrave-tavern-table-1a "eating")
13 (list 9 0 trigrave-inn-counter "working")
14 (list 13 0 trigrave-tavern-table-1d "eating")
15 (list 14 0 trigrave-inn-counter "working")
16 (list 20 0 trigrave-tavern-table-1a "eating")
17 (list 21 0 trigrave-inn-counter "working")
20 ;;----------------------------------------------------------------------------
23 ;; Quest flags, etc, go here.
24 ;;----------------------------------------------------------------------------
25 (define (gwen-mk) nil)
27 ;;----------------------------------------------------------------------------
30 ;; Gwen is the innkeeper for Trigrave. She is a gracious, mysterious woman.
31 ;;----------------------------------------------------------------------------
32 (define (gwen-trade knpc kpc)
33 (if (not (string=? "working" (kern-obj-get-activity knpc)))
34 (say knpc "Come by my shop when I'm open. "
35 "It's the Gray Dove Inn in the northwest corner of town. "
36 "I open at 9:00AM and close the counter at midnight.")
37 (let ((door (eval 'trigrave-inn-room-1-door)))
38 ;; is the room still open?
39 (if (not (door-locked? (kobj-gob door)))
40 ;; yes - remind player
41 (say knpc "Your room is still open!")
42 ;; no - ask if player needs a room
44 (say knpc "Do you need a room?")
45 (if (kern-conv-get-yes-no? kpc)
46 ;; yes - player wants a room
49 "It will be " trigrave-inn-room-price " gold, "
50 "and you may use the room as "
51 "long as you are in town. Agreed?")
52 (if (kern-conv-get-yes-no? kpc)
53 ;; yes - player agrees to the price
54 (let ((gold (kern-player-get-gold)))
55 ;; does player have enough gold?
56 (if (>= gold trigrave-inn-room-price)
57 ;; yes - player has enough gold
61 trigrave-inn-room-price))
62 (say knpc "You're in room 1. Enjoy your stay!")
63 (send-signal knpc door 'unlock)
66 ;; no - player does not have enouvh gold)
67 (say knpc "Sorry, but you need more gold!")))
68 ;; no - player does not agree to the price
70 "You won't find a better deal in the Peninsula!")))
71 ;; no - player does not want a room
72 (say knpc "Perhaps another time.")))))))
74 (define (gwen-thie knpc kpc)
75 (say knpc "Some recent travelers from Green Tower met a man in great haste heading east through the pass. You might try asking around in Green Tower.")
76 (quest-data-update-with 'questentry-thiefrune 'tower 1 (quest-notify (grant-party-xp-fn 10)))
81 ;; default if the only "keyword" which may (indeed must!) be longer than
82 ;; 4 characters. The 4-char limit arises from the kernel's practice of
83 ;; truncating all player queries to the first four characters. Default,
84 ;; on the other hand, is a feature of the ifc mechanism (see ifc.scm).
85 (method 'default (lambda (knpc kpc)
86 (say knpc "I cannot help you with that")))
89 (kern-print "[You see an enchanting woman dressed in "
90 "gray. Belted to her waist is a long, thin "
92 (say knpc "Welcome, traveler.")))
93 (method 'bye (lambda (knpc kpc) (say knpc "Goodbye.")))
96 (say knpc "I'm the innkeeper of Trigrave.")
97 (gwen-trade knpc kpc)))
98 (method 'name (lambda (knpc kpc) (say knpc "I am Gwen.")))
99 (method 'trad gwen-trade)
102 (say knpc "My journeys are over, "
103 "but thank you for the offer.")))
106 (say knpc "That rapscallion is usually at the tavern. He "
107 "stumbles back to his room here late at night, drunk as a sailor.")))
110 (say knpc "There is not much civilization to speak of around here.")))
113 (say knpc "A sweet but befuddled old man. He keeps the shop "
114 "south of my Inn.")))
116 (lambda (knpc kpc) (say knpc "That is not your business.")))
119 (say knpc "If one wishes to hide from an enemy or a "
120 "shameful act there is no place better than this "
121 "forgotten corner of the Shard.")))
124 (say knpc "I enjoy running the Inn because I get to hear "
125 "news from travelers.")))
128 (say knpc "Handsome, but rather grim. He owns the "
129 "blacksmith shop on the east end.")))
130 (method 'news (lambda (knpc kpc)
131 (say knpc "I've heard the Enchanter is missing something valuable.")))
132 (method 'room gwen-trade)
134 (lambda (knpc kpc) (say knpc "That is not your business.")))
137 (say knpc "It was a gift from a friend.")))
140 (say knpc "The Lusty Juggs is in the south part of town.")))
141 (method 'thie gwen-thie)
144 (say knpc "This is a small town, far from civilization. "
145 "Many come here to escape.")))