This is untested... I don't know if it will work but it should be a good start I think??
function script getRandMap {
//this function is to assign a random map name to a variable
$randMap == rand(0,4);
if ($randMap == 0){
setd $mapName == "prontera";
return;
}
if ($randMap == 1){
setd $mapName == "payon";
return;
}
if ($randMap == 2){
setd $mapName == "morroc";
return;
}
if ($randMap == 3){
setd $mapName == "izlude";
return;
}
if ($randMap == 4){
setd $mapName == "prt_fild08";
return;
}
else {
debugmes "ERROR: Random Map generation failed!";
end;
}
}
anyMap,anyX,anyY,anyZ script <name_NPC>::monsterEvent 111,{ //this can be floating NPC, i forget how
OnInterIfInitOnce:
callfunc "getRandMap";
monster $mapName,0,0,"Event Monster",<insert_mob_id>,1,"monsterEvent::OnRespawnMonster";
debugmes "DEBUG: EVENT MONSTER SPAWNED SUCCESSFULLY "+$mapName;
end;
OnRespawnMonster:
announce strcharinfo(0)+" killed the event monster! Respawning...";
callfunc "getRandMap";
monster $mapName,0,0,"Event Monster",<insert_mob_id>,1,"monsterEvent::OnRespawnMonster";
debugmes "DEBUG: EVENT MONSTER RESPAWNED @"+$mapName;
end;
}
*Edit: Obviously there are some things you need to add yourself. Such as the location of the NPC (you can make it floating NPC... no need to click) and the type of monster, the maps you want it to spawn on, etc