summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-11-19 14:09:30 -0300
committerJesusaves <cpntb1@ymail.com>2019-11-19 14:09:30 -0300
commit67b79be83fda4e59af2164ae2668ce7c2476a6e1 (patch)
treed70a05e8f7069c2576d0d88177f4d5e91a60da2a
parent4bd2f8760637f03bd5e757c981d5af1abb22bb1a (diff)
downloadserverdata-67b79be83fda4e59af2164ae2668ce7c2476a6e1.tar.gz
serverdata-67b79be83fda4e59af2164ae2668ce7c2476a6e1.tar.bz2
serverdata-67b79be83fda4e59af2164ae2668ce7c2476a6e1.tar.xz
serverdata-67b79be83fda4e59af2164ae2668ce7c2476a6e1.zip
Lethal Drinking option
-rw-r--r--npc/commands/ucp.txt11
-rw-r--r--npc/items/alcohol.txt6
2 files changed, 14 insertions, 3 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
index 7b4bce58a..89d533b78 100644
--- a/npc/commands/ucp.txt
+++ b/npc/commands/ucp.txt
@@ -167,6 +167,14 @@ function script UserCtrlPanel {
mes l("Long Text Wall Density: ") + col(l("Compact")+": "+GSET_LONGMENU_DENSITY, 2);
+ // GSET_ALCOHOL_NOOVERDRINK
+ // Should players be allowed to drink themselves to death?
+ if (GSET_ALCOHOL_NOOVERDRINK)
+ mes l("Lethal overdrinking: ") + col(l("Not allowed"), 1);
+ else
+ mes l("Lethal overdrinking: ") + col(l("Allowed"), 2);
+
+
if (strcharinfo(2) == "Monster King") {
// GSET_AUTORECEIVE_COINS
// Enables/Disable autoreceive strange coins
@@ -187,6 +195,7 @@ function script UserCtrlPanel {
l("Toggle Soul Menhir automatic saving"),
l("Toggle Daily Reward screen"),
l("Text Wall Density"),
+ l("Lethal alcohol overdrinking"),
rif(strcharinfo(2) == "Monster King", ("Toggle Autoreceive Event Coins"));
mes "";
@@ -211,6 +220,8 @@ function script UserCtrlPanel {
GSET_LONGMENU_DENSITY+=1;
break;
case 5:
+ GSET_ALCOHOL_NOOVERDRINK=!GSET_ALCOHOL_NOOVERDRINK; break;
+ case 6:
GSET_AUTORECEIVE_COINS=!GSET_AUTORECEIVE_COINS; break;
}
clear;
diff --git a/npc/items/alcohol.txt b/npc/items/alcohol.txt
index 80d040f0d..6188f8102 100644
--- a/npc/items/alcohol.txt
+++ b/npc/items/alcohol.txt
@@ -45,11 +45,11 @@ OnUse:
if (ALC_THRESHOLD) {
.@vit=readparam2(bVit);
if (@Alcohol+ALC_THRESHOLD > .@vit) {
- //dispbottom l("You vomit, you are too drunk for this to have effect anymore.");
- dispbottom l("You vomit, you are too drunk and drinking is harmful.");
+ if (GSET_ALCOHOL_NOOVERDRINK) dispbottom l("You vomit, you are too drunk for this to have effect anymore.");
+ else dispbottom l("You vomit, you are too drunk and drinking is harmful.");
dispbottom l("Raise vitality to be able to drink even more.");
sc_start SC_CONFUSION, 5000, 0, 10000, SCFLAG_NOAVOID; // Warning, forces user to use @resync!
- //end; // FIXME
+ if (GSET_ALCOHOL_NOOVERDRINK) end;
percentheal -@Alcohol, -@Alcohol;
}
}