summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-07-21 14:51:48 -0300
committerJesusaves <cpntb1@ymail.com>2020-08-05 03:25:43 -0300
commit5c5c2d7098b1de88cd39fc215aad80e5887a9060 (patch)
tree4bf85892599f82ffd68ed0417e4d46d5d598fc5b
parent876e871c5ec5d963cfaa59201a3b6d0f330f2b40 (diff)
downloadserverdata-5c5c2d7098b1de88cd39fc215aad80e5887a9060.tar.gz
serverdata-5c5c2d7098b1de88cd39fc215aad80e5887a9060.tar.bz2
serverdata-5c5c2d7098b1de88cd39fc215aad80e5887a9060.tar.xz
serverdata-5c5c2d7098b1de88cd39fc215aad80e5887a9060.zip
Remove local functions introduced and which no longer are necessary
-rw-r--r--npc/000-0-1/narrator.txt2
-rw-r--r--npc/functions/main.txt68
2 files changed, 1 insertions, 69 deletions
diff --git a/npc/000-0-1/narrator.txt b/npc/000-0-1/narrator.txt
index d349379e..a63c46a0 100644
--- a/npc/000-0-1/narrator.txt
+++ b/npc/000-0-1/narrator.txt
@@ -48,7 +48,7 @@ function travelToArtis {
// Legacy accounts are excluded
// Only one referral per vault account
- validacc();
+ //getvaultid();
if (!islegacyaccount() && !getvaultvar(REFERRAL_PROG)) referralSystem();
narrator S_LAST_NEXT,
diff --git a/npc/functions/main.txt b/npc/functions/main.txt
index 34468237..471df271 100644
--- a/npc/functions/main.txt
+++ b/npc/functions/main.txt
@@ -224,74 +224,6 @@ function script npctalkonce {
return true;
}
-// validacc() -> Validate attached player vault account
-// Returns "true" on success
-function script validacc {
- .@id=##VAULT[0];
- if (.@id > 0)
- return true;
- // We failed; Maybe we can do something about it?
- if (debug) {
- ##VAULT[0]=getcharid(3);
- consolemes(CONSOLEMES_WARNING, "Account %d has no vault index. Debug environment detected, automatically assigning one...", getcharid(3));
- return true;
- }
- // Nothing to be done about it; I dunno what sort of env this is!
- return false;
-}
-
-// getv(variable{, Vault ID}) -> Returns a Vault Variable
-function script getv {
- .@v$=getarg(0);
- .@id=getarg(1, ##VAULT[0]);
- // Hard Fail
- if (.@id <= 0) {
- announce "ERROR: getv."+.@v$+" failed - Sysadmin help required.", bc_all|bc_npc;
- channelmes("#irc", "CRITICAL ERROR: Invalid Account (getv."+.@v$+")");
- if (playerattached()) {
- dispbottom "A critical error happened in getv."+.@v$+" function. This error is fatal, we halt execution.";
- consolemes(CONSOLEMES_ERROR, "Account %d has no vault index. This error is fatal, script execution halted.", getcharid(3));
- } else {
- consolemes(CONSOLEMES_ERROR, "Vault function called from script without a valid vault account ID. This error is fatal, script execution was halted.");
- }
- end;
- }
- // Yes, 90% of the function is hard-failing.
- // I miss Exception() function >__>
- return getd("$VAULT_"+.@v$+"["+.@id+"]");
-}
-
-// setv(variable, value{, Vault ID}) -> Sets a Vault Variable
-function script setv {
- .@v$=getarg(0);
- if (isstr(getarg(1))) {
- .@val$=getarg(1);
- .@str=true;
- } else {
- .@val=getarg(1);
- .@str=false;
- }
- .@id=getarg(2, ##VAULT[0]);
- // Hard Fail
- if (.@id <= 0) {
- announce "ERROR: setv."+.@v$+" failed - Sysadmin help required.", bc_all|bc_npc;
- channelmes("#irc", "CRITICAL ERROR: Invalid Account (detv."+.@v$+")");
- if (playerattached()) {
- dispbottom "A critical error happened in setv."+.@v$+" function. This error is fatal, we halt execution.";
- consolemes(CONSOLEMES_ERROR, "Account %d has no vault index. This error is fatal, script execution halted.", getcharid(3));
- } else {
- consolemes(CONSOLEMES_ERROR, "Vault function called from script without a valid vault account ID. This error is fatal, script execution was halted.");
- }
- end;
- }
- // Yes, 70% of the function is hard-failing.
- // I miss Exception() function >__>
- if (.@str)
- return setd("$VAULT_"+.@v$+"["+.@id+"]", .@val$);
- else
- return setd("$VAULT_"+.@v$+"["+.@id+"]", .@val);
-}
-
// Get some acc id from char name, even if offline.
// This is a highly sensitive function; Use with caution.
// gf_accid( Name )