summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-05-27 19:35:38 +0000
committerJesusaves <cpntb1@ymail.com>2021-05-27 19:35:38 +0000
commit519a365928311d0cf8558526b073a4cff69eed49 (patch)
tree6b62464ced2779d4068818ee2ac92e49e536cfc5 /npc/functions
parent93fd0fff03385a7d7e2e9d72adbeddb219ad5146 (diff)
downloadserverdata-519a365928311d0cf8558526b073a4cff69eed49.tar.gz
serverdata-519a365928311d0cf8558526b073a4cff69eed49.tar.bz2
serverdata-519a365928311d0cf8558526b073a4cff69eed49.tar.xz
serverdata-519a365928311d0cf8558526b073a4cff69eed49.zip
Mirror Lake Quest - Cindy
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/bitwise.txt18
-rw-r--r--npc/functions/vault.txt6
2 files changed, 12 insertions, 12 deletions
diff --git a/npc/functions/bitwise.txt b/npc/functions/bitwise.txt
index 7d0047e8..02360662 100644
--- a/npc/functions/bitwise.txt
+++ b/npc/functions/bitwise.txt
@@ -121,10 +121,10 @@ function script get_bitword {
/////////////////////////////////////////////////////////////////////////////////
// A Nibble can go up to 15. There are 7 nibbles.
-// set_nibble(VAR, VAL, NIBBLEID)
+// set_nibble(VAR, NIBBLEID, VAL)
function script set_nibble {
.@v=getarg(0);
- switch (getarg(2)) {
+ switch (getarg(1)) {
case 0:
.@s=0; .@m=0xF; break;
case 1:
@@ -140,17 +140,17 @@ function script set_nibble {
case 6:
.@s=24; .@m=0xF000000; break;
default:
- Exception("Invalid SNibble: "+getarg(2), RB_DEFAULT);
+ Exception("Invalid SNibble: "+getarg(1), RB_DEFAULT);
}
- return bitwise_set(.@v, .@m, .@s, getarg(1));
+ return bitwise_set(getarg(0), .@m, .@s, getarg(2));
}
// A Byte can go up to 255. There are 3 bytes. The forth can go up to 127.
-// set_nibble(VAR, VAL, BYTEID)
+// set_nibble(VAR, BYTEID, VAL)
function script set_byte {
.@v=getarg(0);
- switch (getarg(2)) {
+ switch (getarg(1)) {
case 0:
.@s=0; .@m=0xFF; break;
case 1:
@@ -160,10 +160,10 @@ function script set_byte {
case 3:
.@s=24; .@m=0x7F000000; break;
default:
- Exception("Invalid SByte: "+getarg(2), RB_DEFAULT);
+ Exception("Invalid SByte: "+getarg(1), RB_DEFAULT);
}
- return bitwise_set(.@v, .@m, .@s, getarg(1));
+ return bitwise_set(getarg(0), .@m, .@s, getarg(2));
}
// A Bitword can go up to 65535 and is fixed in position to handle Soul EXP.
@@ -171,6 +171,6 @@ function script set_byte {
function script set_bitword {
.@v=getarg(0);
- return bitwise_set(.@v, 0xFFFF, 0, getarg(1));
+ return bitwise_set(getarg(0), 0xFFFF, 0, getarg(1));
}
diff --git a/npc/functions/vault.txt b/npc/functions/vault.txt
index 15a969fb..b6d46a13 100644
--- a/npc/functions/vault.txt
+++ b/npc/functions/vault.txt
@@ -64,8 +64,8 @@ function script vaultOnLogin {
}
// Unset the target lake/world
- set_byte(##00_INFO, 0, 3);
- set_nibble(##00_INFO, 0, 5);
+ set_byte(##00_INFO, 3, 0);
+ set_nibble(##00_INFO, 5, 0);
} else if (.@gto) {
// 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;
@@ -85,7 +85,7 @@ function script vaultOnLogout {
.@api$=json_encode("UID", ##VAULT,
"GID", getcharid(3),
"VAR1N", "TMWQUEST",
- "VAR1V", ##02_TMWQUEST,
+ "VAR1V", ##03_TMWQUEST,
"VEXP", ##VAULT_EXP,
"GOTO", ##VAULT_GOTO,
"MLTO", ##VAULT_MLTO);