//v1.4
ilyo_kwan,95,113,6 script Mid Headgear Enchanter 100,{
//Character Variables
set .@geid, getequipid( EQI_HEAD_MID );
set .@cout, countitem(.item);
set .@gin$, getitemname(.item);
set .@gerf, getequiprefinerycnt( EQI_HEAD_MID );
set .@crd1, getequipcardid( EQI_HEAD_MID,0);
set .@crd2, getequipcardid( EQI_HEAD_MID,1);
set .@crd3, getequipcardid( EQI_HEAD_MID,2);
set .@crd4, getequipcardid( EQI_HEAD_MID,3);
set .@item, 4700+((rand(5)*10)+rand(3));
//Checks & Dialogue
mes .npc$;
mes "I can endow your glasses with mystical powers, but It'll cost yah " + .pric + " " + ( ( .pric-1 ) ? .@gin$ + "s" : .@gin$ ) + "."; next;
if( !.@cout ) {
mes .npc$;
mes "Sorry come back when you have "+.@gin$+"(s)."; close;
}
if( select("Yes:No") == 2 ) {
mes .npc$; mes "Alright, thanks anyways!";
close;
}
if( .@cout < .pric ) {
mes .npc$; mes "I'm sorry you don't have enough "+.@gin$+"(s) to for me to endow your specticals, please come back later.";
close;
}
if(rand(0,3) >= 3) {
mes .npc$;
mes "I'm sorry but I've failed you!";
misceffect 155;
emotion e_sob,0;
delitem .item,.pric;
close;
}
mes .npc$;
//Workhorse
if( compare( ","+.uit$+",", ","+.@geid+"," ) ) {
delitem .item, .pric;
delitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@crd4;
getitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@item;
misceffect .efet;
mes "All done!";
equip .@geid;
close;
}
mes "I'm sorry but you need to equipped a slotted mid-range headgear before we can continue.";
close;
//NPC Constants
OnInit:
//=-=-=-=-=-=-=Configuration=-=-=-=-=-=-=
set .npc$, "[^0000FFBlinger^000000]"; // NPC Name
set .pric, 1; // Price
set .efet, 154; // Effect Number
set .item, 6242; // Item Number
set .uit$, "18518,18611,18519,2202,18747,18603";// Item List
/*18603(Black Devil Mask), Not included because it wasn't in my DB*/
/*2286 Unslotted version of 18507*/
/*2203 Unslotted version of 2204*/
/*2201 Unslotted version of 2202*/
//=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-=
}