|
@@ -11157,11 +11157,18 @@ BUILDIN_FUNC(monster)
|
|
else
|
|
else
|
|
m = map_mapname2mapid(mapn);
|
|
m = map_mapname2mapid(mapn);
|
|
|
|
|
|
|
|
+ TBL_MOB* md;
|
|
|
|
+
|
|
for(i = 0; i < amount; i++) { //not optimised
|
|
for(i = 0; i < amount; i++) { //not optimised
|
|
int mobid = mob_once_spawn(sd, m, x, y, str, class_, 1, event, size, ai);
|
|
int mobid = mob_once_spawn(sd, m, x, y, str, class_, 1, event, size, ai);
|
|
|
|
|
|
- if (mobid)
|
|
|
|
|
|
+ if (mobid > 0) {
|
|
|
|
+ md = map_id2md(mobid);
|
|
|
|
+ if (md)
|
|
|
|
+ md->next_walktime = INVALID_TIMER;
|
|
|
|
+
|
|
mapreg_setreg(reference_uid(add_str("$@mobid"), i), mobid);
|
|
mapreg_setreg(reference_uid(add_str("$@mobid"), i), mobid);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
return SCRIPT_CMD_SUCCESS;
|
|
return SCRIPT_CMD_SUCCESS;
|
|
@@ -11274,11 +11281,18 @@ BUILDIN_FUNC(areamonster)
|
|
else
|
|
else
|
|
m = map_mapname2mapid(mapn);
|
|
m = map_mapname2mapid(mapn);
|
|
|
|
|
|
|
|
+ TBL_MOB* md;
|
|
|
|
+
|
|
for(i = 0; i < amount; i++) { //not optimised
|
|
for(i = 0; i < amount; i++) { //not optimised
|
|
int mobid = mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, 1, event, size, ai);
|
|
int mobid = mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, 1, event, size, ai);
|
|
|
|
|
|
- if (mobid)
|
|
|
|
|
|
+ if (mobid > 0) {
|
|
|
|
+ md = map_id2md(mobid);
|
|
|
|
+ if (md)
|
|
|
|
+ md->next_walktime = INVALID_TIMER;
|
|
|
|
+
|
|
mapreg_setreg(reference_uid(add_str("$@mobid"), i), mobid);
|
|
mapreg_setreg(reference_uid(add_str("$@mobid"), i), mobid);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
return SCRIPT_CMD_SUCCESS;
|
|
return SCRIPT_CMD_SUCCESS;
|