Limited Time Events
Schedules are a good fit for events that start and end at fixed times. In this tutorial, we create a short server-wide meteor shower. Players can collect meteor fragments only while the event is active. When the event ends, progress is cleaned up and the NPC switches back to normal dialogue.
Requirements
You should know the basics of objectives, points, global tags, and schedules.
1. Creating the folder structure for the example quest🔗
Create a new quest package called "meteorShower".
The file structure should look like this:
- meteorShower
- package.yml
- actions.yml
- objectives.yml
- conditions.yml
- items.yml
- conversations
- astronomer.yml
Download the files for this tutorial
Instead of manually creating / filling the files, just download them using the command below:
/bq download BetonQuest/Quest-Tutorials refs/tags/v3.1.0 QuestPackages /Features/Schedules/Limited-Time-Events/1-Setup /meteorShower overwrite
1 2 3 4 5 6 7 | |
1 2 3 4 5 | |
- Replace
33with the Citizens ID of your Astronomer NPC. - This connects the NPC to the
Astronomerconversation.
2. Start the event with a schedule🔗
The first schedule starts the event at 20:00. It sets a global tag and uses runforall to start the collection
objective for every online player.
1 2 3 4 5 6 7 8 9 10 11 | |
- This is the schedule that starts the temporary event.
realtime-dailyuses the real server clock.- The event starts at 20:00 server time.
- The named action is executed without a specific player.
1 2 3 4 5 6 7 8 9 10 11 | |
- The schedule calls one folder that starts every part of the event.
- The global tag marks the server-wide event as active.
runforallswitches from schedule context to each online player that has not already claimed a reward.- Each player's event progress starts at zero.
- Each online player receives the collection objective.
- This folder runs whenever one fragment is picked up.
- The point stores one player's temporary event progress.
- The objective is removed after five fragments so extra pickups do not keep increasing progress.
notifyallis safe to call from a schedule because it is player independent.
1 2 | |
- The objective completes once per picked-up fragment.
persistentrestarts it until the action removes it at five fragments.
1 2 3 4 5 6 | |
- Checks whether the event is currently active for the whole server.
- Checks one player's temporary fragment counter.
- Checks whether the player still has five fragments in their inventory.
- Requires both tracked progress and the actual items for the hand-in.
- Prevents the same player from claiming the reward twice during one event run.
1 2 3 | |
The schedule itself has no player, so it cannot directly add a normal player objective. runforall solves that by
running resetMeteorFragments and addMeteorObjective once for each online player. The global tag
meteorEventActive marks the server-wide event state.
Is the example not working?
Get the correct configs by running the following command.
This will overwrite any changes (including NPC ID's and locations) you have made to the example.
Linking NPCs to conversations is explained in the basics tutorial.
/bq download BetonQuest/Quest-Tutorials refs/tags/v3.1.0 QuestPackages /Features/Schedules/Limited-Time-Events/2-EventStart /meteorShower overwrite
3. Let players claim rewards while the event is active🔗
Now the Astronomer checks whether the event is active and whether the player has collected enough fragments.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
- Reward claiming is checked first, then the missing-item response, then the normal progress message.
- The waiting message is only shown while the global event tag is missing.
- The point placeholder shows this player's current fragment count.
- The reward is available only during the event, after enough pickups, while the player still has the fragments.
- This gives the reward and saves the claimed state.
- This catches players who already claimed their reward.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
- The reward folder groups item hand-in, reward, and cleanup for one player.
- Takes the five fragments.
abortprevents partial removal if something changed. - Gives the configured reward item.
- Saves that this player already claimed the event reward.
- Removes the objective from this player after they are done.
Players now have temporary progress during the event. The point category stores how many fragments they collected,
and the tag meteorRewardClaimed prevents repeated rewards.
4. End the event and clean up progress🔗
Add a second schedule at 20:30. It removes the event tag, removes the temporary objective, deletes temporary points, and clears the reward tag so the next event can be played again.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
- This second schedule closes the temporary event.
- The event ends thirty minutes after it starts.
- The cleanup action runs player independent.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
- The end folder keeps the cleanup in one place.
- Removes the global event state.
- Because this runs from a schedule, it removes the objective for all players.
- Deletes the temporary event point category for all players.
- Clears reward claim tags so the next event can be played again.
- Announces the end to online players.
Because endMeteorShower is called by a schedule, objective remove, deletepoint, and tag delete clean up all
players, including offline players. This keeps the next event run clean.
Download this part of the tutorial
Enter this command in the chat to download this part of the tutorial:
/bq download BetonQuest/Quest-Tutorials refs/tags/v3.1.0 QuestPackages /Features/Schedules/Limited-Time-Events/3-FullExample /meteorShower overwrite
You have now created a limited-time event. The same structure works for weekend dungeons, seasonal gathering windows, server-wide races, double reward hours, or world-state changes that should start and stop automatically.