Aggh. I found some more bugs... here's a fixed version. (I think :P) - mendar Alvoria MUD -- "*whine* Those elves beat me up... I want my money back..." Address -- telnet://conan.ids.net:4000/ Homepage -- http://users.ids.net/~mudguy/ (under construction, perhaps not even updated for months to come) /* start of the proc stuff... */ int get_people_room(const int room) { struct char_data *person; int i=0; for(person=world[room].people ; person; person=person->next_in_room) { if(person) i++; } return i; } struct char_data *select_person_room(const int room) { struct char_data *person; int i; i=get_people_room(room); if(!i) return NULL; for(person=world[room].people; i; person=person->next_in_room) { i--; } return person; } SPECIAL(complainer) { struct char_data *vict1,*vict2,*self; int i; self=(struct char_data *)me; if(!AWAKE(self)) { if(cmd) { if(number(0,1)) { do_wake(self,0,0,0) } return (0); } else { if(number(1,5)==5) { do_wake(self,0,0,0) } return (1); } } if(CMD_IS("flee")&&CAN_SEE(self,ch)) { act("$n tells you 'You wuss! haha...'", FALSE, self, ch, 0, TO_VICT); do_flee(ch,argument,cmd,0); switch(number(1,6) { case 1: act("$n says 'I bet $N just peed $S pants.'", FALSE, self, ch, 0, TO_ROOM); break; case 2: act("$n says 'I heard $N runs from $S own shadow too.'", FALSE, self, ch, 0, TO_ROOM); break; case 3; act("$n says 'I bet $N's afraid of the dark too.'", FALSE, self, ch, 0, TO_ROOM); break; default: break; } return (1); } if(CMD_IS("sleep")&&CAN_SEE(self,ch)) { do_sleep(ch,argument,cmd,0); switch(number(1,6)) { case 1: do_say(self, "Ok everyone... Shhhhhh", 0, 0); break; case 2: do_say(self, "That's a good idea... I'm going to sleep too.", 0, 0); do_sleep(self,0,0,0); break; case 3: do_say(self, "Heh. What a sleepyhead.", 0, 0); break; default: break; } } if(cmd) return; if(FIGHTING(self)) { switch(number(1,80) { case 1: do_say(self,"I think I'm losing...",0,0); break; case 2: do_say(self,"The world won't miss a loudmouth like me. Hah.",0,0); break; case 3: if(GET_HIT(self)<(GET_MAX_HIT(self)/3)) { do_say(self,"I'll live...",0,0); do_say(self,"My cuts are only flesh wounds.",0,0); } break; default: break; } return (1); } if(get_people_room(self->in_room)<=1) return (0); vict1=select_person_room(self->in_room); if((!AWAKE(vict1))||(!CAN_SEE(self,vict1))||(vict1==self)) return (0); if(FIGHTING(vict1)) { if((number(0,1))&&CAN_SEE(self,vict1)) { vict1=FIGHTING(vict1); /* swap the person we're talking about */ /* makes it more interesting. */ } switch(number(1,80)) { case 1: act("$n says '$N started it!'", FALSE, self, vict1, 0, TO_NOTVICT); act("$n says 'I KNOW you started it!'", FALSE, self, vict1, 0, TO_VICT); break; case 2: act("$n says '$N's fighting technique is so lame...'", FALSE, self,vict1,0,TO_NOTVICT); act("$n says 'Your fighting technique is so lame...'", FALSE, self,vict1,0,TO_VICT); break; case 3: act("$n says 'Hehe. I think $N is going to die.'", FALSE, self,vict1,0,TO_NOTVICT); break; case 4: act("$n says 'Hehe. I hope $N loses. $E's such a jerk.'", FALSE, self,vict1,0,TO_NOTVICT); default: break; } return (1); } /* just a summary of how we can get to this point :P. (for those who might be lost already) */ /* execution gets here only if the mob assigned with this is not sleeping, not fighting, if a person hasn't fled or gone to sleep, or the person we've chosen isn't fighting and awake. */ switch(number(1,140)) { case 1: do_say(self,"I talk too much!",0,0); break; case 2: do_say(self,"I think I'm brainless.",0,0); break; case 3: do_say(self,"I think YOU'RE brainless.",0,0); break; case 4: do_say(self,"People are stupid.",0,0); break; case 5: do_say(self,"Who's to blame?",0,0); break; case 6: if(IS_NPC(vict1)&&MEMORY(vict1)) act("$n says 'I think $N is after someone.'",FALSE, self, vict1, 0, TO_ROOM); break; case 7: act("$n says '$N sleeps too much.'", FALSE, self, vict1, 0, TO_NOTVICT); break; case 8: act("$n says 'Run everyone!!! $N is going to kill you!'", FALSE, self, vict1, 0, TO_NOTVICT); break; case 9: act("$n says '$N eats the crumbs on the floor of the bakery.'", FALSE, self, vict1, 0, TO_NOTVICT); act("$n says 'Bleeech.'", FALSE, self, vict1, 0, TO_ROOM); break; case 10: act("$n says '$N did it. I'm sure...'", FALSE, self, vict1, 0, TO_NOTVICT); break; default: break; } return (1); } +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST