Initial commit

Initial commit.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-06-13 15:08:33 -04:00
parent c0bd67a6a7
commit a6f6db7303
5236 changed files with 4203994 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
void DoubleCheck(object oNPC);
void EquipMobs();
void main()
{
EquipMobs();
/*
object oNPC;
oNPC = GetFirstObjectInArea();
while (GetIsObjectValid(oNPC))
{
if (GetObjectType(oNPC) == OBJECT_TYPE_CREATURE && GetLocalInt(oNPC,"Armor") ==1)
{
if (!GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CHEST,oNPC)))
{
AssignCommand(oNPC,ActionEquipMostEffectiveArmor());
DelayCommand(1.0,DoubleCheck(oNPC));
}
}
oNPC = GetNextObjectInArea();
}
*/
}
void EquipMobs()
{
object oMob;
object oItem;
int iItemSlot;
oMob=GetFirstObjectInArea(OBJECT_SELF);
while (GetIsObjectValid(oMob))
{
if (GetLocalInt(oMob,"EN5_Equip") == 1)
{
if (!GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oMob)) || !GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CHEST,oMob)))
{
oItem=GetFirstItemInInventory(oMob);
while (GetIsObjectValid(oItem))
{
iItemSlot=GetLocalInt(oItem,"EN5_EQUIP");
AssignCommand(oMob, ActionEquipItem(oItem, iItemSlot));
oItem=GetNextItemInInventory(oMob);
}
}
}
DelayCommand(1.0,DoubleCheck(oMob));
oMob=GetNextObjectInArea(OBJECT_SELF);
}
}
void DoubleCheck(object oNPC)
{
object oItem;
if (!GetIsObjectValid(GetItemInSlot(INVENTORY_SLOT_CHEST,oNPC)))
{
oItem=CreateItemOnObject("en6_dclothes",oNPC);
SetDroppableFlag(oItem,FALSE);
AssignCommand(oNPC,ActionEquipItem(oItem,INVENTORY_SLOT_CHEST));
}
}