Jump to content
  • 0
Rivers

Refiner NPC won't read Requirements

Question

Good day,
The refiner NPC I added won't read my items, I've tried everything I can think of to fix it but nothing works. Any thoughts?
 

//===== rAthena Script ======================================= 
//============================================================
//============================================================
// +11 and above Refiners
//============================================================
veil,111,199,5	script	Vestri#prt	826,{
	callfunc "refinenew","Vestri",0;
	end;
}
morocc_in,64,41,5	script	Vestri#moc	826,{
	callfunc "refinenew","Vestri",0;
	end;
}
payon_in01,18,132,3	script	Vestri#pay	826,{
	callfunc "refinenew","Vestri",0;
	end;
}

//============================================================
// +11 and above Refiner Function
//============================================================
//= To allow auto safe refining/multiple refining set the
//= second argument to '1' in the function call.
//= If you enable this function, be sure to edit the value of
//= [email protected] to the max safe refine in refine_db.txt as well.
//=
//= 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	{
	[email protected]_name$ = getarg(0);
	disable_items;
	mes "["+ [email protected]_name$ +"]";
	mes "I am the best Armsmith ever!";
	mes "I don't refine normal, boring items.";
	mes "I only refine items that are Level 10 or higher.";
	next;
	mes "["+ [email protected]_name$ +"]";
	mes "Anyway, you may use my services if your item is Level 10 or higher.";
	mes "What do you want me to refine?";
	next;

	setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
	for([email protected] = 1; [email protected]<=10; [email protected]) {
		if (getequipisequiped([email protected][[email protected]])) {
			[email protected]$ = [email protected]$ + F_getpositionname([email protected][[email protected]]) + "-[" + getequipname([email protected][[email protected]]) + "]";
			[email protected] = 1;
		}
		[email protected]$ = [email protected]$ + ":";
	}
	if ([email protected] == 0) {
		mes "["+ [email protected]_name$ +"]";
		mes "I don't think I can refine any items you have...";
		close;
	}
	[email protected] = [email protected][ select([email protected]$) ];

	if (!getequipisequiped([email protected])) { //custom check
		mes "["+ [email protected]_name$ +"]";
		mes "You're not wearing";
		mes "anything there that";
		mes "I can refine.";
		emotion ET_FRET;
		close;
	}
	if (!getequipisenableref([email protected])) {
		mes "["+ [email protected]_name$ +"]";
		mes "I don't think I can";
		mes "refine this item at all...";
		close;
	}
	[email protected] = getequiprefinerycnt([email protected]); //save refinery count
	if ([email protected] < 10) {
		mes "["+ [email protected]_name$ +"]";
		mes "I said I don't work with items that are lower than Level 10.";
		close;
	}
	if ([email protected] >= 20) { //custom check
		mes "["+ [email protected]_name$ +"]";
		mes "I can't refine this";
		mes "any more. This is as";
		mes "refined as it gets!";
		close;
	}
	[email protected] = getequipid([email protected]); // save id of the item
	setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_OVER10, REFINE_ZENY_COST);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_OVER10, REFINE_MATERIAL_ID);
	[email protected] = 10;

	if (getequipweaponlv([email protected]) >= 1 && getequipweaponlv([email protected]) <= 4) {
		[email protected]$ = "a";
		[email protected]$ = "weapon";
	} else {
		[email protected]$ = "an";
		[email protected]$ = "armor";
	}
	
	mes "["+ [email protected]_name$ +"]";
	mes "Hmm " + [email protected]$ + " " + [email protected]$ + ", is that ok?";
	mes "If you want to refine this armor,";
	mes "I will need 1 ^003366" + getitemname([email protected]) + "^000000 and " + callfunc("F_InsertComma",[email protected]) + " zeny.";
	mes "Are you sure you want to continue?";
	next;
	if (select("Yes:No") == 2) {
		mes "["+ [email protected]_name$ +"]";
		mes "Hm... if you mind... never mind...";
		close;
	}
	if (getarg(1) != 1) {
		if (getequippercentrefinery([email protected]) < 100) {
			mes "["+ [email protected]_name$ +"]";
			mes "This "[email protected]$+" already has been refined serveral times.";
			mes "It could be destroyed if I try again.";
			mes "It won't break for sure, but there is has a small chance.";
			next;
			mes "["+ [email protected]_name$ +"]";
			mes "You could be ^FF0000lowering the upgrade level^000000 of the "[email protected]$+",";
			mes "or if it breaks, you will lose ^FF0000any cards^000000 or special properties added to it.";
			next;
			mes "["+ [email protected]_name$ +"]";
			mes "Do you still want me to refine it?";
			mes "I think I have given you enough warning.";
			next;
			if(select("Yes.:No.") == 2) {
				mes "["+ [email protected]_name$ +"]";
				mes "Well, no challenge is one way to go...";
				mes "No risk... that could be wise.";
				close;
			}
		}
		if (countitem([email protected]) < 1 || Zeny < [email protected]) {
			mes "["+ [email protected]_name$ +"]";
			mes "Hm. You don't seem to have enough money or "+getitemname([email protected])+".";
			mes "Please come back when you have them.";
			close;
		}
		Zeny = Zeny - [email protected];
		delitem [email protected],1;

		// anti-hack
		if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) ||
		    callfunc("F_IsEquipRefineHack", [email protected], [email protected])) {
			mes "["+ [email protected]_name$ +"]";
			emotion ET_FRET;
			mes "Wait a second...";
			mes "Do you think I'm stupid?!";
			mes "You switched the item while I wasn't looking! Get out of here!";
			close;
		}

		if (getequippercentrefinery([email protected]) > rand(100)) {
			mes "Clang! Clang! Clang! Clang!";
			successrefitem [email protected];
			next;
			emotion ET_BEST;
			mes "["+ [email protected]_name$ +"]";
			mes "Good! Succes!!!";
			mes "I am the best Armsmith.";
			close;
		} else {
			if (rand(100) < 80) {
				mes "["+ [email protected]_name$ +"]";
				mes "Clang! Clang! Clang! Clang!";
				downrefitem [email protected],3; // Failed refine attempts decrease the item's refine level by 3
				next;
				emotion (!rand(5))?ET_MONEY:ET_HUK;
				mes "["+ [email protected]_name$ +"]";
				mes "Ahhh!!!";
				next;
				mes "["+ [email protected]_name$ +"]";
				mes "Oh my god!";
				mes "The upgrade level has dropped...";
			} else {
				mes "["+ [email protected]_name$ +"]";
				mes "Clang! Clang! Clang!";
				failedrefitem [email protected];
				next;
				emotion (!rand(5))?ET_MONEY:ET_HUK;
				mes "["+ [email protected]_name$ +"]";
				mes "Hmmm!";
				next;
				mes "["+ [email protected]_name$ +"]";
				mes "Oh my! I've failed to refine stuff...";
				mes "I didn't mean it!";
			}
			mes "I could have made a mistake even though I am the best Armsmith ever.";
			mes "It just wasn't meant to be.";
			next;
			mes "["+ [email protected]_name$ +"]";
			mes "I will do a better job next time! Don't worry!";
			close;
		}
	}
