Weather

mrlongshen

Noobies
Messages
1,126
Points
0
Age
36
Location
localhost 127.0.0.1
Emulator
Hi there someone can help me making a weather change every hour or can customize which hour ?

snow: "Makes all maps to have the snow weather effect."
clouds: "Makes all maps to have the cloudy weather effect."
clouds2: "Makes all maps to have another cloudy weather effect."
fog: "Makes all maps to have the fog weather effect."
fireworks: "Makes all maps to have the fireworks weather effect."
sakura: "Makes all maps to have the sakura weather effect."
leaves: "Makes all maps to have the leaves weather effect."
 
@@RodRich haha just simple, i req for auto weather changer. hehe
Take something like prontera.

Ok...that's is simple

I didn't test it, try it and tell me if that works

Code:
-	script	AutoWeather	-1,{

OnInit:
	.weathermaps$[0],"Prontera"; //Add here the maps you want
	end;

OnMinute13: //Every hour on this minute the weather will change randomly
	.@effect = rand(1,7);
	for(set .@r,0; .@r<getarraysize(.weathermaps$); .@r++){
		switch(.@effect){
			case 1: setmapflag .weathermaps$[.@r],mf_snow;
			case 2: setmapflag .weathermaps$[.@r],mf_clouds;
			case 3: setmapflag .weathermaps$[.@r],mf_clouds2;
			case 4: setmapflag .weathermaps$[.@r],mf_fog;
			case 5: setmapflag .weathermaps$[.@r],mf_fireworks;
			case 6: setmapflag .weathermaps$[.@r],mf_sakura;
			case 7: setmapflag .weathermaps$[.@r],mf_leaves;
		}
	}
	end;

}
 
[Error]: script error in file '#.txt' line 4 column 2
    parse_line: expect command, missing function name or calling undeclared function
     1: {
     2:
     3: OnInit:
*    4:         .weathermaps$[0],"Prontera"; //Add here the maps you want
        ~~~~~~~~^
     5:         end;
 
[Error]: script error in file '#.txt' line 4 column 2
    parse_line: expect command, missing function name or calling undeclared function
     1: {
     2:
     3: OnInit:
*    4:         .weathermaps$[0],"Prontera"; //Add here the maps you want
        ~~~~~~~~^
     5:         end;
Lol... I'm sorry...

Just change this line:

.weathermaps$[0],"Prontera"; //Add here the maps you want

to:

Code:
	setarray .weathermaps$[0],"Prontera"; //Add here the maps you want
 
- script AutoWeather -1,{

OnInit:
setarray .weathermaps$[0],"prontera"; //Add here the maps you want
end;

OnMinute13: //Every hour on this minute the weather will change randomly
OnMinute51: //Every hour on this minute the weather will change randomly
.@effect = rand(1,7);
for(set .@r,0; .@r<getarraysize(.weathermaps$); .@r++){
switch(.@effect){
case 1: setmapflag .weathermaps$[.@r],mf_snow;
announce "The snow is falling from the sky!",bc_blue|bc_all;
case 2: setmapflag .weathermaps$[.@r],mf_clouds;
announce "The clouds are gathering!",bc_blue|bc_all;
case 3: setmapflag .weathermaps$[.@r],mf_clouds2;
announce "The clouds are gathering!",bc_blue|bc_all;
case 4: setmapflag .weathermaps$[.@r],mf_fog;
announce "The fog is rising",bc_blue|bc_all;
case 5: setmapflag .weathermaps$[.@r],mf_fireworks;
announce "The fireworks are shooting in the sky!",bc_blue|bc_all;
case 6: setmapflag .weathermaps$[.@r],mf_sakura;
announce "The sakura is falling",bc_blue|bc_all;
case 7: setmapflag .weathermaps$[.@r],mf_leaves;
announce "The leaves are falling down",bc_blue|bc_all;
}
}
end;

}

Soon as the event starts it activates like 4 of those weather types at the same time ^^

 
- script AutoWeather -1,{

OnInit:
setarray .weathermaps$[0],"prontera"; //Add here the maps you want
end;

OnMinute13: //Every hour on this minute the weather will change randomly
OnMinute51: //Every hour on this minute the weather will change randomly
.@effect = rand(1,7);
for(set .@r,0; .@r<getarraysize(.weathermaps$); .@r++){
switch(.@effect){
case 1: setmapflag .weathermaps$[.@r],mf_snow;
announce "The snow is falling from the sky!",bc_blue|bc_all;
case 2: setmapflag .weathermaps$[.@r],mf_clouds;
announce "The clouds are gathering!",bc_blue|bc_all;
case 3: setmapflag .weathermaps$[.@r],mf_clouds2;
announce "The clouds are gathering!",bc_blue|bc_all;
case 4: setmapflag .weathermaps$[.@r],mf_fog;
announce "The fog is rising",bc_blue|bc_all;
case 5: setmapflag .weathermaps$[.@r],mf_fireworks;
announce "The fireworks are shooting in the sky!",bc_blue|bc_all;
case 6: setmapflag .weathermaps$[.@r],mf_sakura;
announce "The sakura is falling",bc_blue|bc_all;
case 7: setmapflag .weathermaps$[.@r],mf_leaves;
announce "The leaves are falling down",bc_blue|bc_all;
}
}
end;

}
Soon as the event starts it activates like 4 of those weather types at the same time ^^
I see... just put an "end" at every cases, above the announce. Like this:

Code:
case 1: setmapflag .weathermaps$[.@r],mf_snow;
			    announce "The snow is falling from the sky!",bc_blue|bc_all;
end;
 
Back
Top