• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

GlobalEvent TM - Boss Raid System v1.3.0 (Release/Updated)

BeniS

Advanced OT User
Senator
Joined
Aug 8, 2009
Messages
1,850
Reaction score
189
Location
New Zealand
TM - Boss Raid System v2.0.0a (Release/Updated)

~*Teh Mavericks Boss Raid System v2.0.0a*~

Hey guys, I'm releasing my Boss Raid System designed and scripted by me! It is a system similar to TFS raid system, but I find my one a lot easier to control and configure, the soul purpose of this script is to make it EASIER to control boss raids, it works really well and gives all the options you need + its dynamic and quite stable as far as I know. This script system uses the globalevents as a thinker/timer. Tested in 0.3.6pl1 and now works in 0.4 (make sure you download the 0.4 package).

Why use this system?:
  • Allows you to easily customize single or global raid settings, with a wide range of settings per raid.
  • Advanced broadcasting options with multiple broadcasts before and/or during raids (you set the length of the delay between broadcasts),
  • Won't spawn creatures in PZ or houses.
  • Can enable or disable single raids or all raids in-game using talkactions,
  • Well tested and stable with steady updates,
  • Removes the monsters before it executes the next raid (if any are found within the bounds+threshold you have set),
  • Options to have bosses or not and add trash monsters or not,
  • Basic debugging logs stored to a file, with detailed information to help identify issues you might be having (if enabled in the global config),
  • Logs every raid that takes place into a log file (if enabled in the global config),
  • Automatically stores the raid with some settings to the database to allow you to check each raids status (enabled | active | boss | lastExecution.)
  • List all raid information using talkaction command /raidlist [filter]. Contains list filtering for large listings.

Latest Version: 2.0.0a


Screen Shots

6iwnc3.jpg


disable.jpg


4vft37.png


!Download In Attachments!

Features:
  • Global Config - Allows you to enable or disable logging and other various things.
  • Raid Logging - Logs when the raid has executed.
  • Basic Debug logging - Logs details on the raid executions (number of creatures created/removed etc).
  • Trash Spawns - These are monsters you want to summon with the boss, weak creatures - for example when Ferumbras spawns you may want other demons to spawn with him. You can configure the amount you want to spawn and set a chance for each of them too.
  • Check Threshold - The distance the script will check outside the set co-ordinates for the boss creatures and trash spawn creatures, in case of luring.
  • Talkaction Controls - Can disable and enable boss raids in-game.
  • [1.3.0] Extensive Broadcasting - Can configure text to be broadcasted with delay intervals and raid activation triggering (will default to final broadcast line) when the raid is executed.
  • [1.3.5] In-Game Listing - Can List all raids in-game by executing the command /raidlist [filter] - contains filtering of specific raids (enabled, disabled, active, inactive, boss name, raidID.)

Functions: ~NOT UPDATED
Lua:
executeBossRaid (returns bool) -- Executes the boss raid if provided with the correct params (!Important Note: This function is not dynamic yet)
	Parametres required: config (array as above), text (array as above), interval (int), lastExecution (float?)


doRegisterRaid (returns bool) -- used for in-game raid control and updates the DB.
	Parametres required: id (int), enabled (int), boss (string)


setRaidToActive (returns bool) -- sets the raid to active (used in the executeBossRaid function: at the moment this is only a flag in the DB).
	Parametres required: id (int), lastExecution (float?)


isRaidActive (returns bool) -- checks if a raid is currently active.
	Parametres required: id (int)


isRaidDisabled (returns bool) -- checks if a raid is disabled.
	Parametres required: id (int)


isRaidValid (returns bool) -- checks if a raid is listed in the DB.
	Parametres required: id (int)


getRaidIdByBoss (returns int) -- returns the raid id name using the boss name to find it in DB.
	Parametres required: boss (string)


getRaidBossById (returns string) -- returns the raid boss name using the id to find it in DB.
	Parametres required: id (int)


doDisableAllRaids (returns bool) -- disables all raids.
	Parametres required: none


doEnableAllRaids (returns bool) -- enables all raids.
	Parametres required: none


doEnableRaid (returns bool) -- enables a specific raid using the raid id.
	Parametres required: id (int)


doDisableRaid (returns bool) -- disables a specific raid using the raid id.
	Parametres required: id (int)

executeBroadcastSequence(returns bool) -- controls the broadcasting sequence configured.
	Parametres required:config (array), broadcasting (array), interval (int)
 
doBroadcastRaidText(returns bool) -- controls the broadcasting sequence configured.
	Parametres required:config (array), broadcast (array), interval (int)

getAllRaidData(returns array) -- pull all the raid data from the database into an array
	Parametres required: none

intToStatus(returns string or bool) -- converts the status int values (1 & 0) to a string value for text formatting
	Parametres required: status (string)

