summaryrefslogtreecommitdiff
path: root/npc/commands/shroom.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-05 08:31:58 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-05 08:31:58 -0300
commit3eb861eeac9e6f3be74b9b995f83085194a6d93a (patch)
tree84ffff7a27867d9111a20b223a5c1c3a66e8c714 /npc/commands/shroom.txt
parent1b29722397dde4800f058ace1c0b44b593ae2b23 (diff)
downloadserverdata-3eb861eeac9e6f3be74b9b995f83085194a6d93a.tar.gz
serverdata-3eb861eeac9e6f3be74b9b995f83085194a6d93a.tar.bz2
serverdata-3eb861eeac9e6f3be74b9b995f83085194a6d93a.tar.xz
serverdata-3eb861eeac9e6f3be74b9b995f83085194a6d93a.zip
New gm command for Saulc: @shroom
Description: Walk to players, spawn plushrooms/chagashrooms and walk away. Do all that while taking a cup of coffee IRL and let the script do the job. Max. 40 players. Works even when player is in a restricted quest map. MobID only.
Diffstat (limited to 'npc/commands/shroom.txt')
-rw-r--r--npc/commands/shroom.txt42
1 files changed, 42 insertions, 0 deletions
diff --git a/npc/commands/shroom.txt b/npc/commands/shroom.txt
new file mode 100644
index 000000000..5dae87397
--- /dev/null
+++ b/npc/commands/shroom.txt
@@ -0,0 +1,42 @@
+// TMW2 Script
+//
+// @shroom <mobID> <Amount> <DisplayName>
+// Plushroom Angel Script
+
+- 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;
+}
+