// TMW2 Script
//
// @shroom <mobID> <Amount> <DisplayName>
// Plushroom Angel Script (Plush: 1011, Chaga: 1128, Clover: 1028)
- script @shroom 32767,{
end;
OnShroom:
.@mobId=atoi(array_shift(.@atcmd_parameters$));
.@mobAm=atoi(array_shift(.@atcmd_parameters$));
.@mobName$=implode(.@atcmd_parameters$, " ");
//.@gmType=(Sex ? NPC_GAMEMASTER : NPC_GAMEMISTRESS);
.@gmType=(Sex ? GameMaster : GameMistress);
.@gmId=monster("boss", 45, 45, strcharinfo(0), .@gmType, 1);
// Max 40 connected players for this to work
.@c = getunits(BL_PC, .@players, 40);
for (.@i = 0; .@i < .@c; .@i++) {
attachrid(.@players[.@i]);
getmapxy(.@m$, .@x, .@y, 0);
unitwarp(.@gmId, .@m$, .@x, .@y);
unitwalk(.@gmId, .@x-1, .@y-1);
sleep2(200);
unitemote(.@gmId, E_HAPPY);
sleep2(150);
areamonster(.@m$, .@x-3, .@y-3, .@x+3, .@y+3, .@mobName$, .@mobId, .@mobAm);
sleep2(120);
detachrid();
}
// Cleanup
unitwarp(.@gmId, "boss", 45, 45);
unitkill(.@gmId);
end;
OnInit:
bindatcmd "shroom", "@shroom::OnShroom", 80, 100, 1;
}