viewing paste Unknown #729 | 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 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
//===== rAthena Script =======================================
// Enchanted Stones Remover
//===== By: ==================================================
//= Masao
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= Any rAthena SVN
//===== Description: =========================================
//= Entfernt Enchanted Stones aus Headgears.
//===== Additional Comments: =================================
//= 1.0 First Version. [Masao]
//============================================================
 
prontera,155,180,4  script  Enchant Remover 123,{
 
    set .zenycost,200000; // Set base cost in zeny of the enchant remover services
    set .perenchantcost,25000; // set cost per enchant of the enchant remover services
    set @enchantnmbr,0;
    
    mes "[Enchant Remover]";
    mes "Good day, young one. I have the power to remove enchantments that you have compounded onto your headgears. Doesn't that sound great?";
    next;
    switch(select("Yes, it does.:What do you charge?:No thanks.")) {
    case 1:
        mes "[Enchant Remover]";
        mes "Very well. Which item shall I examine for you?";
        next;
        switch(select("[" + getequipname(1) + "]:[" + getequipname(9) + "]:[" + getequipname(10) + "]")){
        case 1:
            set @part,1;
            set @eid,getequipid(@part);
            break;
        case 2:
            set @part,9;
            set @eid,getequipid(@part);
            break;
        case 3:
            set @part,10;
            set @eid,getequipid(@part);
            break;
        }
        if((!getequipcardid(@part,1)) && (!getequipcardid(@part,2)) && (!getequipcardid(@part,3))) {
            mes "[Enchant Remover]";
            mes "Young one... There are no enchantments compounded on this item. I can do nothing with it, I'm afraid.";
            close;
        }
        if(getequipcardid(@part,1)){
            set @enchantnmbr,@enchantnmbr+1;
        }
        if(getequipcardid(@part,2)){
            set @enchantnmbr,@enchantnmbr+1;
        }
        if(getequipcardid(@part,3)){
            set @enchantnmbr,@enchantnmbr+1;
        }
        set @enchantcount,@enchantnmbr;
        if (!checkweight(1202,(@enchantcount+1))) { 
            mes "^3355FFJust a minute!";
            mes "I can't offer any of my";
            mes "services to you because";
            mes "you're carrying too much";
            mes "stuff. Put your extra items in";
            mes "Kafra Storage and come again~";
            close;
        }
        mes "[Enchant Remover]";
        mes "This item has " + @enchantcount + " enchantments compounded on it. To perform my magic, I will need " + (.zenycost+(@enchantcount * .perenchantcost)) + " zeny.";
        next;
        mes "[Enchant Remover]";
        mes "^FF0000And be aware that there is an 30% chance of failure when removing the stones! Which means the zeny and the enchanted stones will be gone if I fail!^000000";
        mes "So are you sure you want to proceed?";
        next;
        switch(select("Yes, remove all enchantments:Yes, remove specific enchantment:No, I want to cancel")) {
        case 1:
            mes "[Enchant Remover]";
            mes "Very well. I shall begin.";
            next;
            if(zeny < (.zenycost+(@enchantcount * .perenchantcost))) {
                mes "[Enchant Remover]";
                mes "You do not have enough zeny which I require to work my magic, child. Come again when you do.";
                close;
            }
            if(!getequipisequiped(@part)) {
                mes "[Wise Old Woman]";
                mes "Young one... Your not wearing anything there that I can remove cards from.";
                close;
            }
            if(getequipid(@part) != @eid){
                mes "[Enchant Remover]";
                mes "Are you trying to make me laugh?!";
                mes "I saw exactly how you tried to change your Equipment!";
                close;
            }
            set @refine,getequiprefinerycnt(@part);
            set @card,getequipcardid(@part,0);
            set @enchant2,getequipcardid(@part,1);
            set @enchant3,getequipcardid(@part,2);
            set @enchant4,getequipcardid(@part,3);
            set zeny,zeny - (.zenycost+(@enchantcount * .perenchantcost));
            delitem2 @eid,1,1,@refine,0,@card,@enchant2,@enchant3,@enchant4;
            if(rand(100) >= 30){
                if(@enchant2){
                    getitem @enchant2,1;
                }
                if(@enchant3){
                    getitem @enchant3,1;
                }
                if(@enchant4){
                    getitem @enchant4,1;
                }
            }
            getitem2 @eid,1,1,@refine,0,@card,0,0,0;
            mes "[Enchant Remover]";
            mes "The process was a success. Here are your enchantments and your item. Farewell.";
            close;
        case 2:
            mes "[Enchant Remover]";
            mes "Ok, which enchantment should I remove?";
            next;
            switch(select("1st:2nd:3rd:Cancel")){
            case 1:
                mes "[Enchant Remover]";
                mes "Very well. I shall begin.";
                next;
                if(zeny < (.zenycost+.perenchantcost)) {
                    mes "[Enchant Remover]";
                    mes "You do not have enough zeny which I require to work my magic, child. Come again when you do.";
                    close;
                }
                if(!getequipisequiped(@part)) {
                    mes "[Wise Old Woman]";
                    mes "Young one... Your not wearing anything there that I can remove cards from.";
                    close;
                }
                if(getequipid(@part) != @eid){
                    mes "[Enchant Remover]";
                    mes "Are you trying to make me laugh?!";
                    mes "I saw exactly how you tried to change your Equipment!";
                    close;
                }
                set @refine,getequiprefinerycnt(@part);
                set @card,getequipcardid(@part,0);
                set @enchant2,getequipcardid(@part,1);
                set zeny,zeny - (.zenycost+.perenchantcost);
                delitem2 @eid,1,1,@refine,0,@card,@enchant2,@enchant3,@enchant4;
                getitem2 @eid,1,1,@refine,0,@card,0,@enchant3,@enchant4;
                if(rand(100) >= 30){
                    getitem @enchant2,1;
                }
                mes "[Enchant Remover]";
                mes "The process was a success. Here are your enchantments and your item. Farewell.";
                close;
            case 2:
                mes "[Enchant Remover]";
                mes "Very well. I shall begin.";
                next;
                if(zeny < (.zenycost+.perenchantcost)) {
                    mes "[Enchant Remover]";
                    mes "You do not have enough zeny which I require to work my magic, child. Come again when you do.";
                    close;
                }
                if(!getequipisequiped(@part)) {
                    mes "[Wise Old Woman]";
                    mes "Young one... Your not wearing anything there that I can remove cards from.";
                    close;
                }
                if(getequipid(@part) != @eid){
                    mes "[Enchant Remover]";
                    mes "Are you trying to make me laugh?!";
                    mes "I saw exactly how you tried to change your Equipment!";
                    close;
                }
                set @refine,getequiprefinerycnt(@part);
                set @card,getequipcardid(@part,0);
                set @enchant3,getequipcardid(@part,2);
                set zeny,zeny - (.zenycost+.perenchantcost);
                delitem2 @eid,1,1,@refine,0,@card,@enchant2,@enchant3,@enchant4;
                if(rand(100) >= 30){
                    getitem @enchant3,1;
                }
                getitem2 @eid,1,1,@refine,0,@card,@enchant2,0,@enchant4;
                mes "[Enchant Remover]";
                mes "The process was a success. Here are your enchantments and your item. Farewell.";
                close;
            case 3:
                mes "[Enchant Remover]";
                mes "Very well. I shall begin.";
                next;
                if(zeny < (.zenycost+.perenchantcost)) {
                    mes "[Enchant Remover]";
                    mes "You do not have enough zeny which I require to work my magic, child. Come again when you do.";
                    close;
                }
                if(!getequipisequiped(@part)) {
                    mes "[Wise Old Woman]";
                    mes "Young one... Your not wearing anything there that I can remove cards from.";
                    close;
                }
                if(getequipid(@part) != @eid){
                    mes "[Enchant Remover]";
                    mes "Are you trying to make me laugh?!";
                    mes "I saw exactly how you tried to change your Equipment!";
                    close;
                }
                set @refine,getequiprefinerycnt(@part);
                set @card,getequipcardid(@part,0);
                set @enchant4,getequipcardid(@part,3);
                set zeny,zeny - (.zenycost+.perenchantcost);
                delitem2 @eid,1,1,@refine,0,@card,@enchant2,@enchant3,@enchant4;
                if(rand(100) >= 30){
                    getitem @enchant4,1;
                }
                getitem2 @eid,1,1,@refine,0,@card,@enchant2,@enchant3,0;
                mes "[Enchant Remover]";
                mes "The process was a success. Here are your enchantments and your item. Farewell.";
                close;
            case 4:
                mes "[Enchant Remover]";
                mes "Very well. Return at once if you seek my services.";
                close;
            }
        case 3:
            mes "[Enchant Remover]";
            mes "Very well. Return at once if you seek my services.";
            close;
        }
    case 2:
        mes "[Enchant Remover]";
        mes "I charge a flat fee of "+.zenycost+" zeny, plus "+.perenchantcost+" zeny for each card I remove from the item.";
        mes "^FF0000And be aware that there is an 30% chance of failure when removing the stones! Which means the zeny and the enchanted stones will be gone if I fail!^000000";
        close;
    case 3:
        mes "[Enchant Remover]";
        mes "Very well. Return at once if you seek my services.";
        close;
    }
}
Viewed 823 times, submitted by Guest.