1 ;;----------------------------------------------------------------------------
3 ;;----------------------------------------------------------------------------
4 (define may-start-lvl 6)
5 (define inn-room-price 30)
7 ;;----------------------------------------------------------------------------
11 ;;----------------------------------------------------------------------------
12 (kern-mk-sched 'sch_may
13 (list 0 0 bole-bed-may "sleeping")
14 (list 6 0 bole-dining-hall "working")
17 ;;----------------------------------------------------------------------------
20 ;; Quest flags, etc, go here.
21 ;;----------------------------------------------------------------------------
24 ;;----------------------------------------------------------------------------
27 ;; May is a female innkeeper, who lives in Bole.
28 ;; Melvin is her (seventh) husband.
29 ;;----------------------------------------------------------------------------
30 (define (may-trade knpc kpc)
31 (say knpc "Talk to my husband Melvin in the kitchen."))
33 (define (may-hail knpc kpc)
34 (say knpc "[You meet a stout older woman who looks at you keenly] "
35 "I know you are trouble, but I welcome thee."))
37 (define (may-job knpc kpc)
38 (say knpc "I run the tavern with my husband here in the Bole"))
40 (define (may-husband knpc kpc)
41 (say knpc "My husband Melvin is a worthless drunk and a coward "
42 "but he is a good enough cook. I have outlived six other husbands. "
43 "I married him because I needed help running the inn, that is all."))
45 (define (may-other-husbands knpc kpc)
46 (say knpc "My other husbands were all fools! A few, indeed, I loved. "
47 "But they were fools and each met his own foolish death. "
48 "I see that you are a fool, too, and will meet your own foolish "
51 (define (may-tavern knpc kpc)
52 (say knpc "Melvin is the cook and I serve the guests. "
53 "Perhaps you would care to buy a drink or some supper, "
54 "or a room where you may rest."))
56 (define (may-guests knpc kpc)
57 (say knpc "[She gives you a canny look] Aye, even now we have a strange "
58 "woman and her... companion. But perhaps you were looking for "
60 (if (kern-conv-get-yes-no? kpc)
62 (say knpc "Yes, I thought so. And perhaps this other person had "
63 "something of interest to you?")
64 (if (kern-conv-get-yes-no? kpc)
66 (say knpc "How odd, because that item was also of interest to "
67 "our current guests. Not that it is any of my business, "
68 "but one suspects that the woman and he whom you seek "
69 "arranged to meet here. Perhaps to make an... "
71 (say knpc "Well, there was another man here briefly. But he "
72 "left shortly before you arrived.")))
73 (say knpc "Perhaps you are just out admiring the countryside then.")))
75 (define (may-woman knpc kpc)
76 (say knpc "Yes, we don't often get such beautiful people in these parts. "
77 "Poor Bill is quite smitten. And my fool of a husband ogles here "
78 "whenever he gets a chance. [She leans in close and whispers] But "
79 "if she isn't a sorceress, or one in training, then I'm a goose!"))
81 (define (may-companion knpc kpc)
82 (say knpc "This woman travels with a great brute. I suspect he has ogre "
83 "blood in his veins. Obviously he is her protector, though what bind "
84 "she has over him I know not."))
86 (define (may-bill knpc kpc)
87 (say knpc "Aye, Bill is a local boy. Not too bright, but he makes an "
88 "honest living as a woodcutter. He eats here, and sometimes talks "
91 (define (may-hackle knpc kpc)
92 (say knpc "Hackle is a crazy but harmless old hedge-witch who lives across "
93 "the stream. She has a knack for the healing arts but hasn't the wits "
96 (define (may-room knpc kpc)
97 (if (not (string=? "working" (kern-obj-get-activity knpc)))
98 (say knpc "The Inn is closed. Come back in the morning at 0600.")
99 (let ((door (eval 'bole-inn-room-door)))
100 ;; is the room still open?
101 (if (not (door-locked? (kobj-gob door)))
102 ;; yes - remind player
103 (say knpc "Your room is still open.")
104 ;; no - ask if player needs a room
106 (say knpc "Would ye like a room?")
107 (if (kern-conv-get-yes-no? kpc)
108 ;; yes - player wants a room
111 "It will be " inn-room-price " gold, "
112 "and you may use the room as "
113 "long as you are in town. Agreed?")
114 (if (kern-conv-get-yes-no? kpc)
115 ;; yes - player agrees to the price
116 (let ((gold (kern-player-get-gold)))
117 ;; does player have enough gold?
118 (if (>= gold inn-room-price)
119 ;; yes - player has enough gold
121 (kern-player-set-gold
124 (say knpc "Good. Your room is down the hall "
126 (send-signal knpc door 'unlock)
129 ;; no - player does not have enouvh gold)
130 (say knpc "Ye have not the gold!")))
131 ;; no - player does not agree to the price
133 "Sleep on the ground then. Mind the wolves.")))
134 ;; no - player does not want a room
135 (say knpc "Even one such as you must sometimes rest!")))))))
137 (define (may-thief knpc kpc)
138 (say knpc "Ah... thou playest the thief-catcher. I suspected something of "
139 "the kind. We HAVE had some odd guests here lately."))
141 (define (may-trouble knpc kpc)
142 (say knpc "Ye have the hard, pitiless visage like the men of the Old Era. "
143 "But I sense that thou art not unjust."))
147 (method 'default (lambda (knpc kpc) (say knpc "I can't help thee.")))
148 (method 'hail may-hail)
149 (method 'bye (lambda (knpc kpc) (say knpc "Begone then for now.")))
150 (method 'job may-job)
151 (method 'name (lambda (knpc kpc) (say knpc "I am called May.")))
152 (method 'join (lambda (knpc kpc)
153 (say knpc "Don't flatter me with your foolishness.")))
155 (method 'buy may-trade)
156 (method 'food may-trade)
157 (method 'drin may-trade)
158 (method 'supp may-trade)
159 (method 'trade may-trade)
161 (method 'bill may-bill)
162 (method 'comp may-companion)
163 (method 'gues may-guests)
164 (method 'hack may-hackle)
165 (method 'husb may-husband)
166 (method 'inn may-tavern)
167 (method 'melv may-husband)
168 (method 'other may-other-husbands)
169 (method 'run may-tavern)
170 (method 'room may-room)
171 (method 'six may-other-husbands)
172 (method 'tave may-tavern)
173 (method 'thie may-thief)
174 (method 'trou may-trouble)
175 (method 'woma may-woman)
179 ;;----------------------------------------------------------------------------
180 ;; First-time constructor
181 ;;----------------------------------------------------------------------------
188 sp_human ;;.....species
189 nil ;;..........occupation
190 s_townswoman ;;...sprite
191 faction-men ;;..faction
192 0 ;;............custom strength modifier
193 1 ;;............custom intelligence modifier
194 0 ;;............custom dexterity modifier
195 0 ;;............custom base hp modifier
196 0 ;;............custom hp multiplier (per-level)
197 0 ;;............custom base mp modifier
198 0 ;;............custom mp multiplier (per-level)
199 max-health ;;..current hit points
200 -1 ;;...........current experience points
201 max-health ;;..current magic points
203 may-start-lvl ;;..current level
204 #f ;;...........dead?
205 'may-conv ;;...conversation (optional)
206 sch_may ;;.....schedule (optional)
207 'townsman-ai ;;..........custom ai (optional)
208 nil ;;..........container (and contents)
209 (list t_dagger) ;;.........readied arms (in addition to the container contents)
210 nil ;;..........hooks in effect