summaryrefslogtreecommitdiff
path: root/npc/commands/shroom.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-11 00:05:13 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-11 00:05:13 -0300
commit884d6f1121a6b75a79882a47cfdb743f36ab005e (patch)
treed38b5b1a2726dc3b9fd3d30e0fbb44681ab2958a /npc/commands/shroom.txt
parent7f0e88867b116417a912d87f427deff9c33865ab (diff)
downloadserverdata-884d6f1121a6b75a79882a47cfdb743f36ab005e.tar.gz
serverdata-884d6f1121a6b75a79882a47cfdb743f36ab005e.tar.bz2
serverdata-884d6f1121a6b75a79882a47cfdb743f36ab005e.tar.xz
serverdata-884d6f1121a6b75a79882a47cfdb743f36ab005e.zip
Make @shroom arguments optional
Diffstat (limited to 'npc/commands/shroom.txt')
-rw-r--r--npc/commands/shroom.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/npc/commands/shroom.txt b/npc/commands/shroom.txt
index 635cfc554..79bab470d 100644
--- a/npc/commands/shroom.txt
+++ b/npc/commands/shroom.txt
@@ -11,6 +11,16 @@ OnShroom:
.@mobAm=atoi(array_shift(.@atcmd_parameters$));
.@mobName$=implode(.@atcmd_parameters$, " ");
+ // Checks
+ if (!.@mobId)
+ .@mobId=Plushroom;
+
+ if (!.@mobAm)
+ .@mobAm=1;
+
+ if (.@mobName$ == "")
+ .@mobName$=strmobinfo(1, .@mobId);
+
//.@gmType=(Sex ? NPC_GAMEMASTER : NPC_GAMEMISTRESS);
.@gmType=(Sex ? GameMaster : GameMistress);
.@gmId=monster("boss", 45, 45, strcharinfo(0), .@gmType, 1);