1 ;;----------------------------------------------------------------------------
3 ;;----------------------------------------------------------------------------
4 (define edward-start-lvl 4)
6 ;;----------------------------------------------------------------------------
9 ;; In the dungeons below Green Tower.
10 ;;----------------------------------------------------------------------------
11 (kern-mk-sched 'sch_edward
12 (list 0 0 gtl-jailor-bed "sleeping")
13 (list 7 0 gtl-jail "working" )
14 (list 21 0 gtl-jailor-bed "sleeping")
17 ;;----------------------------------------------------------------------------
20 ;; Quest flags, etc, go here.
21 ;;----------------------------------------------------------------------------
22 (define (edward-mk) (list #f #f))
23 (define (edward-met? gob) (car gob))
24 (define (edward-meet! gob) (set-car! gob #t))
25 (define (edward-has-nate? gob) (cadr gob))
26 (define (edward-has-nate! gob) (set-car! (cdr gob) #t))
28 ;;----------------------------------------------------------------------------
31 ;; Edward is a old blind man, serving as the jailor
32 ;; in the dungeons below Green Tower.
33 ;;----------------------------------------------------------------------------
34 (define (edward-hail knpc kpc)
35 (meet "You meet a pale old man whose eyes are milky white.")
36 (let ((edward (kobj-gob-data knpc)))
37 (cond ((not (edward-met? edward))
38 (say knpc "Who goes there?")
41 (say knpc "I don't know you. Are you hear to make a jail-break?")
43 (say knpc "Well get on with it! I'm too old to stop you.")
44 (say knpc "That's a relief. I'd have no-one to talk to.")
48 (say knpc "Welcome back. I remember your footfalls.")
51 (define (edward-give-nate knpc kpc)
52 (say knpc "Are you delivering a prisoner?")
54 (cond ((is-only-living-party-member? ch_nate)
55 (say knpc "Turn yourself in if you like, "
56 "but get rid of that dead body first! "
57 "This isn't a morgue.")
60 (say knpc "Oh, good. More company. [He takes Nate into custody and "
61 "locks him in a cell]")
62 (kern-char-leave-player ch_nate)
63 (kern-obj-relocate ch_nate (mk-loc p_green_tower_lower 9 10) nil)
65 (say knpc "Here's your receipt, in case the Captain wants it.")
66 (give (kern-get-player) t_prisoner_receipt 1)
67 (edward-has-nate! (kobj-gob-data knpc))
68 (quest-data-update-with 'questentry-bandits 'nate-given-to-jailor 1 (quest-notify nil))
71 (say knpc "Hokay. [He gives Nate a look, then shrugs]")
74 (define (edward-pris knpc kpc)
75 (cond ((in-player-party? 'ch_nate) (edward-give-nate knpc kpc))
77 (let ((edward (kobj-gob-data knpc)))
78 (if (edward-has-nate? edward)
79 (say knpc "I've got a forest goblin and that fellow you brought in.")
80 (say knpc "I've just got a forest goblin right now. "
81 "He and I can't understand each other, "
82 "but that doesn't stop us from swapping stories."))))
85 (define (edward-gobl knpc kpc)
86 (say knpc "I'm not afraid of them. They never done me no harm."))
88 (define (edward-stor knpc kpc)
89 (say knpc "Have you heard the one about Will-o-the-Woods?")
91 (say knpc "Will-o-the-Woods was a spirit that used to haunt these woods, "
92 "in the old days when the gates worked and the gods were honored. ")
94 (say knpc "If a pretty maiden ventured into the woods alone, "
95 "he would appear as a handsome woodsman or ranger, "
96 "and entice her back to his sacred grove. "
97 "There, he would turn her into a tree. ")
99 (say knpc "That's how the Great Wood got its beginning, in his grove. "
100 "And that's why you find so many haunted trees in the woods even to this day.")
103 (say knpc "No one knows what become of Will-o-the-Woods. "
104 "Passed into legend like the other gods, I suppose.")
107 (define (edward-gate knpc kpc)
108 (say knpc "I don't know anything about them. They used to work, that's all I know."))
110 (define (edward-gods knpc kpc)
111 (say knpc "It's not a good idea to talk about the old gods. "
112 "Folks might think us Accursed if they were to overhear."))
114 (define (edward-accu knpc kpc)
115 (say knpc "The Accursed seek power from the old gods... and other things. "
116 "I've had a few in my jail."))
118 (define (edward-talk knpc kpc)
119 (say knpc "The prisoners are the only ones I can talk to down here."))
121 (define (edward-blin knpc kpc)
122 (say knpc "The dark doesn't bother me. Neither does the light, for that matter. "
123 "It's all the same to me."))
125 (define (edward-guar knpc kpc)
126 (say knpc "Truth be told, I'm not much of a guard."))
128 (define (edward-jail knpc kpc)
129 (cond ((in-player-party? 'ch_nate) (edward-give-nate knpc kpc))
131 (say knpc "I feed the prisoners and swap stories with them. "
132 "I'm supposed to guard them, too. Prevent escapes.")
137 ;; default if the only "keyword" which may (indeed must!) be longer than
138 ;; 4 characters. The 4-char limit arises from the kernel's practice of
139 ;; truncating all player queries to the first four characters. Default,
140 ;; on the other hand, is a feature of the ifc mechanism (see ifc.scm).
143 (say knpc "[He shrugs]")))
144 (method 'hail edward-hail)
147 (say knpc "Watch your step in the dark!")))
150 (say knpc "I'm the jailor.")))
153 (say knpc "I am Edward. And you already told me your name.")))
156 (say knpc "Love to. [But he doesn't]")))
157 (method 'accu edward-accu)
158 (method 'blin edward-blin)
159 (method 'esca edward-guar)
160 (method 'gate edward-gate)
161 (method 'gobl edward-gobl)
162 (method 'god edward-gods)
163 (method 'gods edward-gods)
164 (method 'guar edward-guar)
165 (method 'jail edward-jail)
166 (method 'old edward-gods)
167 (method 'pris edward-pris)
168 (method 'stor edward-stor)
169 (method 'talk edward-talk)
172 ;;----------------------------------------------------------------------------
173 ;; First-time constructor
174 ;;----------------------------------------------------------------------------
179 'ch_edward ;;..........tag
180 "Edward" ;;.......name
181 sp_human ;;.....species
182 oc_ranger ;;.. .occupation
183 s_old_townsman ;;..sprite
184 faction-men ;;..faction
185 0 ;;...........custom strength modifier
186 0 ;;...........custom intelligence modifier
187 0 ;;...........custom dexterity modifier
188 0 ;;............custom base hp modifier
189 0 ;;............custom hp multiplier (per-level)
190 0 ;;............custom base mp modifier
191 0 ;;............custom mp multiplier (per-level)
192 max-health ;;..current hit points
193 -1 ;;...........current experience points
194 max-health ;;..current magic points
196 edward-start-lvl ;;..current level
197 #f ;;...........dead?
198 'edward-conv ;;...conversation (optional)
199 sch_edward ;;.....schedule (optional)
200 'townsman-ai ;;..........custom ai (optional)
202 ;;..............container (and contents)
208 (list t_armor_leather) ; readied ;;.........readied arms (in addition to the container contents)
209 nil ;;..........hooks in effect