What I've come up with looks like this
void main()
{
int iRand = d3(1);
object oMainhand;
object oOffhand;
switch (iRand){
case 1: oMainhand = CreateItemOnObject("CeremonialScythe", OBJECT_SELF);
SetDroppableFlag(oMainhand, FALSE);
ActionEquipItem(oMainhand, INVENTORY_SLOT_RIGHTHAND);
break;
case 2: oMainhand = CreateItemOnObject("BoneSword", OBJECT_SELF);
oOffhand = CreateItemOnObject("BoneShield", OBJECT_SELF);
SetDroppableFlag(oMainhand, FALSE);
SetDroppableFlag(oOffhand, FALSE);
ActionEquipItem(oMainhand, INVENTORY_SLOT_RIGHTHAND);
ActionEquipItem(oOffhand, INVENTORY_SLOT_LEFTHAND);
break;
case 3: oMainhand = CreateItemOnObject("BoneSword", OBJECT_SELF);
oOffhand = CreateItemOnObject("BoneSword", OBJECT_SELF);
SetDroppableFlag(oMainhand, FALSE);
SetDroppableFlag(oOffhand, FALSE);
ActionEquipItem(oMainhand, INVENTORY_SLOT_RIGHTHAND);
ActionEquipItem(oOffhand, INVENTORY_SLOT_LEFTHAND);
break;
}
}
I plan to use this in the future, giving certain types of monsters many particular setups, more than just the three listed here. Will this cause instability or lag when multiple creatures are spawning throughout the server with scripts like this tied to them?
Modifié par EzRemake, 03 décembre 2013 - 09:34 .