NPC Uncle "Uncle Ogdajon" with description [; print "Uncle Ogdajon is a scruffy old man, worn from years in the plumbing business."; print " He appears to be carrying "; if (child(self) == 0) print "nothing",(string) random(".^"," important.^"," interesting.^"); else { writelistfrom(child(self),ENGLISH_BIT+WORKFLAG_BIT+PARTINV_BIT+TERSE_BIT+CONCEAL_BIT,1); ".^"; } ], name 'uncle' 'ogdajon' 'Cornelius' 'H//', AdjBefore [c Adj; switch(Adj) { ADJ_GEN: if (c==1) print "your "; c++; } return c; ], walks [; print (string) random(" ambles his way"," ambles"," walks"); ], counter 0, copies_made 0, anger 0, before [; Listen: "You train your ears on your Uncle."; ], life [; Give: if (self.WantsIt(noun)) { voxto(self,actor,"Thanks very much.",-5,actor); move noun to self; rtrue; } voxto(self,actor,"Don't give me that!"); self.SetPro(noun); rtrue; ], daemon [; switch(self.counter) { 0: if(self in location) { emit(self,"^Your uncle reaches into his pocket and pulls forth a folded napkin.^"); self.counter++; move napkin to self; self.SetPro(napkin); } 1: if(self in location) { emit(self,"^~It seems that old Biff has gone and pissed off the Mafia again,~ says your uncle.^^ He unfolds the napkin and shakes some donut crumbs from it.^"); self.counter++; self.SetPro(Biff); } 2: if(self in location) { emit(self,"^Your uncle continues, ~only this time, he didn't have any chewing gum with him, and well, I'm afraid he's about 6 leagues under.~^"); self.counter++; emit(aunt,"^~Oh dear,~ remarks your aunt.^"); } 3: if(self in location) { emit(self,"^More of your family is listening to Uncle Ogdajon now.^^ ~Here I have his last will and testament, written on this napkin. It's sort of a strange will, but I guess he wrote it in a hurry! Heh. It says,~^^"); emit(self," dear family,^"); emit(self," I, Biff, of sound mind and slightly mutilated body,^"); emit(self," will my entire estate to the member of my family^"); emit(self," who can retrieve the most of the following items:^"); emit(cousin,"^~Alright!~ whoops your cousin.^"); emit(self,"^~And then there's a list.~ says your uncle.^"); self.counter++; napkin.number = 1; } 4: if(self in location) { emit(self,"^You uncle folds up the napkin, and finishes, ~I guess I'll go make some photocopies of it and we can get started!~^^"); self.counter++; self.brainadd(1,5); cousin.brainadd(1,5); sister.brainadd(1,5); aunt.brainadd(1,5); } } self.live(); if (self.anger > 0) self.anger --; ], aggrivate [ a o; self.anger = self.anger + a; if (self.anger > 4) voxto(self,o,"Jesus! Frig right off!"); else if (self.anger > 2) voxto(self,o,"Stop that!"); ], NPC_hear [o s a b c p; if (o ofclass phone && o.connection) p = (o.connection).caller; else p = o; switch(s) { uncle: ! p asks uncle to do a,b,c switch(a) { ##NotUnderStood: self.huh(o); ##give: if (b in self) switch(c) { default: switch(b) { default: voxto(self,o,"Nah. I'll keep it.",-4,o); self.SetPro(b); } } else self.def_hear(o,s,a,b,c); default: self.def_hear(o,s,a,b,c); } ##close: ! o closed a switch(a) { copier: if ((napkin notin copier) && self.copies_made < 5 && self.braintest(1)) self.aggrivate(2,o); } ##open: ! o opened a switch(a) { copier: if ((napkin in copier) && self.copies_made < 5 && self.braintest(1)) self.aggrivate(2,o); } default: ! s must be a string switch(a) { ! NPC library messages -1: if (b==self) voxto(self,o,"Hmm."); -6: if (b==self) { self.SetPro(c); switch(c) { uncle: if (p==player) voxto(self,o,"Why, I'm your uncle!"); default: self.def_hear(o,s,a,b,c); } } -7: if (b==self) { self.SetPro(c); switch(c) { biff: voxto(self,o,"Biff pissed off the Mafia."); uncle: voxto(self,o,"I used to be a plumber. You know that!"); default: self.def_hear(o,s,a,b,c); } } -8: if (b==self) { self.SetPro(c); switch(c) { biff: voxto(self,o,"Well, not much, really."); uncle: voxto(self,o,"I'm retired now, of course."); playerobj: voxto(self,o,"You do whatever you want."); default: self.def_hear(o,s,a,b,c); } } -9: if (b==self) { self.SetPro(c); switch(c) { biff: voxto(self,o,"Biff's dead."); default: self.def_hear(o,s,a,b,c); } } -10: if (b==self) { self.SetPro(c); if (c==self) voxto(self,o,"What? I'm right here!"); if (ObjectSees(self,c)) voxto(self,o,"What? Look around, dummy."); else voxto(self,o,"I'm not gonna look around for you!",-4,o); } -11: if (b==self) { self.SetPro(c); switch(c) { uncle: voxto(self,o,"Mind your own business!"); aunt,sister,cousin,playerobj: voxto(self,o,"We're having a family reunion."); default: self.def_hear(o,s,a,b,c); } } -12: if (b==self) voxto(self,o,"I'll talk whenever I like."); -13: if (b==self) { self.SetPro(c); switch(c) { uncle: voxto(self,o,"I'm just fine."); playerobj: if (p==player) voxto(self,o,"Uh, I guess you're doing alright."); default: self.def_hear(o,s,a,b,c); } } -14: if (b==self) voxto(self,o,"Bye now.",-14,o); -15: if (b==self) voxto(self,o,"What's so funny?",-1,o); -16: if (b==self) switch(p) { default: voxto(self,o,"Hah.",-15,o); } -17: if (b==self) voxto(self,o,"What?",-1,o); -18: if (b==self) voxto(self,o,"Erm...",-17,o); -19: if (b==self) { self.SetPro(c); switch(c) { uncle: voxto(self,o,"I do what I like. I've got seniority!"); default: self.def_hear(o,s,a,b,c); } } -20: if (b==self) voxto(self,o,"Whad'ya want from me?",-1,o); -21: if (b==self) voxto(self,o,"Whatever ya like."); -22: if (b==self) voxto(self,o,"Bah, it's not so neat."); -23: if (b==self) { self.SetPro(c); if (ObjectSees(b,c)) voxto(self,o,"Right here, goof."); else switch(c) { default: self.def_hear(o,s,a,b,c); } } -24: if (b==self) { self.SetPro(c); if (c in b) switch(c) { default: self.def_hear(o,s,a,b,c); } else self.def_hear(o,s,a,b,c);; } -25: if (b==self) voxto(self,o,"Cornelius H. Ogdajon."); ! user messages 1: if (b ~= self) rfalse; if (p.wantswill == 3) voxto(self,o,"I already gave you a will!"); else { p.wantswill = 2; if (self.braintest(2)) voxto(self,o,"Sure.",-3,o); else voxto(self,o,"Hang on, will ya?"); } 3: switch(self.&brs-->0) { 1: voxto(self,o,"My quest is to make some photocopies."); 2: voxto(self,o,"My quest is to pass out these copies."); 3: voxto(self,o,"My quest is to pass out these copies."); default: voxto(self,o,"My quest is to die before you have childen."); } 4: voxto(self,o,"Blue... What's that got to do with this?"); 5: voxto(self,o,"Hrmph. I do my own hair, thanks."); 6: voxto(self,o,"A woodchuck would chuck as much wood as he could if a woodchuck could chuck wood."); 10: emit(self,"Your uncle's eyes glaze over, but he regains himself.^"); vox(self,"I smell toast!"); 11: voxto(self,o,"Keep yourself fed, and get yourself a woman!"); default: self.def_hear(o,s,a,b,c); } } ], Huh [ o; switch(random(10)) { 1: voxto(self,o,"What?",-1,o); 2: voxto(self,o,"Wha?",-1,o); 3: voxto(self,o,"Eh?",-1,o); 4: voxto(self,o,"Uh..",-1,o); 5: voxto(self,o,"Try making some sense, eh?",-1,o); 6: voxto(self,o,"What are you talking about?",-1,o); 7: voxto(self,o,"Be a little less vague, there.",-1,o); 8: voxto(self,o,"Um..",-1,o); 9: voxto(self,o,"Speak my language.",-1,o); default: voxto(self,o,"Huh?",-1,o); } ], Brain [s t i o; switch(s) { 1: ! got to make some copies! if (child(papertray) ~= 0 && self.copies_made < 5) { if (napkin notin self && (self notin study || napkin notin copier)) { self.NPC_find(napkin,"Where's that napkin gone to now?", "Hey, I'm trying to make copies of that napkin!"); self.SetPro(napkin); rfalse; } if (self notin study) {self.NPC_go(study); rtrue;} else if (napkin notin copier) { if (copier hasnt open) {self.Act(##open,copier); rtrue;} else if (child(copier) ~= 0) {self.Act(##take,child(copier)); rtrue;} self.Act(##puton,napkin,copier); rtrue; } if (copier has open) {self.Act(##close,copier); rtrue;} self.Act(##push,copybutton); self.copies_made ++; rtrue; } ! collect wills if he doesn't have copies_made t = 0; i = 0; objectloop(o in self) if (IsWill(o)) t++; if (t==0) vox(self,"There. That should do it."); if (t < self.copies_made) { objectloop(t) if (IsWill(t) && t ~= napkin && ObjectSees(self,t) && t notin self) { if (i == 0) self.NPC_find(t,0,"Hey, gimme that will!", "Wish I could get that will!"); else self.NPC_find(t); if (t in self) rtrue; i ++; } ! find more copies if (i == 0) self.NPC_find(0,"Dang it! Where'd them copies get to?"); else self.NPC_find(0,"Hrrm. There must be more copies around somewhere."); rfalse; } self.brainremove(1); self.brainadd(2,4); self.brainadd(3,5); 2: ! got the copies, time to distribute them if (self.copies_made ~= 0) { objectloop(o ~= self && o ofclass NPC) { if (SameScope(self,o) && o provides wantswill) if (o.wantswill == 2) { t = child(self); while (t ~= 0 && IsWill(t) == 0) t = sibling(t); if (t == 0) {voxto(uncle,o,"Hrm. Seems I don't have any left.",2,o);rfalse;} self.Act(##give,t,o); if (t in o) {o.wantswill = 3; self.copies_made --; rtrue;} voxto(uncle,o,"Well, fine! Don't take it!"); self.SetPro(t); o.wantswill = -1; rfalse; } } rfalse; } self.brainremove(2); 3: ! hunt for treasure treasurehunt(self); } ], WantsIt [ o; if (IsWill(o) || IsTreasure(o)) rtrue; rfalse; ], has transparent proper static animate;