Jump to content
  • 0

Blessed Refiner NPC


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

How can i do this on blessed refiner?
 

Quote

when item reached +10 it wont break anymore at +11 unless it will stay only to +10 if failed

using latest rathena database

 

//===== rAthena Script ======================================= 
//= Blessed Refiner
//===== Description: =========================================
//= [Official Conversion]
//= Refiners that use Blessed ores to refine equipment.
//= Upon failure, the equipment is not destroyed. The success
//= rate is identical to that for Enriched ores.
//= - "Blacksmith Dister" only refines from +6~12.
//= NOTE: This NPC is currently disabled on official servers.
//===== Changelog: ===========================================
//= 1.0 First version. [Euphy]
//= 1.1 Removed re-roll behavior. [Secret]
//============================================================

// Main NPC :: new_smelting612
//============================================================
-	script	::BlacksmithDister	-1,{
	disable_items;
	mes "[Blacksmith Dister]";
	mes "In this highly competitive society, we must be different in order to survive!";
	mes "I only refine equipment at the +6 ~ 12 levels.";
	next;
	mes "[Blacksmith Dister]";
	mes "I will need ^ff9999Blessed Oridecon^000000 for weapons, and ^ff9999Blessed Elunium^000000 for armors.";
	mes "Failed refines ^FF0000will not break or reduce the refine level^000000.";
	next;
	mes "[Blacksmith Dister]";
	mes "How about it? Do you want to refine?";
	next;
	setarray .@indices[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 .@i,1; .@i<=10; set .@i,.@i+1)
		set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Unequipped]" ) +":";
	set .@part, .@indices[ select(.@menu$) ];
	if (!getequipisequiped(.@part)) {
		mes "[Blacksmith Dister]";
		switch(.@part) {
		case 1:
			mes "I'm a blacksmith, not a hairstylist.";
			break;
		case 2:
			mes "With my hammer, I will make you a star of the sky.";
			break;
		case 3:
		case 4:
			mes "Making artificial hands is not my specialty.";
			break;
		case 5:
			mes "Bring out the item so I can refine it!";
			break;
		case 6:
			mes "Where is this weird smell coming from?";
			break;
		case 7:
		case 8:
			mes "Where is the accessory?";
			break;
		case 9:
			mes "What do you want me to refine?";
			break;
		case 10:
			mes "Huh? What do you want me to do?";
			break;
		}
		close;
	}
	if (!getequipisenableref(.@part)) {
		mes "[Blacksmith Dister]";
		mes "This item cannot be refined.";
		close;
	}
	.@equip_id = getequipid(.@part);
	.@equip_refine = getequiprefinerycnt(.@part);
	setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3);

	if (.@equip_refine < 6 || .@equip_refine > 12) {
		mes "[Blacksmith Dister]";
		mes "This equipment has refined to "+.@equip_refine+". I only handle items with refine levels from +6 to +12!";
		close;
	}
	set .@equip_lv, getequipweaponlv(.@part);
	switch(.@equip_lv) {
	default:
	case 0:
		set .@price,20000;
		set .@material,6439; //Unbreakable_Def
		set .@type$,"Armor";
		break;
	case 1:
		set .@price,1000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	case 2:
		set .@price,2000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	case 3:
		set .@price,20000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	case 4:
		set .@price,40000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	}
	set .@ore$,"^ff9999Blessed "+.@type$+" Ore^000000";
	mes "[Blacksmith Dister]";
	mes "This "+.@type$+" has been refined to "+.@equip_refine+". To refine it, I need "+.@ore$+" and a "+callfunc("F_InsertComma",.@price)+" zeny refining fee.";
	mes "Do you want to proceed?";
	next;
	if(select("Yes:No") == 2) {
		mes "[Blacksmith Dister]";
		mes "I am busy, don't joke with me!";
		close;
	}
	if (getequippercentrefinery(.@part) < 100) {
		mes "[Blacksmith Dister]";
		mes "This "+.@type$+" has been refined many times. Although it will not disappear upon failure, the "+.@ore$+" will disappear!";
		next;
		mes "[Blacksmith Dister]";
		mes "Of course, the refining fee will not be returned! Do you want to continue?";
		next;
		if(select("Yes:No") == 2) {
			mes "[Blacksmith Dister]";
			mes "Good. I'd be sad if it failed, too.";
			close;
		}
	}
	if (countitem(.@material) == 0 || Zeny < .@price) {
		mes "[Blacksmith Dister]";
		mes "Materials insufficient.";
		mes "To refine "+((.@equip_lv)?"a level "+.@equip_lv+" weapon":"armor")+", I need "+.@ore$+" and a "+callfunc("F_InsertComma",.@price)+" zeny refining fee.";
		close;
	}
	delitem .@material,1;
	set Zeny, Zeny-.@price;

	// anti-hack
	if (callfunc("F_IsEquipIDHack", .@part, .@equip_id) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) || callfunc("F_IsEquipRefineHack", .@part, .@equip_refine))
		close;

	mes "[Blacksmith Dister]";
	mes "Tac! Tac! Tac!";
	if (getequippercentrefinery(.@part, true) > rand(100)) {
		specialeffect EF_BLESSING;
		successrefitem .@part;
		next;
		mes "[Blacksmith Dister]";
		mes "Hahahahahaha!!!";
		next;
		mes "[Blacksmith Dister]";
		mes "Refine was a huge success~ Hahaha!";
		close;
	}
	specialeffect EF_CURSEATTACK;
	specialeffect2 EF_SUI_EXPLOSION;
	next;
	emotion (!rand(5))?ET_ANGER:ET_HUK;
	mes "[Blacksmith Dister]";
	mes "Oh my goodness!!!!";
	next;
	mes "[Blacksmith Dister]";
	mes "Oh! Although it was blessed by "+.@ore$+" to retain the equipment...";
	next;
	mes "[Blacksmith Dister]";
	mes "My mood is worse when I fail!!";
	close;
}
prt_in,52,56,3	duplicate(BlacksmithDister)	Blacksmith Dister#prt	826
payon,148,172,3	duplicate(BlacksmithDister)	Blacksmith Dister#pay	826
alberta_in,20,56,3	duplicate(BlacksmithDister)	Blacksmith Dister#alb	826
yuno_in01,175,18,3	duplicate(BlacksmithDister)	Blacksmith Dister#yuno	826
ein_in01,26,82,3	duplicate(BlacksmithDister)	Blacksmith Dister#ein	826
lhz_in02,280,15,3	duplicate(BlacksmithDister)	Blacksmith Dister#lhz	826

 

