//Created by Guile / Genisys 3/14/08 //This script accurately nails a player pick pocketing another player. //It doesn't fire if they are pick pocketing anything but a player. //The Tag Based Scripting will still fire reguardless. #include "x2_inc_switches" void main() { object oItem = GetModuleItemLost(); object oRobbed; oRobbed = GetModuleItemLostBy(); object oThief; oThief = GetModuleItemAcquiredBy(); object oLost; oLost = GetModuleItemLost(); object oFound; oFound = GetModuleItemAcquired(); string sMsg; sMsg = "You can't pick player's pockets, it's not permitted!"; //Let's make sure the thief is a PC, or continue on to the tag based scripting if (GetIsPC(oThief)) { //Lets see if they have Pick Pocket Skills if(GetSkillRank(SKILL_PICK_POCKET, oThief, TRUE)>0) { //Lets make sure they took it from a PC and not an NPC or Monster. if(GetIsPC(oRobbed)) { //Let's make sure the thief isn't crafting. if(oRobbed != oThief) { //Lets make sure the the thief is the one who disturbed the inventory //of the person who lost the item. (This needs to be tested thoroughly) // if(GetLastDisturbed()== oThief) //Delete the // Below and the // where } appears below as well to activate. // { //Give the item back, destroy the one they took, and kill the thief. ActionTakeItem(oFound, oThief); ActionGiveItem(oFound, oRobbed); SendMessageToPC(oThief, sMsg); effect eEffect; eEffect = EffectDeath(); eEffect = SupernaturalEffect(eEffect); DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oThief)); AssignCommand(oThief, SpeakString("I'm a thief!!", TALKVOLUME_SHOUT)); //} } } } } //This script destroys all items dropped if not in combat (disarmed) or put in a container. //Simply place // before Execute to turn off. ExecuteScript("trashem",OBJECT_SELF); //Tag Based Scripting Check if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) { SetUserDefinedItemEventNumber(X2_ITEM_EVENT_UNACQUIRE); int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF); if (nRet == X2_EXECUTE_SCRIPT_END) { return; } } }