OpenLink Software

Usage stats on NPC checks that a PC has an item equipped

 Permalink

an Entity in Data Space: 134.155.108.49:8890

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 } } }

Graph IRICount
http://dbkwik.webdatacommons.org4
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] This material is Open Knowledge Creative Commons License Valid XHTML + RDFa
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Copyright © 2009-2012 OpenLink Software