ADMSarah Posted June 9, 2024 Posted June 9, 2024 May I request a kafra NPC (default one) with an identify on the choices with 100z per item cost? Quote
0 Racaae Posted July 5, 2024 Posted July 5, 2024 Hi, find in \npc\kafras\functions_kafras.txt .@menu$ = implode(.@K_Menu0$,":"); And insert above it: .@s = getarraysize(.@K_Menu0$); .@K_Menu0$[.@s] = .@K_Menu0$[.@s-1]; .@K_Menu0$[.@s-1] = "Identify items (100z each)"; Find: else if (.@K_Menu0$[.@j] == "Use Guild Storage") { callfunc "F_KafStor",1,0; next; } And insert below it: else if (.@K_Menu0$[.@j] == "Identify items (100z each)") { callfunc "F_KafIdentify"; next; } Also insert this at the end of the file: //=================================================== // Identify Items Function //=================================================== function script F_KafIdentify { .@zeny = 100; .@i = identifyall(false); mes "[Kafra Employee]"; mes "The cost for identify each item is " + .@zeny + "z."; if (.@i) { mes "You have " + F_InsertPlural(.@i, "unidentified item") + "."; mes "Are you sure you want to pay ^0000FF" + .@zeny * .@i + "z^000000?"; next; if(select("Yes.", "No, I changed my mind.") == 1) { if (Zeny < .@zeny * .@i) { mes "[Kafra Employee]"; mes "I'm sorry, but you don't have enough zeny."; return; } Zeny -= .@zeny * .@i; identifyall; mes "[Kafra Employee]"; mes "All your items have been identified."; mes "Thank you for using the Kafra Services!"; } } else mes "You have no unidentified items in your inventory."; return; } Or just replace the whole file:functions_kafras.txt 1 Quote
0 ADMSarah Posted July 5, 2024 Author Posted July 5, 2024 6 hours ago, Racaae said: Hi, find in \npc\kafras\functions_kafras.txt .@menu$ = implode(.@K_Menu0$,":"); And insert above it: .@s = getarraysize(.@K_Menu0$); .@K_Menu0$[.@s] = .@K_Menu0$[.@s-1]; .@K_Menu0$[.@s-1] = "Identify items (100z each)"; Find: else if (.@K_Menu0$[.@j] == "Use Guild Storage") { callfunc "F_KafStor",1,0; next; } And insert below it: else if (.@K_Menu0$[.@j] == "Identify items (100z each)") { callfunc "F_KafIdentify"; next; } Also insert this at the end of the file: //=================================================== // Identify Items Function //=================================================== function script F_KafIdentify { .@zeny = 100; .@i = identifyall(false); mes "[Kafra Employee]"; mes "The cost for identify each item is " + .@zeny + "z."; if (.@i) { mes "You have " + F_InsertPlural(.@i, "unidentified item") + "."; mes "Are you sure you want to pay ^0000FF" + .@zeny * .@i + "z^000000?"; next; if(select("Yes.", "No, I changed my mind.") == 1) { if (Zeny < .@zeny * .@i) { mes "[Kafra Employee]"; mes "I'm sorry, but you don't have enough zeny."; return; } Zeny -= .@zeny * .@i; identifyall; mes "[Kafra Employee]"; mes "All your items have been identified."; mes "Thank you for using the Kafra Services!"; } } else mes "You have no unidentified items in your inventory."; return; } Or just replace the whole file:functions_kafras.txt Thanks mate Quote
0 ADMSarah Posted July 5, 2024 Author Posted July 5, 2024 6 hours ago, Racaae said: Hi, find in \npc\kafras\functions_kafras.txt .@menu$ = implode(.@K_Menu0$,":"); And insert above it: .@s = getarraysize(.@K_Menu0$); .@K_Menu0$[.@s] = .@K_Menu0$[.@s-1]; .@K_Menu0$[.@s-1] = "Identify items (100z each)"; Find: else if (.@K_Menu0$[.@j] == "Use Guild Storage") { callfunc "F_KafStor",1,0; next; } And insert below it: else if (.@K_Menu0$[.@j] == "Identify items (100z each)") { callfunc "F_KafIdentify"; next; } Also insert this at the end of the file: //=================================================== // Identify Items Function //=================================================== function script F_KafIdentify { .@zeny = 100; .@i = identifyall(false); mes "[Kafra Employee]"; mes "The cost for identify each item is " + .@zeny + "z."; if (.@i) { mes "You have " + F_InsertPlural(.@i, "unidentified item") + "."; mes "Are you sure you want to pay ^0000FF" + .@zeny * .@i + "z^000000?"; next; if(select("Yes.", "No, I changed my mind.") == 1) { if (Zeny < .@zeny * .@i) { mes "[Kafra Employee]"; mes "I'm sorry, but you don't have enough zeny."; return; } Zeny -= .@zeny * .@i; identifyall; mes "[Kafra Employee]"; mes "All your items have been identified."; mes "Thank you for using the Kafra Services!"; } } else mes "You have no unidentified items in your inventory."; return; } Or just replace the whole file:functions_kafras.txt I tested but the kafras don't have an option for refine. Quote
0 ADMSarah Posted July 5, 2024 Author Posted July 5, 2024 I tried to add the function as well on kafras.txt but still doesn't shows any options Quote
0 Racaae Posted July 6, 2024 Posted July 6, 2024 9 hours ago, Questune said: I tested but the kafras don't have an option for refine. Refine? Do you mean identify? 8 hours ago, Questune said: I tried to add the function as well on kafras.txt but still doesn't shows any options Any warning on the map-server console? Which Kafra NPC you talking? This should work only on the default/commom ones. Quote
0 ADMSarah Posted July 6, 2024 Author Posted July 6, 2024 29 minutes ago, Racaae said: Refine? Do you mean identify? Any warning on the map-server console? Which Kafra NPC you talking? This should work only on the default/commom ones. Sorry for the confusion ahaha It is identify. There's no error on the console either. Quote
0 Racaae Posted July 6, 2024 Posted July 6, 2024 It's working fine here. Could you share your \npc\kafras\functions_kafras.txt? Quote
0 ADMSarah Posted July 6, 2024 Author Posted July 6, 2024 (edited) 5 hours ago, Racaae said: It's working fine here.functions_kafras.txt Could you share your \npc\kafras\functions_kafras.txt? Here's my kafra functions Edited July 6, 2024 by Questune Quote
0 ADMSarah Posted July 6, 2024 Author Posted July 6, 2024 On 7/5/2024 at 5:27 PM, Racaae said: Hi, find in \npc\kafras\functions_kafras.txt .@menu$ = implode(.@K_Menu0$,":"); And insert above it: .@s = getarraysize(.@K_Menu0$); .@K_Menu0$[.@s] = .@K_Menu0$[.@s-1]; .@K_Menu0$[.@s-1] = "Identify items (100z each)"; Find: else if (.@K_Menu0$[.@j] == "Use Guild Storage") { callfunc "F_KafStor",1,0; next; } And insert below it: else if (.@K_Menu0$[.@j] == "Identify items (100z each)") { callfunc "F_KafIdentify"; next; } Also insert this at the end of the file: //=================================================== // Identify Items Function //=================================================== function script F_KafIdentify { .@zeny = 100; .@i = identifyall(false); mes "[Kafra Employee]"; mes "The cost for identify each item is " + .@zeny + "z."; if (.@i) { mes "You have " + F_InsertPlural(.@i, "unidentified item") + "."; mes "Are you sure you want to pay ^0000FF" + .@zeny * .@i + "z^000000?"; next; if(select("Yes.", "No, I changed my mind.") == 1) { if (Zeny < .@zeny * .@i) { mes "[Kafra Employee]"; mes "I'm sorry, but you don't have enough zeny."; return; } Zeny -= .@zeny * .@i; identifyall; mes "[Kafra Employee]"; mes "All your items have been identified."; mes "Thank you for using the Kafra Services!"; } } else mes "You have no unidentified items in your inventory."; return; } Or just replace the whole file:functions_kafras.txt Maybe I insert the changes into a incorrect locations when I try to get the attached file here its working perfect. Thank you so much mate for the help I didn't realized that Quote
0 ADMSarah Posted July 6, 2024 Author Posted July 6, 2024 Just have 1 problem at the moment, The NPC doesn't tell you you don't have an item to identify. After choosing to identify items Quote
Question
ADMSarah
May I request a kafra NPC (default one) with an identify on the choices with 100z per item cost?
13 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.