How to make a fixed spawn with a time reference aka Cron Tab

How to make a fixed spawn with time aka Cron Tab
Syntax spawn.dtd
Mechanics -
Pre example!

<spawn name = "[queenant_room]">
<npc id = "29001" count = "1" respawn_cron = "* * * * *" pos = "- 21610 181594 -5720 0" />
</spawn>


What you need to pay attention to - respawn_cron = "* * * * *" the fixed spawn format is presented in Cron - consists of MANDATORY five stars.
Every star is time. First - Minutes, Second - hours, Third week, Month, Fifth - day of the week (1-7). (ATTENTION! Completely remove respawn = "something here" respawn_rand = "something here" leave ONLY respawn_cron = "data ")
For example, I want to make Queen Ant aka Queen Ant ant every day at 19:00:
as it is in its original form -
<spawn name = "[queenant_room]">
<npc id = "29001" count = "1" respawn = "129600" respawn_rand = "61200" pos = "- 21610 181594 -5720 0" />
</spawn>


As it became after making changes to the current task -
<spawn name = "[queenant_room]">
<npc id = "29001" count = "1" respawn_cron = "0 19 * * *" pos = "- 21610 181594 -5720 0" />
</spawn>


Thus, I pointed to the second star - this is a watch, i.e. Every day, the AK will be respected at 19:00, even if she was killed at 18:59:59 - she will return at 19:00.
Similarly, the whole described method works with weeks and months, and so on.
 
If I make it like this >

<spawn name = "[queenant_room]">
<npc id = "29001" count = "1" respawn_cron = "0 20 6 * *" pos = "- 21610 181594 -5720 0" />
</spawn>

It will respawn every Saturday at 20:00 right?
 
one questions,if i need take to 20 + random only increases respawn_rand =1200 in te table ?

ex : <npc id="29014" count="1" respawn_cron = "0 21 * * 1,4" respawn_rand="1200" pos="55024 17368 -5412 0" />
 
one questions,if i need take to 20 + random only increases respawn_rand =1200 in te table ?

ex : <npc id="29014" count="1" respawn_cron = "0 21 * * 1,4" respawn_rand="1200" pos="55024 17368 -5412 0" />
Incorrect, look guide about not fixed
 
Si lo hago así, >

<nombre del engendro = "[queenant_room]">
<npc id = "29001" count = "1" respawn_cron = "0 20 6 * *" pos = "- 21610 181594 -5720 0" />
</engendro>

Reaparecerá todos los sábados a las 20:00, ¿verdad?
BRO en que carpeta pongo eso ? disculpa la molestia
 
how i can make a npc apear friday and disapear monday same time?

gameserver/data/zone add file

XML:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE list SYSTEM "zone.dtd">
<list>
    <zone name="[npc_spawn_test]" type="fun" >
        <set name="enabled" val="false" />
        <set name="cronZoneEnablePattern" val="0 12 * * 5" />  //At 12:00 on Friday.
        <set name="cronZoneDisablePattern" val="0 12 * * 7" /> //At 12:00 on Sunday.
        <set name="cronZoneEnableBroadcastSpawnEvent" val="[test2_spawn]" />
        <set name="cronZoneDisableBroadcastDespawnEvent" val="[test2_spawn]" />
        <set name="cronZoneEnableAnnounceCustomMessage" val="voicedcommandhandlers.Debug.Enabled" />
        <set name="cronZoneDisableAnnounceCustomMessage" val="voicedcommandhandlers.Debug.Disabled" />
        <polygon>
            <coords loc="82521 148480 -3472 0" />
            <coords loc="82521 148480 -3472 0" />
            <coords loc="82521 148480 -3472 0" />
            <coords loc="82521 148480 -3472 0" />
        </polygon>
    </zone>
</list>


at gameserver/data/spawn at any file add spawn your npc

XML:
    <spawn name="[custom_spawn]" event_name="[test2_spawn]">
        <npc id="20001" count="1" respawn="60" pos="82521 148480 -3472 0"/>  //gremlin at giran centre
    </spawn>


tested - works :)
 
gameserver/data/zone add file

XML:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE list SYSTEM "zone.dtd">
<list>
    <zone name="[npc_spawn_test]" type="fun" >
        <set name="enabled" val="false" />
        <set name="cronZoneEnablePattern" val="0 12 * * 5" />  //At 12:00 on Friday.
        <set name="cronZoneDisablePattern" val="0 12 * * 7" /> //At 12:00 on Sunday.
        <set name="cronZoneEnableBroadcastSpawnEvent" val="[test2_spawn]" />
        <set name="cronZoneDisableBroadcastDespawnEvent" val="[test2_spawn]" />
        <set name="cronZoneEnableAnnounceCustomMessage" val="voicedcommandhandlers.Debug.Enabled" />
        <set name="cronZoneDisableAnnounceCustomMessage" val="voicedcommandhandlers.Debug.Disabled" />
        <polygon>
            <coords loc="82521 148480 -3472 0" />
            <coords loc="82521 148480 -3472 0" />
            <coords loc="82521 148480 -3472 0" />
            <coords loc="82521 148480 -3472 0" />
        </polygon>
    </zone>
</list>


at gameserver/data/spawn at any file add spawn your npc

XML:
    <spawn name="[custom_spawn]" event_name="[test2_spawn]">
        <npc id="20001" count="1" respawn="60" pos="82521 148480 -3472 0"/>  //gremlin at giran centre
    </spawn>


tested - works :)
Do i need change the enalbed from false to true because npc its not spawnned
 
Leave - false, it will enable when crontab time will be executed.
Play with crontab times and test it. It works for me.
 
Back
Top