summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-23 11:16:07 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-23 11:16:07 -0300
commit15d81154c2ed1ba989924f89fbef672a49965d38 (patch)
treebc5b8547d1cadb634f19cac4060eee19397e64d6 /npc/functions
parenta9175bf3d6916cf83f655ee95a1b56a8c8fef49f (diff)
downloadserverdata-15d81154c2ed1ba989924f89fbef672a49965d38.tar.gz
serverdata-15d81154c2ed1ba989924f89fbef672a49965d38.tar.bz2
serverdata-15d81154c2ed1ba989924f89fbef672a49965d38.tar.xz
serverdata-15d81154c2ed1ba989924f89fbef672a49965d38.zip
029-5 is now a map which causes diseases. Mitigates slime mother farming.
HP > 70%: Bleeding HP > 40%: Poison HP < 00%: Deadly Poison PS. Formula likely wrong.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/clientversion.txt2
-rw-r--r--npc/functions/dungeon.txt40
2 files changed, 41 insertions, 1 deletions
diff --git a/npc/functions/clientversion.txt b/npc/functions/clientversion.txt
index ea8af1be2..53587237a 100644
--- a/npc/functions/clientversion.txt
+++ b/npc/functions/clientversion.txt
@@ -1033,7 +1033,7 @@ function script checkclientversion {
mesc l("Warning."), 1;
mesc l("Warning: You are using an old client."), 1;
next;
- mesc l("Please install the new client from [@@https://manaplus.org/|https://manaplus.org/@@]");
+ //mesc l("Please install the new client from [@@https://manaplus.org/|https://manaplus.org/@@]");
mesc l("Alternatively, download a bleeding edge build at [@@https://manaplus.germantmw.de/|https://manaplus.germantmw.de/@@]");
mesc l("Or use our awesome [@@https://tmw2.org/manalauncher/InstallManaLauncher.exe|Mana Launcher@@] if you're on Windows or Linux.");
next;
diff --git a/npc/functions/dungeon.txt b/npc/functions/dungeon.txt
index 1b3f29f2f..ef0bcc08e 100644
--- a/npc/functions/dungeon.txt
+++ b/npc/functions/dungeon.txt
@@ -11,6 +11,7 @@
OnInit:
setarray .heatmap$, "007-2";
setarray .cursemap$, "006-4", "006-4-1", "025-1";
+ setarray .sickmap$, "029-5";
end;
/////////////////////////////////////////
@@ -75,10 +76,49 @@ OnCurse:
end;
}
+/////////////////////////////////////////
+// Heartbeat for Disease effects
+OnSick:
+ // Did you left?
+ .@i=array_find(.sickmap$, getmap());
+ if (.@i < 0) {
+ @sick$="";
+ end;
+ }
+
+ // First time seeing this
+ if (@sick$ != getmap()) {
+ @sick$=getmap();
+ dispbottom l("This map contains poisonous class and may cause diseases.");
+ }
+
+ // The effect is based on HP
+ if (MaxHp*7/10 > Hp)
+ .@eff = SC_BLOODING;
+ else if (MaxHp*4/10 > Hp)
+ .@eff = SC_POISON;
+ else
+ .@eff = SC_DPOISON;
+
+ // You are in a SICKMAP$, so suffer damage from disease
+ if (@sickio > gettimetick(2)) {
+ heal -50, 0;
+ } else {
+ heal -rand2(50, 200), 0;
+ SC_Bonus(10, .@eff, 1);
+ }
+
+ // New tick (10 seconds fixed cycle)
+ addtimer2 10000, .name$+"::OnSick";
+ end;
+
+
+
//////////////////////////////
007-2 mapflag nosave 007-1,99,189
006-4 mapflag nosave 006-3,54,36
006-4-1 mapflag nosave 006-3,54,36
+029-5 mapflag nosave 029-4,21,97