60 lines
2.0 KiB
Plaintext
60 lines
2.0 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Name s_itemacquired
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
|
|
This script is intended to be called by or incorporated into the
|
|
Module:OnAcquireItem event (script). It works in conjuction with
|
|
s_cleartrash by clearing the destruct time on items picked up by PC's
|
|
so they will not near-instantly be destroyed if dropped. Once dropped,
|
|
however, they will be marked for destruction by s_cleartrash.
|
|
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Scott Thorne (Thornex2@wans.net)
|
|
//:: Created On: July 27, 2002
|
|
//:://////////////////////////////////////////////
|
|
void main()
|
|
{
|
|
object oItem = GetModuleItemAcquired();
|
|
|
|
if (GetIsPC(GetItemPossessor(oItem))) {
|
|
DeleteLocalInt(oItem, "CT_DESTRUCT_TIME_FIX");
|
|
}
|
|
|
|
// Script made by Lucilius
|
|
object oItemGained = GetModuleItemAcquired();
|
|
object oGiver = GetModuleItemLostBy();
|
|
object oReceiver = GetItemPossessor(oItemGained);
|
|
string sItemGained = GetResRef(oItemGained);
|
|
|
|
|
|
if(GetStolenFlag(oItemGained)==TRUE)
|
|
{
|
|
SendMessageToPC(oReceiver, "Pickpocket is disabled on this server.");
|
|
// Start Klarth's modifications.
|
|
SendMessageToPC(oGiver, "Warning! Someone has just attempted to pickpocket you!");
|
|
SendMessageToAllDMs("Pickpocket detected.");
|
|
object oReceiver = GetItemPossessor(oItemGained);
|
|
effect eTag = EffectVisualEffect(VFX_DUR_FLAG_PURPLE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, eTag, oReceiver);
|
|
// End Klarth's modifications.
|
|
DestroyObject(oItemGained);
|
|
CreateItemOnObject(sItemGained, oGiver, 1);
|
|
}
|
|
else
|
|
{
|
|
}
|
|
//:://Tell what was got
|
|
object oItemObtained = GetModuleItemAcquired();
|
|
//object oItemPCGot = GetModuleItemAcquiredBy();
|
|
object oItemPCGot = GetItemPossessor(oItemObtained);
|
|
string oItemName = GetName(oItemObtained);
|
|
string oPCName = GetName(oItemPCGot);
|
|
|
|
//if (GetIsPC(GetItemPossessor(oItemGot)))
|
|
FloatingTextStringOnCreature(oPCName + " Acquired " + oItemName, oItemPCGot);
|
|
}
|
|
|