Hello friends, I would like this script to make the 1st and 2nd Enchantment equal and the 3rd Enchantment be those defined between the lines 106 ~ 107 100%
Thanks guys
pvp_y_1-1,164,173,3 script Encantador 933,{
mes "I can enchant "+getitemname( .faw_itemid );
mes " ";
if( getequipid( EQI_GARMENT ) == .faw_itemid ){
// enchant type category
setarray .enchant_type$,"Fighting","Magic","Archer","Critical","MaxHP","MaxSP","ASPD","STR","AGI","DEX","VIT","INT","LUK";
// enchant list ( Fighting Spirit )
setarray .enchant_list_1,4820;
// enchant list ( Magic )
setarray .enchant_list_2,4826;
// enchant list ( Archer )
setarray .enchant_list_3,4834;
// enchant list ( Critical )
setarray .enchant_list_4,4765;
// enchant list ( Max HP )
setarray .enchant_list_5,4861,4862;
// enchant list ( Max SP )
setarray .enchant_list_64871;
// enchant list ( ASPD )
setarray .enchant_list_74842;
// enchant list ( STR )
setarray .enchant_list_8,4705;
// enchant list ( AGI )
setarray .enchant_list_9,4735;
// enchant list ( DEX )
setarray .enchant_list_10,4725;
// enchant list ( VIT )
setarray .enchant_list_11,4745;
// enchant list ( INT )
setarray .enchant_list_12,4715;
// enchant list ( LUK )
setarray .enchant_list_13,4755;
// extra 1 special enchant for 3rd slot if refine above 9 ( follow by category sequences )
setarray .special_enchant,4821,4828,4836,4765,4868,4801,4807,4853,4854,4857,4855,4856,4858;
Question
IsabelaFernandez
Hello friends, I would like this script to make the 1st and 2nd Enchantment equal and the 3rd Enchantment be those defined between the lines 106 ~ 107 100%
Thanks guys
pvp_y_1-1,164,173,3 script Encantador 933,{
mes "I can enchant "+getitemname( .faw_itemid );
mes " ";
if( getequipid( EQI_GARMENT ) == .faw_itemid ){
.@refine = getequiprefinerycnt( EQI_GARMENT );
for( .@i = 0; .@i < 4; .@i++ )
.@card[.@i] = getequipcardid( EQI_GARMENT,.@i );
switch( select( "Enchant Item","Reset Enchant" ) ){
case 1:
mes "Pick a slot to enchant.";
mes "You may enchant more slot when you have higher refine.";
.@slot = select(
( .@card[1] || .@refine < 0 )?"":"Enchant Slot 1",
( .@card[2] || .@refine < 0 )?"":"Enchant Slot 2",
( .@card[3] || .@refine < 0 )?"":"Enchant Slot 3",
"Cancel"
);
if( .@slot < 4 ){
mes "Pick Enchant Type";
.@type = select( .enchant_type_menu$ ) - 1;
.@size = .enchant_list_size[.@type];
if( .@size ){
copyarray .@enchant_list[0],getd( ".enchant_list_"+( .@type+1 )+"[0]" ),.@size;
if( .@refine >= 9 ){
.@enchant_list[.@size] = .special_enchant[.@type];
.@size++;
}
delequip EQI_GARMENT;
if( rand( 100 ) < .success_rate ){
setd( ".@card["+.@slot+"]" ),.@enchant_list[ rand( .@size ) ];
mes "Done, success to enchant the item.";
getitem2 .faw_itemid,1,1,.@refine,0,.@card[0],.@card[1],.@card[2],.@card[3];
equip .faw_itemid;
}else{
mes "Too bad, failed to enchant the item.";
}
}
}
break;
case 2:
mes "You need "+.enchant_reset_Zeny+" Zeny.";
if( Zeny >= .enchant_reset_Zeny ){
if( select( "Confirm to reset all enchant ??","Cancel" ) == 1 ){
if( !.@card[1] && !.@card[2] && !.@card[3] ){
mes "Your item didnt have any enchanted item.";
}else{
Zeny -= .enchant_reset_Zeny;
delequip EQI_GARMENT;
getitem2 .faw_itemid,1,1,.@refine,0,.@card[0],0,0,0;
equip .faw_itemid;
mes "Done removed all enchanted item.";
}
}
}
default: break;
}
}else{
mes "Make sure you equiped with "+getitemname( .faw_itemid );
}
close;
OnInit:
// FAW item id
.faw_itemid = 2589;
// enchant success rate
.success_rate = 100;
// enchant reset cost
.enchant_reset_Zeny = 1000000;
// enchant type category
setarray .enchant_type$,"Fighting","Magic","Archer","Critical","MaxHP","MaxSP","ASPD","STR","AGI","DEX","VIT","INT","LUK";
// enchant list ( Fighting Spirit )
setarray .enchant_list_1,4820;
// enchant list ( Magic )
setarray .enchant_list_2,4826;
// enchant list ( Archer )
setarray .enchant_list_3,4834;
// enchant list ( Critical )
setarray .enchant_list_4,4765;
// enchant list ( Max HP )
setarray .enchant_list_5,4861,4862;
// enchant list ( Max SP )
setarray .enchant_list_64871;
// enchant list ( ASPD )
setarray .enchant_list_74842;
// enchant list ( STR )
setarray .enchant_list_8,4705;
// enchant list ( AGI )
setarray .enchant_list_9,4735;
// enchant list ( DEX )
setarray .enchant_list_10,4725;
// enchant list ( VIT )
setarray .enchant_list_11,4745;
// enchant list ( INT )
setarray .enchant_list_12,4715;
// enchant list ( LUK )
setarray .enchant_list_13,4755;
// extra 1 special enchant for 3rd slot if refine above 9 ( follow by category sequences )
setarray .special_enchant,4821,4828,4836,4765,4868,4801,4807,4853,4854,4857,4855,4856,4858;
.enchant_type_size = getarraysize( .enchant_type$ );
for( .@i = 0; .@i < .enchant_type_size; .@i++ ){
.enchant_list_size[.@i] = getarraysize( getd( ".enchant_list_"+( .@i+1 ) ) );
if( !.enchant_list_size[.@i] ){
.enchant_type$[.@i] = "";
}
else{
.enchant_type_menu$ = .enchant_type_menu$ + .enchant_type$[.@i];
}
.enchant_type_menu$ = .enchant_type_menu$ + ":";
}
end;
}
Link to comment
Share on other sites
0 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.