Fixed rate for HD material in shadow refiner npc (#3276)

- HD ore have normal rates on official
This commit is contained in:
Atemo 2018-07-03 16:04:18 +02:00 committed by GitHub
parent e13ca63cc8
commit f979710985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
//= Shadow equipments refining NPC.
//===== Changelog: ===========================================
//= 1.0 First version [Aleos]
//= 1.1 Removed re-roll behavior and fetch materials from db
//= 1.1 Removed re-roll behavior and fetch materials from db
//= [Secret]
//============================================================
- script ::ShadowBlacksmith -1,{
@ -35,62 +35,61 @@
mes "HD ores can be used for gear that is at least refine level +7 and will prevent breaking as long as you stay talking to me.";
close;
}
.@part = .@indices[.@choice];
if (!getequipisequiped(.@part)) {
mes "[Shadow Blacksmith]";
mes "There's nothing here!";
close;
}
while(1) {
mes "[Shadow Blacksmith]";
mes "I require " + callfunc("F_InsertComma", .@zeny_cost) + " zeny as a fee for EACH refine attempt.";
mes "Choose your Ore and start refining.";
next;
.@isNormalEqp = 0;
if (.@part != EQI_SHADOW_WEAPON)
.@isNormalEqp = 1;
.@material[0] = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID);
.@material[1] = getequiprefinecost(.@part, REFINE_COST_ENRICHED, REFINE_MATERIAL_ID);
.@material[2] = getequiprefinecost(.@part, REFINE_COST_HD, REFINE_MATERIAL_ID);
.@is_enriched = false;
if (countitem(.@material[0]))
.@mate$[0] = getitemname(.@material[0]);
else {
else
.@mate$[0] = "^8C8C8C"+ getitemname(.@material[0]) +"^000000";
.@miss[0] = 1;
}
if (countitem(.@material[1]))
.@mate$[1] = getitemname(.@material[1]);
else {
else
.@mate$[1] = "^8C8C8C"+ getitemname(.@material[1]) +"^000000";
.@miss[1] = 1;
}
if (getequiprefinerycnt(.@part) > 6 && countitem(.@material[2]))
.@mate$[2] = getitemname(.@material[2]);
else {
else
.@mate$[2] = "^8C8C8C"+ getitemname(.@material[2]) +"^000000";
.@miss[2] = 1;
}
.@option = select(.@mate$[0],.@mate$[1],.@mate$[2],"Cancel");
if (.@option == 4) {
mes "[Shadow Blacksmith]";
mes "You've cancelled refining.";
close;
}
else if (.@option == 3) { // HD
if (getequiprefinerycnt(.@part) < 7) {
switch( select( .@mate$[0], .@mate$[1], .@mate$[2], "Cancel" ) ) {
case 1:// NORMAL
.@choose = .@material[0];
break;
case 2:// ENRICHED
.@is_enriched = true;
.@choose = .@material[1];
break;
case 3:// HD
if (.@equip_refine < 7) {
mes "[Shadow Blacksmith]";
mes "HD Ore can only used for +7 or higher refine level items.";
close;
}
.@hoihoi = 1;
}
.@choose = .@material[.@option-1];
.@choose = .@material[2];
break;
case 4:
mes "[Shadow Blacksmith]";
mes "You've cancelled refining.";
close;
}
if (!countitem(.@choose)) {
mes "[Shadow Blacksmith]";
mes "You do not have enough "+ getitemname(.@choose) +".";
@ -131,7 +130,7 @@
next;
delitem .@choose,1;
Zeny -= .@zeny_cost;
if (getequippercentrefinery(.@part, .@option > 1) > rand(100)) {
if (getequippercentrefinery(.@part, .@is_enriched) > rand(100)) {
successrefitem .@part;
mes "[Shadow Blacksmith]";
mes "It worked! It worked!";