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
data/globalevents/globalevents.xml
you can set the town at variable called "town"
you can add/remove effects at table called "effect"
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"