viewing paste npc random location | Athena

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
prontera,155,181,5  script  Sample  757,{
getmapxy( .@map$,.@x,.@y,1 );
mes "My location : "+.@map$+","+.@x+","+.@y;
close;
 
OnInit:
setarray .coordinate_x,0,300;
setarray .coordinate_y,0,300;
 
// change every 15 minutes.
OnMinute00:
OnMinute15:
OnMinute30:
OnMinute45:
 
.@npc_map$ = strnpcinfo(4);
do{
    .@rand_x = rand( .coordinate_x[0],.coordinate_x[1] );
    .@rand_y = rand( .coordinate_y[0],.coordinate_y[1] );
}while( !checkcell( .@npc_map$,.@rand_x,.@rand_y,cell_chkpass ) );
movenpc strnpcinfo(0),.@rand_x,.@rand_y;
end;
}
Viewed 1289 times, submitted by Emistry.