viewing paste Unknown #737 | 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 155 156 157
//===== rAthena Script =======================================
// Headgear Enchanter
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= Any rAthena SVN
//===== Description: =========================================
//= Enchanted Headgears mit speziellen enchanted 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],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 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_EnchantArmor, .@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. And there will be a random option enchanted. Of course, there is a chance of breaking your headgear.";
        next;
        mes "[Headgear Enchanter]";
        mes "First and most importantly.";
        mes "^ff5555Existing Refine Level of the headgear";
        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 "[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<124; set .@i,.@i+1){
            set .@menu2$,.@menu2$+getitemname(.IDRange[.@i]);
        }
        for(set .@j,0; .@j<20; set .@j,.@j+1){
            set .@menu2$,.@menu2$+getitemname(.IDRange2[.@j]);
        }
        set .@Stone,select(.@menu2$)-1;
        mes "[Headgear Enchanter]";
        mes "Quite of an adventurer huh? Well, shall we?";
        close2;
        progressbar "ffff00",5;
        specialeffect2 154;
        set zeny,zeny-400000;
        set @refine,getequiprefinerycnt(.@part);
        set @card,getequipcardid(.@part,0);
        set @enchant2,getequipcardid(.@part,1);
        set @enchant3,getequipcardid(.@part,2);
        set @enchant4,getequipcardid(.@part,3);
        if(.@addpart == 1){
            delitem2 .@itemid,1,1,@refine,0,@card,@enchant2,@enchant3,@enchant4;
            getitem2 .@itemid,1,1,@refine,0,@card,.@addpart,@enchant3,@enchant4;
        } else if(.@addpart == 2){
            delitem2 .@itemid,1,1,@refine,0,@card,@enchant2,@enchant3,@enchant4;
            getitem2 .@itemid,1,1,@refine,0,@card,@enchant1,.@addpart,@enchant4;
        } else if(.@addpart == 3){
            delitem2 .@itemid,1,1,@refine,0,@card,@enchant2,@enchant3,@enchant4;
            getitem2 .@itemid,1,1,@refine,0,@card,@enchant1,@enchant3,.@addpart;
        }
        close;
    }
    mes "Hmm? There's nothing to be enchanted!";
    mes "Please come back with just ONE equipment to be enchanted.";
    close;
 
OnInit:
    for(set .@i,4700; .@i < 4824; set .@i,.@i+1){
        for(set .@j,0; .@j < 124; set .@j,.@j+1){
            setarray .IDRange[.@j],.@i;
        }
    }
    for(set .@x,4824; .@x < 4844; set .@x,.@x+1){
        for(set .@y,0; .@y < 20; set .@y,.@y+1){
            setarray .IDRange2[.@y],.@x;
        }
    }
    end;
}
Viewed 907 times, submitted by Guest.