// New +11 and above Refining Functions ========================
	if ([email protected] < [email protected]) {
		mes "["+ [email protected]_name$ +"]";
		mes "I can refine this to the safe limit or a desired number of times. It's your choice.";
		next;
		[email protected] = select("To the safe limit, please.","I'll decide how many times.","I've changed my mind...");
	} else
		[email protected] = 2;
	switch([email protected]){
	case 1: 
		[email protected] = [email protected] - [email protected];
		break;
	case 2:
		mes "["+ [email protected]_name$ +"]";
		mes "How many times would you like me to refine your item?";
		next;
		input [email protected];
		[email protected] = [email protected] + [email protected];
		if ([email protected] < 1 || [email protected] > 20) {
			mes "["+ [email protected]_name$ +"]";
			mes "I can't refine this item that many times.";
			close;
		}
		if ([email protected] > [email protected]) {
			[email protected] = [email protected] - [email protected];
			mes "["+ [email protected]_name$ +"]";
			mes "This will try to refine the equipment " + [email protected] + " times past the safe limit. Your equipment may be destroyed... is that ok?";
			next;
			if(select("Yes...","No...") == 2){
				mes "["+ [email protected]_name$ +"]";
				mes "You said so... So be it.";
				close;
			}
		}
		break;
	case 3:
		mes "["+ [email protected]_name$ +"]";
		mes "You said so... So be it.";
		close;
	}
	[email protected] = [email protected] * [email protected];
	mes "["+ [email protected]_name$ +"]";
	mes "That will cost you " + [email protected] + " " + getitemname([email protected]) + " and " + [email protected] + " Zeny. Is that ok?";
	next;
	if(select("Yes:No...") == 2){
		mes "["+ [email protected]_name$ +"]";
		mes "You said so... So be it.";
		close;
	}
	if (countitem([email protected]) < [email protected] || Zeny < [email protected]) {
		mes "["+ [email protected]_name$ +"]";
		mes "Hm. You don't seem to have enough money or "+getitemname([email protected])+".";
		mes "Please come back when you have them.";
		close;
	}
	Zeny = Zeny - [email protected];
	delitem [email protected],[email protected];
	while([email protected]){
		if (getequipisequiped([email protected]) == 0) {
			mes "["+ [email protected]_name$ +"]";
			mes "Look here... you don't have any items on...";
			close;
		}
		// anti-hack
		if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) ||
		    callfunc("F_IsEquipRefineHack", [email protected], [email protected]))
			close;

		if (getequipid([email protected]) != [email protected] || ([email protected] == 1 && getequippercentrefinery([email protected]) < 100)) {
			mes "["+ [email protected]_name$ +"]";
			mes "Clang... No, but did you imagine I could be so stupid?!";
			mes "You changed it...";
			mes "Get out before I stun you with my Hammer!!";
			close;
		}
		if (getequippercentrefinery([email protected]) > rand(100)) {
			mes "Clang! Clang! Clang! Clang!";
			successrefitem [email protected];
			[email protected] = [email protected] - 1;
			next;
		} else {
			if (rand(100) < 80) {
				mes "["+ [email protected]_name$ +"]";
				mes "Clang! Clang! Clang! Clang!";
				downrefitem [email protected],3; // Failed refine attempts decrease the item's refine level by 3
				next;
				emotion (!rand(5))?ET_MONEY:ET_HUK;
				mes "["+ [email protected]_name$ +"]";
				mes "Ahhh!!!";
				next;
				mes "["+ [email protected]_name$ +"]";
				mes "Oh my god!";
				mes "The upgrade level has dropped...";
			} else {
				mes "["+ [email protected]_name$ +"]";
				mes "Clang! Clang! Clang!";
				failedrefitem [email protected];
				next;
				emotion (!rand(5))?ET_MONEY:ET_HUK;
				mes "["+ [email protected]_name$ +"]";
				mes "Hmmm!";
				next;
				mes "["+ [email protected]_name$ +"]";
				mes "Oh my! I've failed to refine stuff...";
				mes "I didn't mean it!";
			}
			mes "I could have made a mistake even though I am the best Armsmith ever.";
			mes "It just wasn't meant to be.";
			next;
			mes "["+ [email protected]_name$ +"]";
			mes "I will do a better job next time! Don't worry!";
			close;
		}
		[email protected] = getequiprefinerycnt([email protected]);
	}
	emotion ET_BEST;
	mes "["+ [email protected]_name$ +"]";
	mes "Good! Succes!!!";
	mes "I am the best Blacksmith.";
	close;
}

