I got the Identifier NPC to apply a 1st RandOpt once the item is identified..
now im stuck how to enchant a 2nd RandOpt with 30% chance. Any Help will be appreciated...
getinventorylist;
for(.@i = 0; .@i < @inventorylist_count; .@i++) {
if (!@inventorylist_identify[.@i]) {
if (getiteminfo(@inventorylist_id[.@i],5) == 16){ //Unidentified Armor
set .@opt,F_rand(3,4,5,6,7,8,9,10,11,12); //1st ROA
if(.@opt == 9 || .@opt == 10) set .@val,rand(3,7); //Values
else if(.@opt == 11 || .@opt == 12) set .@val,rand(1,20);
else set .@val,rand(1,4);
set .@indx,0; //IT WORKS UP UNTIL HERE...
//HOW TO APPLY THIS ONE THOUGH?
if(rand(100)<=30){ // 30% chance to apply 2nd Enchant
set .@opt,F_rand(1,2,17,19,20,21,26,27,28,29,30,31,32,33,34);
if(.@opt == 1) set .@val,rand(1,500);
if(.@opt == 2) set .@val,rand(1,100);
if(.@opt == 17 || .@opt == 19) set .@val,rand(1,20);
if(.@opt == 20 || .@opt == 21) set .@val,rand(1,10);
else set .@val,rand(1,20);
set .@indx,1;
}
}
delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
getitem3 @inventorylist_id[.@i],1,1,0,0,0,0,0,0,.@opt,.@val,.@indx;