viewing paste Unknown #14839 | 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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241
/*=========================================================
Headgear Color Reverter NPC
by Zephy
===========================================================
Description:
===========================================================
An NPC to revert a colored headgear to its original 
pallete.
===========================================================
Additional Notes:
===========================================================
Changelog:
=========================================================*/
 
amatsu,261,238,4    script  Color Reverter::c_reverter  911,{
 
    // Opening dialogue
    mes .npc_name$;
    mes "I am the color reverter NPC!";
    mes "I can revert any of these headgears back to its original color!";
    mes "All I need is: ";
    mes "- ^FF0000"+ .qamt +" "+ getitemname(.qitem) +"^000000";
    mes "- ^FF0000"+ .zeny_amt$ +" zeny.^000000";
    next;
 
    // Bease headgear menu
    // Loop for the menu
    for(set .@i,0; .@i < getarraysize(.base_hg); set .@i, .@i+1)
    {
        set .@base_options$[.@i], getitemname(.base_hg[.@i]);
    }
 
    menu implode(.@base_options$,":"),-;
    set .@choice, @menu - 1; // Indexing purposes
 
    mes .npc_name$;
    mes "Please pick the color ^aa007fOF YOUR CURRENT^000000 headgear.";
    next;
    
    switch(@menu)
    {
        case 1: // Beanie
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_beanie); set .@i, .@i+1)
            {
                set .@beanie_options$[.@i], getitemname(.color_beanie[.@i]);
            }
 
            menu implode(.@beanie_options$,":"),-;
            set .@headgear, .color_beanie[.@color]; // Indexing and Check purposes
            
            break;
        
        case 2: // EX Valkyrie Helemet
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_valkyrie); set .@i, .@i+1)
            {
                set .@valkyrie_options$[.@i], getitemname(.color_valkyrie[.@i]);
            }
            
            menu implode(.@valkyrie_options$,":"),-;
            set .@headgear, .color_valkyrie[@menu - 1]; // Indexing and Check purposes
            
            break;
 
        case 3: // Baseball Cap
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_baseball); set .@i, .@i+1)
            {
                set .@baseball_options$[.@i], getitemname(.color_baseball[.@i]);
            }
            
            menu implode(.@baseball_options$,":"),-;
            set .@headgear, .color_baseball[@menu - 1]; // Indexing and Check purposes
            
            break;
 
        case 4: // Scarf
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_scarf); set .@i, .@i+1)
            {
                set .@scarf_options$[.@i], getitemname(.color_scarf[.@i]);
            }
            
            menu implode(.@scarf_options$,":"),-;
            set .@headgear, .color_scarf[@menu - 1]; // Indexing and Check purposes
            
            break;
 
        case 5: // Hunter's Hat
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_hunter); set .@i, .@i+1)
            {
                set .@hunter_options$[.@i], getitemname(.color_hunter[.@i]);
            }
 
            menu implode(.@hunter_options$,":"),-;
            set .@headgear, .color_hunter[@menu - 1]; // Indexing and Check purposes
            
            break;
        
 
        case 6: // Coppola
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_coppola); set .@i, .@i+1)
            {
                set .@coppola_options$[.@i], getitemname(.color_coppola[.@i]);
            }
            
            menu implode(.@coppola_options$,":"),-;
            set .@headgear, .color_coppola[@menu - 1]; // Indexing and Check purposes
            
            break;
        
 
        case 7: // Captian's Hat
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_captain); set .@i, .@i+1)
            {
                set .@captain_options$[.@i], getitemname(.color_captain[.@i]);
            }
            
            menu implode(.@captain_options$,":"),-;
            set .@headgear, .color_captain[@menu - 1]; // Indexing and Check purposes
            
            break;
    
        case 8: // Gangster Scarf
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_gangster); set .@i, .@i+1)
            {
                set .@gangster_options$[.@i], getitemname(.color_gangster[.@i]);
            }
 
            menu implode(.@gangster_options$,":"),-;
            set .@headgear, .color_gangster[@menu - 1]; // Indexing and Check purposes
            
            break;
 
        case 9: // Lighthalzen Aura
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_lighthalzen); set .@i, .@i+1)
            {
                set .@lighthalzen_options$[.@i], getitemname(.color_lighthalzen[.@i]);
            }
 
            menu implode(.@lighthalzen_options$,":"),-;
            set .@headgear, .color_lighthalzen[@menu - 1]; // Indexing and Check purposes
            
            break;
 
        case 10: // Cat Ears
            // Loop for the menu
            for(set .@i,0; .@i < getarraysize(.color_catears); set .@i, .@i+1)
            {
                set .@catears_options$[.@i], getitemname(.color_catears[.@i]);
            }
 
            menu implode(.@catears_options$,":"),-;
            set .@headgear, .color_catears[@menu - 1]; // Indexing and Check purposes
            
            break;
    }
    
    // Check if player has required headgear equipped
    if ((getequipid(EQI_HEAD_TOP) != .@headgear) || (getequipid(EQI_HEAD_LOW) != .@headgear))
    {
        mes .npc_name$;
        mes "Please equip the required top headgear.";
        close;
    }
 
    // Check if the headgear has a card
    if(getequipcardcnt(EQI_HEAD_TOP) > 0)
    {
        mes .npc_name$;
        mes "Please make sure all cards have been removed before proceeding.";
        close;
    }
 
    // Check if player has the required items
    if(countitem(.qitem) < .qamt || Zeny < .zeny)
    {
        mes .npc_name$;
        mes "Please remember, I require ^FF0000"+ .qamt +" "+ getitemname(.qitem) +" and "+ .zeny +" zeny.^000000";
        close;
    }
    
    // Final warning about refinement
    mes .npc_name$;
    mes "^FF0000Please remember that any refinement done to this headgear will be lost. Would you like to continue?";
    next;
    
    // Final chance to say no
    if(select("No:Yes") == 1)
    {
        mes .npc_name$;
        mes "Come back if you change your mind!";
        close;
    }
    
    // Delete items, reduce Zeny, and unequip the headgear
    delitem .qitem, .qamt;
    set Zeny, Zeny-.zeny;
    unequip EQI_HEAD_TOP;
    delitem .@headgear, 1;
    
    // Get OC headgear
    getitem .base_hg[.@choice], 1;
    
    // Ending dialogue
    mes .npc_name$;
    mes "Enjoy your headgear!";
    close;
 
