summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/hub.txt30
1 files changed, 26 insertions, 4 deletions
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());
+ }
}
}