From a20c0f9d45ea91ed924f1e797fd051e03a376740 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 26 May 2021 22:42:56 -0300 Subject: Fix a few typos, and introduce MirrorLakeSendTo() --- npc/functions/bitwise.txt | 36 ++++++++++++++++++------------------ npc/functions/vault.txt | 15 +++++++++++++++ 2 files changed, 33 insertions(+), 18 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/bitwise.txt b/npc/functions/bitwise.txt index fd80024e..7d0047e8 100644 --- a/npc/functions/bitwise.txt +++ b/npc/functions/bitwise.txt @@ -73,17 +73,17 @@ function script get_nibble { case 0: .@s=0; .@m=0xF; break; case 1: - .@s=4; .@m=0XF0; break; + .@s=4; .@m=0xF0; break; case 2: - .@s=8; .@m=0XF00; break; + .@s=8; .@m=0xF00; break; case 3: - .@s=12; .@m=0XF000; break; + .@s=12; .@m=0xF000; break; case 4: - .@s=16; .@m=0XF0000; break; + .@s=16; .@m=0xF0000; break; case 5: - .@s=20; .@m=0XF00000; break; + .@s=20; .@m=0xF00000; break; case 6: - .@s=24; .@m=0XF000000; break; + .@s=24; .@m=0xF000000; break; default: Exception("Invalid Nibble: "+getarg(1), RB_DEFAULT, .@v); } @@ -99,11 +99,11 @@ function script get_byte { case 0: .@s=0; .@m=0xFF; break; case 1: - .@s=8; .@m=0XFF00; break; + .@s=8; .@m=0xFF00; break; case 2: - .@s=16; .@m=0XFF0000; break; + .@s=16; .@m=0xFF0000; break; case 3: - .@s=24; .@m=0X7F000000; break; + .@s=24; .@m=0x7F000000; break; default: Exception("Invalid Byte: "+getarg(1), RB_DEFAULT, .@v); } @@ -128,17 +128,17 @@ function script set_nibble { case 0: .@s=0; .@m=0xF; break; case 1: - .@s=4; .@m=0XF0; break; + .@s=4; .@m=0xF0; break; case 2: - .@s=8; .@m=0XF00; break; + .@s=8; .@m=0xF00; break; case 3: - .@s=12; .@m=0XF000; break; + .@s=12; .@m=0xF000; break; case 4: - .@s=16; .@m=0XF0000; break; + .@s=16; .@m=0xF0000; break; case 5: - .@s=20; .@m=0XF00000; break; + .@s=20; .@m=0xF00000; break; case 6: - .@s=24; .@m=0XF000000; break; + .@s=24; .@m=0xF000000; break; default: Exception("Invalid SNibble: "+getarg(2), RB_DEFAULT); } @@ -154,11 +154,11 @@ function script set_byte { case 0: .@s=0; .@m=0xFF; break; case 1: - .@s=8; .@m=0XFF00; break; + .@s=8; .@m=0xFF00; break; case 2: - .@s=16; .@m=0XFF0000; break; + .@s=16; .@m=0xFF0000; break; case 3: - .@s=24; .@m=0X7F000000; break; + .@s=24; .@m=0x7F000000; break; default: Exception("Invalid SByte: "+getarg(2), RB_DEFAULT); } diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt index 4ef97470..15a969fb 100644 --- a/npc/functions/vault.txt +++ b/npc/functions/vault.txt @@ -70,6 +70,8 @@ function script vaultOnLogin { // Heading somewhere which is not here! mesc l("WARNING: If you use any Mirror Lake feature on this world, the current Mirror Lake Quest will be marked as \"Failed\"."), 1; mesc l("If this is undesired, select the correct world, and if needed create a new char on it."), 1; + ##VAULT_GOTO=.@gto; + ##VAULT_MLTO=.@mlp; next; closeclientdialog; } @@ -95,3 +97,16 @@ function script vaultOnLogout { return; } +// MirrorLakeSendTo(World, Lake) +function script MirrorLakeSendTo { + .@w=getarg(0); + .@t=getarg(1); + ##VAULT_GOTO=.@w; + ##VAULT_MLTO=.@t; + closeclientdialog; + dispbottom l("Darkness fills your vision..."); + sleep2(1000); + kick(getcharid(3), 7); // 7 is not a valid kick reason + end; +} + -- cgit v1.2.3-60-g2f50