UW2_PRC8/_module/nss/remove_items.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

50 lines
1005 B
Plaintext

/*--------------------------------------------------------
Script Name: remove_items
----------------------------------------------------------
Created By: Genisys(Guile)
Created On: 3/03/09
---------------------------------------------------------
This script goes in the OnEnterEvent of a trackstrigger..
It removes the guild item from non-guildmember..
----------------------------------------------------------*/
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
object oItem;
int nSlot;
if (!GetIsPC(oPC) || GetIsDM(oPC)) return;
//If they are in the guild...
if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID)
{
oItem = GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oItem))
{
if (GetTag(oItem)=="guildstone")
{
//If the name is not valid...
if(GetStringLeft(GetName(oItem),1)=="<")
{
//Kill the item...
DestroyObject(oItem, 0.0f);
}
}
oItem = GetNextItemInInventory(oPC);
}
}
//End Void Main
}