This is a control system for scheduling town invasions. I wrote a simple version of this for a shard I'm helping on. I have since made improvements to it and the owner has consented for me to release it since there are no invasion systems currently released. Also need to give a big thanks to @Vorspire who helped me with the Persistance!
Use the command [invasionsystem and you will get the following gump:
In that gump, you can select the town, monster type and champion type. You must also set a date and time for the invasion (UTC time). You can also chose to randomize the city, monster, and champion by checking the Randomize all button and setting the time.
Once the invasion is created successfully, you will get a message confirming it. Once created, you can view your pending or active invasions using the command [listinvasions :
When the time comes (within about 30 seconds of the actual time), the monsters will spawn in town. Players must kill all the spawn to spawn the Champion. The Champion is a typical Champ Spawn champion and will do the gold shower, powerscrolls, champ skull, etc.
You can change the towns, monsters, and champions in the scripts and they will be updated in the gump. The Champions can be changed in the enums in Invasion Settings.cs:
You can simply change the name in TownChampionType to your custom type to change the available champions. You can also change the available towns and MonsterTypes here. The MonsterTypes must also be defined in MonsterTownSpawnEntry:
Notice that you can also change the creatures for each MonsterType as well as the amounts of each.
If you change the Towns, you will need to properly define them in the Invasion System.cs:
I've tested the system locally, and on my server (Linux) and it seems to work perfectly. Please let me know if you have any issues.
My future plans is to create portals that appear around town that the monsters actually spawn out of. You will have to destroy the portals to spawn the champion. That is more in line with what we saw on OSI shards. For now, the spawn is just random around town but I figured it was better to release as is so that people can enjoy now.
Use the command [invasionsystem and you will get the following gump:
In that gump, you can select the town, monster type and champion type. You must also set a date and time for the invasion (UTC time). You can also chose to randomize the city, monster, and champion by checking the Randomize all button and setting the time.
Once the invasion is created successfully, you will get a message confirming it. Once created, you can view your pending or active invasions using the command [listinvasions :
When the time comes (within about 30 seconds of the actual time), the monsters will spawn in town. Players must kill all the spawn to spawn the Champion. The Champion is a typical Champ Spawn champion and will do the gold shower, powerscrolls, champ skull, etc.
You can change the towns, monsters, and champions in the scripts and they will be updated in the gump. The Champions can be changed in the enums in Invasion Settings.cs:
You can simply change the name in TownChampionType to your custom type to change the available champions. You can also change the available towns and MonsterTypes here. The MonsterTypes must also be defined in MonsterTownSpawnEntry:
Notice that you can also change the creatures for each MonsterType as well as the amounts of each.
If you change the Towns, you will need to properly define them in the Invasion System.cs:
I've tested the system locally, and on my server (Linux) and it seems to work perfectly. Please let me know if you have any issues.
My future plans is to create portals that appear around town that the monsters actually spawn out of. You will have to destroy the portals to spawn the champion. That is more in line with what we saw on OSI shards. For now, the spawn is just random around town but I figured it was better to release as is so that people can enjoy now.