Initial upload
Initial upload
This commit is contained in:
45
_module/nss/crystalkillspc.nss
Normal file
45
_module/nss/crystalkillspc.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
object oItem;
|
||||
|
||||
//Created by Guile 3/27/07
|
||||
//This script strips the pc of all shards should they be trying to reloot!
|
||||
//Put this script OnUsed of an altar or placable
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
if (GetItemPossessedBy(oPC, "thecrystalshard")!= OBJECT_INVALID)
|
||||
{
|
||||
oItem = GetFirstItemInInventory(oPC);
|
||||
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
if (GetTag(oItem)=="thecrystalshard") DestroyObject(oItem);
|
||||
|
||||
oItem = GetNextItemInInventory(oPC);
|
||||
}
|
||||
|
||||
FloatingTextStringOnCreature("Your Crystal Shard has turned to dust!!!!!", oPC);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetItemPossessedBy(oPC, "thecrystalshard")== OBJECT_INVALID)
|
||||
{
|
||||
CreateItemOnObject("thecrystalshard", oPC);
|
||||
|
||||
FloatingTextStringOnCreature("You have found an ancient artifact!!!", oPC);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user