Files
HeroesStone_PRC8/_module/nss/sting.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

38 lines
1.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Glowing Items Sample Item Script
//:: sting
//:: Copyright (c) 2004 Jason Stephenson
//:://////////////////////////////////////////////
/*
This is a sample script for a sword with a tag
of "sting" that is intended to show how to use
the glowitem_inc install and delete functions
on an item.
*/
//:://////////////////////////////////////////////
//:: Created By: Jason Stephenson (Dyrcona)
//:: Created On: July 18, 2004
//:: Modified on: August 8, 2004
//:://////////////////////////////////////////////
#include "x2_inc_switches"
#include "glowitem_inc"
void main()
{
int nEvent = GetUserDefinedItemEventNumber();
object oPC;
object oItem;
if (nEvent == X2_ITEM_EVENT_EQUIP) {
//oPC = GetPCItemLastEquippedBy();
oItem = GetPCItemLastEquipped();
InstallGlowItemRacialEffect(oItem, RACIAL_TYPE_HUMANOID_ORC);
}
if (nEvent == X2_ITEM_EVENT_UNEQUIP) {
//oPC = GetPCItemLastUnequippedBy();
oItem = GetPCItemLastUnequipped();
DeleteGlowItemEffect(oItem);
}
SetExecutedScriptReturnValue(X2_EXECUTE_SCRIPT_END);
}