• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Raids...

Aleada

Unknown Member
Joined
Mar 14, 2013
Messages
231
Reaction score
7
I have no idea what I have done wrong... but this is my raids.lua:
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<raids>
	<raid name="Brutus Bloodbeard" file="Brutus_Bloodbeard.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Dire Penguin" file="Dire_Penguin.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Insectoid" file="Insectoid.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Latrivan" file="Latrivan.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Lord of the Elements" file="Lord_of_the_Elements.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Mad Technomancer" file="Mad_Technomancer.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Ninja" file="Ninja.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>		
	<raid name="Pyromancer" file="Pyromancer.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Ron the Ripper" file="Ron_the_Ripper.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	<raid name="Xenia" file="Xenia.xml" interval2="18000" margin="18000" reftype="single" ref="no"/>	
	
	<!--
		executed on average once every 2 minutes

		<raid name="Example" file="example.xml" interval2="2" margin="0" reftype="single" ref="no"/>
			won't be executed again till Cave Rat gets killed

		<raid name="Example2" file="example.xml" interval2="2" margin="0" reftype="block" ref="no"/>
			will stay as 'running' until Cave Rat gets killed
	-->
</raids>

And the raids are just spamming 1 after another... I'm trying to make it so it goes on interval by using this globalevent:
LUA:
function onThink(interval, lastExecution)
local raids = {"Brutus Bloodbeard", "Dire Penguin", "Insectoid", "Latrivan", "Lord of the Elements", "Mad Technomancer", "Ninja", "Pyromancer", "Ron the Ripper", "Xenia"}
local number = math.random(1, 10)
	if number == 1 then
		executeRaid(raids[math.random(1,#raids)])
	end
return TRUE
end

And here's my globalevents.xml:
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<globalevents>
	<globalevent name="save" interval="9000000" event="script" value="save.lua"/>
	<globalevent name="clean" interval="7200000" event="script" value="clean.lua"/>
	<globalevent name="effecttile" interval="2000" script="effectile.lua"/>
	<globalevent name="serverstart" type="start" event="script" value="start.lua"/>
	<globalevent name="playersrecord" type="record" event="script" value="record.lua"/>
	<globalevent name="LastMan" interval="10800000" event="script" value="LMStp.lua"/>			
	<globalevent name="LMS" interval="135000" event="script" value="LMS.lua"/>
	<globalevent name="raids" interval="7200" script="raids.lua"/>	
	<globalevent name="Lottery" interval="18000000" event="script" value="lottery.lua"/>	
</globalevents>

Any help is greatly appreciated! :D Thank you!
I will REP anyone who helps! :)
 
Omg.. I didn't even notice that! Lol ty very much I'll try it when I get home... I'll REP you anyways even if it doesn't work ;) but ty!
 
Back
Top