diff options
Diffstat (limited to 'npc')
-rw-r--r-- | npc/custom/events/mushroom_event.txt | 2 | ||||
-rw-r--r-- | npc/merchants/advanced_refiner.txt | 19 | ||||
-rw-r--r-- | npc/merchants/hd_refine.txt | 15 | ||||
-rw-r--r-- | npc/merchants/refine.txt | 17 | ||||
-rw-r--r-- | npc/other/Global_Functions.txt | 23 | ||||
-rw-r--r-- | npc/re/instances/OldGlastHeim.txt | 4 | ||||
-rw-r--r-- | npc/re/instances/ghost_palace.txt | 2 | ||||
-rw-r--r-- | npc/re/merchants/hd_refiner.txt | 11 | ||||
-rw-r--r-- | npc/re/merchants/refine.txt | 11 | ||||
-rw-r--r-- | npc/re/merchants/shadow_refiner.txt | 10 |
10 files changed, 94 insertions, 20 deletions
diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt index b04b99fff..fc7446814 100644 --- a/npc/custom/events/mushroom_event.txt +++ b/npc/custom/events/mushroom_event.txt @@ -41,7 +41,7 @@ OnMinute10: // Start time (every hour) set .status,1; set .Spawn,rand(1,10); // How many Mushrooms should spawn? set .Map$,.maps$[rand(getarraysize(.maps$))]; - killmonster .Map$,"All"; + killmonster(.Map$, "all"); monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(NPC_NAME)+"::OnMobKilled"; announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0; sleep 2500; diff --git a/npc/merchants/advanced_refiner.txt b/npc/merchants/advanced_refiner.txt index 9632f95f7..ec263e192 100644 --- a/npc/merchants/advanced_refiner.txt +++ b/npc/merchants/advanced_refiner.txt @@ -44,14 +44,19 @@ //========================================================================= payon,157,146,6 script Suhnbi#cash 4_M_03,{ - disable_items; - mes "[Suhnbi]"; - mes "I am the Armsmith"; - mes "I can refine all kinds of weapons,"; - mes "armor and equipment, so let me"; - mes "know what you want to refine."; - next; + mes("[Suhnbi]"); + mes("I am the Armsmith"); + mes("I can refine all kinds of weapons,"); + mes("armor and equipment, so let me"); + mes("know what you want to refine."); + if (getbattleflag("features/replace_refine_npcs") == 1) { + if (openrefineryui()) + close(); + } + next(); + + disable_items; setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; .@menu$ = ""; for(.@i = 1; .@i<=10; ++.@i) { diff --git a/npc/merchants/hd_refine.txt b/npc/merchants/hd_refine.txt index a7fc5e922..1a5a43621 100644 --- a/npc/merchants/hd_refine.txt +++ b/npc/merchants/hd_refine.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."; @@ -179,6 +190,10 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 4_M_DWARF //== Basta (+10 and up) ==================================== - script ::Basta FAKE_NPC,{ + if (getbattleflag("features/replace_refine_npcs") == 1) { + if (openrefineryui()) + end(); + } disable_items; mes "[Basta]"; mes "I'm the best Blacksmith in the whole world, Basta."; diff --git a/npc/merchants/refine.txt b/npc/merchants/refine.txt index 7f1b4d9a3..19ebf4a8e 100644 --- a/npc/merchants/refine.txt +++ b/npc/merchants/refine.txt @@ -589,14 +589,19 @@ lhz_in02,282,20,7 script Fulerr 4_M_LGTMAN,{ // If you enable this function, be sure to edit the value of .@safe to the max // safe refine in refine_db.txt as well. function script refinemain { + mesf("[%s]", getarg(0)); + mes("I'm the Armsmith."); + mes("I can refine all kinds of weapons, armor and equipment, so let me"); + mes("know what you want me to refine."); + + if (getbattleflag("features/replace_refine_npcs") == 1) { + if (openrefineryui()) + close(); + } + next(); + disable_items; .@features = getarg(1); - mes "[" + getarg(0) + "]"; - mes "I'm the Armsmith."; - mes "I can refine all kinds of weapons, armor and equipment, so let me"; - mes "know what you want me to refine."; - next; - setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; .@menu$ = ""; for(.@i = 1; .@i <= 10; ++.@i) { diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index 86332e931..e3741b495 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -434,7 +434,7 @@ function script F_ShuffleNumbers { //== Function F_MesColor =================================== // Function to colorize npc dialog without having to memorize the color code // Examples: -// mes callfunc("F_MesColor", C_BLUE) +"This message is now in BLUE"; +// mesf("%sThis message is now in BLUE.", F_MesColor(C_BLUE)); function script F_MesColor { return sprintf("^%06X", min(getarg(0), 0xFFFFFF)); } @@ -467,3 +467,24 @@ function script F_GetTradeRestriction { .@trade$ += "NoAuction|"; return .@trade$; } + +//== Function F_MesItemInfo =================================== +// Show the item name and a clickable link for the item description +// Only works with mes and mesf, does not work in menu/select +function script F_MesItemInfo { + .@item = getarg(0); + .@itemname$ = getitemname(.@item); + if (.@itemname$ != "null") { + .@itemslot = getitemslots(.@item); + if (.@itemslot) + .@itemname$ = sprintf("%s [%d]", .@itemname$, .@itemslot); + } + else + .@itemname$ = "Unknown Item"; + if (PACKETVER >= 20150729) + return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item); + else if (PACKETVER >= 20130130) + return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item); + else + return .@itemname$; +} diff --git a/npc/re/instances/OldGlastHeim.txt b/npc/re/instances/OldGlastHeim.txt index 44b5f1e61..ec0efeb53 100644 --- a/npc/re/instances/OldGlastHeim.txt +++ b/npc/re/instances/OldGlastHeim.txt @@ -2744,7 +2744,7 @@ glast_01,188,273,5 script White Knight#1a 4_WHITEKNIGHT,{ close(); } mes("I exchange you a White Knight Card for ^0000FF3000 Coagulated Spell^000000 or ^FF000070 Contaminated Magic^000000."); - mes("<ITEMLINK>White Knight Card<INFO>4608</INFO></ITEMLINK>"); + mes(F_MesItemInfo(White_Knightage_Card)); next(); setarray(.@item[0], Coagulated_Spell, Corrupted_Charm); setarray(.@cost[0], 3000, 70); @@ -2777,7 +2777,7 @@ glast_01,192,273,3 script Khalitzburg Knight#1a 4_F_KHALITZBURG,{ close(); } mes("I exchange you a Khalitzburg Knight Card for ^0000FF5000 Coagulated Spell^000000 or ^FF0000100 Contaminated Magic^000000."); - mes("<ITEMLINK>Khalitzburg Knight Card<INFO>4609</INFO></ITEMLINK>"); + mes(F_MesItemInfo(Khali_Knightage_Card)); next(); setarray(.@item[0], Coagulated_Spell, Corrupted_Charm); setarray(.@cost[0], 5000, 100); diff --git a/npc/re/instances/ghost_palace.txt b/npc/re/instances/ghost_palace.txt index 3e708dc57..a291984db 100644 --- a/npc/re/instances/ghost_palace.txt +++ b/npc/re/instances/ghost_palace.txt @@ -601,7 +601,7 @@ OnInstanceInit: OnStart: stopnpctimer instance_npcname("#gp3control"); disablenpc(instance_npcname("#gp3control")); - killmonster(instance_mapname("1@spa"), "All"); + killmonster(instance_mapname("1@spa"), "all"); disablenpc(instance_npcname("#gp3warp")); enablenpc(instance_npcname("Lurid Royal Guard#gp5")); enablenpc(instance_npcname("Tiara Princess#gp5")); 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" + ":")); |