• 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!

Raids, need help with them! Rep++

Chrippe

New Member
Joined
Jun 17, 2007
Messages
51
Reaction score
0
Okay so I've been running my server for a while now and I decided to implent Raids to it. They run automatically and all that but the problem is that they keep spawning eventhough the raid monster isn't killed. I am using crying damson 0.3.5. Client version 8.50 Here are the codes:


\data\raids\morgaroth.xml
Lua:
<?xml version="1.0" encoding="utf-8"?>
<raid>
<announce delay="1000" type="event" message="Testmessage no 1" />
<announce delay="10000" type="event" message="Testmessage no 2" />
<announce delay="20000" type="event" message="Testmessage no 3" />
<announce delay="30000" type="event" message="Testmessage no 4" />
<singlespawn delay="40000" name="Morgaroth" x="519" y="427" z="7" />
</raid>

\data\raids\raids.xml
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<raids>
	<raid name="Morgaroth" file="morgaroth.xml" interval2="2" margin="0" reftype="single" ref="no"/>
</raids>

\data\raids\scripts\raidevent.lua
Lua:
function onRaid()
	doBroadcastMessage("Broadcast from a raid script!")
	return true
end

I read in the example Raid.xml that reftype="single" will not execute a raid untill the executed one is killed.
Also that the reftype="blocked" will make the raid stay as "running" until the monster gets killed.

How do I solve this problem?

Also is there any possibility to implent a "chance" so that the monster has a 5% chance to spawn, each 2 minutes in this case?


Thanks in advance, reputation will be given to the problemsolvers!

Sincerely yours,
Chrippe
 
Last edited:

Raid script :p


globalevents

raids.lua

Code:
local raids = {"Barbarian", "Demodras", "Elfs", "Ferumbras", "Necropharus", "Nomad", "OrcsThais", "Orshabaal", "Pirates", "Quara", "Rats", "Scarabs", "The Old Widow", "UndeadDarashia", "UndeadArmy", "Wolfsraid", "Necropharus", "Hornedfox"}
function onThink(interval, lastExecution)
	executeRaid(raids[math.random(1,#raids)])
	return TRUE
end

globalevents.xml

Code:
		<globalevent name="raids" interval="43200" event="script" value="raids.lua"/>


change the interval to the time between the raids :p


Not sure if this is what you wanted since I didnt even read ur post fully :p
 
As you would've seen if you would've read my full post, I need a script that involves a "chance" so that for example each 10 minutes there's a 10% chance that a raid goes off, does your script involve that? I don't think so but then I'm not a scripter myself, let me know will ya?

Thanks in advance
 
As you would've seen if you would've read my full post, I need a script that involves a "chance" so that for example each 10 minutes there's a 10% chance that a raid goes off, does your script involve that? I don't think so but then I'm not a scripter myself, let me know will ya?

Thanks in advance

IT does not but it executes a random raid each 12 hours =)
 
I see, well that's at least one step closer :p Thanks! Anyone else who knows how to set a chance that a raid is spawned and to solve my problem? Thanks in advance!
 

Similar threads

Back
Top