diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/hub.txt | 2 | ||||
-rw-r--r-- | npc/functions/vault.txt | 9 |
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); |