Changed folder name.
Changed folder name.
This commit is contained in:
68
_module/nss/unequipallnscan.nss
Normal file
68
_module/nss/unequipallnscan.nss
Normal file
@@ -0,0 +1,68 @@
|
||||
////////////////////////////////////
|
||||
//Created by Genisys / Guile 7/01/08
|
||||
////////////////////////////////////
|
||||
/*
|
||||
|
||||
This script goes in the OnEnter
|
||||
event of an area or preferrably
|
||||
a Tracks Trigger, which you want to
|
||||
place in an area where ALL PCs will
|
||||
go to, a must enter area or trigger..
|
||||
|
||||
Becuase this system can be resource
|
||||
intensive it's is highly NOT recommended
|
||||
to put this script in the OnEnter
|
||||
Event of the module Event OnClientEnter
|
||||
or the area where all PCs enter the
|
||||
module at or you may very well crash
|
||||
the server!
|
||||
|
||||
*/
|
||||
////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
//Define Major Variables
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
//If it's not a PC Stop here!
|
||||
if(!GetIsPC(oPC))return;
|
||||
|
||||
//Do this only one time per PC per restart..
|
||||
if(GetLocalInt(oPC, "iScan")==2)
|
||||
{
|
||||
//Stop the script dead here!
|
||||
return;
|
||||
}
|
||||
//Othewise they must have never done this.. continue on!
|
||||
else
|
||||
{
|
||||
//NOTE: You can make it always scan every PC ever time
|
||||
//Simply type // at the start of the line below to make this always active..
|
||||
SetLocalInt(oPC, "iScan", 2);
|
||||
}
|
||||
|
||||
|
||||
//First make the PC Unequip all items they are wearing
|
||||
//If the items were not unequipped some might be missed (bug)
|
||||
object oSlot;
|
||||
int nSlot;
|
||||
|
||||
for (nSlot=0; nSlot<NUM_INVENTORY_SLOTS; nSlot++)
|
||||
{
|
||||
oSlot = GetItemInSlot(nSlot, oPC);
|
||||
|
||||
AssignCommand(oPC, ActionUnequipItem(oSlot));
|
||||
}
|
||||
|
||||
//Now scan all of the items in the PCs inventory for...
|
||||
//Disallowed Item Properties,
|
||||
//Uber Items
|
||||
//Items with TOO many properties
|
||||
|
||||
//Do it twice just incase we missed something!
|
||||
DelayCommand(2.5, ExecuteScript("scanitems", oPC));
|
||||
DelayCommand(5.0, ExecuteScript("scanitems", oPC));
|
||||
|
||||
//Main Script End
|
||||
}
|
Reference in New Issue
Block a user