• 0
wasaru

breaking items and refined items back to 0

Question

Posted (edited)

can anyone edit me this script. i wanna remove the " breaking item when fail " 

and remove the " going back to +0 refined items when success "

and i wanna add " clear enchants too " plz

thank you

madropvp,93,89,3    script    XileRO Gear Enchanter    4_F_VALKYRIE2,{
    disable_items;
    mes "[XileRO Gear Enchanter]";
    if (Zeny >= 100000000) {
        mes "I've been studying ways to enhance a gear to maximize its capability.";
        next;
        mes "[XileRO Gear Enchanter";
        mes "Enchanting is an awesome skill that infuses a mysterious status powers into the armor's hidden socket. it will enchant to ^5555ff+1 to +3 all stats^000000.randomly";
        next;
        mes "[XileRO Gear Enchanter]";
        mes "If by any chance, you would want to enchant your gear, bring me ^5555ff100,000,000^000000 zeny and the gear you want to enchant and you are all set to go.";
        mes "Are you ready??.";
        next;
        mes "[XileRO Gear Enchanter]";
        mes "In that case, the Enchantment may be applied to an item which you didn't mean to Enchant. So just bring ^5555ffONE Gear^000000 you want enchanted to be safe...";
        mes "And just to warn you that the item can be ^5555ffBREAK^000000 let's see how lucky you are..";
        next;
        mes "[XileRO Gear Enchanter]";
        mes "I'm not responsible for what would happen if you have more than one of the same kind in your inventory.";
        mes "So before we start, your gear must be ^5555ff+0^000000 and ^5555ffno card^000000. or else it will remove when the enchants is a success.";
        mes "are you ready?...";
        next;
        switch(select("Non Slotted Armor.", "Slotted Armor.", "High Grade Armor.", "Temporal Shoes Slotted.", "Garment.", "Maybe next time.")) {
        case 1:
            setarray [email protected][0],2307,2309,2314,2316,2321,2325,2327,2328,2330,2332,2334,2335,2341,2344,2346,2348,2350,2337,2386,2394,2395,2396;
            [email protected] = 50;
            break;
        case 2:
            setarray [email protected][0],2311,2318,2319,2320,2308,2310,2315,2317,2322,2324,2326,2331,2333,2336,2342,2345,2347,2349,2351;
            [email protected] = 55;
            [email protected] = 1;
            break;
        case 3:
            setarray [email protected][0],2364,2365,2391,2374,2375,2376,2377,2378,2379,2380,2381,2382,2387,2388,2389,2357,15147,15146,2390;
            [email protected] = 60;
            break;
        case 4:
            setarray [email protected][0],22006,22010,22008,22009,22011,22007;
            [email protected] = 60;
            break;
        case 5:
            setarray [email protected][0],2589,2576;
            [email protected] = 60;
            break;
        case 6:
            mes "[XileRO Gear Enchanter]";
            mes "Please come back when you have any interest in enchanting your gear.";
            close;
        }
        [email protected]$ = "";
        for([email protected] = 0; [email protected]<getarraysize([email protected]); [email protected])
            [email protected]$ += getitemname([email protected][[email protected]])+(([email protected])?" [1]":"")+":";
        callsub S_EnchantArmor, [email protected][select([email protected]$)-1], [email protected];
        end;
    }
    mes "I am in charge of Enchanting gears. Simply put, I've been studying ways to power-up gear.";
    next;
    mes "[XileRO Gear Enchanter]";
    mes "If by any chance, you would want to enchant your gear, bring me ^5555ff100,000,000^000000 zeny and the gear you want to enchant and you are all set to go.";
    mes "Are you ready??.";
    close;

S_EnchantArmor:
    [email protected] = getarg(0);
    [email protected] = getarg(1);
    mes "[XileRO Gear Enchanter]";
    if (countitem([email protected]) == 1) {
        mes "Socket enchant will cost you ^5555ff100,000,000^000000 zeny. And there will be a random option enchanted. Of course, there is a chance of breaking your gear.";
        next;
        mes "[XileRO Gear Enchanter]";
        mes "First and most importantly.";
        mes "^ff5555Existing Refine Level of the Gear";
        mes "and Cards will be GONE.^000000";
        mes "Do you still want to try an Enchant?";
        next;
        if(select("Hmm... Let me think it over.", "Go ahead.") == 1) {
            mes "[XileRO Gear Enchanter]";
            mes "Well, I can't blame you. Safety first, eh?";
            mes "Now you have a nice day.";
            close;
        }
        mes "[XileRO Gear Enchanter]";
        mes "Quite of an adventurer huh? Well, shall we?";
        close2;
        specialeffect(EF_MAPPILLAR, AREA, playerattached());
        if (Zeny < 100000000) {
            mes "[XileRO Gear Enchanter]";
            mes "Sorry, but you don't have enough zeny.";
            close;
        }
        progressbar "ffff00",7;
        Zeny -= 100000000;
        delitem [email protected],1;
        switch (rand(1,[email protected])) {
            case 1: [email protected] = 30559;break;
            case 2: [email protected] = 30557;break;
            case 3: [email protected] = 30558;break;
            case 4: [email protected] = 30557;break;
            case 5: [email protected] = 30559;break;
            case 6: [email protected] = 30557;break;
            case 7:
            case 8: [email protected] = 30558;break;
            case 9:
            case 10: [email protected] = 30558;break;
            case 11:
            case 12: [email protected] = 30559;break;
            case 13:
            case 14: [email protected] = 30559;break;
            case 15:
            case 16: [email protected] = 30557;break;
            case 17:
            case 18: [email protected] = 30557;break;
            case 19:
            case 20:
            case 21: [email protected] = 30559;break;
            case 22:
            case 23:
            case 24: [email protected] = 30558;break;
            case 25:
            case 26:
            case 27: [email protected] = 30558;break;
            case 28:
            case 29:
            case 30: [email protected] = 30557;break;
            case 31:
            case 32:
            case 33: [email protected] = 30557;break;
            case 34:
            case 35:
            case 36: [email protected] = 30559;break;
            default:
                specialeffect(EF_PHARMACY_FAIL, AREA, playerattached());
                mes "[XileRO Gear Enchanter]";
                mes "Well that's too bad.";
                mes "The requested equipment has failed to enchant.";
                close;
        }
        getitem2 [email protected], 1, 1, 0, 0, 0, 0, 0, [email protected];
    }
    else {
        mes "Hmm? There's nothing to be enchanted!";
        mes "Please come back with just ONE equipment to be enchanted.";
        close;
    }
}

 

Edited by Dastgir
codebox

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

breaking item when fail

    delitem [email protected],1;

 

going back to +0 refined items when success

 getitem2 [email protected], 1, 1, 0, 0, 0, 0, 0, [email protected];

search for  getitem2 and getequiprefinerycnt

getitem2("<item name>", <amount>, <identify>, <refine>, <attribute>, <card1>, <card2>, <card3>, <card4>{, <account ID>})

 

for clear enchants you need to add new npc.

 

untested

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now