Changed folder name.
Changed folder name.
This commit is contained in:
49
_module/nss/remove_items.nss
Normal file
49
_module/nss/remove_items.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
/*--------------------------------------------------------
|
||||
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user