Jump to content
  • 0

R>Expanded Barter Shop


KazumaSatou

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  145
  • Reputation:   36
  • Joined:  05/15/20
  • Last Seen:  

Is there anyone can provide a sample of Expanded Barter Shop that looks like in the picture with multiple requirements?image

I tried to add another Index but doesn't work. Tried to add new Item and Amount without another Index but doesn't work also.
Can anyone help me make something like  in the picture? The basic barter shop works but the expanded, I have no idea how to make it work. Already searched in the forum but I didn't find anything example on how  to make expanded barter shop like this. Thanks in advance.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   68
  • Joined:  10/25/20
  • Last Seen:  

Barter Shop commit: https://github.com/rathena/rathena/commit/e40da669ed8bb3f06a503e954be51c726a249c33

Examples of how to use Barter Shop: https://github.com/rathena/rathena/blob/master/npc/re/merchants/barters/quests_17_1.yml

 

his file is a part of rAthena.
#   Copyright(C) 2022 rAthena Development Team
#   https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###########################################################################
# Barter Database
###########################################################################
#
# Barter Settings
#
###########################################################################
#  - Name               NPC name.
#    Map                Map name. (Default: not on a map)
#    X                  Map x coordinate. (Default: 0)
#    Y                  Map y coordinate. (Default: 0)
#    Direction          Direction the NPC is looking. (Default: North)
#    Sprite             Sprite name of the NPC. (Default: FakeNpc)
#    Items:             List of sold items.
#      - Index          Index of the item inside the shop. (0-...)
#                       Maximum index depends on client.
#        Item           Aegis name of the item.
#        Stock          Amount of item in stock. 0 means unlimited. (Default: 0)
#        Zeny           Cost of them item in Zeny. (Default: 0)
#        RequiredItems: List of required items (Optional)
#          - Index      Index of the required item. (0-4)
#            Item       Aegis name of required item.
#            Amount     Amount of required item. (Default: 1)
#            Refine     Refine level of required item. (Default: 0)
###########################################################################

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  145
  • Reputation:   36
  • Joined:  05/15/20
  • Last Seen:  

37 minutes ago, cook1e said:

Barter Shop commit: https://github.com/rathena/rathena/commit/e40da669ed8bb3f06a503e954be51c726a249c33

Examples of how to use Barter Shop: https://github.com/rathena/rathena/blob/master/npc/re/merchants/barters/quests_17_1.yml

 

his file is a part of rAthena.
#   Copyright(C) 2022 rAthena Development Team
#   https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###########################################################################
# Barter Database
###########################################################################
#
# Barter Settings
#
###########################################################################
#  - Name               NPC name.
#    Map                Map name. (Default: not on a map)
#    X                  Map x coordinate. (Default: 0)
#    Y                  Map y coordinate. (Default: 0)
#    Direction          Direction the NPC is looking. (Default: North)
#    Sprite             Sprite name of the NPC. (Default: FakeNpc)
#    Items:             List of sold items.
#      - Index          Index of the item inside the shop. (0-...)
#                       Maximum index depends on client.
#        Item           Aegis name of the item.
#        Stock          Amount of item in stock. 0 means unlimited. (Default: 0)
#        Zeny           Cost of them item in Zeny. (Default: 0)
#        RequiredItems: List of required items (Optional)
#          - Index      Index of the required item. (0-4)
#            Item       Aegis name of required item.
#            Amount     Amount of required item. (Default: 1)
#            Refine     Refine level of required item. (Default: 0)
###########################################################################

 

 

I checked the script but I didn't see multiple currency in the script. I already tried the single currency and it works. I need now is the multiple currency like in the first post's picture.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  171
  • Reputation:   68
  • Joined:  10/25/20
  • Last Seen:  

With multiple currencies you mean this?
 

  - Name: shop_sp_cor
    Items:
      - Index: 0
        Item: Teleport_Ep17_01
        RequiredItems:
          - Index: 0
            Item: EP17_1_EVT02
            Amount: 1
          - Index: 1
            Item: Hat_
            Amount: 1
            Refine: 7
          - Index: 2
            Item: Dagger_
            Amount: 1
            Refine: 10
          - Index: 3
            Item: Jellopy
            Amount: 100


To buy the Item Teleport_Ep17_01 you will need the following.

1x EP17_1_EV02
1x Hat[1] +7
1x Dagger[3] +10
100x Jellopy

I'm sorry but i can't send you a screenshot since i don't have Visual Studio SDK 10 at the moment to compile the latest rAthena.

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

