Advertisement
Emistry

[RO] Card Remover required item

Jan 9th, 2016
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.40 KB | None | 0 0
  1. // http://www.emistry.net/board/index.php?threads/card-remover.553/
  2.  
  3. prt_in,31,103,4 script  Card Remover#eAcustom   108,{
  4.  
  5.     set .itemid,7539; // required item
  6.     set .cost,1; // required amount
  7.    
  8.     mes "[Card Remover]";
  9.     mes "Good day, young one. I have the power to remove cards that you have compounded onto your equipment. Does this idea please you?";
  10.     next;
  11.     switch(select("Yes, it does.:No thanks.")) {
  12.     case 1:
  13.         mes "[Card Remover]";
  14.         mes "Very well. Which item shall I examine for you?";
  15.         next;
  16.  
  17.         setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
  18.         set .@menu$,"";
  19.         for( set .@i,1; .@i <= 10; set .@i,.@i+1 )
  20.         {
  21.             if( getequipisequiped(.@i) )
  22.             set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
  23.  
  24.             set .@menu$, .@menu$ + ":";
  25.         }
  26.         set .@part,select(.@menu$);
  27.         if(!getequipisequiped(.@part)) {
  28.             mes "[Card Remover]";
  29.             mes "Young one... Your not wearing anything there that I can remove cards from.";
  30.             close;
  31.         }
  32.         if(getequipcardcnt(.@part) == 0) {
  33.             mes "[Card Remover]";
  34.             mes "Young one... There are no cards compounded on this item. I can do nothing with it, I'm afraid.";
  35.             close;
  36.         }
  37.         set .@cardcount,getequipcardcnt(.@part);
  38.        
  39.         if (!checkweight(1202,(.@cardcount+1))) {
  40.             mes "^3355FFJust a minute!";
  41.             mes "I can't offer any of my";
  42.             mes "services to you because";
  43.             mes "you're carrying too much";
  44.             mes "stuff. Put your extra items in";
  45.             mes "Kafra Storage and come again~";
  46.             close;
  47.         }
  48.         mes "[Card Remover]";
  49.         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.";
  50.         next;
  51.         .@option = select("Give it a try ! "+.cost+" x "+getitemname( .itemid )+"^000000 ");
  52.         if( countitem( .itemid ) < .cost ) {
  53.             mes "[Card Remover]";
  54.             mes "You do not have all the items I require to work my magic, child. Come again when you do.";
  55.             close;
  56.         }
  57.         mes "[Card Remover]";
  58.         mes "Very well. I shall begin.";
  59.         delitem .itemid,.cost;
  60.         successremovecards .@part;
  61.         mes "[Card Remover]";
  62.         mes "The process was a success. Here are your cards and your item. Farewell.";
  63.         close;
  64.     default:
  65.         mes "[Card Remover]";
  66.         mes "Very well. Return at once if you seek my services.";
  67.         close;
  68.     }
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement