Initial Commit

Initial Commit
This commit is contained in:
Jaysyn904
2023-09-21 19:51:32 -04:00
parent 65b5bd7fd3
commit 102ba7dab6
6400 changed files with 5741850 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
//courtesy of FunkySwerve
void ForceUnequip (object oTarget, object oItem)
{
if (!GetIsObjectValid(oTarget) || GetObjectType(oTarget) != OBJECT_TYPE_CREATURE)
return;
if (!GetIsObjectValid(GetArea(oTarget))) {
DelayCommand(5.0, ForceUnequip(oTarget, oItem));
return;
}
if (GetIsDead(oTarget)) {
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(GetMaxHitPoints(oTarget)), oTarget);
DelayCommand(0.1, ForceUnequip(oTarget, oItem));
} else {
AssignCommand(oTarget, ClearAllActions(TRUE));
SetLocalInt(oItem, "ForceUnequipped", TRUE);
AssignCommand(oTarget, ActionUnequipItem(oItem));
AssignCommand(oTarget, ActionDoCommand(SetCommandable(TRUE)));
AssignCommand(oTarget, SetCommandable(FALSE));
}
}
void main()
{
object oPC = GetEnteringObject();
if (GetTag(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC)) == "NW_IT_TORCH001")
{
DelayCommand(0.3, FloatingTextStringOnCreature("You can't use torches underwater!", oPC));
DelayCommand(0.3, ForceUnequip(oPC, GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC)));
}
}