void fnMuttering() { // PURPOSE: Mutter object oMe=OBJECT_SELF; object oBook=GetItemPossessedBy(oMe,"it_grubbins"); if (!GetIsObjectValid(oBook)) return; if (!GetIsInCombat(oMe)&&!GetIsDMPossessed(oMe)&&!IsInConversation(oMe)) { // mutter int nR=d4(); if (nR==1) AssignCommand(oMe,SpeakString("Where are they?")); else if (nR==2) AssignCommand(oMe,SpeakString("I've got it. Hurry up and get here already.")); else if (nR==3) AssignCommand(oMe,SpeakString("Grrr... what are they waiting for?")); else if (nR==4) AssignCommand(oMe,SpeakString("Get the book. I got the book. Meet me here. I'm here, so where the hell are you?")); DelayCommand(10.0,fnMuttering()); } // mutter } // fnMuttering() //////////////////////////////////////////////////////////////////[ MAIN ]////// void main() { object oPC=GetEnteringObject(); object oTrigger=OBJECT_SELF; if (GetIsPC(oPC)) { // is a PC object oBook=GetItemPossessedBy(oPC,"it_grubbins"); if(!GetIsObjectValid(oBook)&&GetLocalInt(oPC,"nGrubbinsQuest")==1&&GetTag(GetArea(oPC))==GetLocalString(oPC,"sGrubbinsQuest")) { // quest active object oNPC=GetLocalObject(oTrigger,"oNPC"); if (!GetIsObjectValid(oNPC)) { // create NPC object oWP=GetNearestObjectByTag("GRUBBINS_QUEST",oPC); oNPC=CreateObject(OBJECT_TYPE_CREATURE,"grubbins_th",GetLocation(oWP)); AssignCommand(oNPC,ActionRandomWalk()); AssignCommand(oNPC,fnMuttering()); SetLocalObject(oTrigger,"oNPC",oNPC); } // create NPC } // quest active } // is a PC } //////////////////////////////////////////////////////////////////[ MAIN ]//////