Jump to content
  • 0

Adding select menu before buying in barter shop


Question

Posted

I want to show the confirm menu before buying in the barter shop.

I tried to use:

clif_scriptmenu(&sd, barter->npcid, "yes:no");

but I have no idea how to wait the player select the menu and use that option.

the result is the client show the select menu, but it starts to buy the item from barter shop. I want the client to wait for player to select "yes" or "no" before start buying from shop.

 

Thanks in advance.

 

3 answers to this question

Recommended Posts

  • 0
Posted (edited)
1 hour ago, oukiii said:

I want to show the confirm menu before buying in the barter shop.

I tried to use:

clif_scriptmenu(&sd, barter->npcid, "yes:no");

but I have no idea how to wait the player select the menu and use that option.

the result is the client show the select menu, but it starts to buy the item from barter shop. I want the client to wait for player to select "yes" or "no" before start buying from shop.

 

Thanks in advance.

 

check at \npc\re\merchants\Extended_Ammunition.txt

barter setting at npc\re\merchants\barters\Extended_Ammunition.yml

Edited by hendra814
  • 0
Posted

@hendra814

Thanks for your answer :). But I want the select menu show after player buy some item.

Example:

- Player buy "Apple" with "Jellopy" and "10 zeny"

- Client show the select menu with dialog "Buy 1x Apple with 1x Jellopy. 10z. Are you sure?" and select option is "yes" and "no"

- If player select yes then continue the purchase event.

- If player select "no" then exit the npc_barter_purchase function.

  • 0
Posted
59 minutes ago, oukiii said:

@hendra814

Thanks for your answer :). But I want the select menu show after player buy some item.

Example:

- Player buy "Apple" with "Jellopy" and "10 zeny"

- Client show the select menu with dialog "Buy 1x Apple with 1x Jellopy. 10z. Are you sure?" and select option is "yes" and "no"

- If player select yes then continue the purchase event.

- If player select "no" then exit the npc_barter_purchase function.

oo i see, thanks for the confirmation,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...