summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-05-24 23:09:09 -0300
committerJesusaves <cpntb1@ymail.com>2021-05-24 23:09:09 -0300
commit23c938eb4b7f387625553d6d67954c955861ce40 (patch)
treefea1e59febdfdb4bfb20f624ef0ff4a8886b8bca
parent87a29f6b887958de8cecefa152f476c1754681cb (diff)
downloadserverdata-23c938eb4b7f387625553d6d67954c955861ce40.tar.gz
serverdata-23c938eb4b7f387625553d6d67954c955861ce40.tar.bz2
serverdata-23c938eb4b7f387625553d6d67954c955861ce40.tar.xz
serverdata-23c938eb4b7f387625553d6d67954c955861ce40.zip
Make Vault functions reliant on $BETASERVER flag
-rw-r--r--npc/functions/hub.txt2
-rw-r--r--npc/functions/vault.txt9
2 files changed, 9 insertions, 2 deletions
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 5461c4bd5..fdccd482d 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -228,7 +228,7 @@ function script HUB_Logout {
if (!.@dead) {
CHAREG_CLEANUP=gettimetick(2);
// Send updates to Vault API
- if (##VAULT) {
+ if (getvaultid()) {
.@api$=json_encode("UID", ##VAULT,
"GID", getcharid(3),
"VAR1N", "MLQUEST",
diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt
index 55ae5ae9f..ec69c435f 100644
--- a/npc/functions/vault.txt
+++ b/npc/functions/vault.txt
@@ -4,12 +4,19 @@
// Description:
// Vault Utilities
+function script getvaultid {
+ if ($BETASERVER)
+ return ##VAULT;
+ else
+ return 0;
+}
+
function script getvaultexp {
.@exp=getarg(0);
if (.@exp > 100)
Exception("ILLEGAL VAULT EXPERIENCE, FIXME URGENTLY. STOPPING SCRIPT BY FORCE WHILE DOING NOTHING.",
RB_DEBUGMES | RB_IRCBROADCAST | RB_GLOBALANNOUNCE | RB_ISFATAL);
- if (##VAULT) {
+ if (getvaultid()) {
##VAULT_EXP+=.@exp;
debugmes("Granting %d Soul Exp to %d under the Moubootaur's authority.",
.@exp, ##VAULT);