Jump to content
  • 0
Sign in to follow this  
StarLord2.0

Costume Script Request

Question

Please read b4 Reacting :)

Good Day Fam, 

Can someone help me with a script for a costume

i dont want to diff any so that i came here.. hehe

requesting for an npc who can delete item and give item
with auto detecting what the character is wearing like in costume converted out there.
i basically added two different item costume and non costume with same attributes

and just like the costume converted out there. not converting any with cards and ups
i have 35 custom items 

basically its 70 bcuz of the costume items.

 

thank you and have a nice day. hope someone is happy to help.  :D

1.jpg

11.jpg

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Can try this :

 

Quote

//===== Script =======================================
//= Costume Convertor [v1.0] — (Swap normal ↔ costume versions safely)
//===== By: ==========================================
//= Checkmate (idea & implementation)
//===== Summary ======================================
//= Automatically detects if player wears a normal or costume item
//= Deletes the worn item
//= Gives the corresponding costume/non-costume version
//= Safe from refinement/card duplication
//= Supports easy expansion for 70 (35x2) custom items
//===================================================
//= QUICK SETUP
//= 1) Add your item pairs inside the array below
//= 2) Place this NPC in any city (ex: prontera 150,150)
//= 3) Click NPC while wearing your target item
//===================================================

prontera,150,150,4    script    Costume Converter    4_M_BARD,{
    mes "[Costume Converter]";
    mes "Hello adventurer!";
    mes "I can convert your normal gears into costume version and vice versa.";
    next;

    //===================================================
    // Define your pairs here: { normal_id, costume_id }
    //===================================================
    setarray .ItemPair$[0],
        "3524,3525", // Hokage Helm
        // Add more below as needed...
        "XXXX,YYYY", // Example
        "AAAA,BBBB"; // Example

    //===================================================
    // Scan equipped headgears (upper/mid/lower)
    //===================================================
    set .@headgear, getequipid(EQI_HEAD_TOP);
    set .@found, 0;

    for (set .@i,0; .@i < getarraysize(.ItemPair$); set .@i,.@i+1) {
        setarray .@pair$, explode(",", .ItemPair$[.@i]);
        set .@normal, atoi(.@pair$[0]);
        set .@costume, atoi(.@pair$[1]);

        if (.@headgear == .@normal) {
            delitem .@normal, 1;
            getitem .@costume, 1;
            mes "Converted your normal item to costume version!";
            set .@found, 1;
            break;
        } else if (.@headgear == .@costume) {
            delitem .@costume, 1;
            getitem .@normal, 1;
            mes "Converted your costume item to normal version!";
            set .@found, 1;
            break;
        }
    }

    if (!.@found) {
        mes "You are not wearing any convertible item on your head.";
    }
    close;
}

 

- No cards/refine/copying — it purely swaps based on ID, making it safe and clean.
 

- Works only on EQI_HEAD_TOP, but you can easily extend to:

   EQI_HEAD_MID

   EQI_HEAD_LOW
 

- Just add your pairs like this:

setarray .ItemPair$[0],
	"3524,3525",  // Hokage Helm
	"3526,3527",  // Another custom headgear
	"3528,3529";  // and so on

 

Edited by Checkmate

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.