• 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 Effects on house tiles on a specific town

Jetro

jangeldev
Joined
Aug 1, 2011
Messages
452
Reaction score
68
Location
Venezuela
Hi all, this is a random script, it is more for funny servers, it sends a random effect over a random tile of every house located at a specific town

Firstly u have to compile this function: http://otland.net/f35/gethousetiles-houseid-167916/

then data/globalevents/scripts/animatedhouses.lua
Lua:
local effects = {59, 60, 65}
local town = 1
function onThink(interval, lastExecution)
	for _, h in pairs (getTownHouses(town)) do 
		t = getHouseTiles(h)
		doSendMagicEffect(t[math.random(#t)], effects[math.random(#effects)])
	end
	return true
end


data/globalevents/globalevents.xml
XML:
<globalevent name="animatedhouse" interval="1500" event="script" value="animatedhouses.lua"/>

you can set the town at variable called "town"
you can add/remove effects at table called "effect"
 
Back
Top