From f8ccd420cb13c4e8c3e32ac64ae0e6a43576526e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 26 Oct 2022 01:32:27 -0300 Subject: I forgot, but previous commit does nothing without being on global_event_handler --- world/map/npc/functions/vault.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'world/map/npc/functions/vault.txt') 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; +} + -- cgit v1.2.3-70-g09d2