diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/commands/shroom.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/npc/commands/shroom.txt b/npc/commands/shroom.txt index 79bab470d..4b19ed907 100644 --- a/npc/commands/shroom.txt +++ b/npc/commands/shroom.txt @@ -7,13 +7,16 @@ end; OnShroom: - .@mobId=atoi(array_shift(.@atcmd_parameters$)); - .@mobAm=atoi(array_shift(.@atcmd_parameters$)); - .@mobName$=implode(.@atcmd_parameters$, " "); + if (.@atcmd_parameters$[0] != "") + .@mobId=atoi(array_shift(.@atcmd_parameters$)); + if (.@atcmd_parameters$[1] != "") + .@mobAm=atoi(array_shift(.@atcmd_parameters$)); + if (.@atcmd_parameters$[2] != "") + .@mobName$=implode(.@atcmd_parameters$, " "); // Checks if (!.@mobId) - .@mobId=Plushroom; + .@mobId=PlushroomField; if (!.@mobAm) .@mobAm=1; @@ -28,19 +31,22 @@ OnShroom: // Max 40 connected players for this to work .@c = getunits(BL_PC, .@players, 40); for (.@i = 0; .@i < .@c; .@i++) { + debugmes "Attach account %d to spawn %d %s (%d)", .@players[.@i], .@mobAm, .@mobName$, .@mobId; attachrid(.@players[.@i]); getmapxy(.@m$, .@x, .@y, 0); unitwarp(.@gmId, .@m$, .@x, .@y); + sleep2(20); unitwalk(.@gmId, .@x-1, .@y-1); sleep2(200); unitemote(.@gmId, any(E_HAPPY, E_HAPPY, E_ANGEL, E_EVILCROC)); sleep2(150); // Adjust amount based on player level - .@Ammo=limit(1, BaseLevel/10*.@mobAm, 60); + .@Ammo=limit(1, BaseLevel/15*.@mobAm, 60); + debugmes "Spawn %d mobs", .@Ammo; areamonster(.@m$, .@x-3, .@y-3, .@x+3, .@y+3, .@mobName$, .@mobId, .@Ammo); - sleep2(120); + sleep2(320); detachrid(); } |