1 ;;----------------------------------------------------------------------------
3 ;;----------------------------------------------------------------------------
4 (define mouse-start-lvl 8)
6 ;;----------------------------------------------------------------------------
8 ;;----------------------------------------------------------------------------
10 ;;----------------------------------------------------------------------------
13 ;; Quest flags, etc, go here.
14 ;;----------------------------------------------------------------------------
15 (define (mouse-mk) (list #t))
16 (define (mouse-first-meeting? mouse) (car mouse))
17 (define (mouse-set-first-meeting! mouse val) (set-car! mouse val))
18 (define (mouse-talked)
19 (quest-data-update-with 'questentry-thiefrune 'talked 1 (quest-notify (grant-party-xp-fn 10)))
23 (define (mouse-meet-first-time knpc kpc)
25 (define (mouse-disappear)
26 (say knpc "Oh, bother. Not again!")
27 (kern-obj-add-effect knpc ef_invisibility nil)
32 (say knpc "Hi. You weren't sent by the Red Lady, were you?")
36 (say knpc "Whew! You scared me for a minute.")
41 (define (mouse-gratitude)
42 (say knpc "Praise be to Alopex! The Red Lady is dead! "
43 "You've done me a great favor.")
47 (define (kathryn-speech)
48 (say ch_kathryn "Fool, you have led me right to the thief!")
49 (kern-obj-set-conv ch_kathryn nil)
50 (kern-being-set-base-faction ch_kathryn faction-monster))
53 (say ch_thud "Thief here! Kill! Kill! Kill!")
54 (kern-obj-set-conv ch_thud nil)
55 (kern-being-set-base-faction ch_thud faction-monster))
58 (open-moongate (mk-loc (loc-place (kern-obj-get-location knpc)) 7 2)))
60 (define (warp-in-kathryn kgate)
62 (kern-obj-get-location kgate)
66 (define (warp-in-thud kgate)
68 (kern-obj-get-location kgate)
72 (mouse-set-first-meeting! (kobj-gob-data knpc) #f)
73 (if (defined? 'ch_kathryn)
74 (if (is-alive? ch_kathryn)
75 (if (is-player-party-member? ch_kathryn)
77 ;; kathryn is alive in the party (if thud is defined then he must
78 ;; be in the party, too; see kathryn.scm)
80 (kern-char-leave-player ch_kathryn)
82 (if (defined? 'ch_thud)
84 (if (is-alive? ch_thud)
86 (kern-char-leave-player ch_thud)))
89 ;; kathryn is alive but not in the party so gate her in, and
90 ;; thud, too, if he's alive
91 (let ((kgate (open-gate))
92 (use-thud? (and (defined? 'ch_thud)
93 (is-alive? ch_thud))))
95 (warp-in-kathryn kgate)
102 (close-moongate kgate)
106 (if (is-player-party-member? ch_kathryn)
108 ;; but in the party so remove her and thud, too, if he's defined
110 (kern-char-leave-player ch_kathryn)
111 (if (defined? 'ch_thud)
112 (if (is-alive? ch_thud)
115 (kern-char-leave-player ch_thud)
118 (kern-char-leave-player ch_thud)
122 ;; kathryn is dead but not in the party (since she is not in the
123 ;; party, thud cannot be either)
126 ;; kathryn is undefined (so she could never have been in the party, and
127 ;; thus neither could thud)
130 ;;----------------------------------------------------------------------------
132 ;;----------------------------------------------------------------------------
133 (define (mouse-hail knpc kpc)
134 (let ((mouse (kobj-gob-data knpc)))
135 (if (mouse-first-meeting? mouse)
136 (mouse-meet-first-time knpc kpc)
138 (say knpc "Ah, hello. Heh.")
143 (define (mouse-default knpc kpc)
144 (say knpc "Got me there."))
146 (define (mouse-name knpc kpc)
147 (say knpc "I'm the Mouse."))
149 (define (mouse-join knpc kpc)
150 (say knpc "Sorry, I'm not a team player. Heh."))
152 (define (mouse-job knpc kpc)
153 (say knpc "I... uh... collect things."))
156 (define (mouse-coll knpc kpc)
157 (say knpc "Some might even call me a thief."))
159 (define (mouse-thie knpc kpc)
160 (say knpc "Until recently it was a good business. Somebody wants "
161 "something, they pay me to get it. But then I was hired by this "
162 "strange lady in red."))
164 (define (mouse-lady knpc kpc)
165 (say knpc "The lady hired me to get something and then meet her to "
166 "exchange it for payment. All very typical, you know? But instead "
167 "of paying me, she tried to kill me!"))
169 (define (mouse-kill knpc kpc)
170 (say knpc "That red lady and her brute were relentless! I can't thank you "
171 "enough for getting rid of them, but I have a bad feeling they weren't "
172 "working alone. I'll be hunted for the rest of my life unless I can "
173 "get rid of this stupid rune!"))
175 (define (mouse-rune knpc kpc)
176 (if (not (in-inventory? knpc t_rune_k))
177 (say knpc "It's your problem now, buddy!")
180 (define (give-rune gold)
181 (let* ((pgold (kern-player-get-gold)))
183 (kern-obj-add-gold kpc (- 0 gold))
184 (let ((price (min pgold gold)))
185 (say knpc "You don't have enough! Oh well, I'll just take "
186 "whatever you can give me for it.")
187 (kern-obj-add-gold kpc (- 0 price)))))
188 (kern-obj-remove-from-inventory knpc t_rune_k 1)
189 (kern-obj-add-to-inventory kpc t_rune_k 1)
190 (quest-data-update-with 'questentry-thiefrune 'recovered 1 (quest-notify (grant-party-xp-fn 50)))
193 (say knpc "This rune I got for the red lady has been nothing but "
194 "trouble since I first heard of it. I don't even know what "
195 "it's good for! I'll give you a really good deal on it. Say, "
197 (if (kern-conv-get-yes-no? kpc)
200 (say knpc "Well, I guess I do owe you for saving me from "
201 "that red lady. How about 250 gold?")
202 (if (kern-conv-get-yes-no? kpc)
205 (say knpc "You drive a hard bargain, buddy. 100 gold?")
206 (if (kern-conv-get-yes-no? kpc)
210 (if (kern-conv-get-yes-no? kpc)
213 (say knpc "Look, just take it ok?")
214 (if (kern-conv-get-yes-no? kpc)
217 (say knpc "I'm desperate! Here, "
218 "I'll pay YOU to take it! "
219 "Just get it away from me!")
220 (give-rune (- 0 100))))))
223 (define (mouse-bye knpc kpc)
224 (say knpc "No offense, but I hope we never meet again."))
226 (define (mouse-alopex knpc kpc)
227 (say knpc "Alopex? Oh, the old god of thieves. "
228 "Or so I've heard."))
232 (method 'default mouse-default)
233 (method 'hail mouse-hail)
234 (method 'bye mouse-bye)
235 (method 'job mouse-job)
236 (method 'name mouse-name)
237 (method 'join mouse-join)
239 (method 'coll mouse-coll)
240 (method 'kill mouse-kill)
241 (method 'lady mouse-lady)
242 (method 'rune mouse-rune)
243 (method 'thie mouse-thie)
244 (method 'alop mouse-alopex)
247 ;;----------------------------------------------------------------------------
248 ;; First-time constructor
249 ;;----------------------------------------------------------------------------
252 (kern-char-force-drop
257 sp_human ;;.....species
258 nil ;;..........occupation
259 s_brigand ;;.....sprite
260 faction-men ;;..faction
261 0 ;;............custom strength modifier
262 0 ;;............custom intelligence modifier
263 6 ;;............custom dexterity modifier
264 2 ;;............custom base hp modifier
265 2 ;;............custom hp multiplier (per-level)
266 1 ;;............custom base mp modifier
267 1 ;;............custom mp multiplier (per-level)
268 max-health ;;..current hit points
269 -1 ;;...........current experience points
270 max-health ;;..current magic points
272 mouse-start-lvl ;;..current level
273 #f ;;...........dead?
274 'mouse-conv ;;...conversation (optional)
275 nil ;;..........schedule (optional)
276 nil ;;..........custom ai (optional)
278 ;;..........container (and contents)
282 (list 1 t_armor_leather)
283 (list 1 t_leather_helm)
288 nil ;;..........readied arms (in addition to the container contents)
289 nil ;;..........hooks in effect