/*========================================================= Headgear Color Reverter NPC by Zephy =========================================================== Description: =========================================================== An NPC to revert a colored headgear to its original pallete. =========================================================== Additional Notes: =========================================================== Changelog: =========================================================*/ alexandria,137,171,4 script Color Reverter (Upper)::c_reverter 443,{ // 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: // 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 5: // 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 6: // 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 7: // 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; case 8: // Viking Helmet // Loop for the menu for(set .@i,0; .@i < getarraysize(.color_viking); set .@i, .@i+1) { set .@viking_options$[.@i], getitemname(.color_viking[.@i]); } menu implode(.@viking_options$,":"),-; set .@headgear, .color_viking[@menu - 1]; // Indexing and Check purposes break; } // Check if player has required headgear equipped if ((getequipid(EQI_HEAD_TOP) != .@headgear) || (getequipid(EQI_HEAD_TOP) != .@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, 5383, 5200, 5184, 16201, 17434; // Beanie, EX Valkyrie Helm, Baseball Cap, Scarf, Hunter's Hat, Coppola, Captain's Hat, Cat Ears, Viking Helm 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_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_catears[0], 22367, 22368, 22369, 22370, 22371; // Blue, Gold, Pink, Purple, Red setarray .color_viking[0], 17424, 17425, 17426, 17428, 17429, 17430, 17431, 17435; // Black, Blue, Cyan, Gold, Green, Purple, Red, White end; }