BCNM Menus with Multiple Options
Posted: Sat Jan 17, 2015 9:42 pm
I was looking into the BCNM menu problem and found something interesting that I am no longer able to duplicate. This is the code that I am using for the onTrigger() function to play around with the menu in the Ghelsba Outpost at the hut door.
file: darkstar\scripts\zones\Ghelsba_Outpost\npcs\Hut_Door.lua
The problem with the menu is that 'option' always returns as 255, usually that is. At least it always returns 255 at first. For a while, and this is what I am unable to duplicate now for some reason, there was another 0x05b packet sent after the 0x5c packet. It is in that packet that the value for 'option' corresponds to the selected menu item. These are the values that I have for the menu items:
0x01 Save The Children
0x11 The Holy Crest
0x21 Wings of Fury
0x31 Petrifying Pair
0x41 Toadal Recall
0x51 Mirror, Mirror
In the file bcnm.lua there are some comments concerning multiple event update packets. Is there any way to cycle through these until you get a value that is not 255 or 0?
file: darkstar\scripts\zones\Ghelsba_Outpost\npcs\Hut_Door.lua
Code: Select all
function onTrigger(player,npc)
local menuTest = 0xFFFFFFFF;
local RemoveSaveTheChildren = false;
local RemoveTheHolyCrest = false;
local RemoveWingsOfFury = false;
local RemovePetrifyingPair = false;
local RemoveToadalRecall = false;
local RemoveMirrorMirror = false;
local Removedots = true;
if( RemoveSaveTheChildren) then menuTest = menuTest - 1; end
if( RemoveTheHolyCrest) then menuTest = menuTest - 2; end
if( RemoveWingsOfFury) then menuTest = menuTest - 4; end
if( RemovePetrifyingPair) then menuTest = menuTest - 8; end
if( RemoveToadalRecall) then menuTest = menuTest - 16; end
if( RemoveMirrorMirror) then menuTest = menuTest - 32; end
if( Removedots) then
menuTest = menuTest - 64;
menuTest = menuTest - 128;
menuTest = menuTest - 256;
menuTest = menuTest - 512;
menuTest = menuTest - 1024;
menuTest = menuTest - 2048;
menuTest = menuTest - 4096;
menuTest = menuTest - 8192;
menuTest = menuTest - 16384;
menuTest = menuTest - 32768;
menuTest = menuTest - 65536;
menuTest = menuTest - 131072;
menuTest = menuTest - 262144;
menuTest = menuTest - 524288;
menuTest = menuTest - 1048576;
menuTest = menuTest - 2097152;
menuTest = menuTest - 4194304;
menuTest = menuTest - 8388608;
menuTest = menuTest - 16777216;
menuTest = menuTest - 33554432;
menuTest = menuTest - 67108864;
menuTest = menuTest - 134217728;
menuTest = menuTest - 268435456;
menuTest = menuTest - 536870912;
menuTest = menuTest - 1073741824;
end
player:startEvent(0x7d00, 0, 0, 0, menuTest, 0, 0, 0);
end;
0x01 Save The Children
0x11 The Holy Crest
0x21 Wings of Fury
0x31 Petrifying Pair
0x41 Toadal Recall
0x51 Mirror, Mirror
In the file bcnm.lua there are some comments concerning multiple event update packets. Is there any way to cycle through these until you get a value that is not 255 or 0?