OnInit:
// Configuration
        // General
        set .npc_name$, "[^008800Color Reverter^000000]";
 
        // Requirements
        set .qitem, 8063; // Ancient Heirloom
        set .qamt, 1; // .qitem amount
        set .zeny, 30000000; // Set Zeny price
        set .zeny_amt$, "30,000,000"; // Set zeny string amount
 
        // Headgears
        setarray .base_hg[0], 5076, 8047, 5282, 17445, 5383, 5200, 5184, 5361, 17456, 16201; // Beanie, EX Valkyrie Helm, Baseball Cap, Scarf, Hunter's Hat, Coppola, Captain's Hat, Gangster Scarf, Lighthalzen Aura, Cat Ears
        setarray .color_beanie[0], 5235, 22308, 22311, 22310, 22309, 22307; // Gray, Red, Dark Blue, Green, Cyan, Black
        setarray .color_valkyrie[0], 22346, 22347, 22348, 22349, 22350, 22351, 22352, 22353, 22354, 22354; // Black, Brown, Cyan, Gold, Green, Orange, Pink, Purple, Red, Silver
        setarray .color_baseball[0], 5282, 22302, 22303, 22304, 22305, 22306, 22301; // Yellow, Cyan, Green, Purple, Red, White, Black
        setarray .color_scarf[0], 22335, 22336, 22337, 22338, 22339, 22340; // Blue, Cyan, Gold, Pink, Red, Green
        setarray .color_hunter[0], 22327, 22328, 22329, 22330, 22331, 22332, 22333; // Black, Blue, Cyan, Gold, Purple, White, Red
        setarray .color_coppola[0], 22341, 22342, 22343, 22344, 22345; // Black, Blue, Cyan, Green, Red
        setarray .color_captain[0], 22312, 22313, 22314, 22315, 22316, 22317, 22318, 22319, 22372; //Black, Blue, Green, Cyan, Gold, Purple, Red, White, Pink
        setarray .color_gangster[0], 22320, 22321, 22322, 22323, 22324, 22325, 22326; // Black, Blue, Cyan, Gold, Green, Purple, White
        setarray .color_lighthalzen[0], 17457, 17458, 17460, 22364, 22365, 22366; // Black, Blue, Red, Green, Pink, Purple
        setarray .color_catears[0], 22367, 22368, 22369, 22370, 22371; // Blue, Gold, Pink, Purple, Red
    
    end;
}
Viewed 652 times, submitted by Guest.