Author Topic: Problem with onheartbeat script and waypoints  (Read 561 times)

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Problem with onheartbeat script and waypoints
« Reply #15 on: September 05, 2010, 05:10:41 am »


               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 .
                     
                  


            

Legacy_Krevett

  • Full Member
  • ***
  • Posts: 203
  • Karma: +0/-0
Problem with onheartbeat script and waypoints
« Reply #16 on: September 05, 2010, 08:26:16 am »


               Thanks all, the problem is solved! I got it with your method ghostofgod (less changes to make for me), happy to see there's still many people involves in this game '<img'>