Following script_commands.txt I understand almost everything in 'getitem2', except from this
// First, let's get an ID of a character who's name will be on the item.
// Only an existing character's name may be there.
// Let's assume our character is 'Adam' and find his ID.
@charid = getcharid(0,"Adam");
// Now we split the character ID number into two portions with a binary
// shift operation. If you don't understand what this does, just copy it.
@card3 = @charid & 65535;
@card4 = @charid >> 16;
My problem is the box is not opening in Woe times (the item alone works perfectly fine)
What am I getting wrong here? how does this binary shift works? what is &0xffff?
Question
drifterxxxx2
Hi
I'm trying to make Woe potion boxes so I set battleflag 'woe_reserved_char_id' and added to a NPC script
i.e. the NPC gives me Woe's White Potion, this item will only work in Woe time
Until now i'm perfectly fine and everything works
So now I'm trying to make a box of Woe's White Potion and found this old script in eAmod
{ getitem2 504,50,1,0,0,254,0,getbattleflag("woe_reserved_char_id")&0xffff,(getbattleflag("woe_reserved_char_id")>>16)&0xffff; }
Following script_commands.txt I understand almost everything in 'getitem2', except from this
// First, let's get an ID of a character who's name will be on the item. // Only an existing character's name may be there. // Let's assume our character is 'Adam' and find his ID. @charid = getcharid(0,"Adam"); // Now we split the character ID number into two portions with a binary // shift operation. If you don't understand what this does, just copy it. @card3 = @charid & 65535; @card4 = @charid >> 16;
My problem is the box is not opening in Woe times (the item alone works perfectly fine)
What am I getting wrong here? how does this binary shift works? what is &0xffff?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.