diff options
author | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-29 16:10:48 +0000 |
---|---|---|
committer | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-01-29 16:10:48 +0000 |
commit | 620e60eebce2c1f35c5c9a82f6ca365b316587f5 (patch) | |
tree | 38a39e0415f419d9a49ae456ed0e26654c23d559 /npc/custom/card_remover.txt | |
parent | a2675f07d7da22a7c6ae11f545bf8f671e785a82 (diff) | |
download | hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.gz hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.bz2 hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.xz hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.zip |
AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/custom/card_remover.txt')
-rw-r--r-- | npc/custom/card_remover.txt | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/npc/custom/card_remover.txt b/npc/custom/card_remover.txt new file mode 100644 index 000000000..8af6ed157 --- /dev/null +++ b/npc/custom/card_remover.txt @@ -0,0 +1,175 @@ +// Card removal NPC by TyrNemesis^
+// DANGEROUS! TODO: Think.. think 8) [Lupus]
+
+
+prt_in.gat,28,73,4 script Wise Old Woman 78,{
+
+UPGRADEROOT:
+ 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;
+ menu "Yes, it does.",REMOVEMENU,
+ "What do you charge?",REMOVEPRICE,
+ "No thanks.",CLOSEOUT;
+
+REMOVEPRICE:
+ mes "[Wise Old Woman]";
+ mes "I charge a flat fee of 200000 zeny, plus 25000 zeny for each card I remove from the item. In addition, I need a star crumb and a yellow gemstone to work my magic.";
+ next;
+ menu "Very well. Let's do it.",REMOVEMENU,
+ "No thanks.",CLOSEOUT;
+
+REMOVEMENU:
+ mes "[Wise Old Woman]";
+ mes "Very well. Which item shall I examine for you?";
+ next;
+ menu "I changed my mind.",CLOSEOUT,
+ getequipname(1),SLOT1,
+ getequipname(2),SLOT2,
+ getequipname(3),SLOT3,
+ getequipname(4),SLOT4,
+ getequipname(5),SLOT5,
+ getequipname(6),SLOT6,
+ getequipname(7),SLOT7,
+ getequipname(8),SLOT8,
+ getequipname(9),SLOT9,
+ getequipname(10),SLOT10;
+
+SLOT1:
+ set @part,1;
+ goto CARDNUMCHECK;
+
+SLOT2:
+ set @part,2;
+ goto CARDNUMCHECK;
+
+SLOT3:
+ set @part,3;
+ goto CARDNUMCHECK;
+
+SLOT4:
+ set @part,4;
+ goto CARDNUMCHECK;
+
+SLOT5:
+ set @part,5;
+ goto CARDNUMCHECK;
+
+SLOT6:
+ set @part,6;
+ goto CARDNUMCHECK;
+
+SLOT7:
+ set @part,7;
+ goto CARDNUMCHECK;
+
+SLOT8:
+ set @part,8;
+ goto CARDNUMCHECK;
+
+SLOT9:
+ set @part,9;
+ goto CARDNUMCHECK;
+
+SLOT10:
+ set @part,10;
+ goto CARDNUMCHECK;
+
+CARDNUMCHECK:
+ if(getequipcardcnt(@part) == 0) goto DENYCARDCOUNT;
+ set @cardcount,getequipcardcnt(@part);
+ if(@cardcount > 1) goto CARDNUMMULTIMSG;
+ mes "[Wise Old Woman]";
+ mes "This item has " + @cardcount + " card compounded on it. To perform my magic, I will need 225000 zeny, a ^0000FFStar Crumb^000000, and a ^0000FFYellow Gemstone^000000.";
+ goto CARDNUMPOSTMSG;
+CARDNUMMULTIMSG:
+ mes "[Wise Old Woman]";
+ mes "This item has " + @cardcount + " cards compounded on it. To perform my magic, I will need " + (200000+(@cardcount * 25000)) + " zeny, a ^0000FFStar Crumb^000000, and a ^0000FFYellow Gemstone^000000.";
+CARDNUMPOSTMSG:
+ next;
+ menu "Very well. Do it.",REMOVECARDWARNING,
+ "Never mind.",CLOSEOUT;
+
+REMOVECARDWARNING:
+ 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;
+ menu "I changed my mind about this.",CLOSEOUT,
+ "The item.",PRIORITYITEM,
+ "The cards.",PRIORITYCARD;
+
+PRIORITYITEM:
+ set @failtype,1;
+ goto REMOVECARD;
+
+PRIORITYCARD:
+ set @failtype,2;
+ goto REMOVECARD;
+
+REMOVECARD:
+ mes "[Wise Old Woman]";
+ mes "Very well. I shall begin.";
+ if((zeny < (200000+(@cardcount * 25000))) || (countitem(1000) < 1) || (countitem(715) < 1)) goto DENYMATERIAL;
+ set zeny,zeny - (200000+(@cardcount * 25000));
+ delitem 1000,1;
+ delitem 715,1;
+// Replace the constants in the next 3 lines with failure chance values defined in refine_db.txt
+// First value = Total failure chance (item and cards destroyed)
+// Second value = Partial failure chance (one or the other is destroyed, player decides which one is safe)
+// Third value = Harmless failure chance (all that's lost is your investment)
+
+ set @failchance,rand(100);
+// if(@failchance < 2) goto FAILREMOVECARD0;
+// if((@failchance < 8) && (@failtype == 1)) goto FAILREMOVECARD1;
+// if((@failchance < 8) && (@failtype == 2)) goto FAILREMOVECARD2;
+ if(@failchance < 10) goto FAILREMOVECARD3;
+ successremovecards @part;
+ next;
+ mes "[Wise Old Woman]";
+ mes "The process was a success. Here are your cards and your item. Farewell.";
+ close;
+
+FAILREMOVECARD0:
+ failedremovecards @part,0;
+ next;
+ mes "[Wise Old Woman]";
+ mes "The process was a total failure. I am afraid the item and the cards were destroyed.";
+ close;
+
+FAILREMOVECARD1:
+ failedremovecards @part,1;
+ next;
+ mes "[Wise Old Woman]";
+ mes "While I have managed to remove the cards from the item, they were destroyed in the process. The item, however, is okay.";
+ close;
+
+FAILREMOVECARD2:
+ failedremovecards @part,2;
+ next;
+ mes "[Wise Old Woman]";
+ mes "Most unfortunate. I succeeded at removing the cards, but the item itself was destroyed in the process.";
+ close;
+
+FAILREMOVECARD3:
+ failedremovecards @part,3;
+ next;
+ mes "[Wise Old Woman]";
+ mes "I have failed to remove the cards. Luckily, however, both the item and the cards are still okay.";
+ close;
+
+DENYCARDCOUNT:
+ 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;
+
+DENYMATERIAL:
+ next;
+ 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;
+
+CLOSEOUT:
+ mes "[Wise Old Woman]";
+ mes "Very well. Return at once if you seek my services.";
+ close;
+}
|