| Author: | Huntsman29 |
| Author Website: | n/a |
| Script Name: | Street Fight |
| Description: | Will cause two NPCs to fight as soon as they see a PC approach. |
| Instructions on Use: |
|
Script 1 (OnUserDefined):
| //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Street Fight script 2 NPC's or more duke it out. */ //::////////////////////////////////////////////// //:: Created By: Mike Paddon/Enfamous //:: Created On: 15th July 2002 //::////////////////////////////////////////////// void main() { int nUser = GetUserDefinedEventNumber(); if(nUser == 1002) //OnPerception { object oSeen = GetFirstPC(); object oNPC = GetObjectByTag("BOB"); // If it isn't a PC that the commoner sees, it won't do anything. while(oSeen != OBJECT_INVALID) { if (GetObjectSeen(oSeen,OBJECT_SELF)) { // Once he sees the commoner he will attack NPC tagged before ActionSpeakString("Ye has bin shagging me wife, DIE!"); ActionDoCommand (AdjustReputation(oNPC, OBJECT_SELF, -50)); ActionDoCommand (ActionAttack (oNPC)); break; } oSeen = GetNextPC(); } } } |
Script 2 (OnUserDefined):
| #include "NW_I0_GENERIC" void main() { int nUser = GetUserDefinedEventNumber(); if(nUser == 1002) //OnPerception { object oSeen = GetLastPerceived(); // If it isn’t a PC that the commoner sees, it won’t do anything. if (GetIsPC(oSeen)) { // Once he sees the PC he will speak the string ActionSpeakString("Yeah so what! Bring it on loser!"); } } } |