About: NPC checks that a PC has an item equipped   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

This is a basic OnPerceived script which will check for an item and make the NPC hostile if the PC does not have it equipped: // Goes in the OnPercieved of an NPC // Checks a PC has the correct item equipped in a specific inventory slot void main() { object oPC = GetLastPerceived(); object oDisguise = GetObjectByTag("disguise"); // Insert the correct item tag if (GetIsPC(oPC)) { object oTarget = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); // Change the inventory slot as required if (oTarget != oDisguise) { // Uncomment the appropriate lines or add your own custom code // AdjustFactionReputation(oPC,OBJECT_SELF,-100);//This would make the NPC's whole faction hostile // SetIsTemporaryEnemy(oPC);//This is for just this NPC // ActionAttack(oPC);// Ensures the NPC will attack immediately } } }

AttributesValues
rdfs:label
  • NPC checks that a PC has an item equipped
rdfs:comment
  • This is a basic OnPerceived script which will check for an item and make the NPC hostile if the PC does not have it equipped: // Goes in the OnPercieved of an NPC // Checks a PC has the correct item equipped in a specific inventory slot void main() { object oPC = GetLastPerceived(); object oDisguise = GetObjectByTag("disguise"); // Insert the correct item tag if (GetIsPC(oPC)) { object oTarget = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); // Change the inventory slot as required if (oTarget != oDisguise) { // Uncomment the appropriate lines or add your own custom code // AdjustFactionReputation(oPC,OBJECT_SELF,-100);//This would make the NPC's whole faction hostile // SetIsTemporaryEnemy(oPC);//This is for just this NPC // ActionAttack(oPC);// Ensures the NPC will attack immediately } } }
dcterms:subject
abstract
  • This is a basic OnPerceived script which will check for an item and make the NPC hostile if the PC does not have it equipped: // Goes in the OnPercieved of an NPC // Checks a PC has the correct item equipped in a specific inventory slot void main() { object oPC = GetLastPerceived(); object oDisguise = GetObjectByTag("disguise"); // Insert the correct item tag if (GetIsPC(oPC)) { object oTarget = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC); // Change the inventory slot as required if (oTarget != oDisguise) { // Uncomment the appropriate lines or add your own custom code // AdjustFactionReputation(oPC,OBJECT_SELF,-100);//This would make the NPC's whole faction hostile // SetIsTemporaryEnemy(oPC);//This is for just this NPC // ActionAttack(oPC);// Ensures the NPC will attack immediately } } }
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software