Event NPC Start Time and End Time

Results 1 to 9 of 9
  1. #1
    Ultimate Member Drewww is offline
    MemberRank
    Apr 2015 Join Date
    164Posts

    Event NPC Start Time and End Time

    Event NPC Start Time and End Time
    Events and some Event NPC require a Start Time and End Time, for example the XP Buff NPCs, their Start and End times are in dbo.SysKeyValue and look similar to:

    Expstarttime_00 7291733
    Expendtime_00 8291733

    To get the values needed you can use your calculator and do the following:
    (Month 1-12, Day 1-31, Hours 0-23, Seconds 0-59)
    If you want the Event to start on the 8th month 5th day 6th hour and 10 seconds you would do this:
    8*1000000 + 5*10000 + 6*100 + 10
    Which gives us a start time of 8050610

    And do the same for the end time.

    Except for Gold > Dias and Dias > Gold NPCs, they only require an Hour format.
    Start Time can be 0 hours to 24 hours
    Any value over 24 in either start/end fields will give a start hour of 0 and end hour of 24
    Last edited by Drewww; 01-08-15 at 03:07 AM.


  2. #2
    Member Reaperman is offline
    MemberRank
    Jan 2015 Join Date
    76Posts

    Re: Event NPC Start Time and End Time

    Quote Originally Posted by Drewww View Post

    To get the values needed you can use your calculator and do the following:
    (Month 1-12, Day 1-31, Hours 0-23, Seconds 0-59)
    If you want the Event to start on the 8th month 5th day 6th hour and 10 seconds you would do this:
    8*1000000 + 5*10000 + 6*100 + 10
    Which gives us a start time of 8050610

    And do the same for the end time.
    Hey Drewww,

    thanx for this hint...If I edit the DB for example Expstarttime_00 8010600 and Expendtime_00 9010600 where I can find the NPCs or have to create the NPCs...?!

    Greetings
    Reaperman
    Last edited by Reaperman; 01-08-15 at 10:32 AM. Reason: add question

  3. #3
    Ultimate Member Turmalin is offline
    MemberRank
    Jul 2014 Join Date
    168Posts

    Re: Event NPC Start Time and End Time

    I think, you would need to edit scripts.
    BTW, thanks for info, didn't know it.

  4. #4
    Ultimate Member Drewww is offline
    MemberRank
    Apr 2015 Join Date
    164Posts

    Re: Event NPC Start Time and End Time

    Event NPCs are spawned with some GM items.
    /gm ? give 208958 - NPCs for Daily Quest Items
    /gm ? give 207264 - Daily Presents
    /gm ? give 201368 - NPCs for XP TP Debt

  5. #5
    Member Reaperman is offline
    MemberRank
    Jan 2015 Join Date
    76Posts

    Re: Event NPC Start Time and End Time

    Quote Originally Posted by Drewww View Post
    Event NPCs are spawned with some GM items.
    /gm ? give 208958 - NPCs for Daily Quest Items
    /gm ? give 207264 - Daily Presents
    /gm ? give 201368 - NPCs for XP TP Debt
    Yes thats right, but after a server restart I have too respawn the npcs with these items. Give it a way that they are permanent ingame?

  6. #6
    Ultimate Member Drewww is offline
    MemberRank
    Apr 2015 Join Date
    164Posts

    Re: Event NPC Start Time and End Time

    Oh in that case you use the GM Object Editor, with that tool you can save the NPC to the database so it reloads with the server.
    Also if you are handy with SQL you can insert the data needed in to ROM_GlobalDB dbo.NPCdata
    That is where all pre-saved NPC and objects are.

  7. #7
    Ultimate Member Turmalin is offline
    MemberRank
    Jul 2014 Join Date
    168Posts

    Re: Event NPC Start Time and End Time

    Sure.
    Just use GM_ObjEdit addon and enable "save" flag on needed npc or just use spawn script with save flag enabled.
    For ex.:


    SetMode( HERE_MUST_BE_NPC_DB_ID_FOR_EX_FROM_CREATE_OBJ_FUNCTION, Hex("0xffffffff") - Def_Mode_Save);



    For list of all flags you can look into Init_Role_ModeValue function(00017.lua).

  8. #8
    Member Reaperman is offline
    MemberRank
    Jan 2015 Join Date
    76Posts

    Re: Event NPC Start Time and End Time

    Hey Dreww and turmalin,

    thx for this. I tested it with the GM_ObjEdit and it works. Thx for the hint with the spawn script!

  9. #9
    Member arvenn is offline
    MemberRank
    Aug 2019 Join Date
    84Posts

    Re: Event NPC Start Time and End Time

    I have a problem. If EXP, TP and Drop Npc get buff from one of them, the other two don't give buff. He tells me to come again tomorrow.

    Although I set a droprate npc buff from lua codes, it gives a drop buff on my first purchase, but when I buy it again it causes magicbiskuvit
    I have 2 strange problems this way. Can anyone help?



Advertisement