beginterrainscript;
variables;
short x,y,f,tsize,tick;
body;
beginstate INIT_STATE;
f = get_memory_cell(0);
tsize=current_town_size();
if(tsize==0)
tsize=64;
if(tsize==1)
tsize=48;
if(tsize==2)
tsize=32;
if(tsize>64)
tsize=0;
set_script_mode(3);
tick = get_current_tick();
break;
beginstate START_STATE;
if((get_current_tick() != tick) && (get_flag(get_memory_cell(1),get_memory_cell(2)) == 1)){
tick = get_current_tick();
x=0;
while(x0;
while(yif(is_field_on_space(x,y,f)){
put_field_on_space(x,y - 1,f);
put_field_on_space(x - 1,y,f);
}
y=y+1;
}
x=x+1;
}
x=tsize;
while(x>=0){
y = tsize;
while(y >= 0){
if(is_field_on_space(x,y,f)){
put_field_on_space(x,y + 1,f);
put_field_on_space(x + 1,y,f);
}
y = y - 1;
}
x = x - 1;
}
}
break