<globalevent name="rain" interval="600000" event="script" value="rain.lua"/> -- Put interval that you want to rain.
local rain = Rain:new()
function onThink(interval, lastExecution)
local minX = xxx
local minY = xxx
local maxX = xxx
local maxY = xxx
local frompos = {x=math.random(minX, maxX), y=math.random(minY, maxY), z=7}
local topos = {x=math.random(frompos.x, maxX), y=math.random(frompos.y, maxY), z=7}
local effects = {
snow = {
disteffect = CONST_ANI_SNOWBALL,
effect = CONST_ME_ENERGYAREA
},
rain = {
disteffect = CONST_ANI_ICE,
effect = CONST_ME_LOSEENERGY
}
}
random = math.random(0, 10)
if (random == 0) then
rain.chance = math.random(10,50)
rain:start({fromPos = frompos, toPos = topos}, effects.snow, 300, math.random(100, 500))
else
rain.chance = math.random(40,100)
rain.createItem = {chance = math.random(0,10), item = {itemid = 2016, type = 1}}
rain:start({fromPos = frompos, toPos = topos}, effects.rain, math.random(300, 1000), math.random(100, 350))
end
return TRUE
end
local minX = 0
local minY = 0
local maxX = 0
local maxY = 0
<globalevent name="rain" interval="600000" event="script" value="rain.lua"/> -- Put interval that you want to rain.
local rain = Rain:new()
function onThink(interval, lastExecution)
local minX = xxx
local minY = xxx
local maxX = xxx
local maxY = xxx
local frompos = {x=math.random(minX, maxX), y=math.random(minY, maxY), z=7}
local topos = {x=math.random(frompos.x, maxX), y=math.random(frompos.y, maxY), z=7}
local effects = {
snow = {
disteffect = CONST_ANI_SNOWBALL,
effect = CONST_ME_ENERGYAREA
},
rain = {
disteffect = CONST_ANI_ICE,
effect = CONST_ME_LOSEENERGY
}
}
random = math.random(0, 10)
if (random == 0) then
rain.chance = math.random(10,50)
rain:start({fromPos = frompos, toPos = topos}, effects.snow, 300, math.random(100, 500))
else
rain.chance = math.random(40,100)
rain.createItem = {chance = math.random(0,10), item = {itemid = 2016, type = 1}}
rain:start({fromPos = frompos, toPos = topos}, effects.rain, math.random(300, 1000), math.random(100, 350))
end
return TRUE
end
local minX = 0
local minY = 0
local maxX = 0
local maxY = 0
local rain = Rain:new()
function onThink(interval, lastExecution)
local minX = 89
local minY = 121
local maxX = 99
local maxY = 129
local frompos = {x=math.random(minX, maxX), y=math.random(minY, maxY), z=7}
local topos = {x=math.random(frompos.x, maxX), y=math.random(frompos.y, maxY), z=7}
local effects = {
snow = {
disteffect = CONST_ANI_SNOWBALL,
effect = CONST_ME_ENERGYAREA
},
rain = {
disteffect = CONST_ANI_ICE,
effect = CONST_ME_LOSEENERGY
}
}
random = math.random(0, 10)
if (random == 0) then
rain.chance = math.random(10,50)
rain:start({fromPos = frompos, toPos = topos}, effects.snow, 300, math.random(100, 500))
else
rain.chance = math.random(40,100)
rain.createItem = {chance = math.random(0,10), item = {itemid = 2016, type = 1}}
rain:start({fromPos = frompos, toPos = topos}, effects.rain, math.random(300, 1000), math.random(100, 350))
local storage = 1234 -- You can edit this storage.
local raids = {
"rabbits", -- Name of raid that you want be automatically.
}
function onThink(interval, lastExecution, thinkInterval)
if getGlobalStorageValue(storage) == -1 or getGlobalStorageValue(storage) < os.time() then
executeRaid(raids[math.random(1, #raids)])
setGlobalStorageValue(storage, os.time() + 9 * 60 * 60)
end
return TRUE
end
end
return TRUE
end