41 lines
1.8 KiB
Plaintext
41 lines
1.8 KiB
Plaintext
|
void main()
|
||
|
{
|
||
|
object oItem;
|
||
|
oItem = GetPCItemLastEquipped();
|
||
|
object oPC = GetPCItemLastEquippedBy();
|
||
|
string sItemGained = GetTag(oItem);
|
||
|
// string sItemGained = GetResRef(oItem);
|
||
|
|
||
|
if (GetIsPC(oPC) == TRUE)
|
||
|
{
|
||
|
if (GetStringLeft(sItemGained, 9) == "KelObject")
|
||
|
{
|
||
|
|
||
|
if (GetHitDice(oPC) <= 34)
|
||
|
{
|
||
|
SetLocalInt(oItem, "kitem_error", TRUE);
|
||
|
DelayCommand(3.0, DeleteLocalInt(oItem, "kitem_error"));
|
||
|
object nItem = CopyObject(oItem, GetLocation(oPC), oPC);
|
||
|
DeleteLocalInt(nItem, "recentunequip");
|
||
|
DestroyObject(oItem);
|
||
|
SendMessageToPC(oPC, "You must be 35th level to use a Keltrian Item.");
|
||
|
}
|
||
|
}
|
||
|
else if (GetStringLeft(sItemGained, 7) == "Ancient")
|
||
|
{
|
||
|
|
||
|
if (GetHitDice(oPC) <= 18)
|
||
|
{
|
||
|
SetLocalInt(oItem, "kitem_error", TRUE);
|
||
|
DelayCommand(3.0, DeleteLocalInt(oItem, "kitem_error"));
|
||
|
object nItem = CopyObject(oItem, GetLocation(oPC), oPC);
|
||
|
DeleteLocalInt(nItem, "recentunequip");
|
||
|
DestroyObject(oItem);
|
||
|
SendMessageToPC(oPC, "You must be 18th level to use an Ancient Item.");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|