• 0

Headgear Color Changer


Good day, Can I ask for help to modify the script cashheadgear_dye.. This script requires only item 6220 (Mysterious Dyestuff) to change HEAD GEAR colors ..

My request are

1. Make it ASK multiple requirements .. for example : I want to change Black Valkyrie Helm into Red Valkyrie Helm. The NPC will ask for 3 Scarlet Dyestuff,inshort it will ask Dyestuff depending on my desired color of headgear

2. Also add multiple requirement not just one item. like example I want my Black Valk Helm to switch into Pink Valk Helm, It will ask 2 Scarlet Dye and 1 White Dyestuff

3. Change only the Headgear that im wearing. Checker if im wearing the headgear if not ask to wear it.


sorry for my bad English.I hope you can help me. Thanks a lot here is the Script. Ive already changed the items 50000 - 50009 [C_Valkyrie Helm]

//===== rAthena Script ======================================= 
//= Headgear Dyer (Cash)
//===== By: ==================================================
//= Xantara
//= Maud_Dib
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= [Official Conversion]
//= Change headgear's color. Cost is a Mysterious Dyestuff
//===== Additional Comments: =================================
//= 1.0 First / Optimized Version

prt_in,127,76,4    script    Alora    862,{

// Mysterious Dyestuff
    set [email protected], 6220;
// Headgear Choices
    setarray [email protected]$[1], "C_Valkyrie Helm","Beanie","Drooping Cat","Deviruchi Hat","Wig","Ribbon","Magestic Goat";
// Mage Hats - Normal, Yellow, Blue, Brown, Gray, Red
    setarray [email protected]_1[1], 50000,50001,50002,50003,50004,50005,50006,50007,50008,50009;
// Beanies - Normal, Pink, Blue, Brown
    setarray [email protected]_2[1], 5076, 5237, 5236, 5235;
// Drooping Cats - Normal, Blue, Brown, Gray, Pink, Yellow
    setarray [email protected]_3[1], 5058, 5233, 5231, 5230, 5232, 5234;
// Deviruchi Hats - Normal, Red, Gray, Brown
    setarray [email protected]_4[1], 5038, 5227, 5228, 5229;
// Wigs - Happy, Shiny, Marvelous, Fantastic
    setarray [email protected]_5[1], 5273, 5274, 5275, 5276;
// Ribbons - Normal, Black, Yellow, Green, Pink, Red, Orange, White
    setarray [email protected]_6[1], 2208, 5191, 5192, 5193, 5194, 5195, 5196, 5197;
// Magestic Goats - Normal, Evolved
    setarray [email protected]_7[1], 2256, 5217;

    mes "[Alora]";
    mes "Hello, I can change your headgear's color if you bring me a Mysterious Dyestuff.";
    mes "[Alora]";
    mes "Do you have a headgear that you would like to dye?";
    for(set [email protected],1; [email protected] < getarraysize([email protected]$); set [email protected],[email protected]+1) {
        if([email protected] == 1)    set [email protected]$, [email protected]$[[email protected]];
        else            set [email protected]$, [email protected]$ +":"+ [email protected]$[[email protected]];
    set [email protected]$, [email protected]$ +":Cancel";
    set [email protected], select([email protected]$);
    if([email protected] == getarraysize([email protected]$)) {
        mes "[Alora]";
        mes "Have a good journey adventurer!";
        mes "If you ever are curious to try a new color on your Kafra headgear or the ones you found on your adventures please come to me!";
    mes "[Alora]";
    mes "Okay, what color do you want to change it to?";
    for(set [email protected],1; [email protected] < getarraysize(getd("[email protected]_"[email protected]+"")); set [email protected],[email protected]+1) {
        if([email protected] == 1 && [email protected] != 5)
            set [email protected]$, "Normal";
        else if([email protected] == 1 && [email protected] == 5)
            set [email protected]$, getitemname(getd("[email protected]_"[email protected]+"["[email protected]+"]"));
        else {
            sscanf(getitemname(getd("[email protected]_"[email protected]+"["[email protected]+"]")),"%s "+ [email protected]$[[email protected]],[email protected]$);
            set [email protected]$, [email protected]$ +":"+ [email protected]$;
    set [email protected]$, [email protected]$ +":Cancel";
    set [email protected], select([email protected]$);
    if([email protected] == getarraysize(getd("[email protected]_"[email protected]+""))) {
        mes "[Alora]";
        mes "Oh, okay no problem!";
    set [email protected], getd("[email protected]_"[email protected]+"["[email protected]+"]");
    mes "[Alora]";
    mes "Oh I'm so excited aren't you?";
    mes "And just to be sure, what color is the "+ [email protected]$[[email protected]] +" you want me to use?";
    mes "[Alora]";
    mes "Please understand that I'm going to use the ^FF00001st "+ [email protected]$[[email protected]] +" of that color in your inventory!^000000";
    mes "[Alora]";
    mes "Any upgrades and cards will be dissolved by the mysterious dye, so be sure you are ok with having a ^0000FF+0 "+ getitemname([email protected]) +" without any cards.^000000";
    mes "["+ strcharinfo(0) +"]";
    mes "Ok, thanks for the warning, I think I'll give you my";
    set [email protected]$, "Nevermind";
    for(set [email protected],1; [email protected] < getarraysize(getd("[email protected]_"[email protected]+"")); set [email protected],[email protected]+1) {
        if([email protected] == 1)    set [email protected]$, [email protected]$ +":Normal "+ getitemname(getd("[email protected]_"[email protected]+"["[email protected]+"]"));
        else            set [email protected]$, [email protected]$ +":"+ getitemname(getd("[email protected]_"[email protected]+"["[email protected]+"]"));
    set [email protected], select([email protected]$) - 1;
    if([email protected]) {
        mes "[Alora]";
        mes "It's best to be very sure, have a safe journey.";
    set [email protected], getd("[email protected]_"[email protected]+"["[email protected]+"]");
    if([email protected] == [email protected]) {
        mes "[Alora]";
        mes "Woah what happened?";
    if(!countitem([email protected]) || !countitem([email protected])) {
        mes "[Alora]";
        mes "Oh my, you seem to be missing something.";
    mes "[Alora]";
    mes "Looks great doesn't it?!";
    mes "I hope you'll come back to dye more pretty headgears!";
    delitem [email protected],1; // Dyestuff
    delitem [email protected],1;  // Your headgear
    getitem [email protected],1;  // Dyed headgear


Edited by Emistry
Please use codebox.

Share this post

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.