viewing paste Unknown #10347 | Athena

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
//===== Hercules Script ======================================
//= Card Removal NPC
//===== By: ==================================================
//= TyrNemesis^
//===== Current Version: =====================================
//= 1.2a
//===== Description: =========================================
//= Removes cards from equipped items.
//===== Additional Comments: =================================
//= 1.0 First version. [TyrNemesis^]
//= 1.2 Optimized and fixed getequipname menu. [Kisuka]
//= 1.2a Added 'disable_items' command. [Euphy]
//============================================================
 
prt_in,28,73,4  script  Wise Old Woman#eAcustom 1_F_ORIENT_04,{
 
        set .zenycost,200000; // Set base cost in zeny of the card remover services
        set .percardcost,25000; // set cost per card of the card remover services
        set .faildestroy,1; // Should the card remover have a chance of failure that destroys items? 1 = Yes, 0 = No.
 
        disable_items;
        mes "[Wise Old Woman]";
        mes "Good day, young one. I have the power to remove cards that you have compounded onto your equipment. Does this idea please you?";
        next;
        switch(select("Yes, it does.:What do you charge?:No thanks.")) {
        case 1:
                mes "[Wise Old Woman]";
                mes "Very well. Which item shall I examine for you?";
                next;
 
                setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
                set .@menu$,"";
                for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
                {
                        if( getequipisequiped(.@i) )
                        set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
 
                        set .@menu$, .@menu$ + ":";
                }
                set .@part,select(.@menu$);
                if(!getequipisequiped(.@part)) {
                        mes "[Wise Old Woman]";
                        mes "Young one... Your not wearing anything there that I can remove cards from.";
                        close;
                }
                if(getequipcardcnt(.@part) == 0) {
                        mes "[Wise Old Woman]";
                        mes "Young one... There are no cards compounded on this item. I can do nothing with it, I'm afraid.";
                        close;
                }
                set .@cardcount,getequipcardcnt(.@part);
               
                if (!checkweight(1202,(.@cardcount+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 "[Wise Old Woman]";
                mes "This item has " + .@cardcount + " cards compounded on it. To perform my magic, I will need " + (.zenycost+(.@cardcount * .percardcost)) + " zeny, a ^0000FFStar Crumb^000000, and a ^0000FFYellow Gemstone^000000.";
                next;
                if(select("Very well. Do it.:Nevermind.") == 2) {
                        mes "[Wise Old Woman]";
                        mes "Very well. Return at once if you seek my services.";
                        close;
                }
                if((Zeny < (.zenycost+(.@cardcount * .percardcost))) || (countitem(1000) < 1) || (countitem(715) < 1)) {
                        mes "[Wise Old Woman]";
                        mes "You do not have all the items I require to work my magic, child. Come again when you do.";
                        close;
                }
                mes "[Wise Old Woman]";
                mes "Before I begin, I must warn you--I may fail. If I do, I may destroy the cards, the item, or both. I do not give refunds. That being said, which is more important to you: The cards, or the item?";
                next;
                switch(select("I changed my mind about this.:The item.:The cards.")) {
                case 1:
                        mes "[Wise Old Woman]";
                        mes "Very well. Return at once if you seek my services.";
                        close;
                case 2:
                        set .@failtype,1;
                        break;
                case 3:
                        set .@failtype,2;
                }
                mes "[Wise Old Woman]";
                mes "Very well. I shall begin.";
                Zeny -= (.zenycost+(.@cardcount * .percardcost));
                delitem 1000,1;
                delitem 715,1;
                next;
                successremovecards .@part;
                mes "[Wise Old Woman]";
                mes "The process was a success. Here are your cards and your item. Farewell.";
                close;
        case 2:
                mes "[Wise Old Woman]";
                mes "I charge a flat fee of "+.zenycost+" zeny, plus "+.percardcost+" zeny for each card I remove from the item. In addition, I need a star crumb and a yellow gemstone to work my magic.";
                close;
        case 3:
                mes "[Wise Old Woman]";
                mes "Very well. Return at once if you seek my services.";
                close;
        }
}
 
Viewed 711 times, submitted by evilpuncker.