Configuration:

System Config Example->
Lua:
main_config = {

    logRaids = true, -- This will write a line in a txt file everytime a raid is activated along with its time
    enableDebug = false, -- if you want to check what is happening will your scripts it will print it to the console (good for testing)
    allowDisabling = true, -- this will allow you to disable raids in-game if you wish (make sure each raid has a different "id" in their config)
    debugFileName = "raidDebug", -- Name of the txt file where you can see the raid debug info on raids that have been activated.
    fileName = "raidLog", -- Name of the txt file where you can see the raids that have been activated.
    logpath = "globalevents/scripts/raids/logs/", -- this is the place where the log files are.
    path = "globalevents/scripts/raids/", -- this is the place where all the files are.
    libpath = "globalevents/scripts/raids/lib/" -- this is the place where the library files are.
}

dofile(getDataDir().."".. main_config.libpath .."eventraids.lua") --dont touch unless you know what you are doing

Talk Actions:
  • /disableraid 1 <- will disable raid with id 1 or,
  • /disableraid The Horned Fox <- will disable raid with the boss name The Horned Fox,
  • /disableraid all <- will disable all raids.
  • /enableraid 1 <- will enable raid with id 1 or,
  • /enableraid The Horned Fox <- will enable raid with the boss name The Horned Fox,
  • /enableraid all <- will enable all raids.
  • /raidlist [optional filters] <- lists all raids. Parameters(filters): enabled, disabled, active, inactive, boss name, raid id.

How To Setup:

1) Copy the raids folder into your /data/globalevents/scripts folder.

2) Open /data/globalevents/scripts/raids and rename the file "exampleRaid.lua" to what ever name suits (example: thehornedfox.lua) - (or if you are adding new raids, copy the file and rename)

3) Open the file you just renamed and edit the config to suit your needs. Example:
Lua:
------- Config Begin -------

	local config = 
	{
		raidName = "Horned Rage",
		boss = {name = "The Horned Fox", amount = 1, pos = {x=nil,y=nil,z=nil}},
		spawnBossChance = 100, --(%)
		enabled = true,
		topLeft = { x=1020, y=801, z=7, stackpos=253 },
		bottomRight={ x=1032, y=806, z=7, stackpos=253 },
		autoCleanSpawns = { enabled = true, time = 80000 },
		broadcast = true,
		trashspawn = {
			{name = "Minotaur", amount = 3, chance = 100},
			{name = "Minotaur Guard", amount = 3, chance = 100},
			{name = "Minotaur Mage", amount = 3, chance = 100}
		},
		checkThreshold = 10
	}
	
	local broadcasting = 
	{
		  --{text = string, interval = integer[milliseconds], activate = boolean[true/false]} NOTE: Only have ONE 'true' value for the activate param
		  --(or it will activate more than once.) it will activate on the last text by default if no activate value is found.
		  --The raid creatures will not spawn until it reaches the broadcast text with activate parameter 'true'.
			{text = "Minotaurs have been sighted moving towards thais, beware!", interval = 500, activate = false},
			{text = "Prepare for battle citizens of thais! Take arms against the Minotaurs", interval = 10000, activate = false},
			{text = "Minotaurs are attacking thais! Defeat their leader "..config.boss.name.." before it is too late.", interval = 10000, activate = true} --No comma (,) for the last entry
	}

------- Config End -------
(Make sure when adding the trashspawns and broadcasts you don't leave a , (comma) on the end of the sub array)

4) Next open your /data/globalevents/globalevents.xml file and add the following:
XML:
<!-- Raid System Init (2.0.0a version only) -->
<globalevent name="raidSystemInit" type="start" event="script" value="raids/lib/init.lua"/>
0.3:
XML:
	<globalevent name="thehornedfox" interval="120" event="script" value="raids/thehornedfox.lua"/>
	<globalevent name="register_thehornedfox" type="start" event="script" value="raids/thehornedfox.lua"/>

0.4:
XML:
	<globalevent name="thehornedfox" interval="120000" event="script" value="raids/thehornedfox.lua"/>
	<globalevent name="register_thehornedfox" type="start" event="script" value="raids/thehornedfox.lua"/>

Change the value to be your file name on both, and change the interval to what you like.
interval is how long it takes to execute the raid - it is in seconds so if you want it to be say 1 hour long you have to make it 3600 or what ever you like.

5) Now you have the raid configured you will need to add a new table to your database.
->5a) Go into localhost/phpmyadmin and logon to your database.
->5b) Find the tab that says "SQL" and click it. Next add the the following code into the box and click "go":
Code:
CREATE TABLE `boss_raids` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `raidName` varchar(30) NOT NULL,
  `enabled` tinyint(2) NOT NULL default '1',
  `active` tinyint(2) NOT NULL default '0',
  `boss` varchar(30) NOT NULL,
  `lastExecution` int(25) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