thank you.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  429
  • Reputation:   163
  • Joined:  12/12/17
  • Last Seen:  

2 hours ago, Quesooo said:

How can i do this on blessed refiner?
 

using latest rathena database

 


//===== rAthena Script ======================================= 
//= Blessed Refiner
//===== Description: =========================================
//= [Official Conversion]
//= Refiners that use Blessed ores to refine equipment.
//= Upon failure, the equipment is not destroyed. The success
//= rate is identical to that for Enriched ores.
//= - "Blacksmith Dister" only refines from +6~12.
//= NOTE: This NPC is currently disabled on official servers.
//===== Changelog: ===========================================
//= 1.0 First version. [Euphy]
//= 1.1 Removed re-roll behavior. [Secret]
//============================================================

// Main NPC :: new_smelting612
//============================================================
-	script	::BlacksmithDister	-1,{
	disable_items;
	mes "[Blacksmith Dister]";
	mes "In this highly competitive society, we must be different in order to survive!";
	mes "I only refine equipment at the +6 ~ 12 levels.";
	next;
	mes "[Blacksmith Dister]";
	mes "I will need ^ff9999Blessed Oridecon^000000 for weapons, and ^ff9999Blessed Elunium^000000 for armors.";
	mes "Failed refines ^FF0000will not break or reduce the refine level^000000.";
	next;
	mes "[Blacksmith Dister]";
	mes "How about it? Do you want to refine?";
	next;
	setarray .@indices[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 .@i,1; .@i<=10; set .@i,.@i+1)
		set .@menu$, .@menu$ + ( getequipisequiped(.@indices[.@i]) ? getequipname(.@indices[.@i]) : F_getpositionname(.@indices[.@i]) +"-[Unequipped]" ) +":";
	set .@part, .@indices[ select(.@menu$) ];
	if (!getequipisequiped(.@part)) {
		mes "[Blacksmith Dister]";
		switch(.@part) {
		case 1:
			mes "I'm a blacksmith, not a hairstylist.";
			break;
		case 2:
			mes "With my hammer, I will make you a star of the sky.";
			break;
		case 3:
		case 4:
			mes "Making artificial hands is not my specialty.";
			break;
		case 5:
			mes "Bring out the item so I can refine it!";
			break;
		case 6:
			mes "Where is this weird smell coming from?";
			break;
		case 7:
		case 8:
			mes "Where is the accessory?";
			break;
		case 9:
			mes "What do you want me to refine?";
			break;
		case 10:
			mes "Huh? What do you want me to do?";
			break;
		}
		close;
	}
	if (!getequipisenableref(.@part)) {
		mes "[Blacksmith Dister]";
		mes "This item cannot be refined.";
		close;
	}
	.@equip_id = getequipid(.@part);
	.@equip_refine = getequiprefinerycnt(.@part);
	setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3);

	if (.@equip_refine < 6 || .@equip_refine > 12) {
		mes "[Blacksmith Dister]";
		mes "This equipment has refined to "+.@equip_refine+". I only handle items with refine levels from +6 to +12!";
		close;
	}
	set .@equip_lv, getequipweaponlv(.@part);
	switch(.@equip_lv) {
	default:
	case 0:
		set .@price,20000;
		set .@material,6439; //Unbreakable_Def
		set .@type$,"Armor";
		break;
	case 1:
		set .@price,1000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	case 2:
		set .@price,2000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	case 3:
		set .@price,20000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	case 4:
		set .@price,40000;
		set .@material,6438; //Unbreakable_Weap
		set .@type$,"Weapon";
		break;
	}
	set .@ore$,"^ff9999Blessed "+.@type$+" Ore^000000";
	mes "[Blacksmith Dister]";
	mes "This "+.@type$+" has been refined to "+.@equip_refine+". To refine it, I need "+.@ore$+" and a "+callfunc("F_InsertComma",.@price)+" zeny refining fee.";
	mes "Do you want to proceed?";
	next;
	if(select("Yes:No") == 2) {
		mes "[Blacksmith Dister]";
		mes "I am busy, don't joke with me!";
		close;
	}
	if (getequippercentrefinery(.@part) < 100) {
		mes "[Blacksmith Dister]";
		mes "This "+.@type$+" has been refined many times. Although it will not disappear upon failure, the "+.@ore$+" will disappear!";
		next;
		mes "[Blacksmith Dister]";
		mes "Of course, the refining fee will not be returned! Do you want to continue?";
		next;
		if(select("Yes:No") == 2) {
			mes "[Blacksmith Dister]";
			mes "Good. I'd be sad if it failed, too.";
			close;
		}
	}
	if (countitem(.@material) == 0 || Zeny < .@price) {
		mes "[Blacksmith Dister]";
		mes "Materials insufficient.";
		mes "To refine "+((.@equip_lv)?"a level "+.@equip_lv+" weapon":"armor")+", I need "+.@ore$+" and a "+callfunc("F_InsertComma",.@price)+" zeny refining fee.";
		close;
	}
	delitem .@material,1;
	set Zeny, Zeny-.@price;

	// anti-hack
	if (callfunc("F_IsEquipIDHack", .@part, .@equip_id) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) || callfunc("F_IsEquipRefineHack", .@part, .@equip_refine))
		close;

	mes "[Blacksmith Dister]";
	mes "Tac! Tac! Tac!";
	if (getequippercentrefinery(.@part, true) > rand(100)) {
		specialeffect EF_BLESSING;
		successrefitem .@part;
		next;
		mes "[Blacksmith Dister]";
		mes "Hahahahahaha!!!";
		next;
		mes "[Blacksmith Dister]";
		mes "Refine was a huge success~ Hahaha!";
		close;
	}
	specialeffect EF_CURSEATTACK;
	specialeffect2 EF_SUI_EXPLOSION;
	next;
	emotion (!rand(5))?ET_ANGER:ET_HUK;
	mes "[Blacksmith Dister]";
	mes "Oh my goodness!!!!";
	next;
	mes "[Blacksmith Dister]";
	mes "Oh! Although it was blessed by "+.@ore$+" to retain the equipment...";
	next;
	mes "[Blacksmith Dister]";
	mes "My mood is worse when I fail!!";
	close;
}
prt_in,52,56,3	duplicate(BlacksmithDister)	Blacksmith Dister#prt	826
payon,148,172,3	duplicate(BlacksmithDister)	Blacksmith Dister#pay	826
alberta_in,20,56,3	duplicate(BlacksmithDister)	Blacksmith Dister#alb	826
yuno_in01,175,18,3	duplicate(BlacksmithDister)	Blacksmith Dister#yuno	826
ein_in01,26,82,3	duplicate(BlacksmithDister)	Blacksmith Dister#ein	826
lhz_in02,280,15,3	duplicate(BlacksmithDister)	Blacksmith Dister#lhz	826

 

