Jump to content
  • 0

Adding select menu before buying in barter shop


oukiii

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/21/22
  • Last Seen:  

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.

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1190
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  08/21/22
  • Last Seen:  

@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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  1190
  • Reputation:   161
  • Joined:  06/12/12
  • Last Seen:  

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,

Link to comment
Share on other sites

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.

×
×
  • Create New...