1;; Thorald is a character in the Tutorial game. 2 3 4(define (thorald-mixi knpc kpc) 5 (say knpc "To M)ix spells first press the 'M' key. " 6 "Then type the first letter of each spell syllable followed by ENTER. " 7 "For example, In Ex Por would be: i, e, p, ENTER.") 8 (prompt-for-key) 9 (say knpc "Next, select the reagents using the space bar. ") 10 (prompt-for-key) 11 (say knpc "Next, press ENTER and type the number of mixtures to make. " 12 "Just mix 1 for now. ") 13 (prompt-for-key) 14 (say knpc "You can see what spells you have mixed with the Z)tatus command. " 15 "Why don't you try mixing one now? Talk to me again when you've succeeded.") 16 (kern-conv-end) 17 ) 18 19(define conv-thorald 20 (ifc nil 21 (method 'bye 22 (lambda (knpc kpc) 23 (say knpc "Oh, I'm sure we'll be seeing more of each other."))) 24 (method 'default 25 (lambda (knpc kpc) 26 (say knpc "I can't help you with that."))) 27 (method 'hail 28 (lambda (knpc kpc) 29 (kern-log-msg "You meet a bored old man.") 30 (if (in-inventory? kpc in_ex_por) 31 (say knpc "I see you have an In Ex Por spell. " 32 "Ask me about casting it if you don't know how.") 33 (say knpc "Welcome to the tutorial. Why don't you ask me about my job, " 34 "or maybe that door over there.") 35 ))) 36 (method 'join 37 (lambda (knpc kpc) 38 (say knpc "Yes, let's get this show on the road. " 39 "Press 'F' and I'll follow you. " 40 "Later if you want me to take turns moving with you, press 'F' again. " 41 "And if you want me to explore while you wait, press '2'. " 42 "You can always press 'F' again to get me to follow you.") 43 (join-player knpc) 44 (kern-conv-end) 45 )) 46 (method 'name 47 (lambda (knpc kpc) 48 (say knpc "I'm Thorald. Hi."))) 49 (method 'job 50 (lambda (knpc kpc) 51 (say knpc "I'm just the hired help."))) 52 (method 'door 53 (lambda (knpc kpc) 54 (say knpc "Yes, I know a spell that can open that magically locked door. " 55 "Imagine that! Why don't you ask me about it?") 56 )) 57 (method 'spel 58 (lambda (knpc kpc) 59 (say knpc "The In Ex Por spell unlocks magically locked doors. " 60 "To mix it you'll need sulphurous ash and blood moss. " 61 "Ask me about mixing if you don't know how."))) 62 (method 'mix thorald-mixi) 63 (method 'mixi thorald-mixi) 64 (method 'cast 65 (lambda (knpc kpc) 66 (say knpc "To C)ast a spell press 'c' and then enter the first letter of each magic word. " 67 "For example, to cast In Ex Por you enter 'i', 'e' and 'p'. " 68 "Use backspace if you mess up. " 69 "When the spell is right hit ENTER to cast it. " 70 "In Ex Por requires you to target the door."))) 71 )) 72 73(define (thorald-ai kchar) #t) 74 75(define (mk-thorald) 76 (kern-mk-char 77 'ch_thorald ; tag 78 "Thorald Greybeard" ; name 79 sp_human ; species 80 oc_wrogue ; occ 81 s_companion_wizard ; sprite 82 faction-player ; starting alignment 83 0 10 2 ; str/int/dex 84 0 1 ; hp mod/mult 85 10 5 ; mp mod/mult 86 240 -1 8 0 8 ; hp/xp/mp/AP_per_turn/lvl 87 #f ; dead 88 'conv-thorald ; conv 89 nil ; sched 90 'thorald-ai ; special ai 91 nil ; container 92 (list t_sling 93 t_armor_leather 94 ) 95 nil 96 )) 97