Holiday Random Event Timer System
What have you done in this MR?
Holidays have always been one of my favorite things in RuneScape because of the cozy vibes they give. I always thought it would be more immersive and the holidays more enjoyable if there were random events specific to the holidays to add to the ambience. Here is my implementation of the idea. I hope everyone likes it and it can be implemented into 2009scape. Please share your feedback and let me know your honest thoughts.
Implemented a new holiday random event timer system:
The timer system is based on Ceikry's AntiMacro timer system but with many modifications. The holiday random event system auto enables based on current date and defined start / end dates for a holiday defined in HolidayRandoms.kt . This system brings holiday random events that occur randomly every 30 to 90 minutes. These randoms are not suppose to be the main event for the holiday but as compliment to the normal holiday events. The timer system / events have been designed to not interrupt gameplay and are visual. They will not occur to a player if a normal random event is active, the player is in a random event restricted zone, or the player is in combat. The timer will keep delaying by 50 ticks until proper conditions are met. This timer system has no effect on the normal AntiMacro timer(normal random events). Any of the new events that cause a very small amount of damage have safety checks in place to never kill or bring a player below 5 HP. This timer system is very flexible and can be used to add random events for any other holiday(which I plan too if this gets merged). The timer system currently has 2 server config booleans. holiday_random_events = true(default) and force_halloween_randoms = false(default). A holiday's randoms can be force enabled outside of the defined date range via the server config or a command. With the implementation of the timer system it ships with 7 halloween random events I have created which are detailed below.
The holiday random event timer system has 3 commands :
::hrevent -p username -e eventName
- You can type just ::hrevent to get a list of available holiday randoms you can spawn
::forcehrevents holidayName
- Use ::forcehrevents to get the list of available holidays
- This command can be used to force the holiday timer system to enable for a specified holiday
- When running this command it registers the holiday timer system with the holiday specified for all players currently online and makes it so players logging in after the command is run will receive the holiday randoms timer.
- This works by setting the server constants holiday_random_event = true and force_"holidayname"_randoms = true for the server. (These will reset on next server reboot to the values defined in the server config)
::stophrevents
- This command is used to remove ALL holiday random timers from logged in players and set server constant holiday_random_events = false so players will no longer receive the timer on login. (This will reset on next server reboot to the values defined in the server config)
The 7 Halloween Randoms: The current defined start date for the halloween randoms is October 17th and the end date is November 7th. (2 weeks before and one week after halloween)
Witch: The witch will spawn and cast one of 5 random spells on the player. ::hrevent -p username -e witch
- The first spell turns the player into skeleton for one minute
- The second spell causes an explosion at the players feet causing 2 damage
- The third spell makes the player dance and the witch laughs
- The fourth spell turns the player into a bat for one minute
- The fifth spell turns the player into a chair for one minute
Spider: ::hrevent -p username -e spider
- A spider spawns and player will stomp and kill the spider if they are within 3 tiles after short time after it spawns
Black Cat: ::hrevent -p username -e black_cat
- A black cat spawns and follows the player for a short time and then if the player is within 3 tiles it hisses and damages the player. If the player is more than 3 tiles away the cat it just hisses.
Ghost: ::hrevent -p username -e ghost
- A ghost spawns and follows the player making ghost noises for a short time
Zombie: ::hrevent -p username -e zombie
- A zombie spawns and attempts to bite the player. There is a 50% chance the zombie bites the player and turns them into a zombie for one minute
Vampire: ::hrevent -p username -e vampire
- A vampire spawns and tries to bite the player. There is a 50% chance the zombie bites the player and turns them into a vampire for one minute
Death:
- Death spawns, a creepy jingle plays, and death says a random line to the player about their time running out.
Testing:
- Use ::forcehrevents halloween (if halloween randoms are not enabled on test) you can tell if they are enabled if you get the message "A chill goes down your spine" when you login. This is the message the player receives when the timer registers for halloween on the player.
- Spawn all the events using the commands above and test them (Turn all your volume sliders up. They have sound and some even have music)
- Verify holiday random events can not be spawned if you have a regular random event active (like a genie following you) or you are in combat. The timer should delay 50 ticks and try again. Use ::timers to check you currently registered timers. The timer is called holiday
Are there any tricky things testers should keep an eye out for?
-
No -
Yes, as follows: -
I have tested these changes thoroughly. -
This requires extra testing due to changes to architecture or other similarly risky changes. -
I used the Thanos Tool for any JSON edits where possible, and have attached screenshots of any changes. -
I acknowledge that this contribution will be released under the AGPL license.
*** NOTE: If Gitlab complains about pipelines stating that you need to "Validate your Gitlab account" there is no need to worry. You do not have to do this and it is only occurring because OUR pipeline tried to run on your fork. While it's preferred that you do validate your account, you can safely ignore/dismiss this message from Gitlab. ***