Jump to content
  • 0

Enchanter Modification..


Question

Posted
comodo,176,153,5 script Enchant Expert 626,{
mes "[Enchant Expert]";
mes "Hey, today might be your lucky day !!";
mes "Do you want to enchant your equipped armor ?";
next;
mes "[Enchant Expert]";
mes "The enchant system give you a random stats from +1 to +10.";
mes "Of course, the higher the stats, the lower the percentage.";
next;
.@equip = select( "Top","Armor","L-Hand","R-Hand","Garment","Shoe","Acc L","Acc R","Mid","Low" );
if ( !getequipisequiped( .@equip ) ) {
mes "You do not have any equipment there.";
close;
}
.@id = getequipid( .@equip );
.@ref = getequiprefinerycnt( .@equip );
.@card1 = getequipcardid( .@equip, 0 );
.@card2 = getequipcardid( .@equip, 1 );
.@card3 = getequipcardid( .@equip, 2 );
.@card4 = getequipcardid( .@equip, 3 );
if ( .@card1 == 255 || .@card1 == 254 ) {
mes "I can't enchant a signed equipment.";
close;
}
if ( .@card4 ) {
mes "This armor has already enchanted.";
close;
}
 
.@rand = rand(.totalchance);
while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++;
.@o = rand(0,5); // orb of str/int/dex ....
 
delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 0;
getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4700 + .@o * 10 + .@r;
equip .@id;
close;
OnInit:
setarray .rate, 55,50,45,25,20,5,4,3,2,1; // rate of getting +1 is 55%, +2 is 50% .... +10 is 10% ...
 
while ( .@i < 10 ) {
.totalchance = .totalchance + .rate[.@i];
.@i++;
}
end;
}

 

 

 

Remove "Top" "Mid" "Low" from the selection? 

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

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