1;;---------------------------------------------------------------------------- 2;; Constants 3;;---------------------------------------------------------------------------- 4 5;;---------------------------------------------------------------------------- 6;; Schedule 7;; 8;; The schedule below is for the place "Trigrave" 9;;---------------------------------------------------------------------------- 10(kern-mk-sched 'sch_gwen 11 (list 0 0 trigrave-gwens-bed "sleeping") 12 (list 8 0 trigrave-tavern-table-1a "eating") 13 (list 9 0 trigrave-inn-counter "working") 14 (list 13 0 trigrave-tavern-table-1d "eating") 15 (list 14 0 trigrave-inn-counter "working") 16 (list 20 0 trigrave-tavern-table-1a "eating") 17 (list 21 0 trigrave-inn-counter "working") 18 ) 19 20;;---------------------------------------------------------------------------- 21;; Gob 22;; 23;; Quest flags, etc, go here. 24;;---------------------------------------------------------------------------- 25(define (gwen-mk) nil) 26 27;;---------------------------------------------------------------------------- 28;; Conv 29;; 30;; Gwen is the innkeeper for Trigrave. She is a gracious, mysterious woman. 31;;---------------------------------------------------------------------------- 32(define (gwen-trade knpc kpc) 33 (if (not (string=? "working" (kern-obj-get-activity knpc))) 34 (say knpc "Come by my shop when I'm open. " 35 "It's the Gray Dove Inn in the northwest corner of town. " 36 "I open at 9:00AM and close the counter at midnight.") 37 (let ((door (eval 'trigrave-inn-room-1-door))) 38 ;; is the room still open? 39 (if (not (door-locked? (kobj-gob door))) 40 ;; yes - remind player 41 (say knpc "Your room is still open!") 42 ;; no - ask if player needs a room 43 (begin 44 (say knpc "Do you need a room?") 45 (if (kern-conv-get-yes-no? kpc) 46 ;; yes - player wants a room 47 (begin 48 (say knpc 49 "It will be " trigrave-inn-room-price " gold, " 50 "and you may use the room as " 51 "long as you are in town. Agreed?") 52 (if (kern-conv-get-yes-no? kpc) 53 ;; yes - player agrees to the price 54 (let ((gold (kern-player-get-gold))) 55 ;; does player have enough gold? 56 (if (>= gold trigrave-inn-room-price) 57 ;; yes - player has enough gold 58 (begin 59 (kern-player-set-gold 60 (- gold 61 trigrave-inn-room-price)) 62 (say knpc "You're in room 1. Enjoy your stay!") 63 (send-signal knpc door 'unlock) 64 (kern-conv-end) 65 ) 66 ;; no - player does not have enouvh gold) 67 (say knpc "Sorry, but you need more gold!"))) 68 ;; no - player does not agree to the price 69 (say knpc 70 "You won't find a better deal in the Peninsula!"))) 71 ;; no - player does not want a room 72 (say knpc "Perhaps another time."))))))) 73 74(define (gwen-thie knpc kpc) 75 (say knpc "Some recent travelers from Green Tower met a man in great haste heading east through the pass. You might try asking around in Green Tower.") 76 (quest-data-update-with 'questentry-thiefrune 'tower 1 (quest-notify (grant-party-xp-fn 10))) 77 ) 78 79(define gwen-conv 80 (ifc basic-conv 81 ;; default if the only "keyword" which may (indeed must!) be longer than 82 ;; 4 characters. The 4-char limit arises from the kernel's practice of 83 ;; truncating all player queries to the first four characters. Default, 84 ;; on the other hand, is a feature of the ifc mechanism (see ifc.scm). 85 (method 'default (lambda (knpc kpc) 86 (say knpc "I cannot help you with that"))) 87 (method 'hail 88 (lambda (knpc kpc) 89 (kern-print "[You see an enchanting woman dressed in " 90 "gray. Belted to her waist is a long, thin " 91 "sword.]") 92 (say knpc "Welcome, traveler."))) 93 (method 'bye (lambda (knpc kpc) (say knpc "Goodbye."))) 94 (method 'job 95 (lambda (knpc kpc) 96 (say knpc "I'm the innkeeper of Trigrave.") 97 (gwen-trade knpc kpc))) 98 (method 'name (lambda (knpc kpc) (say knpc "I am Gwen."))) 99 (method 'trad gwen-trade) 100 (method 'join 101 (lambda (knpc kpc) 102 (say knpc "My journeys are over, " 103 "but thank you for the offer."))) 104 (method 'chan 105 (lambda (knpc kpc) 106 (say knpc "That rapscallion is usually at the tavern. He " 107 "stumbles back to his room here late at night, drunk as a sailor."))) 108 (method 'civi 109 (lambda (knpc kpc) 110 (say knpc "There is not much civilization to speak of around here."))) 111 (method 'earl 112 (lambda (knpc kpc) 113 (say knpc "A sweet but befuddled old man. He keeps the shop " 114 "south of my Inn."))) 115 (method 'enem 116 (lambda (knpc kpc) (say knpc "That is not your business."))) 117 (method 'esca 118 (lambda (knpc kpc) 119 (say knpc "If one wishes to hide from an enemy or a " 120 "shameful act there is no place better than this " 121 "forgotten corner of the Shard."))) 122 (method 'inn 123 (lambda (knpc kpc) 124 (say knpc "I enjoy running the Inn because I get to hear " 125 "news from travelers."))) 126 (method 'jim 127 (lambda (knpc kpc) 128 (say knpc "Handsome, but rather grim. He owns the " 129 "blacksmith shop on the east end."))) 130 (method 'news (lambda (knpc kpc) 131 (say knpc "I've heard the Enchanter is missing something valuable."))) 132 (method 'room gwen-trade) 133 (method 'sham 134 (lambda (knpc kpc) (say knpc "That is not your business."))) 135 (method 'swor 136 (lambda (knpc kpc) 137 (say knpc "It was a gift from a friend."))) 138 (method 'tave 139 (lambda (knpc kpc) 140 (say knpc "The Lusty Juggs is in the south part of town."))) 141 (method 'thie gwen-thie) 142 (method 'trig 143 (lambda (knpc kpc) 144 (say knpc "This is a small town, far from civilization. " 145 "Many come here to escape."))) 146 147 )) 148