//////////////////////////////////////////////////////////////////////////////// // it_rh_debug - Debug Random Houses // By Deva B. Winblood. November 13th, 2008 //////////////////////////////////////////////////////////////////////////////// void main() { object oPC=GetItemActivator(); object oDoor=GetItemActivatedTarget(); if (!GetIsObjectValid(oDoor)||GetObjectType(oDoor)!=OBJECT_TYPE_DOOR) { // wrong target SendMessageToPC(oPC,"This item can only be used on Random House doors."); } // wrong target else { // valid target if (GetStringLength(GetLocalString(oDoor,"sDirection"))>0) { // valid target SetLocalObject(oPC,"oTarget",oDoor); int nType=GetLocalInt(oDoor,"nType"); int nStyle=GetLocalInt(oDoor,"nStyle"); if (nType>0) { // already defined SendMessageToPC(oPC,"This Door is already defined as follows:"); if (nType==1) SendMessageToPC(oPC,"Type: Small House 1"); else if (nType==2) SendMessageToPC(oPC,"Type: Small House 2"); else if (nType==3) SendMessageToPC(oPC,"Type: Large House"); else if (nType==4) SendMessageToPC(oPC,"Type: Storage Building"); if (nStyle==1) SendMessageToPC(oPC,"Style: Single Male"); else if (nStyle==2) SendMessageToPC(oPC,"Style: Single Female"); else if (nStyle==3) SendMessageToPC(oPC,"Style: Married Couple"); else if (nStyle==4) SendMessageToPC(oPC,"Style: Married Couple + Child"); else if (nStyle==5) SendMessageToPC(oPC,"Style: Bandit - Single Male"); else if (nStyle==6) SendMessageToPC(oPC,"Style: Bandit - Single Female"); else if (nStyle==7) SendMessageToPC(oPC,"Style: 2 Bandits"); else if (nStyle==8) SendMessageToPC(oPC,"Style: 3 Bandits"); else if (nStyle==9) SendMessageToPC(oPC,"Style: Mage Low Level"); else if (nStyle==10) SendMessageToPC(oPC,"Style: Mage Mid Level"); else if (nStyle==11) SendMessageToPC(oPC,"Style: Retired Adventurer"); else if (nStyle==12) SendMessageToPC(oPC,"Style: Haunted - 1 Ghost"); else if (nStyle==13) SendMessageToPC(oPC,"Style: Haunted - 2 Ghosts"); else if (nStyle==14) SendMessageToPC(oPC,"Style: Empty - Nice"); else if (nStyle==15) SendMessageToPC(oPC,"Style: Empty - Run Down"); else if (nStyle==16) SendMessageToPC(oPC,"Style: Craftsman"); else if (nStyle==17) SendMessageToPC(oPC,"Style: Beggar"); else if (nStyle==18) SendMessageToPC(oPC,"Style: Crime Scene - Murder"); else if (nStyle==19) SendMessageToPC(oPC,"Style: Crime Scene - Necromancy"); else if (nStyle==20) SendMessageToPC(oPC,"Style: Crime Scene - Arson"); } // already defined else { // initiate dialog AssignCommand(oPC,ClearAllActions(TRUE)); AssignCommand(oPC,ActionStartConversation(oPC,"rh_debug",TRUE,FALSE)); } // initiate dialog } // valid target else { // invalid target SendMessageToPC(oPC,"This Can only be used on external doors for Random Houses."); } // invalid target } // valid target }