From 8fa081b6b4ad26851f3ab8f485ba76f3e4338762 Mon Sep 17 00:00:00 2001 From: Ibrahim Zidan Date: Wed, 17 Apr 2019 07:29:18 +0200 Subject: Implement Refinery UI Signed-off-by: Ibrahim Zidan --- npc/re/merchants/hd_refiner.txt | 11 +++++++++++ npc/re/merchants/refine.txt | 11 +++++++++++ npc/re/merchants/shadow_refiner.txt | 10 ++++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) (limited to 'npc/re') diff --git a/npc/re/merchants/hd_refiner.txt b/npc/re/merchants/hd_refiner.txt index 17979642e..2dcc74bae 100644 --- a/npc/re/merchants/hd_refiner.txt +++ b/npc/re/merchants/hd_refiner.txt @@ -39,6 +39,17 @@ //== Blacksmith Mighty Hammer (+7~9) ======================= - script ::MightyHammer FAKE_NPC,{ + mes("[Blacksmith Mighty Hammer]"); + mes("I'm a blacksmith skilled in refining weapons and armors."); + mes("I can refine an item of your choice among the items you are equipped with."); + mes("Which item do you want to refine?"); + + if (getbattleflag("features/replace_refine_npcs") == 1) { + if (openrefineryui()) + close(); + } + next(); + disable_items; mes "[Blacksmith Mighty Hammer]"; mes "Unlike others, I am a blacksmith who refines a very limited number of items."; diff --git a/npc/re/merchants/refine.txt b/npc/re/merchants/refine.txt index 6356acfca..879e9a5f1 100644 --- a/npc/re/merchants/refine.txt +++ b/npc/re/merchants/refine.txt @@ -56,6 +56,17 @@ payon_in01,18,132,3 script Vestri#pay 4_M_DWARF,{ // On official servers, if an item is unsuccessfully refined it will break at a // 20% rate and downgrade at an 80% rate. function script refinenew { + mesf("[%s]", getarg(0)); + mes("I'm a blacksmith skilled in refining weapons and armors."); + mes("I can refine an item of your choice among the items you are equipped with."); + mes("Which item do you want to refine?"); + + if (getbattleflag("features/replace_refine_npcs") == 1) { + if (openrefineryui()) + close(); + } + next(); + disable_items; mes "["+ getarg(0) +"]"; mes "I am the best Armsmith ever!"; diff --git a/npc/re/merchants/shadow_refiner.txt b/npc/re/merchants/shadow_refiner.txt index f03d348b2..db9668b6d 100644 --- a/npc/re/merchants/shadow_refiner.txt +++ b/npc/re/merchants/shadow_refiner.txt @@ -39,11 +39,17 @@ itemmall,31,76,3 script Shadow Blacksmith#nomal 4_F_JOB_BLACKSMITH,{ .@npc_name$ = "[Shadow Blacksmith]"; .@zeny_cost = 20000; // Amount of zeny to be charged for refining. - disable_items; mesf("%s", .@npc_name$); mes("Do you want to refine a Shadow item?"); mes("Please choose the part you want to refine."); - next; + + if (getbattleflag("features/replace_refine_npcs") == 1) { + if (openrefineryui()) + close(); + } + next(); + + disable_items; setarray(.@position$[0],"Armor","Weapon","Shield","Shoes","Earring","Pendant"); for (.@i=EQI_SHADOW_ARMOR; .@i <= EQI_SHADOW_ACC_L; .@i++){ .@menu$ = .@menu$ + (getequipisequiped(.@i) ? getequipname(.@i) : ("^8C8C8C" + .@position$[.@i-EQI_SHADOW_ARMOR] + " [Not Equipped]^000000" + ":")); -- cgit v1.2.3-60-g2f50