Added "Removed Files" folder
Added "Removed Files" folder in case we needed to review any of them.
This commit is contained in:
85
_removed files/everpcequip.nss
Normal file
85
_removed files/everpcequip.nss
Normal file
@@ -0,0 +1,85 @@
|
||||
//Script Name: everpcequip
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 5/10/08 (updated 8/10/08)
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script handles the equipping of all items tagged "arena"
|
||||
Players cannot equip items in the arena unless it's tagnamed "arena"
|
||||
Likewise players cannot equipt items tagnamed "arena" outside of the arena.
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
//Required Include
|
||||
#include "x2_inc_switches"
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
//Declare Major Variables
|
||||
object oItem = GetPCItemLastEquipped();
|
||||
object oPC = GetPCItemLastEquippedBy();
|
||||
int nSlot;
|
||||
object nItem;
|
||||
|
||||
|
||||
//You need to assign the tagname "TheArena" to any areas you deem as an Arena
|
||||
//All items tagnamed "Arena" are unequipped if the person is NOT in the Arena.
|
||||
//All Non-Arena items are unequipped if the player is IN the Arena
|
||||
|
||||
//If the player is in the arena and eqiupping a non-arena item
|
||||
if(GetTag(GetArea(oPC)) == "TheArena")
|
||||
{
|
||||
for (nSlot=0; nSlot<NUM_INVENTORY_SLOTS; nSlot++)
|
||||
{
|
||||
nItem = GetItemInSlot(nSlot, oPC);
|
||||
|
||||
if (GetIsObjectValid(nItem))
|
||||
{
|
||||
//If it's not an arena item remove it!
|
||||
if(GetTag(nItem) != "arena")
|
||||
{
|
||||
AssignCommand(oPC, ActionUnequipItem(oItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//If not in the arena, and equipping arena items..
|
||||
if(GetTag(GetArea(oPC)) != "TheArena")
|
||||
{
|
||||
for (nSlot=0; nSlot<NUM_INVENTORY_SLOTS; nSlot++)
|
||||
{
|
||||
nItem = GetItemInSlot(nSlot, oPC);
|
||||
|
||||
if (GetIsObjectValid(nItem))
|
||||
{
|
||||
//If it's not an arena item remove it!
|
||||
if(GetTag(nItem) == "arena")
|
||||
{
|
||||
AssignCommand(oPC, ActionUnequipItem(oItem));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////BIOWARE XP2 TAG BASE SCRIPTING CODE/////////////////////////
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Generic Item Script Execution Code
|
||||
// If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
|
||||
// it will execute a script that has the same name as the item's tag
|
||||
// inside this script you can manage scripts for all events by checking against
|
||||
// GetUserDefinedItemEventNumber(). See x2_it_example.nss
|
||||
// -------------------------------------------------------------------------
|
||||
if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
|
||||
{
|
||||
SetUserDefinedItemEventNumber(X2_ITEM_EVENT_EQUIP);
|
||||
int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
|
||||
if (nRet == X2_EXECUTE_SCRIPT_END)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//End script
|
||||
}
|
Reference in New Issue
Block a user