// Ori/Elu to Carnium/Bradium Refiners
//============================================================
-	script	Austri#ref	-1,{
	if (checkweight(1201,1) == 0) {
		mes "- Wait a minute !! -";
		mes "- Currently you're carrying -";
		mes "- too many items with you. -";
		mes "- Please try again -";
		mes "- after you lose some weight. -";
		close;
	}
	mes "[Austri]";
	mes "If you bring me 3";
	mes "Oridecon or Elunium";
	mes "I can exchange them for";
	mes "Bradium or Carnium.";
	mes "Just give me 50,000z.";
	next;
	switch(select("Oridecon to Bradium.:Elunium to Carnium.:Purified Bradium to Carnium.:No thanks.")) {
	case 1:
		setarray [email protected][0],984,3,6224;  //Oridecon -> Bradium
		break;
	case 2:
		setarray [email protected][0],985,3,6223;  //Elunium -> Carnium
		break;
	case 3:
		setarray [email protected][0],6090,1,6223; //Purified_Bradium -> Carnium
		break;
	case 4:
		mes "[Austri]";
		mes "Hmm...";
		close;
	}
	if (countitem([email protected][0]) >= [email protected][1] && Zeny >= 50000) {
		delitem [email protected][0],[email protected][1];
		Zeny = Zeny - 50000;
		getitem [email protected][2],1;
		mes "[Austri]";
		if ([email protected][0] == 6090) {
			mes "Refining with Refined Bradium";
			mes "can be a little expensive.";
			mes "I can exchange it for some Carnium.";
		} else
			mes "Ok! Here's your "+getitemname([email protected][2])+".";
		mes "Take it and use it well.";
		close;
	}
	mes "[Austri]";
	mes "You better not be trying";
	mes "to cheat me because you";
	mes "don't have enough money";
	mes "or "+getitemname([email protected][0])+".";
	close;
}
prt_in,85,71,5	duplicate(Austri#ref)	Austri#prt	826
payon_in01,14,125,5	duplicate(Austri#ref)	Austri#pay	826
morocc_in,60,38,5	duplicate(Austri#ref)	Austri#moc	826

// Malangdo Refiner
//============================================================
malangdo,224,172,6	script	Clink#mal_normal	544,{
	disable_items;
	mes "[Clink]";
	mes "My cool dad Holink said I have the world's greatest refine hammer!!";
	mes "Meow Meow~";
	mes "Who do you think I am?";
	mes "Yes!!! You!! You want to refine?";
	next;
	setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
	for([email protected] = 1; [email protected]<=10; set [email protected],[email protected]+1)
		[email protected]$ = [email protected]$ + ( getequipisequiped([email protected][[email protected]]) ? getequipname([email protected][[email protected]]) : F_getpositionname([email protected][[email protected]]) +"-[Empty]" ) +":";
	[email protected] = [email protected][ select([email protected]$) ];
	if (!getequipisequiped([email protected])) {
		mes "[Clink]";
		switch([email protected]) {
		case 1:
			mes "Dad said. There's no cure for stupidity...";
			break;
		case 2:
			mes "There's nothing to see here!!";
			break;
		case 3:
			mes "What an arrogant left hand this is!";
			break;
		case 4:
			mes "What an arrogant right hand this is!";
			break;
		case 5:
			mes "Get that dirty thing off my face!!";
			break;
		case 6:
			mes "Kyaong~! Do not provoke me.";
			break;
		case 7:
		case 8:
			mes "Where is the accessory?";
			break;
		case 9:
		case 10:
			mes "Are you talking about the other head part?";
			break;
		}
		close;
	}
	if (!getequipisenableref([email protected])) {
		mes "[Clink]";
		mes "This can't be refined!!";
		close;
	}
	[email protected] = getequiprefinerycnt([email protected]); //save refinery count
	if ([email protected] >= 10) {
		mes "[Clink]";
		mes "Perfect refining. Did I do this for you?";
		close;
	}
	
	[email protected] = getequipid([email protected]); // save id of the item
	setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_ZENY_COST);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
	
	mes "[Clink]";
	switch(getequipweaponlv([email protected])) {
	default:
	case 0: // Armor
		[email protected]$ = "armor";
		mes "Hmm, an armor refine? Someone like you?";
		break;
	case 1: // Level 1 Weapon
		[email protected]$ = "weapon";
		mes "A level 1 weapon?";
		mes "Urr... Annoying... Okay, let's try...";
		break;
	case 2: // Level 2 Weapon
		[email protected]$ = "weapon";
		mes "A level 2 weapon?";
		break;
	case 3: // Level 3 Weapon
		[email protected]$ = "weapon";
		mes "Woot!! A level 3 weapon? Impressive~";
		break;
	case 4: // Level 4 Weapon
		[email protected]$ = "weapon";
		mes "Wow!... A level 4 weapon~!!";
		break;
	}
	mes "You need ^ff9999"+getitemname([email protected])+"^000000 and ^ff9999"[email protected]+"^000000 Zeny. Do you have them?";
	next;
	if(select("Yes, I do!!:Forget about it!!") == 2) {
		mes "[Clink]";
		mes "I knew it!!";
		mes "I knew you were not worth trying my magical refining hammer for.";
		close;
	}
	if (getequippercentrefinery([email protected]) < 100) {
		mes "[Clink]";
		mes "Wow!!";
		mes "This "[email protected]$+" has been refined quite a bit, huh?";
		mes "You do know that this might break, right?";
		next;
		mes "[Clink]";
		mes "If you break the "[email protected]$+", you can never use it again.";
		mes "Cards and enchant effects...";
		mes "the ^ff0000whole thing will disappear^000000.";
		mes "You still up for this~?";
		next;
		if(select("Yes, I am!!:Forget about it!!") == 2) {
			mes "[Clink]";
			mes "I knew it!!";
			mes "You can't even take this big step. Don't think about refining...";
			close;
		}
	}
	if (countitem([email protected]) == 0 || Zeny < [email protected]) {
		mes "[Clink]";
		mes "Hey you!! Didn't I tell you";
		mes "that you need ^ff9999"+getitemname([email protected])+"^000000 and ^ff9999"[email protected]+"^000000 Zeny??!!";
		close;
	}
	delitem [email protected],1;
	Zeny = [email protected];

	// anti-hack
	if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3]) ||
		callfunc("F_IsEquipRefineHack", [email protected], [email protected])) {
		mes "[Clink]";
		emotion ET_FRET;
		mes "Wait a second...";
		mes "Do you think I'm stupid?!";
		mes "You switched the item while I wasn't looking! Get out of here!";
		close;
	}

	if (getequippercentrefinery([email protected]) <= rand(100)) {
		failedrefitem [email protected];
		mes "[Clink]";
		mes "Cry Hammer!! Cry!!!";
		next;
		switch(rand(1,5)) {
			case 1: emotion ET_CRY; break;
			case 2: emotion ET_PROFUSELY_SWEAT; break;
			case 3: emotion ET_KEK; break;
			case 4: emotion ET_SCRATCH; break;
			case 5: emotion ET_BIGTHROB; break;
		}
		mes "[Clink]";
		mes "Huh?! I failed?!";
		next;
		mes "[Clink]";
		mes "Arrgg~ It's all~ Broken...? What a pity~";
		next;
		mes "[Clink]";
		mes "Hey...!! Get me another one.";
		mes "This is not possible.";
		mes "How can my hammer fail from refining?";
		close;
	}
	successrefitem [email protected];
	mes "[Clink]";
	mes "Cry Hammer!! Cry!!!";
	next;
	emotion ET_CHUP;
	mes "[Clink]";
	mes "Ok!! Perfect!!";
	mes "There's nothing I can't refine";
	mes "with this special hammer.";
	mes "You can praise me!!";
	mes "What a day!!";
	close;
}

 