@cook1e Hey, on these examples, NPCs are not specified, been trying to locate on how to access these npcs. if it's not specified, how can we access them? very new to barter system and exploring it, thank you!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

2 hours ago, cook1e said:

Sorry what I meant was, if the Map, X, and Y is not specified, like the example on re/merchants. where can this data/npc located in game? is there an official barter NPC or command to access this in game if the map/location of npc is not set manually?

- Name: shop_sp_cor
    Items:
      - Index: 0
        Item: Teleport_Ep17_01
        RequiredItems:
          - Index: 0
            Item: EP17_1_EVT02
            Amount: 1
          - Index: 1
            Item: Hat_
            Amount: 1
            Refine: 7
          - Index: 2
            Item: Dagger_
            Amount: 1
            Refine: 10
          - Index: 3
            Item: Jellopy
            Amount: 100

 

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  12/22/22
  • Last Seen:  

On 7/17/2022 at 7:22 PM, RagnaTechDev said:

Sorry what I meant was, if the Map, X, and Y is not specified, like the example on re/merchants. where can this data/npc located in game? is there an official barter NPC or command to access this in game if the map/location of npc is not set manually?

- Name: shop_sp_cor
    Items:
      - Index: 0
        Item: Teleport_Ep17_01
        RequiredItems:
          - Index: 0
            Item: EP17_1_EVT02
            Amount: 1
          - Index: 1
            Item: Hat_
            Amount: 1
            Refine: 7
          - Index: 2
            Item: Dagger_
            Amount: 1
            Refine: 10
          - Index: 3
            Item: Jellopy
            Amount: 100

 

Have you figure this out yet? I tries to find there location too!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  121
  • Reputation:   6
  • Joined:  09/26/14
  • Last Seen:  

sample in /npc/custom/barter.yml.

# This file is a part of rAthena.
#   Copyright(C) 2022 rAthena Development Team
#   https://rathena.org - https://github.com/rathena
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###########################################################################
# Barter Database
###########################################################################
#
# Barter Settings
#
###########################################################################
#  - Name               NPC name.
#    Map                Map name. (Default: not on a map)
#    X                  Map x coordinate. (Default: 0)
#    Y                  Map y coordinate. (Default: 0)
#    Direction          Direction the NPC is looking. (Default: North)
#    Sprite             Sprite name of the NPC. (Default: FakeNpc)
#    Items:             List of sold items.
#      - Index          Index of the item inside the shop. (0-...)
#                       Maximum index depends on client.
#        Item           Aegis name of the item.
#        Stock          Amount of item in stock. 0 means unlimited. (Default: 0)
#        Zeny           Cost of them item in Zeny. (Default: 0)
#        RequiredItems: List of required items (Optional)
#          - Index      Index of the required item. (0-4)
#            Item       Aegis name of required item.
#            Amount     Amount of required item. (Default: 1)
#            Refine     Refine level of required item. (Default: 0)
###########################################################################

Header:
  Type: BARTER_DB
  Version: 1


Body:
  - Name: barter_refine_11
    Map: prontera
    X: 150
    Y: 150
    Direction: South
    Sprite: 1_etc_01
    Items:
      - Index: 0
        Item: Oridecon
        RequiredItems:
          - Index: 0
            Item: Oridecon_Stone
            Amount: 5
      - Index: 1
        Item: Elunium
        RequiredItems:
          - Index: 0
            Item: Elunium_Stone
            Amount: 5
      - Index: 2
        Item: Bradium
        Zeny: 50000
        RequiredItems:
          - Index: 0
            Item: Oridecon
            Amount: 3
      - Index: 3
        Item: Carnium
        Zeny: 50000
        RequiredItems:
          - Index: 0
            Item: Elunium
            Amount: 3
      - Index: 4
        Item: Carnium
        Zeny: 50000
        RequiredItems:
          - Index: 0
            Item: Purified_Bradium

image.png.9f762c3eb772dc4aac1db0a51e5362b6.png

image.png.08987c587420931cc047b85be50d3070.png

Edited by mawjustin
Added npc image
  • Upvote 1
  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

does this barter system auto refill the item?

like the limited stock of 50 will replenish?

#TIA

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  11/21/13
  • Last Seen:  

Sorry for my fool necromancy, but I like to follow up related topics and questions on the same topic, for further repository for other fellow devs.

Ok, back on topic, can the Barter Shops from their DB be called by the CallShop function?

```*callshop "<name>"{,<option>};```

 

Thanks in advance, mates.

Edited by Karas
Typo
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...