thank you.

add this

if(getequiprefinerycnt(.@part) < 10) failedrefitem .@part // if refine is less than +10... item will break..

above 

Line 166: specialeffect EF_CURSEATTACK;

 

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

5 minutes ago, pajodex said:

add this


if(getequiprefinerycnt(.@part) < 10) failedrefitem .@part // if refine is less than +10... item will break..

above 


Line 166: specialeffect EF_CURSEATTACK;

 

thank you

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

5 minutes ago, pajodex said:

add this


if(getequiprefinerycnt(.@part) < 10) failedrefitem .@part // if refine is less than +10... item will break..

above 


Line 166: specialeffect EF_CURSEATTACK;

 

the +10 item wont break anymore or downgrade to +9 it should be remain to +10 and if +11 it will go down to +10

the point is the save point for the item is just +10

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

I test it, when the item is +11 and failed its still remain on +11
it should be +10 if failed from +11 or more
and if the item is +10 and failed it wont break anymore

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

For Blessed (Blacksmith Blessing) refinemenet feature, you can use (replace the current NPC) by hd_refiner.txt NPC from Refine UI update.

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

21 minutes ago, Cydh said:

For Blessed (Blacksmith Blessing) refinemenet feature, you can use (replace the current NPC) by hd_refiner.txt NPC from Refine UI update.

thank you for that sir

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   7
  • Joined:  08/15/18
  • Last Seen:  

Is this refine good? I refine with mine and break the items even if you have hd brandium or other xD

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

1 hour ago, abby said:

Is this refine good? I refine with mine and break the items even if you have hd brandium or other xD

the script doesn't have breaking command, not sure you tested it or just random post

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   7
  • Joined:  08/15/18
  • Last Seen:  

56 minutes ago, Cydh said:

the script doesn't have breaking command, not sure you tested it or just random post

Because I have lowered many and all with rupture, I will prove it.

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...