I'm running a small multiplayer server over my LAN. The problem I'm having is that I have a particular PC who has a scripted item that summons a set of armor to him. It's cheesy, I know, but the player REALLY wanted it.
- void main()
- {
- object oBoundArmor;
- effect eFX;
- object oPC = GetItemActivator();
- if ( GetLocalInt(oPC, "BoundArmorOn") == 1 )
- {
- FloatingTextStringOnCreature("Your Bound Armor is already active.", oPC);
- return;
- }
- else
- {
- CreateItemOnObject("boundarmor_s", oPC);
- ClearAllActions(TRUE);
- DelayCommand(0.1f,AssignCommand(oPC, ActionEquipItem(GetItemPossessedBy(OBJECT_SELF, "boundarmor_s"), INVENTORY_SLOT_CHEST)));
- SetLocalInt(oPC, "BoundArmorOn", 1);
- //Get rid of the armor
- eFX = EffectVisualEffect(VFX_IMP_EVIL_HELP);
- oBoundArmor = GetItemPossessedBy(oPC, "boundarmor_s");
- DelayCommand(900.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eFX, oBoundArmor));
- DelayCommand(900.0, DestroyObject(oBoundArmor));
- DelayCommand(900.0, SetLocalInt(oPC, "BoundArmorOn", 0));
- DelayCommand(900.0, AssignCommand(oPC,ClearAllActions()));
- DelayCommand(900.2, AssignCommand(oPC,ActionEquipMostEffectiveArmor()));
- }
- }
This is basically what I have going. Works great. Item is activated... is set on him, and then 900 seconds later is gotten rid of. Problem... every PC in the multiplayer has their armor destroyed along with him. Everyone is pretty pissed off at that PC, and I can't figure out how it happened. It's also a reoccuring problem.
Anyone have any ideas that might help?