Added barter npcs to sell/exchange refine ore (#6993)

Thanks to @il3ol2ed @Pokye !
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
This commit is contained in:
Atemo 2022-06-02 15:03:29 +02:00 committed by GitHub
parent 4aba94ca01
commit 54a3724c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 343 additions and 4 deletions

View File

@ -18483,7 +18483,7 @@ Body:
Flags:
BuyingStore: true
- Id: 6327
AegisName: Limited_High_Density_Bradium
AegisName: LI_HD_Bradium
Name: (Limited)High Density Bradium
Type: Etc
Buy: 20
@ -23063,7 +23063,7 @@ Body:
NoMail: true
NoAuction: true
- Id: 6906
AegisName: Limited_High_Density_Kalunium
AegisName: LI_HD_Carnium
Name: (Limited)High Density Kalunium
Type: Etc
Buy: 20
@ -23111,7 +23111,7 @@ Body:
NoMail: true
NoAuction: true
- Id: 6910
AegisName: Limited_Purified_Oridecon
AegisName: LI_HD_Oridecon
Name: (Limited) Purified Oridecon
Type: Etc
Buy: 10
@ -23125,7 +23125,7 @@ Body:
NoMail: true
NoAuction: true
- Id: 6911
AegisName: Limited_Purified_Eluminium
AegisName: LI_HD_Elunium
Name: (Limited) Purified Eluminium
Type: Etc
Buy: 10

View File

@ -51,3 +51,4 @@ Footer:
- Path: npc/re/merchants/barters/quests_16_1.yml
- Path: npc/re/merchants/barters/quests_16_2.yml
- Path: npc/re/merchants/barters/quests_17_1.yml
- Path: npc/re/merchants/barters/refine.yml

View File

@ -0,0 +1,222 @@
# 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_1
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
- Name: barter_refine_2
Items:
- Index: 0
Item: Ethernium
Zeny: 10000
RequiredItems:
- Index: 0
Item: Etel_Dust
- Index: 1
Item: Elunium
- Index: 1
Item: Etherdeocon
Zeny: 10000
RequiredItems:
- Index: 0
Item: Etel_Dust
- Index: 1
Item: Oridecon
- Index: 2
Item: Etel_Bradium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: Bradium
- Index: 3
Item: Etel_Carnium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: Carnium
- Index: 4
Item: Enriched_Ethernium
Zeny: 20000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 2
- Index: 1
Item: Enriched_Elunium
- Index: 5
Item: Enriched_Etherdeocon
Zeny: 20000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 2
- Index: 1
Item: Enriched_Oridecon
- Index: 6
Item: HD_Ethernium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: HD_Elunium
- Index: 7
Item: HD_Etherdeocon
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: HD_Oridecon
- Index: 8
Item: HD_Ethernium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: LI_HD_Elunium
- Index: 9
Item: HD_Etherdeocon
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: LI_HD_Oridecon
- Index: 10
Item: HD_Etel_Bradium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: HD_Bradium
- Index: 11
Item: HD_Etel_Carnium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: HD_Carnium
- Index: 12
Item: HD_Etel_Bradium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: LI_HD_Bradium
- Index: 13
Item: HD_Etel_Carnium
Zeny: 50000
RequiredItems:
- Index: 0
Item: Etel_Dust
Amount: 3
- Index: 1
Item: LI_HD_Carnium
- Name: barter_refine_3
Items:
- Index: 0
Item: Shadowdecon
RequiredItems:
- Index: 0
Item: Shadowdecon_Ore
Amount: 20
- Index: 1
Item: Zelunium
RequiredItems:
- Index: 0
Item: Zelunium_Ore
Amount: 20

View File

@ -17,6 +17,7 @@
//= 1.3 Updated to match the latest official script. [Euphy]
//= 1.4 Added correct safe refines. [Haruna]
//= 1.5 Added Refine UI [Atemo, Lemongrass]
//= 1.6 Added Barter exchange npcs [Atemo]
//============================================================
// +11 and above Refiners
@ -582,3 +583,118 @@ malangdo,224,172,6 script Clink#mal_normal 544,{
mes "What a day!!";
close;
}
// Renewal barter shops
- script refine_barter_init -1,{
end;
OnInit:
if (getbattleflag("feature.barter")) {
unloadnpc "Vurewell";
unloadnpc "Begnahd";
unloadnpc "Sade";
unloadnpc "Kahlamanlith";
unloadnpc "Dilemma";
unloadnpc "Tirehaus";
unloadnpc "Krugg";
unloadnpc "Hakhim";
unloadnpc "Abdula";
unloadnpc "Xenophon";
unloadnpc "Delight";
unloadnpc "Matestein";
unloadnpc "Fruel";
npcshopupdate "market_refine_prt_in",1010,200,999999;
npcshopupdate "market_refine_payon",1010,200,999999;
npcshopupdate "market_refine_morocc_in",1010,200,999999;
npcshopupdate "market_refine_alberta_in",1010,200,999999;
npcshopupdate "market_refine_yuno_in01",1010,200,999999;
npcshopupdate "market_refine_ein_in01",1010,200,999999;
npcshopupdate "market_refine_lhz_in02",1010,200,999999;
npcshopupdate "market_refine_prt_in",1011,1000,999999;
npcshopupdate "market_refine_payon",1011,1000,999999;
npcshopupdate "market_refine_morocc_in",1011,1000,999999;
npcshopupdate "market_refine_alberta_in",1011,1000,999999;
npcshopupdate "market_refine_yuno_in01",1011,1000,999999;
npcshopupdate "market_refine_ein_in01",1011,1000,999999;
npcshopupdate "market_refine_lhz_in02",1011,1000,999999;
}
else {
unloadnpc "market_refine_prt_in";
unloadnpc "market_refine_payon";
unloadnpc "market_refine_morocc_in";
unloadnpc "market_refine_alberta_in";
unloadnpc "market_refine_yuno_in01";
unloadnpc "market_refine_ein_in01";
unloadnpc "market_refine_lhz_in02";
unloadnpc "Dietrich#ns_prt";
unloadnpc "Pauline";
}
end;
}
- marketshop market_refine_prt_in -1,1010:-1:999999,1011:-1:999999
- marketshop market_refine_payon -1,1010:-1:999999,1011:-1:999999
- marketshop market_refine_morocc_in -1,1010:-1:999999,1011:-1:999999
- marketshop market_refine_alberta_in -1,1010:-1:999999,1011:-1:999999
- marketshop market_refine_yuno_in01 -1,1010:-1:999999,1011:-1:999999
- marketshop market_refine_ein_in01 -1,1010:-1:999999,1011:-1:999999
- marketshop market_refine_lhz_in02 -1,1010:-1:999999,1011:-1:999999
prt_in,63,69,3 script Dietrich#ns_prt 4_M_02,{
mes "[" + strnpcinfo(1) + "]";
mes "We sell and exchange various ores used in smelting.";
next;
switch( select( "View basic smelting ores", "View advanced smelting ores", "View Ether smelting ores", "Cancel" ) ) {
case 1:
mes "[" + strnpcinfo(1) + "]";
mes "Phracon and Emveretarcon are available for use in smelting low-level weapons.";
close2;
callshop "market_refine_" + strnpcinfo(4);
end;
case 2:
mes "[" + strnpcinfo(1) + "]";
mes "We are purifying Elunium Stone or Oridecon Stone, or exchanging them with Bradium or Carnium.";
close2;
callshop "barter_refine_1";
end;
case 3:
mes "[" + strnpcinfo(1) + "]";
mes "We add Etel Dust to existing smelting ores and replace them with Ether-bearing smelting ores.";
close2;
callshop "barter_refine_2";
end;
case 4:
mes "[" + strnpcinfo(1) + "]";
mes "If you lack the materials used for smelting, come anytime.";
close;
}
end;
OnInit:
setunittitle getnpcid(0), "<Responsible for smelting products>";
end;
}
payon,137,178,5 duplicate(Dietrich#ns_prt) Hakhim#2 4_M_ORIENT01
morocc_in,72,32,3 duplicate(Dietrich#ns_prt) Abdula#2 4W_M_03
alberta_in,21,63,5 duplicate(Dietrich#ns_prt) Xenophon#ns_albe 4_M_02
yuno_in01,164,27,4 duplicate(Dietrich#ns_prt) Delight#2 4_M_ORIENT01
ein_in01,18,82,5 duplicate(Dietrich#ns_prt) Matestein#2 4_M_02
lhz_in02,281,24,5 duplicate(Dietrich#ns_prt) Fruel#2 4_M_02
// Shadowdecon/Zelunium exchange npcs
prt_in,64,57,3 script Pauline 4_M_02,{
mes "[" + strnpcinfo(1) + "]";
mes "Do you have <ITEM>[Shadowdecon Gemstone]<INFO>25728</INFO></ITEM> or <ITEM>[Zelunium Gemstone]<INFO>25730</INFO></ITEM>?";
mes "We will exchange them for refined products for use as smelting goods.";
close2;
callshop "barter_refine_3";
end;
}
payon,142,179,3 duplicate(Pauline) Jihu 4_M_ORIENT01
morocc_in,64,37,3 duplicate(Pauline) Marik 4W_M_03
alberta_in,24,63,5 duplicate(Pauline) Satana 4_M_02
yuno_in01,164,31,6 duplicate(Pauline) Dimir 4_M_ORIENT01
lhz_in02,275,23,5 duplicate(Pauline) Nemil 4_M_02
ein_in01,30,88,5 duplicate(Pauline) Galan 4_M_02