Thanks Ben. I think it´s the right way but it doesn´t work rightfull.
I put two serv.logs inside the code. The first one Shows me th coordination. the second one should appears when the Region ist found. but nothing but an error.
PHP Code:
[FUNCTION make_weather]
local.map=<dargv[0]> // map, 0
local.region_defname=<argv[1]> // your region name you wish that it rain
local.weather=<argv[2]> // weather like rain, snow or try
local.size=<serv.maplist.<dlocal.map>.sector.size>
FOR 1 <eval <serv.maplist.<dlocal.map>.sector.qty>-1> //<-- fixed the last bug in my error code with <SERV.MAP(6176>
local.secx = (<local.size>/2) + ((<local._for> / <serv.maplist.<dlocal.map>.sector.rows>) * <local.size>)
local.secy = (<local.size>/2) + ((<local._for> / <serv.maplist.<dlocal.map>.sector.cols>) * <local.size>)
serv.log Loc: <dlocal.secx>,<dlocal.secy>
local.secregion = <SERV.MAP(<dlocal.secx>,<dlocal.secy>,<dlocal.map>).region.defname>
IF (STRMATCH("<local.region_defname>*","<local.secregion>"))
SERV.MAP.<dlocal.map>.SECTOR.<dlocal._for> <local.weather>
serv.log Find the Region.
ENDIF
ENDFOR
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 32,32
17:03:(sphere_gm_commands.scp,6872)Loc: 96,32
17:03:(sphere_gm_commands.scp,6872)Loc: 96,32
17:03:(sphere_gm_commands.scp,6872)Loc: 96,32
17:03:(sphere_gm_commands.scp,6872)Loc: 96,32
17:03:ERROR:(sphere_gm_commands.scp,6874)Can't resolve <SERV.MAP(6176>