diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-10-14 16:42:34 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-10-14 16:42:34 -0300 |
commit | e6f19082f625ae2090e5c6891b0ba8a0c6ec4d83 (patch) | |
tree | fedb4525762dd8e835db2a9b7d4987f4d4f6f60e /world/map/npc | |
parent | 29a8cbab34acc9eb03242daaeaf83415704461b0 (diff) | |
download | serverdata-e6f19082f625ae2090e5c6891b0ba8a0c6ec4d83.tar.gz serverdata-e6f19082f625ae2090e5c6891b0ba8a0c6ec4d83.tar.bz2 serverdata-e6f19082f625ae2090e5c6891b0ba8a0c6ec4d83.tar.xz serverdata-e6f19082f625ae2090e5c6891b0ba8a0c6ec4d83.zip |
Add the handler for ##ADD_LVL and ##ADD_GP
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/functions/global_event_handler.txt | 1 | ||||
-rw-r--r-- | world/map/npc/functions/vault.txt | 33 | ||||
-rw-r--r-- | world/map/npc/scripts.conf | 1 |
3 files changed, 35 insertions, 0 deletions
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt index 2743d9f3..dab56fde 100644 --- a/world/map/npc/functions/global_event_handler.txt +++ b/world/map/npc/functions/global_event_handler.txt @@ -17,6 +17,7 @@ OnPCLoginEvent: callfunc "MaybeGiveBirthday"; callfunc "MiriamExpire"; // force the speed skill quest to expire callfunc "ConvertChristmas21"; // Christmas 2021 + callfunc "VaultLogin"; // Mirror Lake Protocol biddings // add more here set @login_event, 2; end; diff --git a/world/map/npc/functions/vault.txt b/world/map/npc/functions/vault.txt new file mode 100644 index 00000000..6290d8d9 --- /dev/null +++ b/world/map/npc/functions/vault.txt @@ -0,0 +1,33 @@ +// Mirror Lake Protocol and The Mana World Vault utilities +// TMWA is hopelessy broken, so most helpers simply don't exist. +// +// Author: jesusalva + +function|script|VaultLogin +{ + if (##VAULT < 1) goto L_Return; + + callsub S_Exp; + callsub S_Gold; + + return; // go back to global handler + +S_Return: // this is to end execution of a sub + return; + +L_Return: + return; + +S_Exp: + if (##ADD_LVL < 1) goto S_Return; + getexp ##ADD_LVL, 0; + set ##ADD_LVL, 0; + return; + +S_Gold: + if (##ADD_GP < 1) goto S_Return; + set Zeny, Zeny + ##ADD_GP; + set ##ADD_GP, 0; + return; +} + diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index 86c7c75f..49804a10 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -32,6 +32,7 @@ npc: npc/functions/DyeConfig.txt npc: npc/functions/motd.txt npc: npc/functions/motdconfig.txt npc: npc/functions/ghost.txt +npc: npc/functions/vault.txt npc: npc/functions/global_event_handler.txt // Item Functions |