viewing paste Mid Headgear Enchanter v1.4 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
//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 .pric1;                      // Price
        set .efet154;                        // Effect Number
        set .item6242;                       // 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-=-=-=-=-=-=-=-=-=
}
Viewed 1264 times, submitted by Skorm.