NPC Menu option

Post Reply
dragonarmor
Posts: 36
Joined: Sat Feb 21, 2015 10:08 am

NPC Menu option

Post by dragonarmor » Sun Dec 10, 2017 9:50 am

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

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: NPC Menu option

Post by TeoTwawki » Sun Dec 10, 2017 2:02 pm

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.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

dragonarmor
Posts: 36
Joined: Sat Feb 21, 2015 10:08 am

Re: NPC Menu option

Post by dragonarmor » Sun Dec 10, 2017 5:06 pm

Do you know how to find the correct codes? that's where i'm stuck. Thanks

Post Reply