diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-05-27 05:37:41 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-05-27 05:37:41 -0300 |
commit | 73a22e7a1f7bad1d711221453c6562e8f3140449 (patch) | |
tree | d85d24f0f2c320423eb90d4a572703e4ce8586b4 /npc/functions/bitwise.txt | |
parent | 6fca282e934531255efbddd80b7748e1ab35d860 (diff) | |
download | serverdata-73a22e7a1f7bad1d711221453c6562e8f3140449.tar.gz serverdata-73a22e7a1f7bad1d711221453c6562e8f3140449.tar.bz2 serverdata-73a22e7a1f7bad1d711221453c6562e8f3140449.tar.xz serverdata-73a22e7a1f7bad1d711221453c6562e8f3140449.zip |
set byte/nibble fix (do we even need to reset this info, though?)
Diffstat (limited to 'npc/functions/bitwise.txt')
-rw-r--r-- | npc/functions/bitwise.txt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/npc/functions/bitwise.txt b/npc/functions/bitwise.txt index 88938eef9..023606629 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(getarg(0), .@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(getarg(0), .@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. |