summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-29 11:02:36 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-29 11:02:36 -0300
commit6fc1e2fc43d1dc217df402d2a196dd06b3512f39 (patch)
tree566e90cbf96bd8f030975f5af05f3288506c687a /npc
parentbd503ad7d569b1eb3213ca817af869f890ea8d88 (diff)
downloadserverdata-6fc1e2fc43d1dc217df402d2a196dd06b3512f39.tar.gz
serverdata-6fc1e2fc43d1dc217df402d2a196dd06b3512f39.tar.bz2
serverdata-6fc1e2fc43d1dc217df402d2a196dd06b3512f39.tar.xz
serverdata-6fc1e2fc43d1dc217df402d2a196dd06b3512f39.zip
More optmizations
Diffstat (limited to 'npc')
-rw-r--r--npc/012-1/guards.txt21
-rw-r--r--npc/functions/siege.txt16
-rw-r--r--npc/scripts.conf2
3 files changed, 24 insertions, 15 deletions
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
index 1a64b89e6..d8d5389db 100644
--- a/npc/012-1/guards.txt
+++ b/npc/012-1/guards.txt
@@ -651,14 +651,11 @@ OnColonelDeath:
end;
OnMKSiege:
- addmapmask "012-1", MASK_MATTACK;
- addmapmask "014-3", MASK_MATTACK;
- changemusic "012-1", any("mythica.ogg", "eric_matyas_ghouls.ogg", "misuse.ogg", "Arabesque.ogg");
+ debugmes "Begin";
+ siege_setup("014-3");
+ siege_setup("012-1", "WARNING! WARNING! Siege starting at Hurnscald!!");
disablenpc("Mana Stone");
$@SIEGE_HURNS=rand(1,10);
- pvpon("012-1");
- pvpon("014-3");
- announce(("##1WARNING! WARNING! Siege starting at Hurnscald!!"), bc_all);
siege_spawn("014-3", BlackScorpion, 10, "#HurnscaldSiege::OnBlackScorpionDeath");
initnpctimer;
end;
@@ -699,16 +696,13 @@ OnTimer15000:
disablenpc "Rakinorf, Mayor";
end;
-OnTimer30000:
- debugmes "6k";
+OnTimer60000:
siege_spawn("012-1", BlackScorpion, 3, "#HurnscaldSiege::OnBlackScorpion2Death");
siege_spawn("012-1", GreenSlime, 10+$@SIEGE_HURNS, "#HurnscaldSiege::OnGreenSlimeDeath");
siege_spawn("012-1", CandiedSlime, 1+$@SIEGE_HURNS, "#HurnscaldSiege::OnCandiedSlimeDeath");
end;
-OnTimer60000:
- debugmes "12k";
-
+OnTimer120000:
// We will now prepare the boss
// It must be stronger than players in at least 15 levels, so the mob group
// is different. The siege difficulty, as usual, gives an extra level to them.
@@ -753,8 +747,7 @@ OnTimer60000:
siege_spawn("012-1", any_of($@SIEGE_TMPMOBS), 2+$@SIEGE_HURNS, "#HurnscaldSiege::OnRespawn");
end;
-OnTimer90000:
- debugmes "18k";
+OnTimer180000:
siege_selectmob(siege_calcdiff("012-1"), $@SIEGE_HURNS, TP_HURNS);
siege_spawn("012-1", any_of($@SIEGE_TMPMOBS), 1+$@SIEGE_HURNS, "#HurnscaldSiege::OnRespawn");
siege_spawn("012-1", any_of($@SIEGE_TMPMOBS), 2+$@SIEGE_HURNS, "#HurnscaldSiege::OnRespawn");
@@ -793,7 +786,7 @@ OnTimer600000:
$@MK_AGGRO=$@MK_AGGRO/20;
mapannounce("012-1", "##1The Monster King army is preparing to withdraw!", bc_map);
end;
-OnTimer150000:
+OnTimer630000:
removemapmask "012-1", MASK_MATTACK;
removemapmask "014-3", MASK_MATTACK;
changemusic "012-1", "caketown.ogg"; // Restore to default
diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt
index 49c9fd5f9..261492ac2 100644
--- a/npc/functions/siege.txt
+++ b/npc/functions/siege.txt
@@ -125,3 +125,19 @@ function script siege_selectmob {
}
+// Prepare a siege with optional announce
+// siege_setup ( map{, announce} )
+function script siege_setup {
+ debugmes "Cast";
+ .@m$=getarg(0);
+ .@msg$=getarg(1, "");
+
+ addmapmask .@m$, MASK_MATTACK;
+ changemusic .@m$, any("mythica.ogg", "eric_matyas_ghouls.ogg", "misuse.ogg", "Arabesque.ogg");
+ disablenpc("Mana Stone");
+ pvpon(.@m$);
+ if (.@msg$ != "")
+ kamibroadcast(col(.@msg$,1));
+ return;
+}
+
diff --git a/npc/scripts.conf b/npc/scripts.conf
index a4b89d05c..832e62242 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -29,6 +29,7 @@
"npc/items/rand_sc_heal.txt",
"npc/items/inc_sc_bonus.txt",
"npc/commands/event.txt",
+"npc/commands/kami.txt",
// config script
"npc/config/hairstyle_config.txt",
@@ -83,7 +84,6 @@
"npc/commands/debug.txt",
"npc/commands/discord.txt",
"npc/commands/ipcheck.txt",
-"npc/commands/kami.txt",
"npc/commands/language.txt",
"npc/commands/mobinfo.txt",
"npc/commands/motd-debug-text.txt",