88 lines
3.3 KiB
Plaintext
88 lines
3.3 KiB
Plaintext
const string EPIC_MONK_GLOVES_TAG = "DragonPunch";
|
|
const int REQUIRED_MONK_LEVELS = 21;
|
|
|
|
//Added new consts for ac weapons. Ba'al
|
|
|
|
const int REQUIRED_BA_STRENGTH = 36;
|
|
|
|
const string EPIC_AC_SPEAR_TAG = "tb_udhwsp";
|
|
const string EPIC_AC_GREATS_TAG = "tb_udhwgs";
|
|
const string EPIC_AC_HEAVYF_TAG = "tb_udhwhf";
|
|
const string EPIC_AC_SCYTHE_TAG = "tb_udhwsc";
|
|
const string EPIC_AC_QUATER_TAG = "tb_udhwqs";
|
|
const string EPIC_AC_HALBERD_TAG = "tb_udhwha";
|
|
const string EPIC_AC_TWOBLADEDS_TAG = "tb_udhwtb";
|
|
const string EPIC_AC_DOUPLEAXE_TAG = "tb_udhwda";
|
|
const string EPIC_AC_DIREMACE_TAG = "tb_udhwdm";
|
|
const string EPIC_AC_GREATA_TAG = "tb_udhwga";
|
|
|
|
//Added new consts for rogue weapons.
|
|
|
|
const string EPIC_ROGUE_SHORT_TAG = "bt_xqwspb";
|
|
const string EPIC_ROGUE_KUKRI_TAG = "bt_xqwetc";
|
|
const string EPIC_ROGUE_DAGGER_TAG = "bt_xqwsbs";
|
|
const string EPIC_ROGUE_ADAGGER_TAG = "sf_14_adagger";
|
|
const int REQUIRED_ROGUE_LEVELS = 21;
|
|
|
|
//Added new consts for Defender weapons.
|
|
|
|
const string EPIC_DD_BAXE_TAG = "sf_14_baxe";
|
|
const string EPIC_DD_WAXE_TAG = "sf_14_waxe";
|
|
const string EPIC_DD_GAXE_TAG = "sf_14_gaxe";
|
|
const string EPIC_DD_HAMMER_TAG = "sf_14_hammer";
|
|
const int REQUIRED_DD_LEVELS = 15;
|
|
|
|
|
|
// New function to slim down this script. And to simplify future additions.
|
|
// Added by SoulFlame on 1/3/05
|
|
void EpicGearCheck(object oPC, int iPC, int iReq, string sMessage);
|
|
|
|
void EpicGearCheck(object oPC, int iPC, int iReq, string sMessage)
|
|
{
|
|
if (iPC < iReq)
|
|
{
|
|
SendMessageToPC(oPC, sMessage);
|
|
AssignCommand(oPC, ActionUnequipItem(GetPCItemLastEquipped()));
|
|
}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
object oItem = GetPCItemLastEquipped();
|
|
object oPC = GetPCItemLastEquippedBy();
|
|
string sMessage;
|
|
|
|
// Elvin 06-Jan-2005
|
|
// Exit script if equipper is not a PC
|
|
if( !GetIsPC(oPC) )
|
|
{
|
|
return;
|
|
}
|
|
|
|
if( oItem != OBJECT_INVALID)
|
|
{
|
|
string sTag = GetTag(oItem);
|
|
|
|
if( sTag == EPIC_MONK_GLOVES_TAG)
|
|
{
|
|
sMessage = "Sorry, only Epic Monks can equip this item.";
|
|
EpicGearCheck(oPC, GetLevelByClass(CLASS_TYPE_MONK, oPC), REQUIRED_MONK_LEVELS, sMessage);
|
|
}
|
|
else if( sTag == EPIC_AC_SPEAR_TAG || sTag == EPIC_AC_GREATS_TAG || sTag == EPIC_AC_HEAVYF_TAG || sTag == EPIC_AC_SCYTHE_TAG || sTag == EPIC_AC_QUATER_TAG || sTag == EPIC_AC_HALBERD_TAG || sTag == EPIC_AC_TWOBLADEDS_TAG || sTag == EPIC_AC_DOUPLEAXE_TAG || sTag == EPIC_AC_DIREMACE_TAG || sTag == EPIC_AC_GREATA_TAG)
|
|
{
|
|
sMessage = "You have to have at least 36 strenght to use this epic weapon.";
|
|
EpicGearCheck(oPC, GetAbilityScore(oPC, ABILITY_STRENGTH), REQUIRED_BA_STRENGTH, sMessage);
|
|
}
|
|
else if( sTag == EPIC_ROGUE_SHORT_TAG || sTag == EPIC_ROGUE_KUKRI_TAG || sTag == EPIC_ROGUE_DAGGER_TAG || sTag == EPIC_ROGUE_ADAGGER_TAG)
|
|
{
|
|
sMessage = "Sorry, only Epic Rogues can equip this item.";
|
|
EpicGearCheck(oPC, GetLevelByClass(CLASS_TYPE_ROGUE, oPC), REQUIRED_ROGUE_LEVELS, sMessage);
|
|
}
|
|
else if (sTag == EPIC_DD_BAXE_TAG || sTag == EPIC_DD_GAXE_TAG || sTag == EPIC_DD_HAMMER_TAG || sTag == EPIC_DD_WAXE_TAG)
|
|
{
|
|
sMessage = "Sorry, only True Defenders(15) can equip this item.";
|
|
EpicGearCheck(oPC, GetLevelByClass(CLASS_TYPE_DWARVEN_DEFENDER, oPC), REQUIRED_DD_LEVELS, sMessage);
|
|
}
|
|
}
|
|
}
|