Initial Upload
Initial Upload
This commit is contained in:
48
_module/nss/_onacquire.nss
Normal file
48
_module/nss/_onacquire.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
//::------------------------------------------------------------------------:://
|
||||
//:: Script: dk_oai :://
|
||||
//:: Location: OnAcquiredItem :://
|
||||
//:: Author: Darvin Kezar :://
|
||||
//:: Created: 2002-12-16 :://
|
||||
//::------------------------------------------------------------------------:://
|
||||
#include "x2_inc_switches"
|
||||
#include "dk_handler"
|
||||
void main()
|
||||
{
|
||||
object oObject = GetModuleItemAcquired();
|
||||
object oPossessor = GetItemPossessor(oObject);
|
||||
object oPC = GetModuleItemAcquiredBy();
|
||||
object oLoser = GetModuleItemLostBy();
|
||||
int nEvent =GetUserDefinedItemEventNumber();
|
||||
object oItem, oNew, oLost;
|
||||
if(!GetIsPC(oPossessor))
|
||||
return;
|
||||
///skullball
|
||||
if(oObject ==(GetObjectByTag("skullball")))
|
||||
{
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_GLOW_PURPLE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oPossessor,5.0);
|
||||
}
|
||||
///multiguild////////
|
||||
|
||||
ExecuteScript("multiguild",oPC);
|
||||
|
||||
////////////
|
||||
if(GetIsPC(oLoser)&&!GetIsUnAcquirable(oObject)&&oLoser!=oPossessor)
|
||||
return;
|
||||
if(GetIsAcquirable(oObject, oPossessor))
|
||||
return;
|
||||
oNew = CreateObject(OBJECT_TYPE_ITEM,GetResRef(oObject),GetLocation(oPossessor));
|
||||
if(GetIdentified(oObject))
|
||||
SetIdentified(oNew, TRUE);
|
||||
oLost = GetFirstItemInInventory(oObject);
|
||||
while(GetIsObjectValid(oLost))
|
||||
{
|
||||
oItem = CreateItemOnObject(GetResRef(oLost), oNew, GetNumStackedItems(oLost));
|
||||
if(GetIdentified(oLost))
|
||||
SetIdentified(oItem, TRUE);
|
||||
DestroyObject(oLost);
|
||||
oLost = GetNextItemInInventory(oObject);
|
||||
}
|
||||
DestroyObject(oObject);
|
||||
SendMessageToPC(oPossessor, "You already have this item!");
|
||||
}
|
Reference in New Issue
Block a user