1;;---------------------------------------------------------------------------- 2;; Schedule 3;; 4;; In Bole. 5;;---------------------------------------------------------------------------- 6(kern-mk-sched 'sch_melvin 7 (list 0 0 bole-bed-melvin "sleeping") 8 (list 7 0 bole-kitchen "working") 9 (list 21 0 bole-bedroom-may "idle") 10 (list 22 0 bole-bed-melvin "sleeping") 11 ) 12 13;;---------------------------------------------------------------------------- 14;; Gob 15;; 16;; Quest flags, etc, go here. 17;;---------------------------------------------------------------------------- 18(define (melvin-mk) nil) 19 20;;---------------------------------------------------------------------------- 21;; Conv 22;; 23;; Melvin is the cook at the Inn in Bole. 24;; He is the (seventh) husband to May. 25;;---------------------------------------------------------------------------- 26(define melv-merch-msgs 27 (list "Come by the tavern when I'm open. I open at 7:00AM and close at midnight." 28 "Try the daily special." ;; buy 29 nil ;; sell 30 nil ;; trade 31 "Not bad, eh?" ;; sold-something 32 "Now don't be shy." ;; sold-nothing 33 nil ;; bought-something 34 nil ;; bought-nothing 35 nil ;; traded-something 36 nil ;; traded-nothing 37 )) 38 39(define melv-catalog 40 (list 41 (list t_beer 4 "Beer; it's what's for breakfast!") 42 (list t_food 3 "Folks say I make the best jalapeno quiche in the Shard!") 43 )) 44 45(define (melvin-buy knpc kpc) (conv-trade knpc kpc "buy" melv-merch-msgs melv-catalog)) 46 47;; basics... 48(define (melvin-default knpc kpc) 49 (say knpc "Ask May about that, I don't know.")) 50 51(define (melvin-hail knpc kpc) 52 (say knpc "[You meet a hungover chef] Hello, partner.")) 53 54(define (melvin-name knpc kpc) 55 (say knpc "I'm Melvin, the cook.")) 56 57(define (melvin-job knpc kpc) 58 (say knpc "I run the Bole Inn & Tavern with my wife, May. I cook, she " 59 "serves.")) 60 61(define (melvin-join knpc kpc) 62 (say knpc "I wouldn't be much good to you, partner. Better leave me here " 63 "to my kitchen where at least I can cook you some grub.")) 64 65(define (melvin-bye knpc kpc) 66 (say knpc "Farewell, partner. Come back any time you're hungry.")) 67 68;; other characters & town... 69(define (melvin-may knpc kpc) 70 (say knpc "My wife May is an ornery woman, but sharp as a tack.")) 71 72(define (melvin-kath knpc kpc) 73 (say knpc "That red lady is a wicked beauty! But I'm neither drunk nor " 74 "fool enough to mingle with wizards business. Take my advice, stay " 75 "far away from her and that thing she travels with!")) 76 77(define (melvin-bill knpc kpc) 78 (say knpc "He's missing a screw or two, but he's a good lad.")) 79 80(define (melvin-thud knpc kpc) 81 (say knpc "That's no man traveling with the red lady, but I've never seen a " 82 "troll that could talk so well. I'm not sure what it is, but magic had " 83 "a hand in making it.")) 84 85(define (melvin-bole knpc kpc) 86 (say knpc "It's a nice enough place.")) 87 88(define (melvin-hack knpc kpc) 89 (say knpc "Hackle lives in the northwest corner of town across the bridge. " 90 "She's a crazy old hedge-witch but harmless.")) 91 92 93;; thief quest... 94(define (melvin-thie knpc kpc) 95 (say knpc "There was a strange rogue who came in here not long ago, " 96 "looking like he had demons hounding his trail. He left shortly after " 97 "the red lady arrived. Spoke with Hackle before he left, I think. " 98 "Most odd.")) 99 100;; misc... 101(define (melvin-wiza knpc kpc) 102 (say knpc "There's foul business afoot! There's something going on between " 103 "that red sorceress and that mysterious rogue, I know it.")) 104 105(define (melvin-inn knpc kpc) 106 (say knpc "If you need a room for the night or something cold to wash the " 107 "dust from your throat, talk to May. But if you're hungry just say so " 108 "and I'll fix you right up!")) 109 110(define (melvin-hung knpc kpc) 111 (say knpc "Are you hungry?") 112 (if (kern-conv-get-yes-no? kpc) 113 (melvin-buy knpc kpc) 114 (say knpc "Well if you get hungry just say so!"))) 115 116(define melvin-conv 117 (ifc basic-conv 118 ;; default if the only "keyword" which may (indeed must!) be longer than 119 ;; 4 characters. The 4-char limit arises from the kernel's practice of 120 ;; truncating all player queries to the first four characters. Default, 121 ;; on the other hand, is a feature of the ifc mechanism (see ifc.scm). 122 (method 'default melvin-default) 123 (method 'hail melvin-hail) 124 (method 'bye melvin-bye) 125 (method 'job melvin-job) 126 (method 'name melvin-name) 127 (method 'join melvin-join) 128 129 (method 'buy melvin-buy) 130 (method 'food melvin-buy) 131 (method 'drin melvin-buy) 132 (method 'supp melvin-buy) 133 (method 'trad melvin-buy) 134 135 (method 'food melvin-buy) 136 (method 'trad melvin-buy) 137 (method 'buy melvin-buy) 138 139 (method 'bill melvin-bill) 140 (method 'cook melvin-inn) 141 (method 'inn melvin-inn) 142 (method 'kath melvin-kath) 143 (method 'red melvin-kath) 144 (method 'lady melvin-kath) 145 (method 'sorc melvin-kath) 146 (method 'may melvin-may) 147 (method 'hack melvin-hack) 148 (method 'hung melvin-hung) 149 (method 'tave melvin-inn) 150 (method 'thud melvin-thud) 151 (method 'thin melvin-thud) 152 (method 'pet melvin-thud) 153 154 (method 'thie melvin-thie) 155 (method 'rogu melvin-thie) 156 (method 'char melvin-thie) 157 )) 158 159;;---------------------------------------------------------------------------- 160;; First-time constructor 161;;---------------------------------------------------------------------------- 162(define (mk-melvin) 163 (bind 164 (kern-mk-char 'ch_melvin ; tag 165 "Melvin" ; name 166 sp_human ; species 167 nil ; occ 168 s_townsman ; sprite 169 faction-men ; starting alignment 170 2 0 1 ; str/int/dex 171 0 0 ; hp mod/mult 172 0 0 ; mp mod/mult 173 max-health -1 max-health 0 3 ; hp/xp/mp/AP_per_turn/lvl 174 #f ; dead 175 'melvin-conv ; conv 176 sch_melvin ; sched 177 'townsman-ai ; special ai 178 nil ; container 179 (list t_dagger) ; readied 180 ) 181 (melvin-mk))) 182