diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-10-26 01:32:27 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-10-26 01:32:27 -0300 |
commit | f8ccd420cb13c4e8c3e32ac64ae0e6a43576526e (patch) | |
tree | c3aaa7fa72d11c8372edc74cbc0dea287423597d /world | |
parent | 05e6ffa722923ad7b587273e6326dcd644900915 (diff) | |
download | serverdata-f8ccd420cb13c4e8c3e32ac64ae0e6a43576526e.tar.gz serverdata-f8ccd420cb13c4e8c3e32ac64ae0e6a43576526e.tar.bz2 serverdata-f8ccd420cb13c4e8c3e32ac64ae0e6a43576526e.tar.xz serverdata-f8ccd420cb13c4e8c3e32ac64ae0e6a43576526e.zip |
I forgot, but previous commit does nothing without being on global_event_handler
Diffstat (limited to 'world')
-rw-r--r-- | world/map/npc/functions/global_event_handler.txt | 4 | ||||
-rw-r--r-- | world/map/npc/functions/vault.txt | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index dab56fde..690b0566 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -38,6 +38,10 @@ OnPCDieEvent: set @killerrid, 0; // reset killer rid end; +OnPCLogoutEvent: + callfunc "VaultLogout"; + end; + OnInit: callfunc "ClearGlobalVars"; callfunc "MOTD"; // set the MOTD array diff --git a/world/map/npc/functions/vault.txt b/world/map/npc/functions/vault.txt index 1c08dba1..ee30863c 100644 --- a/world/map/npc/functions/vault.txt +++ b/world/map/npc/functions/vault.txt @@ -6,6 +6,7 @@ function|script|VaultLogin { if (##VAULT < 1) goto L_Return; + // TODO: Or #VAULT ? Which of the two is set? callsub S_Exp; callsub S_Gold; @@ -170,3 +171,17 @@ L_Flush2: return; } +function|script|VaultLogout +{ + if (##VAULT < 1) goto L_Return; + // TODO: Or #VAULT ? Which of the two is set? + set $@API_PROTOCOL, API_VAULT; + set $@API_DATA$, "'UID': "+##VAULT+", 'GID': "+getcharid(3); + callfunc "FlushAPI"; + + return; + +L_Return: + return; +} + |