summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-10 19:35:52 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-10 19:35:52 -0300
commit663b284860416b72c8dcee5604aab281855e4675 (patch)
treedbeafa9c76b5c8134cf21fb79254adfd80555136
parent47a9e160fdfb0664f3217a0d8a2bbfd1357eb6f0 (diff)
downloadserverdata-663b284860416b72c8dcee5604aab281855e4675.tar.gz
serverdata-663b284860416b72c8dcee5604aab281855e4675.tar.bz2
serverdata-663b284860416b72c8dcee5604aab281855e4675.tar.xz
serverdata-663b284860416b72c8dcee5604aab281855e4675.zip
Pentagram code for Fires of Steam event
-rw-r--r--db/re/mob_db.conf3
-rw-r--r--npc/003-3/malindou.txt5
-rw-r--r--npc/029-0/warps.txt10
-rw-r--r--npc/029-1/_import.txt1
-rw-r--r--npc/029-1/pentagram.txt68
5 files changed, 85 insertions, 2 deletions
diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf
index c11c31973..c2bdb6e15 100644
--- a/db/re/mob_db.conf
+++ b/db/re/mob_db.conf
@@ -1832,7 +1832,8 @@ mob_db: (
AttackMotion: 672
DamageMotion: 200
Drops: {
- Coal: 15
+ Coal: 65
+ DarkCrystal: 15
}
},
// 1046~1048 is free
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index ad4a9d564..dcc03f2bf 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -67,6 +67,11 @@ OnInit:
$BCONFB_DROP = 100;
$BCONFN_DROP = 7;
$BCONFD_DROP = 0;
+ $FIRESOFSTEAM[1] = 10000;
+ $FIRESOFSTEAM[2] = 10000;
+ $FIRESOFSTEAM[3] = 10000;
+ $FIRESOFSTEAM[4] = 10000;
+ $FIRESOFSTEAM[5] = 10000;
}
/*
// Current UPDATE value: Dom Jun 17 21:32:45 -03 2018
diff --git a/npc/029-0/warps.txt b/npc/029-0/warps.txt
index 714560b98..ac16f880d 100644
--- a/npc/029-0/warps.txt
+++ b/npc/029-0/warps.txt
@@ -27,7 +27,15 @@ function script FiresOfSteam_Warp {
end;
OnTouch:
if (FiresOfSteam_Warp(2)) goto L_Warp;
- // Additional conditions here (TODO)
+ // Additional conditions here
+ if ($FIRESOFSTEAM[1] > 0 ||
+ $FIRESOFSTEAM[2] > 0 ||
+ $FIRESOFSTEAM[3] > 0 ||
+ $FIRESOFSTEAM[4] > 0 ||
+ $FIRESOFSTEAM[5] > 0) {
+ dispbottom l("A magic barrier prevents you from enterering. Maybe it is a good idea to shut down the pentagrams first?");
+ end;
+ }
// Fallthrough
L_Warp:
warp "029-2", 35, 70;
diff --git a/npc/029-1/_import.txt b/npc/029-1/_import.txt
index 2b438ab71..5822170ec 100644
--- a/npc/029-1/_import.txt
+++ b/npc/029-1/_import.txt
@@ -1,2 +1,3 @@
// Map 029-1: Dark Forest
// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/029-1/pentagram.txt",
diff --git a/npc/029-1/pentagram.txt b/npc/029-1/pentagram.txt
new file mode 100644
index 000000000..f38f8e671
--- /dev/null
+++ b/npc/029-1/pentagram.txt
@@ -0,0 +1,68 @@
+// TMW2 scripts.
+// Author:
+// Jesusalva
+// Description:
+// Fires of Steam: The Death of Andrei Sakar
+
+//////////////////////////////////////////
+// Pentagram Core
+
+029-1,35,32,0 script Pentagram#FoS_1 NPC_NO_SPRITE,{
+ .@n$=strnpcinfo(0, "_0");
+ explode(.@ni$, .@n$, "_");
+ .@id=atoi(.@ni$[1]);
+ debugmes "ID %d", .@id;
+ if (.@id < 1) end;
+ if ($FIRESOFSTEAM[.@id] < 1) end;
+
+ mesn;
+ mesq l("Power remaining: %s", fnum($FIRESOFSTEAM[.@id]));
+ next;
+ mesc l("Use items to drain the pentagram. Final result is affected by int!");
+ mesc l("WARNING: Monsters will appear!"), 1;
+ select
+ l("Cancel"),
+ l("Dark Crystal (5 power)"),
+ l("Terranite Ore (3 power)"),
+ l("Coal (1 power)");
+ mes "";
+ switch (@menu) {
+ case 2:
+ .@val=5;.@it=DarkCrystal;
+ break;
+ case 3:
+ .@val=3;.@it=TerraniteOre;
+ break;
+ case 4:
+ .@val=1;.@it=Coal;
+ break;
+ default:
+ close;
+ }
+
+ closeclientdialog;
+ .@val*=countitem(.@it);
+ .@val*=(readparam2(bInt)+100)/100; // Each int gives +1%
+ delitem .@it, countitem(.@it);
+ $FIRESOFSTEAM[.@id]-=.@val;
+ // TODO: Check & unlock
+ if ($FIRESOFSTEAM[.@id] < 1)
+ disablenpc .name$;
+ // Create monsters based on effectivity
+ areamonster("029-1", .x-3, .y-3, .x+3, .y+3, strmobinfo(1, MagicGoblin), MagicGoblin, (.@val/15)+1, "SteamFire#Ctrl::OnEvent1");
+ dispbottom l("Power remaining: %s", fnum($FIRESOFSTEAM[.@id]));
+ close;
+
+OnInit:
+ .distance=3;
+ end;
+}
+
+// Now we duplicate
+029-1,258,39,0 duplicate(Pentagram#FoS_1) Pentagram#FoS_2 NPC_NO_SPRITE
+029-1,113,148,0 duplicate(Pentagram#FoS_1) Pentagram#FoS_3 NPC_NO_SPRITE
+029-1,229,188,0 duplicate(Pentagram#FoS_1) Pentagram#FoS_4 NPC_NO_SPRITE
+029-1,38,257,0 duplicate(Pentagram#FoS_1) Pentagram#FoS_5 NPC_NO_SPRITE
+
+
+