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

Change ->

vejsa

Banned User
Joined
Nov 3, 2007
Messages
434
Reaction score
0
Hello.. I'v been wondering if this is possible: I want to make my server pvp but I also want it to change from PvP to PvP-E every 6 or 8 hours.. If this is possible can any one show me how I can make this work?
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Change World Type" enabled="yes">
	<globalevent name="changewt" interval="21600" event="buffer"><![CDATA[
		setWorldType(getWorldType() == WORLD_TYPE_PVP and WORLD_TYPE_PVP_ENFORCED or WORLD_TYPE_PVP)
	]]></globalevent>
</mod>
 
How many hours did you put there? Also one last thing.. Is there a way so there will "pop" up a message when the world types changes?
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<mod name="Change World Type" enabled="yes">
	<globalevent name="changewt" interval="21600" event="buffer"><![CDATA[
		setWorldType(getWorldType() == WORLD_TYPE_PVP and WORLD_TYPE_PVP_ENFORCED or WORLD_TYPE_PVP)
		for _, player in ipairs(getPlayersOnline()) do
			doPlayerPopupFUI(player, "Gameworld type has been changed.")
		end
	]]></globalevent>
</mod>

In TFS 0.4 1000 = 1 s., i don't remember how it was in perv. ver
 
Thanks you guys :>

last question: do i have to add this:
Code:
<globalevent name="changewt" type="pvpmode" event="script" value="pvpmode.lua"/>
to globalevent?
 
Back
Top