summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-02-16 21:27:57 -0300
committerJesusaves <cpntb1@ymail.com>2024-02-16 21:27:57 -0300
commit29b792a0c147e7184c07661b27821303f261cdc2 (patch)
tree6336eaf7770383eff99e693b5258d433985c7a99 /npc
parent5802c80f9269eeb97ba9fc43ddec905c6a39c06a (diff)
downloadserverdata-29b792a0c147e7184c07661b27821303f261cdc2.tar.gz
serverdata-29b792a0c147e7184c07661b27821303f261cdc2.tar.bz2
serverdata-29b792a0c147e7184c07661b27821303f261cdc2.tar.xz
serverdata-29b792a0c147e7184c07661b27821303f261cdc2.zip
By popular demand: Sieges are back
Diffstat (limited to 'npc')
-rw-r--r--npc/001-10-1/scripts.txt2
-rw-r--r--npc/001-10/scripts.txt2
-rw-r--r--npc/functions/aurora.txt11
-rw-r--r--npc/functions/event.txt28
-rw-r--r--npc/functions/mobpoint.txt2
-rw-r--r--npc/functions/news.txt12
-rw-r--r--npc/items/lofteleporter.txt2
-rw-r--r--npc/items/teleporter.txt2
8 files changed, 53 insertions, 8 deletions
diff --git a/npc/001-10-1/scripts.txt b/npc/001-10-1/scripts.txt
index c23ba30af..ae6b5c86a 100644
--- a/npc/001-10-1/scripts.txt
+++ b/npc/001-10-1/scripts.txt
@@ -46,7 +46,7 @@ OnReward2:
setq2 LoFQuest_COD, getq2(LoFQuest_COD) + 1;
getitem BottledDust, 1;
}
- if ($EVENT$ == "Rebirth")
+ if ($EVENT$ == "Rebirth" || $EVENT$ == "Siege")
getitem BottledDust, rand2(1,2);
warp "018-2-1", 24, 29;
specialeffect(FX_FANFARE, SELF, getcharid(3));
diff --git a/npc/001-10/scripts.txt b/npc/001-10/scripts.txt
index 143f6b837..421322b16 100644
--- a/npc/001-10/scripts.txt
+++ b/npc/001-10/scripts.txt
@@ -143,7 +143,7 @@ OnInit:
spawner("#CODMASTER::OnEDeath", 160, 45, 190, 130, 4);
OnClock0059:
- if ($EVENT$ == "Rebirth")
+ if ($EVENT$ == "Rebirth" || $EVENT$ == "Siege")
.chance=60;
else
.chance=40;
diff --git a/npc/functions/aurora.txt b/npc/functions/aurora.txt
index d754f8e5d..fbad772e7 100644
--- a/npc/functions/aurora.txt
+++ b/npc/functions/aurora.txt
@@ -136,8 +136,13 @@ function script FYNewEvent {
kamibroadcast("Magic Olympics are now open!", "Aurora Events");
break;
case 9:
- $EVENT$="Rebirth";
- kamibroadcast("Rebirth Season has begun!", "Aurora Events");
+ if ($GAME_STORYLINE < 5) {
+ $EVENT$="Rebirth";
+ kamibroadcast("Rebirth Season has begun!", "Aurora Events");
+ } else {
+ $EVENT$="Siege";
+ kamibroadcast("Siege Season has begun!", "Aurora Events");
+ }
break;
case 10:
$EVENT$="Fishing";
@@ -729,7 +734,7 @@ function script FYE_Submit {
// Stops any Aurora Event
function script FYStopEvent {
- setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing", "Candor", "Mining", "Tower", "Raid", "Olympics", "Celestia", "Rebirth", "Gemini";
+ setarray .@av$, "Kamelot", "Regnum", "Expo", "Fishing", "Candor", "Mining", "Tower", "Raid", "Olympics", "Celestia", "Rebirth", "Siege", "Gemini";
if (array_find(.@av$, $EVENT$) >= 0) {
sClear();
$EVENT$="";
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 96525148a..37832a316 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -190,6 +190,34 @@ OnTimer90000:
channelmes("#world", "An event is happening on Aeros! Hurry up!");
}
+ // Handle Siege season
+ if ($EVENT$ == "Siege" && (.users >= 3 || $@GM_OVERRIDE) && !$@MK_SCENE && !$@GM_EVENT && rand2(99999) < .users) {
+ $@SIEGE_ABORTED = false;
+ .@towns = rand2(1, 15);
+ kamibroadcast("Monster King! Seize and destroy some towns!", "Moubootaur");
+ // Tulimshar
+ if (.@towns & 1) {
+ $@MK_SCENE=MK_SIEGE_TULIM;
+ donpcevent("Lieutenant Dausen::OnMKSiege");
+ }
+ // Halinarzo
+ if (.@towns & 2) {
+ $@MK_SCENE=MK_SIEGE_HALIN;
+ donpcevent("Lieutenant Jacob::OnMKSiege");
+ }
+ // Hurnscald
+ if (.@towns & 4) {
+ $@MK_SCENE=MK_SIEGE_HURNS;
+ donpcevent("#HurnscaldSiege::OnMKSiege");
+ }
+ // Nivalis
+ if (.@towns & 8) {
+ $@MK_SCENE=MK_SIEGE_NIVAL;
+ donpcevent("Lieutenant Joshua::OnMKSiege");
+ }
+
+ }
+
initnpctimer;
end;
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 3e52930a9..f7793fbd5 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -43,7 +43,7 @@ function script mobpoint {
.@addval=max(0, .@addval);
// Events (+10% Mob Points)
- if ($EVENT$ == "Rebirth")
+ if ($EVENT$ == "Rebirth" || $EVENT$ == "Siege")
.@addval = .@addval * 11 / 10;
// Hardcore Server special rules (3× Monster Points)
diff --git a/npc/functions/news.txt b/npc/functions/news.txt
index b5840ae49..1d99318d2 100644
--- a/npc/functions/news.txt
+++ b/npc/functions/news.txt
@@ -312,6 +312,18 @@ function script EventHelp {
mes l("Also: You'll be able to rebirth at Tulimshar with Jakod. What are you waiting for?!");
mesc l("Location: Not applicable"), 3;
/////////////////////////////////////////////////////////////////////////
+ } else if ($EVENT$ == "Siege") {
+ mesc ".:: " + l("Siege Season") + " ::.", 2;
+ mes "";
+ mes l("During this season, monster point gain is increased in %d%%!", 10);
+ mes l("Warp Crystals will also break much less, and Time Flasks will recharge faster!");
+ if (getq(LoFQuest_COD))
+ mes l("Call of Dusty event, in Land of Fire, also outputs more rewards.");
+ mes "";
+ mes l("The Monster King puppet and the Moubootaur army will randomly siege towns, so be always ready for the random sieges.");
+ mes "";
+ mesc l("Location: Not applicable"), 3;
+ /////////////////////////////////////////////////////////////////////////
} else if ($EVENT$ == "Tower") {
mesc ".:: " + l("Dream Tower Appears") + " ::.", 2;
mes "";
diff --git a/npc/items/lofteleporter.txt b/npc/items/lofteleporter.txt
index aa9553ad8..b4796c88e 100644
--- a/npc/items/lofteleporter.txt
+++ b/npc/items/lofteleporter.txt
@@ -21,7 +21,7 @@
function loftel_time {
.@time = max((60*getarg(0))-(getarg(1)*60), 30);
// During rebirth season, wait time is reduced in 30%
- if ($EVENT$ == "Rebirth")
+ if ($EVENT$ == "Rebirth" || $EVENT$ == "Siege")
.@time = .@time * 2 / 3;
return gettimetick(2)+.@time;
}
diff --git a/npc/items/teleporter.txt b/npc/items/teleporter.txt
index 529ff93c1..ba8748ea8 100644
--- a/npc/items/teleporter.txt
+++ b/npc/items/teleporter.txt
@@ -37,7 +37,7 @@ OnUse:
.@timet=limit(0, gettimetick(2)-TELEPORTER_TIME, 3600);
.@prop=.@timet*2777/1000; // Make it range from 0~10000
.@adj_breakrate=limit( 500, .@prop, 9500 );
- if ($EVENT$ == "Rebirth")
+ if ($EVENT$ == "Rebirth" || $EVENT$ == "Siege")
.@adj_breakrate /= 2;
//debugmes "Adjusted break ratio: %d", .@adj_breakrate;
if (rand(10000) > .@adj_breakrate)