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

Raid + Globalevent

I've got script in my Globalevent/Scripts file.

For Example raid:
1st message + enable xxx.lua
2nd message
3rd message
And for example 2 min after last message to disable xxx.lua
 
Make the raid summon a custom monster you dont use anywhere in the map and on the xxx.lua check if the monster is spawned
 
No, you dont understand me... I want a raid which includes also globalevent.
It's function onRaid() addEvent something like that but i dont know exacly what to do with it^
 
rain system all over tibia? Or just over a part of tibia cause that script is for only a tiny bit of tibia... correct me if i'm wrong

Shouldnt it be very laggy with a rain system? (depends on how big it is ofc)
 
The rain causes debuged sometimes. I don't think people of your Server want this.

If you want this:
XML:
<globalevent name="rain" interval="600000" event="script" value="rain.lua"/> -- Put interval that you want to rain.
Lua:
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

Here you edit cords to rain:
Lua:
local minX = 0
local minY = 0
local maxX = 0
local maxY = 0

Rep++ if help
 
Last edited:
Never got any debug ;F It would be great if some1 can help me with this, If it will be buging, I will throw it out. But I dont think so...
 
XML:
<globalevent name="rain" interval="600000" event="script" value="rain.lua"/> -- Put interval that you want to rain.
Lua:
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

Here you edit cords to rain:
Lua:
local minX = 0
local minY = 0
local maxX = 0
local maxY = 0

Rep++ if help
 
OMG! I know that

Can't anyone understand that I want RAID + RAIN in 1???

RAIN DURING RAID
STARTS WHEN FIRST TEXT OF RAID APPEARS
ENDS AFTER 2-3 MINUTEs AFTER LAST TEXT.
 
Can not believe that for this you need a raid. edit the time it will rain and the problem will be solved, do not think it's so difficult to have to put it in raid.

Anyway. You can do the following:
1. Create a Raid, then go put raid on globalevents with interval of 1 hour (example).
2. This raid give "x" messages, with delays of 5 minutes.
3. Crate a globalevents rain, that start every 65 minutes (5 minutes latter than raid).
4. Raid Start and 5 minutes latter rain will be efective.
 
Last edited:
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

Will be something like that working?

@Edit/Up.
Ok :)
 
Back
Top