1.png

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Couldn't find what the issue in the above script was, so I replaced it with this one and it worked to the refine rate specified in the script.

veil,111,199,0	script	Vestri#cash	87,{
	disable_items;
	mes "[Vestri]";
	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;

	setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
	for(set [email protected],1; [email protected]<=10; set [email protected],[email protected]+1) {
		if (getequipisequiped([email protected][[email protected]])) {
			set [email protected]$, [email protected]$ + F_getpositionname([email protected][[email protected]]) + "-[" + getequipname([email protected][[email protected]]) + "]";
			set [email protected],1;
		}
		set [email protected]$, [email protected]$ + ":";
	}
	if ([email protected] == 0) {
		mes "[Vestri]";
		mes "I don't think I can refine any items you have...";
		close;
	}
	set [email protected], [email protected][ select([email protected]$) ];

	if (!getequipisequiped([email protected])) //custom check
		close;
	if (!getequipisenableref([email protected])) {
		mes "[Vestri]";
		mes "Go find another Blacksmith. You can't refine this thing.";
		close;
	}
	if (getequiprefinerycnt([email protected]) >= 13) {
		mes "[Vestri]";
		mes "Hmm... someone perfected this already. I don't think I can work on it further.";
		close;
	}


	[email protected] = getequipid([email protected]); // save id of the item
	[email protected] = getequiprefinerycnt([email protected]); //save refinery count
	[email protected] = getequiprefinecost([email protected], REFINE_COST_ENRICHED, REFINE_ZENY_COST);
	[email protected] = getequiprefinecost([email protected], REFINE_COST_ENRICHED, REFINE_MATERIAL_ID);

	// Make sure you have the necessary items and Zeny to refine your items
	// Determines chance of failure and verifies that you want to continue.
	callsub S_RefineValidate,getequipweaponlv([email protected]),[email protected],[email protected],[email protected],[email protected],[email protected];

	mes "[Vestri]";
	mes "Clang! Clang! Clang!";
	if (getequippercentrefinery([email protected], true) > rand(100)) {
		successrefitem [email protected];
		next;
		emotion ET_BEST;
		mes "[Vestri]";
		mes "There you go! It's done.";
		mes "It's been a while since I've made such a fine "+((getequipweaponlv([email protected]))?"weapon":"armor")+". You must be happy because it has become stronger!";
		close;
	}
	failedrefitem [email protected];
	next;
	emotion (!rand(5))?ET_MONEY:ET_HUK;
	mes "[Vestri]";
	mes "Uuuuuuuuuummmmmph!!!";
	next;
	mes "[Vestri]";
	mes "...";
	mes ".....";
	mes ".......Huhuhuhuhu~";
	mes "........It was your choice and my ability, no regret.";
	close;

