viewing paste Unknown #739 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
//===== rAthena Script =======================================
// Headgear Enchanter
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= Any rAthena SVN
//===== Description: =========================================
//= Enchants headgears with enchantment stones.
//===== Additional Comments: =================================
//= 1.0 First Version. [Masao]
//============================================================
 
prontera,155,185,4  script  Headgear Enchanter  123,{
 
    mes "[Headgear Enchanter]";
    if (Zeny > 399999) {
        mes "I've been studying ways to enhance an headgear to maximize it's capability.";
        next;
        mes "[Headgear Enchanter]";
        mes "Enchanting is an awesome skill that infuses a mysterious status power into the headgear's hidden socket.";
        next;
        mes "[Headgear Enchanter]";
        mes "However, you have to keep in mind that if there are two headgears of the same kind in your possession, the Enchantment will be applied in the order they are placed in your inventory.";
        next;
        mes "[Headgear Enchanter]";
        mes "In that case, the Enchantment may be applied to an item which you didn't mean to Enchant. So just bring ^5555ffONE headgear^000000 you want enchanted to be safe...";
        next;
        mes "[Headgear Enchanter]";
        mes "I'm not responsible for what would happen if you have more than one of the same kind in your inventory.";
        next;
        switch(select("Upper Headgear:Mid Headgear:Low Headgear:Cancel")) {
        case 1:
            setarray .@Items[0],5147,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; //Item ID's für Upper Headgears eintragen, übrige 0en löschen.
            set @part,1;
            set .@k,1;
            break;
        case 2:
            setarray .@Items[0],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; //Item ID's für Mid Headgears eintragen, übrige 0en löschen.
            set @part,9;
            set .@k,1;
            break;
        case 3:
            setarray .@Items[0],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0; //Item ID's für Lower Headgears eintragen, übrige 0en löschen.
            set @part,10;
            set .@k,1;
            break;
        case 4:
            mes "[Headgear Enchanter]";
            mes "Please come back when you have any interest in enchanting your headgear.";
            close;
        }
        set .@menu$,"";
        for(set .@i,0; .@i<getarraysize(.@Items); set .@i,.@i+1)
            set .@menu$, .@menu$+getitemname(.@Items[.@i])+((.@k)?" [1]":"")+":";
        callsub S_Enchantheadgear, .@Items[select(.@menu$)-1];
        end;
    }
    mes "I am in charge of Enchanting headgears. Simply put, I've been studying ways to power-up headgear.";
    next;
    mes "[Headgear Enchanter]";
    mes "If by any chance, you would want to enchant your headgear, bring me 400,000 zeny and the headgear you want to enchant and you are all set to go.";
    close;
 
S_Enchantheadgear:
    set .@itemid,getarg(0);
    mes "[Headgear Enchanter]";
    if (countitem(.@itemid) == 1) {
        mes "Socket enchant wil cost you 400,000 zeny.";
        next;
        if(select("Hmm... Let me think it over.:Go ahead.")==1) {
            mes "[Headgear Enchanter]";
            mes "Well, I can't blame you. Safety first, eh?";
            mes "Now you have a nice day.";
            close;
        }
        if (Zeny < 400000) {
            mes "[Headgear Enchanter]";
            mes "Sorry, but you don't have enough zeny.";
            close;
        }
        mes "[Headgear Enchanter]";
        mes "In which hidden slot would you like to insert your echanted stone?";
        next;
        switch(select("1st:2nd:3rd:Cancel")){
        case 1:
            set .@addpart,1;
            break;
        case 2:
            set .@addpart,2;
            break;
        case 3:
            set .@addpart,3;
            break;
        case 4:
            mes "Well, I can't blame you. Safety first, eh?";
            mes "Now you have a nice day.";
            close;
        }
        mes "[Headgear Enchanter]";
        mes "Great, now please choose which enchanted stone you would like to insert:";
        next;
        set .@menu2$,"";
        for(set .@i,0; .@i<getarraysize(.IDRange); set .@i,.@i+1){
            set .@menu2$,.@menu2$+getitemname(.IDRange[.@i])+":";
        }
        set .@Stone,.IDRange[select(.@menu2$)-1];
        if(countitem(.@Stone) < 1){
            mes "[Headgear Enchanter]";
            mes "I'm sorry but it seems like you're not in possesion of that stone.";
            mes "Why don't you come back when you got the stone you would like to enchant?";
            close;
        }
        if(!isequipped(.@itemid){
            mes "[Headgear Enchanter]";
            mes "You need to equip the gear you would like to enchant, otherwise the enchantment won't work.";
            close;
        }
        mes "[Headgear Enchanter]";
        mes "Quite of an adventurer huh? Well, shall we?";
        close2;
        progressbar "ffff00",5;
        specialeffect2 154;
        set zeny,zeny-400000;
        delitem .@Stone,1;
        set .@refine,getequiprefinerycnt(@part);
        set .@card,getequipcardid(@part,0);
        set .@enchant2,getequipcardid(@part,1);
        set .@enchant3,getequipcardid(@part,2);
        set .@enchant4,getequipcardid(@part,3);
        switch(.@addpart){
        case 1:
            delitem2 .@itemid,1,1,.@refine,0,.@card,.@enchant2,.@enchant3,.@enchant4;
            getitem2 .@itemid,1,1,.@refine,0,.@card,.@Stone,.@enchant3,.@enchant4;
        case 2:
            delitem2 .@itemid,1,1,.@refine,0,.@card,.@enchant2,.@enchant3,.@enchant4;
            getitem2 .@itemid,1,1,.@refine,0,.@card,.@enchant2,.@Stone,.@enchant4;
        case 3:
            delitem2 .@itemid,1,1,.@refine,0,.@card,.@enchant2,.@enchant3,.@enchant4;
            getitem2 .@itemid,1,1,.@refine,0,.@card,.@enchant2,.@enchant3,.@Stone;
        }
        close;
    }
    mes "Hmm? There's nothing to be enchanted!";
    mes "Please come back with just ONE equipment to be enchanted.";
    close;
 
OnInit:
    setarray .IDRange[0],4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716,4717,4718,4719,4720,4721,4722,4723,4724,4725,4726,4727,4728,4729,4730,4731,4732,4733,4734,4735,4736,4737,4738,4739,4740,
    4741,4742,4743,4744,4745,4746,4747,4748,4749,4750,4751,4752,4753,4754,4755,4756,4757,4758,4759,4760,4761,4762,4763,4764,4765,4766,4767,4768,4769,4770,4771,4772,4773,4774,4775,4776,4777,4778,4779,4780,
    4781,4782,4783,4784,4785,4786,4787,4788,4789,4790,4800,4801,4802,4803,4804,4805,4806,4807,4808,4809,4810,4811,4812,4813,4814,4815,4816,4817,4818,4819,4820,4821,4822,4823,4824;
    end;
}
Viewed 786 times, submitted by Guest.