• 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 Rain Sistem

[15/10/2010 20:32:36] [Error - GlobalEvent Interface]
[15/10/2010 20:32:36] data/globalevents/scripts/rain.lua:eek:nThink
[15/10/2010 20:32:36] Description:
[15/10/2010 20:32:36] data/globalevents/scripts/rain.lua:9: bad argument #2 to 'random' (interval is empty)
[15/10/2010 20:32:36] stack traceback:
[15/10/2010 20:32:36] [C]: in function 'random'
[15/10/2010 20:32:36] data/globalevents/scripts/rain.lua:9: in function <data/globalevents/scripts/rain.lua:3>
[15/10/2010 20:32:36] [Error - GlobalEvents::think] Couldn't execute event: rain
[15/10/2010 20:33:10] [Notice - Game::reloadInfo] Reload type does not work.
-.-
 
I know this is an older thread but i'm using this script on my server and everything works right.
However i was wondering if someone could tell me what i need to do to make this script rain on the entire area
not just an area inside this area..
(rains on about 1 screen in a random area within the coordinates)
 
(bump) i really need some help with this....
can anyone please help me figure this out?

i changed these lines
Lua:
    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}

to this
Lua:
    local frompos = {x=minX, y=minY, z=7}
    local topos = {x={frompos.x, maxX}, y={frompos.y, maxY}, z=7}


BUT i get an error in the lib file rain.lua at line 16 that says "for" limit must be a number
 
Last edited:
Lua:
[16/01/2011 17:18:22] [Error - GlobalEvent Interface] 
[16/01/2011 17:18:22] data/globalevents/scripts/rain.lua:onThink
[16/01/2011 17:18:22] Description: 
[16/01/2011 17:18:22] data/globalevents/scripts/rain.lua:9: bad argument #2 to 'random' (interval is empty)
[16/01/2011 17:18:22] stack traceback:
[16/01/2011 17:18:22]     [C]: in function 'random'
[16/01/2011 17:18:22]     data/globalevents/scripts/rain.lua:9: in function <data/globalevents/scripts/rain.lua:3>
[16/01/2011 17:18:22] [Error - GlobalEvents::think] Couldn't execute event: rain

Copied the whole script.
 
Fixed it, min x&y has to go from up-left corner and max x&y from down-right corner
 
IT'S FOR 0.3.6+ SHIT.

And Elexonic, stop acting as if this was your script.

REP + for another person script? -facepalm
 
haha, looks funny ;) I will add it to raid system with some monsters :D

PS. Working on 0.4 ;)
 
Last edited:
Fits 0.3 and 0.4 ...

o.o. reads the second line.

Up: Thx-
 
Upload the image again.. or someone ells, please - upload them.

I cant get it to work.. using 0.3.6

No bugs in the console but I cant make it rain.
 
I could rescue this picture: P, is old but it will, but is seen in small
images
 
I know someone said a bit earlier about using this for snow,what changes would be needed?
Was gonna try it on an icy area
 
data/globalevents/scripts/rain.lua:9: bad argument #2 to 'random' (interval is empty)

We know what i do wrong?
 
Copia Bien de nuevo el script y configura las posiciones justo hay en rain.. para las posicion x y y superior y inferior.. creo que las pusiste mal y por eso te da fallo.. o no copiaste bien el script..

Edit possition in rain [globalevent] and copy again script..
 
Yeah this isn't working, did everything that it said to do, no error's, no rain nothing, changed it to a onTime(time) event.. still didnt work.... anyideas? TFS 0.3.7 Crying Damson
 
not sure if anyone even looks at this anymore, but i'll ask anyway
i got it to work thanks and ++rep
but i wanna get it to rain all over thais at all times.
i doubt i will have lag doing it, i just can't get it to do whole city.
if someone could help me out that would be awesome.
 
Set the coordinates for the whole city and change

rain.chance = Math.random (20.100)

to

rain.chance = Math.random (100.100)

maybe that will work?
 
Back
Top