S_RefineValidate:
	[email protected]_lvl = getarg(0);
	[email protected]_req = getarg(1);
	[email protected] = getarg(2);
	[email protected] = getarg(3);
	setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3);

	// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
	if (VIP_SCRIPT && !vip_status(VIP_STATUS_ACTIVE)) {
		switch([email protected]_lvl){
			case 0: set [email protected], [email protected] * 10; break;
			case 1: set [email protected], [email protected] * 40; break;
			case 2: set [email protected], [email protected] * 50; break;
			case 3: set [email protected], [email protected] * 2; break;
			case 4: set [email protected], [email protected] * 2; break;
		}
	}

	mes "[Vestri]";
	if ([email protected]_lvl)
		mes "You want to refine a level "+ [email protected]_lvl +" weapon?";
	mes "To refine that, you'll need to have one ^ff9999"+ getitemname([email protected]_req) +"^000000 and "+ [email protected] +" zeny.";
	mes "Would you like to continue?";
	next;
	if(select("Yes:No") == 1) {
		if (getequippercentrefinery([email protected]) < 100) {
			if ([email protected]_lvl) {
				mes "[Vestri]";
				mes "Wow!!";
				mes "This weapon probably";
				mes "looks like it's been refined...";
				mes "many times...";
				mes "It may break if";
				mes "you refine it again.";
				next;
				mes "And if it breaks,";
				mes "you can't use it anymore!";
				mes "All the cards in it and the properties ^ff0000will be lost^000000!";
				mes "^ff0000Besides, the equipment will break!^000000";
				mes "Are you sure you still want to continue?";
				next;
				if(select("Yes:No") == 2) {
					mes "[Vestri]";
					mes "Good.";
					mes "Because if the weapon breaks from unreasonable refining, then I get a bad mood, too.";
					close;
				}
			} else {
				mes "[Vestri]";
				mes "Giggle. Giggle. Oh, you have guts, daring to refine this.";
				mes "You know it's pretty risky, don't you?";
				next;
				mes "If your defensive equipment is broken, you'll never be able to use it again.";
				mes "Even your cards and your modifications will ^ff0000completely disappear^000000.";
				//mes "Everything will disappear. As in... GONE!";
				mes "Do you really wish to continue?";
				next;
				if(select("Yes:No") == 2) {
					mes "[Vestri]";
					mes "What nonsense. You waste my precious time.";
					mes "Get lost, punk.";
					close;
				}
			}
		}
		if (countitem([email protected]_req) > 0 && Zeny > [email protected]) {
			delitem [email protected]_req,1;
			set Zeny, Zeny - [email protected];

			// anti-hack
			if (callfunc("F_IsEquipIDHack", [email protected], getarg(4)) ||
				callfunc("F_IsEquipRefineHack", [email protected], getarg(5)) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3])) {
				mes "[Holink]";
				emotion ET_FRET;
				mes "Wait a second...";
				mes "Do you think I'm stupid?!";
				mes "You switched the item while I wasn't looking! Get out of here!";
				close;
			}

			return;
		}
		mes "[Vestri]";
		mes "Are these all you have?";
		mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?";
		close;
	}
	mes "[Vestri]";
	mes "I can't help it even if you're not happy about it...";
	close;
}

 

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.