Jump to content
  • 0

R> Default kafra with identify


Question

13 answers to this question

Recommended Posts

  • 0
Posted

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

  • MVP 1
  • 0
Posted
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

  • 0
Posted
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.

  • 0
Posted
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.

  • 0
Posted
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.

  • 0
Posted
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

  • 0
Posted

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

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...