Jump to content
  • 0
prototype00

ADD Refine Items

Question

Hey guys, I need your help, how can I make the script refine only one list of Ids that is of my choice. ID 450086,450087,45088, grace items. Thanks 😉

Quote

prontera,147,156,5    script    Presença    851,{
    disable_items;
    if (countitem(6993))
        set [email protected],1;
    if (countitem(6993))
        set [email protected],1;
    if ([email protected] && [email protected]) {
        mes "[Refine Master]";
        mes "Hello!";
        mes "What's up?";
        mes "I'm a specialist";
        mes "for refining items,";
        mes "but I don't work anymore.";
        next;
        switch(select("I'll go on my way.:Hmm... this makes me curious.")) {
        case 1:
            mes "[Refine Master]";
            mes "Take care, adventurer.";
            close;
        case 2:
            mes "[Refine Master]";
            mes "Actually, I sometimes provide refine services for adventurers with a ^006400Refine Ticket^000000...";
            mes "Bye bye~!";
            close;
        }
    }
    emotion ET_SURPRISE;
    mes "[Refine Master]";
    mes "Greetings!";
    mes "I can refine an item up to the ^006400same level as your ticket^000000.";
    mes "You don't have to worry! There's no chance of breaking your item.";
    next;
    if(select("I'll come back later.:Refine item with ticket.") == 1) {
        mes "[Refine Master]";
        mes "Okay.";
        mes "You can come again later.";
        close;
    }
    mes "[Refine Master]";
    mes "Which equipment would you like to refine?";
    next;
    setarray [email protected]$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower";
    setarray [email protected][1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW;
    for(set [email protected],1; [email protected]<=20; set [email protected],[email protected]+1)
        set [email protected]$, [email protected]$+((getequipisequiped([email protected][[email protected]]))?getequipname([email protected][[email protected]]):[email protected]$[[email protected]]+"- [Empty]")+":";
    set [email protected], [email protected][ select([email protected]$) ];
    if (!getequipisequiped([email protected])) {
        mes "[Refine Master]";
        mes "You have to equip the item you want to refine.";
        close;
    }
    if (!getequipisenableref([email protected])) {
        emotion ET_OTL;
        mes "[Refine Master]";
        mes "Oh, I'm sorry.";
        mes "This item is impossible to refine.";
        close;
    }
    [email protected] = getequipid([email protected]); // save id of the item
    [email protected] = getequiprefinerycnt([email protected]); //save refinery count
    setarray [email protected][0], getequipcardid([email protected],0), getequipcardid([email protected],1), getequipcardid([email protected],2), getequipcardid([email protected],3);
    switch(getequipweaponlv([email protected])) {
    default:
    case 0:
        setarray [email protected][0],6993;
        set [email protected]$,"Armor";
        set [email protected],[email protected];
        break;
    case 1:
    case 2:
    case 3:
    case 4:
        setarray [email protected][0],6993;
        set [email protected]$,"Weapon";
        set [email protected],[email protected];
        break;
    }
    if ([email protected]) {
        emotion ET_THINK;
        mes "[Refine Master]";
        mes "If you want to refine this ^006400"[email protected]$+"^000000, please come along with ^006400"[email protected]$+" Refine Ticket^000000.";
        mes "See you later!";
        close;
    }
    mes "[Refine Master]";
    mes "Please choose which ^006400"[email protected]$+" Refine Ticket^000000 you want to use.";
    next;
    set [email protected]$,"";
    for(set [email protected],0; [email protected]<getarraysize([email protected]); set [email protected],[email protected]+1)
        set [email protected]$, [email protected]$+getitemname([email protected][[email protected]])+":";
    set [email protected], select([email protected]$)-1;
    set [email protected]_id, [email protected][[email protected]];
    if (countitem([email protected]_id) == 0) {
        emotion ET_QUESTION;
        mes "[Refine Master]";
        mes getitemname([email protected]_id)+" is not in your inventory. Did you put it in your storage?";
        mes "Please check again.";
        mes "See you later!";
        close;
    }
    mes "[Refine Master]";
    mes "I'm going to refine ^006400"+getequipname([email protected])+"^8B4513 to the next level^000000 with ^006400"+getitemname([email protected]_id)+"^000000.";
    mes "May I proceed?";
    next;
    if(select("No.:Yes.") == 1) {
        emotion ET_THINK;
        mes "[Refine Master]";
        mes "Oh, you changed your mind.";
        mes "Ok.";
        mes "You can come back later.";
        close;
    }
    if (getequiprefinerycnt([email protected]) == 20) {
        mes "[Refine Master]";
        mes "This ^006400"+getequipname([email protected])+"^8B4513 is PERFECT, no need to refine it anymore~";
        close;
    }
    mes "[Refine Master]";
    mes "Great.";
    mes "As you wish!";
    mes "I have my own special way to refine...";
    mes ".......ka boom!";
    specialeffect EF_SUI_EXPLOSION;
    if (countitem([email protected]_id)) {
        delitem [email protected]_id,1;

        // anti-hack
        if (callfunc("F_IsEquipIDHack", [email protected], [email protected]) ||
            callfunc("F_IsEquipRefineHack", [email protected], [email protected]) || callfunc("F_IsEquipCardHack", [email protected], [email protected][0], [email protected][1], [email protected][2], [email protected][3])) {
            mes "[Refine Master]";
            emotion ET_FRET;
            mes "Wait a second...";
            mes "Do you think I'm stupid?!";
            mes "You switched the item while I wasn't looking! Get out of here!";
            close;
        }
    } else {
        next;
        mes "Error!";
        mes "Please report this.";
        close;
    }
    successrefitem [email protected];
    next;
    emotion ET_DELIGHT;
    mes "[Refine Master]";
    mes "Alright, here it is~";
    mes "Well, ^0000FF"+strcharinfo(0)+"^000000!";
    mes "Congratulations on your shining "[email protected]$+".";
    mes "You look GREAT!";
    mes "Farewell~!";
    close;
}

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
setarray [email protected]_item_list, 450086, 450087, 45088;

if (inarray([email protected]_item_list, getequipid([email protected])) == -1) {
	emotion ET_OTL;
	mes "[Refine Master]";
	mes "Oh, I'm sorry.";
	mes "This item is impossible to refine.";
	close;
}

 

  • Upvote 1
Link to comment
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.   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.



×
×
  • Create New...

Important Information

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