From 6e6d7c558e80866e53454048608abae093eefcfe Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 24 May 2021 23:40:12 -0300 Subject: Upgrade Mirror Lake rules, and force-equip the Mirror Lake Armor --- npc/functions/hub.txt | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'npc/functions/hub.txt') diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index f9987f9b5..382fb21d7 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -26,17 +26,29 @@ function script HUB_Login { if (getvaultid()) { .@gto=get_byte(##00_INFO, 3); .@mlp=get_nibble(##00_INFO, 5); - if (.@gto == $WID) { + // Work only on new chars, or chars which cleared Tulimshar. + if (.@gto == $WID && + (!getq(General_Narrator) || + (getq(General_Narrator) && BaseLevel > 20))) + { // Warp to the proper Mirror Lake switch (.@mlp) { - case 1: warp "018-7-1", 90, 47; break; - default: warp "014-4", 28, 31; break; + case 1: warp "018-7-1", 90, 47; LOCATION$ = "LoF"; break; + default: warp "014-4", 28, 31; LOCATION$ = "LoF"; break; } // Send debug information debugmes("Vault User %d moved to lake %d.", getvaultid(), .@mlp); - // FIXME: Handle new user (non-native) accounts + // Handle new user (non-native) accounts + if (!getq(General_Narrator)) { + getitembound MirrorLakeArmor, 1, 4; + equip(MirrorLakeArmor); + TUTORIAL=true; + //BaseLevel = get_byte(##00_INFO, 0) + 1; + // TODO: Display quick tutorial + dispbottom l("Mirror Lake : Obtain help with %s.", b("@info")); + } // Unset the target lake/world set_byte(##00_INFO, 0, 3); @@ -261,6 +273,16 @@ function script HUB_Logout { "MLTO", 0); ##VAULT_EXP=0; api_send(API_FLUSHVAULT, .@api$); + // Destroy temporary characters + if (countitem(MirrorLakeArmor)) { + delitem MirrorLakeArmor, countitem(MirrorLakeArmor); + clearitem(); + resetlvl(2); + resetstatus(); + resetskill(); + warp "000-0", 22, 24; + debugmes("Vault User %d reset!", getvaultid()); + } } } -- cgit v1.2.3-60-g2f50