summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/commands/ucp.txt25
-rw-r--r--npc/craft/alchemy.txt17
-rw-r--r--npc/functions/permissions.txt4
3 files changed, 42 insertions, 4 deletions
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
index 5ad0c0182..f2dfd166f 100644
--- a/npc/commands/ucp.txt
+++ b/npc/commands/ucp.txt
@@ -201,6 +201,14 @@ function script UserCtrlPanel {
mes l("Long Text Wall Density: ") + col(l("Compact")+": "+GSET_LONGMENU_DENSITY, 2);
+ // GSET_FIXED_ALCHEMY
+ // Alchemy Table Behavior
+ if (GSET_FIXED_ALCHEMY)
+ mes l("Alchemy Table: ") + col(l("Never ask: Brew %d", GSET_FIXED_ALCHEMY), 1);
+ else
+ mes l("Alchemy Table: ") + col(l("Ask everytime"), 2);
+
+
// GSET_ALCOHOL_NOOVERDRINK
// Should players be allowed to drink themselves to death?
if (GSET_ALCOHOL_NOOVERDRINK)
@@ -247,6 +255,7 @@ function script UserCtrlPanel {
l("Toggle Soul Menhir automatic saving"),
l("Toggle Daily Reward screen"),
l("Text Wall Density"),
+ l("Alchemy Table brewing"),
l("Lethal alcohol overdrinking"),
l("Show Tutorial Protips"),
rif($EVENT$ == "Valentine", ("Valentine Eating")),
@@ -274,12 +283,22 @@ function script UserCtrlPanel {
GSET_LONGMENU_DENSITY+=1;
break;
case 5:
- GSET_ALCOHOL_NOOVERDRINK=!GSET_ALCOHOL_NOOVERDRINK; break;
+ if (GSET_FIXED_ALCHEMY) {
+ GSET_FIXED_ALCHEMY=0;
+ } else {
+ .@max=(is_sponsor() ? 25 : 10);
+ mesc l("How many to brew? (%d-%d)", 0, .@max);
+ input(GSET_FIXED_ALCHEMY, 0, .@max);
+ GSET_FIXED_ALCHEMY=limit(0, GSET_FIXED_ALCHEMY, 10);
+ }
+ break;
case 6:
- TUTORIAL=!TUTORIAL; break;
+ GSET_ALCOHOL_NOOVERDRINK=!GSET_ALCOHOL_NOOVERDRINK; break;
case 7:
- GSET_VALENTINE_EATALL=!GSET_VALENTINE_EATALL; break;
+ TUTORIAL=!TUTORIAL; break;
case 8:
+ GSET_VALENTINE_EATALL=!GSET_VALENTINE_EATALL; break;
+ case 9:
GSET_AUTORECEIVE_COINS=!GSET_AUTORECEIVE_COINS; break;
}
clear;
diff --git a/npc/craft/alchemy.txt b/npc/craft/alchemy.txt
index e23416596..6e0084596 100644
--- a/npc/craft/alchemy.txt
+++ b/npc/craft/alchemy.txt
@@ -33,7 +33,22 @@ function script AlchemySystem {
.success=false;
} else {
if (.scope == CRAFT_NPC || .knowledge[.@entry]) {
- usecraft .@craft;
+ if (GSET_FIXED_ALCHEMY) {
+ .@m=limit(1, GSET_FIXED_ALCHEMY, 25);
+ } else {
+ .@max=(is_sponsor() ? 25 : 10);
+ mesc l("How many to brew? (%d-%d)", 1, .@max);
+ input(.@m, 1, .@max);
+ }
+ // Alchemy loop
+ .@i=0;
+ while (.@i < .@m) {
+ .@s=usecraft(.@craft);
+ .@i++;
+ // Failed for whatever reason
+ if (!.@s)
+ break;
+ }
.success=true;
} else {
.success=false;
diff --git a/npc/functions/permissions.txt b/npc/functions/permissions.txt
index eaedcce92..2838f7a92 100644
--- a/npc/functions/permissions.txt
+++ b/npc/functions/permissions.txt
@@ -19,3 +19,7 @@ function script is_admin {
function script is_staff {
return (getgmlevel() >= 5);
}
+
+function script is_sponsor {
+ return (getgmlevel());
+}