summaryrefslogtreecommitdiff
path: root/npc/001-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-07-01 14:17:38 -0300
committerJesusaves <cpntb1@ymail.com>2018-07-01 14:17:38 -0300
commit6280e841b6b98523d6ee4c370098ab417433d284 (patch)
tree17045c16e75ab2ff10a44d8d0537fcae7c1c9640 /npc/001-1
parent1c0eceb0b96abe3cd5100b43710ee128e06b96f6 (diff)
downloadserverdata-6280e841b6b98523d6ee4c370098ab417433d284.tar.gz
serverdata-6280e841b6b98523d6ee4c370098ab417433d284.tar.bz2
serverdata-6280e841b6b98523d6ee4c370098ab417433d284.tar.xz
serverdata-6280e841b6b98523d6ee4c370098ab417433d284.zip
Minor improvement, do not create multiple items
Diffstat (limited to 'npc/001-1')
-rw-r--r--npc/001-1/eventmaster.txt65
1 files changed, 40 insertions, 25 deletions
diff --git a/npc/001-1/eventmaster.txt b/npc/001-1/eventmaster.txt
index a61f6a770..46782bf67 100644
--- a/npc/001-1/eventmaster.txt
+++ b/npc/001-1/eventmaster.txt
@@ -23,17 +23,17 @@
}
}
- function mkitem { // ( ID )
+ function mkitem { // ( ID{, Amount} )
// [0] East [1] West [2] Full makeitem
switch($@AEROS_SPWN) {
case 1:
- makeitem(getarg(0), 1, "001-1", rand(20,140), rand(20,140));
+ makeitem(getarg(0), getarg(1,1), "001-1", rand(20,140), rand(20,140));
break;
case 2:
- makeitem(getarg(0), 1, "001-1", rand(20,340), rand(20,160));
+ makeitem(getarg(0), getarg(1,1), "001-1", rand(20,340), rand(20,160));
break;
default:
- makeitem(getarg(0), 1, "001-1", rand(171,320), rand(158,339));
+ makeitem(getarg(0), getarg(1,1), "001-1", rand(171,320), rand(158,339));
break;
}
}
@@ -56,9 +56,7 @@ L_Menu:
"Abort",L_Close,
"Start/End Event", L_EventHandler,
"Spawn",L_Spawn,
- rif(countitem(StrangeCoin) >= 10, "Drop a Toothbrush! (10x Coins)"),L_Drop,
- rif(countitem(StrangeCoin) >= 10, "Drop a Bronze Gift (10x Coins)"), L_Bgif,
- rif(countitem(StrangeCoin) >= 10, "Drop a Silver Gift (10x Coins)"), L_Sgif,
+ rif(countitem(StrangeCoin) >= 10, "Drop stuff! (10x Coins)"),L_Drop,
"Reconfigure spawn/warp points",L_Conf,
"Adjust coins drop rate",L_Rate;
@@ -743,28 +741,45 @@ L_Boss:
L_Drop:
- delitem(StrangeCoin,10);
- mkitem(Toothbrush);
- mes "";
- mes "Dropped.";
- next;
- goto L_Menu;
+L_Boss:
+ select
+ "Abort", // 1
+ "Toothbrush", // 2
+ "Bronze Gift" , // 3
+ "Silver Gift", // 4
+ "Golden Gift", // 5
+ "Prism Gift", // 6
+ "Supreme Gift"; // default
-L_Bgif:
- delitem(StrangeCoin,10);
- mkitem(BronzeGift);
- mes "";
- mes "Bronze Gift Dropped.";
- next;
- goto L_Menu;
+ if (@menu != 1)
+ input .@c, 0, countitem(StrangeCoin)/10;
+ if (.@c == 0)
+ @menu=99;
+
+ delitem(StrangeCoin,.@c);
+ switch (@menu) {
+ case 1:
+ goto L_Menu;
+ break;
+ case 2:
+ mkitem(Toothbrush, .@c); break;
+ case 3:
+ mkitem(BronzeGift, .@c); break;
+ case 4:
+ mkitem(SilverGift, .@c); break;
+ case 5:
+ mkitem(GoldenGift, .@c); break;
+ case 6:
+ mkitem(PrismGift, .@c); break;
+ default:
+ mkitem(SupremeGift, .@c); break;
+
+ }
-L_Sgif:
- delitem(StrangeCoin,10);
- mkitem(SilverGift);
mes "";
- mes "Silver Gift Dropped.";
+ mes "Dropped.";
next;
- goto L_Menu;
+ goto L_Drop;
L_Rate:
mes "";