50 lines
1005 B
Plaintext
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
|
||
|
}
|