Well yea it can be done like that but in versions 1.x.x I haven't made it dynamic. I am removing the need for the parameters config, broadcasting, and interval in these functions so it can be executed dynamically
Hope people find it useful, I enjoy creating it in some spare times I have2.0.0a Requirements: Progress [10/11]
- [X] Redesign library the code struture in preparation for 2.0.0a features (remove any internal and external reliances.)
- [X] Store all passed values into the database so they can be pulled once to prevent parsing params.
- [ ] Move the raid library to a more standardized location(?)
- [X] Allow for the system to handle the function call 'executeBossRaid(params)' more dynamically and mobily.
- [X] Create a more dynamic logging sequence.
- [X] Revamp UI prompting for:
-> Raid List
-> Logging/Debuging- [X] 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'- [X] Set the boss to spawn at a specific coordinate on the map (rather than spawning in the range randomly)
- [X] A timer in the script to remove the raid monsters and boss a certain amount of time after the raid occurs (configurable.)
- [X] Monsters spawn in "waves", in sync with broadcasts leading up to the boss spawning (configurable.)
- [X] Edit docs to fit with all changes made.
<globalevent name="bosses" interval="120000" event="script" value="raids/bosses.lua"/>
<globalevent name="registerbosses" type="start" event="script" value="raids/bosses.lua"/>
do mathrandom(1,10)
if mathrandom = 1 then
local config =
{
id = 1,
boss = {name = "The Horned Fox", amount = 1},
spawnBossChance = 100, --(%)
enabled = true,
topLeft={x=1020, y=801, z=7, stackpos=253},
bottomRight={x=1032, y=806, z=7, stackpos=253},
broadcast = true,
trashspawn = {
{name = "Minotaur", amount = 3, chance = 100},
{name = "Minotaur Guard", amount = 3, chance = 100},
{name = "Minotaur Mage", amount = 3, chance = 100} --No comma (,) for the last entry
},
checkThreshold = 0
}
local broadcasting =
{
--{text = string, interval = integer[milliseconds], activate = boolean[true/false]} NOTE: Only have ONE 'true' value
--(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}
}
if mathrandom = 2 then
local config =
{
id = 2,
boss = {name = "Necropharus", amount = 1},
spawnBossChance = 100, --(%)
enabled = true,
topLeft={x=1020, y=801, z=7, stackpos=253},
bottomRight={x=1032, y=806, z=7, stackpos=253},
broadcast = true,
trashspawn = {
{name = "Minotaur", amount = 3, chance = 100},
{name = "Minotaur Guard", amount = 3, chance = 100},
{name = "Minotaur Mage", amount = 3, chance = 100} --No comma (,) for the last entry
},
checkThreshold = 0
}
local broadcasting =
{
--{text = string, interval = integer[milliseconds], activate = boolean[true/false]} NOTE: Only have ONE 'true' value
--(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
}-
if mathrandom = 3 then
local config =
{
id = 3,
boss = {name = "Tiquandas Revenge", amount = 1},
spawnBossChance = 100, --(%)
enabled = true,
topLeft={x=1020, y=801, z=7, stackpos=253},
bottomRight={x=1032, y=806, z=7, stackpos=253},
broadcast = true,
trashspawn = {
{name = "Minotaur", amount = 3, chance = 100},
{name = "Minotaur Guard", amount = 3, chance = 100},
{name = "Minotaur Mage", amount = 3, chance = 100} --No comma (,) for the last entry
},
checkThreshold = 0
}
local broadcasting =
{
--{text = string, interval = integer[milliseconds], activate = boolean[true/false]} NOTE: Only have ONE 'true' value
--(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*******]]--
It would be nice if I could separate my raids in 2:
Raids with boss
Raids without boss
I have like 20 raids here, I don't want to lose them all u know, is there a way to set make a script like this:
PS: I don't know much about lua, some commands like if mathrandom = 1 then and domath don't even exist in lua, I've put that just to transmit the idea...
Lua:<globalevent name="bosses" interval="120000" event="script" value="raids/bosses.lua"/> <globalevent name="registerbosses" type="start" event="script" value="raids/bosses.lua"/>
Lua:do mathrandom(1,10) if mathrandom = 1 then local config = { id = 1, boss = {name = "The Horned Fox", amount = 1}, spawnBossChance = 100, --(%) enabled = true, topLeft={x=1020, y=801, z=7, stackpos=253}, bottomRight={x=1032, y=806, z=7, stackpos=253}, broadcast = true, trashspawn = { {name = "Minotaur", amount = 3, chance = 100}, {name = "Minotaur Guard", amount = 3, chance = 100}, {name = "Minotaur Mage", amount = 3, chance = 100} --No comma (,) for the last entry }, checkThreshold = 0 } local broadcasting = { --{text = string, interval = integer[milliseconds], activate = boolean[true/false]} NOTE: Only have ONE 'true' value --(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} } if mathrandom = 2 then local config = { id = 2, boss = {name = "Necropharus", amount = 1}, spawnBossChance = 100, --(%) enabled = true, topLeft={x=1020, y=801, z=7, stackpos=253}, bottomRight={x=1032, y=806, z=7, stackpos=253}, broadcast = true, trashspawn = { {name = "Minotaur", amount = 3, chance = 100}, {name = "Minotaur Guard", amount = 3, chance = 100}, {name = "Minotaur Mage", amount = 3, chance = 100} --No comma (,) for the last entry }, checkThreshold = 0 } local broadcasting = { --{text = string, interval = integer[milliseconds], activate = boolean[true/false]} NOTE: Only have ONE 'true' value --(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 }- if mathrandom = 3 then local config = { id = 3, boss = {name = "Tiquandas Revenge", amount = 1}, spawnBossChance = 100, --(%) enabled = true, topLeft={x=1020, y=801, z=7, stackpos=253}, bottomRight={x=1032, y=806, z=7, stackpos=253}, broadcast = true, trashspawn = { {name = "Minotaur", amount = 3, chance = 100}, {name = "Minotaur Guard", amount = 3, chance = 100}, {name = "Minotaur Mage", amount = 3, chance = 100} --No comma (,) for the last entry }, checkThreshold = 0 } local broadcasting = { --{text = string, interval = integer[milliseconds], activate = boolean[true/false]} NOTE: Only have ONE 'true' value --(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*******]]--
So every 2 days or something like this a boss spawn, but not necessarily a minotaur or wolf raid you know?
Thanks a lot!
BUMP
that would be awesome