ALTER TABLE `boss_raids` AUTO_INCREMENT = 1;

6) Go to /data/globalevents/scripts/raids folder, open the raidsConfig.lua file and set to fit your needs.

7) Go to your /data/talkactions/scripts and add the folder called "raids - goes in talkactions" in there and rename it just "raids".

8) Now open your /data/talkactions and open the file talkactions.xml and add the following code:
PHP:
	<talkaction log="yes" access="4" words="/disableraid" hide="yes" event="script" value="raids/bossraid_control.lua"/>
	<talkaction log="yes" access="4" words="/enableraid" hide="yes" event="script" value="raids/bossraid_control.lua"/>
    <talkaction log="yes" access="4" words="/raidlist" hide="yes" event="script" value="raids/bossraid_control.lua"/>

Now your done!! You can add as many as you like, just by repeating steps 2, 3, and 4. Be sure to rep me for this and hope it comes in handy for lots of people, its working really well and I haven't found any problems with it yet! I appreciate comments on what you think of my work and how I could better improve it. Help keep this system alive by supporting it! :D

Update Information:
2.0.0a
  • Redesign library the code struture in preparation for 2.0.0a features (remove any internal and external reliances).
  • Store all passed values into the database so they can be pulled once to prevent parsing params.
  • Allow for the system to handle the function call 'executeBossRaid(params)' more dynamically and mobile.
  • Create a more dynamic logging sequence.
  • Revamp UI prompting for Raid List, Logging/Debuging
  • Remove requirement to set ID's in the configs (make it self maintained).
  • Add checking for matching boss names
  • Add standard String checking: 'string.lower'
  • Set the boss to spawn at a specific coordinate on the map (rather than spawning in the range randomly)
  • A timer in the script to remove the raid monsters and boss a certain amount of time after the raid occurs (configurable).
  • Monsters spawn in "waves", in sync with broadcasts leading up to the boss spawning (configurable).

1.3.5
  • Added new in-game raid listing feature. Allows you to list all raids using a talkaction /raidlist [optional filter]. The filters will allow you to give you the raids with specific status's e.g. /raidlist enabled gives you the raids that are enabled.
  • Filter Params: enabled, disabled, active, inactive, boss name/raid name, raid id.

1.3.1
  • Fixed a minor bug with broadcasting. (The broadcasting was not disabling when the raid was set to disable.)

1.3.0
  • You can now add broadcast messages with delay intervals and configurable activation triggers (it will default to the last broadcast text if the param is not found.)
  • Also edited some of the code structures to have dual conpatibility for 0.3.6 & 0.4.

1.2.2
  • Fixed a few minor bugs to do with compatibility.

1.2.1
  • Changed the "Add boss" for loop to a while loop to fix a bug (when a boss is set in PZ the raid doesn't replace the boss).

1.2.0
  • Added Protection Zone control to avoid creatures summoning in protection zones or houses.
  • Fixed a minor bug with trash spawns (if the trashspawn was listed in the array but amount set to 0/disabled the creatures were still being removed if in the threshold).
  • Fixed a minor error in the name recognition control in the talkactions.

1.0.0
  • This was the first release. For more information on this please check the changelog.

Updated Files:
To update your older version simply replace the files according to the update code. Or syncronize the changes if you don't wish to lose some of your configuration (do so with caution).
2.0.0a -
* Can't remember lol
1.3.5 -
*eventraids.lua edited
*boss_control.lua edited (talkaction)
1.3.1 -
*eventraids.lua edited
1.3.0 -
*eventraids.lua edited
*exampleRaid.lua edited
Note: Made it compatible with both 0.3.6 and 0.4 versions
1.2.2 -
*eventraids.lua edited
1.2.1 -
*eventraids.lua edited
1.2.0 -
*eventraids.lua edited
*bossraid_control.lua edited

Known Issue(s):
  • When the Threshold checks on blank/null tiles it brings up the error for each time it checks it and can cause some issues for people with slow servers.

Be sure to post here if you find a bug.
 

Attachments

  • [OLD] [0.4] [Teh Maverick] Boss Raid System v1.2.2.rar
    8.7 KB · Views: 87 · VirusTotal
  • [OLD] [0.3] [Teh Maverick] Boss Raid System v1.2.2.rar
    8.7 KB · Views: 47 · VirusTotal
  • [LATEST] [0.3+0.4] [Teh Maverick] Boss Raid System v1.3.5.rar
    10.8 KB · Views: 347 · VirusTotal
  • [BeniS] Boss Raid System v2.0.0a.zip
    13.2 KB · Views: 154 · VirusTotal
Last edited:
Looks cool, i'll try it
rep+ :)

Edit: Tested it and works like a charm^^
 
Last edited:
Back
Top