Page 1 of 1

NPC Menu option

Posted: Sun Dec 10, 2017 9:50 am
by dragonarmor
I am working on Isakoth Npc in Basktok Markets. How is the option == Menu number calculated? How do I find this number? looking at the Cruor Prospector code, I see 10 items on page one. Isakoth has 15 items on page 1.

Code: Select all

function onEventFinish(player,csid,option)
    -- printf("CSID: %u",csid);
    -- printf("RESULT: %u",option);
    local Price = 0;
    local ItemID = 0;
    local Quantity = 1;

    -- Items Page 1
    if (option == 65537) then -- Perle Salade
        Price = 4000;
        ItemID = 11503;
    elseif (option == 131073) then -- Perle Hauberk
        Price = 5000;
        ItemID = 13759;
    elseif (option == 196609) then -- Perle Moufles

Re: NPC Menu option

Posted: Sun Dec 10, 2017 2:02 pm
by TeoTwawki
each npc can have entirely different option codes for their events - most npc's do not use the same stuff as some random npc in a different zone. You can expect other cruor prospectors to be similar, but some npc in bastok won't work the same way.

Re: NPC Menu option

Posted: Sun Dec 10, 2017 5:06 pm
by dragonarmor
Do you know how to find the correct codes? that's where i'm stuck. Thanks