Just got home from a loooong day at work. But I wanted to make sure I left you with something that worked for sure. So with the same idea of what I was suggesting for changes mixed with what you had posted, this is tested and working:
void main()
{
if ((GetIsDawn() || GetIsDay()) && GetLocalInt(OBJECT_SELF, "post")==2)
{
ClearAllActions();
ActionEquipItem(GetLocalObject(OBJECT_SELF, "oldobject"), INVENTORY_SLOT_LEFTHAND);
SetLocalInt(OBJECT_SELF, "post", 1);
return;
}
if ((GetIsNight() || GetIsDusk()) && GetLocalInt(OBJECT_SELF, "post")==1)
{
ClearAllActions();
SetLocalObject(OBJECT_SELF, "oldobject", GetItemInSlot(INVENTORY_SLOT_LEFTHAND));
ActionEquipItem(GetItemPossessedBy(OBJECT_SELF, "NW_IT_TORCH001"), INVENTORY_SLOT_LEFTHAND);
SetLocalInt(OBJECT_SELF, "post", 2);
return;
}
ExecuteScript("nw_c2_default1", OBJECT_SELF);
}
You may have already got it working with one of the other methods posted. But just in case this is another. Hope it helps and good luck.
Modifié par GhostOfGod, 05 septembre 2010 - 04:14 .