From d69c31c13bc2c6a5f6d56caa8352aa2657aab762 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 22 May 2021 22:16:35 -0300 Subject: Add getvaultexp() function and assign 20 Soul EXP each rebirth. Moubootaur Legends has used 100 Soul EXP out of 500 possible. --- npc/025-1/phoenix.txt | 1 + npc/functions/vault.txt | 20 ++++++++++++++++++++ npc/scripts.conf | 1 + 3 files changed, 22 insertions(+) create mode 100644 npc/functions/vault.txt diff --git a/npc/025-1/phoenix.txt b/npc/025-1/phoenix.txt index 1a380f331..5cc7df6d1 100644 --- a/npc/025-1/phoenix.txt +++ b/npc/025-1/phoenix.txt @@ -116,6 +116,7 @@ REBIRTH_OVERLEVEL=max(0, BaseLevel-.@blvl-(REBIRTH_OVERLEVEL/REBIRTH)); resetlvl(3); NewcomerEXPDROPUP(); + getvaultexp(20); getitembound SupremeGift, 1, 4; warp "005-1", 40, 117; LOCATION$="Candor"; diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt new file mode 100644 index 000000000..55ae5ae9f --- /dev/null +++ b/npc/functions/vault.txt @@ -0,0 +1,20 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Description: +// Vault Utilities + +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) { + ##VAULT_EXP+=.@exp; + debugmes("Granting %d Soul Exp to %d under the Moubootaur's authority.", + .@exp, ##VAULT); + } + return; +} + + diff --git a/npc/scripts.conf b/npc/scripts.conf index aad39c382..e10a2ac27 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -7,6 +7,7 @@ "npc/functions/array.txt", "npc/functions/bitwise.txt", "npc/functions/math.txt", +"npc/functions/vault.txt", "npc/functions/util.txt", // General-purpose Framework functions -- cgit v1.2.3-60-g2f50