Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.61 KB | None | 0 0
  1. //gold or iron
  2. 021-2.gat,23,55,0   script  machinary   160,{
  3.     set @IRON_ITEM, 640;
  4.         set @IRI_COAL, 10;
  5.         set @IRI_GP, 1000;
  6.         set @IRI_iron, 5;
  7.     set @GOLD_ITEM, 4029;
  8.         set @IRI_COAL_G, 15;
  9.         set @IRI_GP_G, 2000;
  10.         set @IRI_Gold, 6;
  11.     set @COAL_ITEM, 4001;
  12.     set @IRON_INGOT, 4015;
  13.     set @GOLD_INGOT, 4030;
  14.     mes "[machinary]";
  15.     mes "";
  16.     menu    "Do Iron Ingot", -,
  17.             "Do Gold Ingot", -,
  18.             "actualy, what do I need to bring ?", -,
  19.             "good bye then.", -;
  20.         if (@menu == 1) set @choice, 1;
  21.         if (@menu == 2) set @choice, 2;
  22.         if (@menu == 3) goto L_make;
  23.         if (@menu == 4) close;
  24.     if (@choice == 1) setarray @req_items, @IRON_ITEM, @IRI_COAL, @IRI_GP, @IRI_iron, @IRON_INGOT; 
  25.     if (@choice == 2) setarray @req_items, @GOLD_ITEM, @IRI_COAL_G, @IRI_GP_G, @IRI_Gold, @GOLD_INGOT;
  26.     mes "[machinary]";
  27.     mes "how many "+getitemname(@req_items[4])+"you would like to have ?"; 
  28.     input @NR;
  29.     if (@NR == 0) goto L_bye;
  30.     if (@coutitem(@req_items[4]) goto L_after;
  31.     getinventorylist;
  32.     if (@inventorylist_count == 100 || @coutitem(@req_items[0]) => @NR*@req_items[3] || @coutitem(@COAL_ITEM) => @NR*@req_items[1]  ) goto L_tooweight;
  33. L_after:
  34. //do you have all the item req ?
  35.     if (@coutitem(@req_items[0]) < @NR*@req_items[3]) goto L_Itemout;
  36.     if (@countitem(@COAL_ITEM) < @NR*@req_items[1]) goto L_coal;
  37.     if (@zeny < (@NR*@IRI_GP)) goto L_noGP;
  38. //player have all item req
  39.     //del them all !
  40.         delitem @req_items[0], @NR*@req_items[3];
  41.         delitem @COAL_ITEM, @NR*@req_items[1];
  42.         set zeny, @NR*@IRI_GP; 
  43.     //redward !
  44.         getitem @req_items[4], @NR;
  45.     close;
  46. L_Itemout:
  47.     mes "[machinary]";
  48.     mes ((@NR*@req_items[3])-countitem(@req_items[0]))+" "+ getitemname(@req_items[0])+" are not here, try to get them.";  
  49. close;
  50. L_coal:
  51.     mes "[machinary]";
  52.     mes ((@NR*@req_items[1])-countitem(@COAL_ITEM))+" Coal are missing, try to get them."; 
  53. close;
  54. L_noGP:
  55.     mes "[machinary]";
  56.     mes "Do you think it's free ? Get "+((@NR*@req_items[1]) - zeny)+" if you want to have "+ @NR +" "+getitemname(@req_items[4])+".";
  57. close;
  58. L_make:
  59.     mes "[machinary]";
  60.     mes "Notice: for do an Iron Ingot, you need to stop being a faggot and close minecraft";
  61.     mes "- 5 irons ores";
  62.     mes "- 10 coals";
  63.     mes "- 1000 gp";
  64.     next;
  65.     mes "[machinary]";
  66.     mes "Notice: for do an Gold Ingot, you need";
  67.     mes "- 6 golds ores";
  68.     mes "- 15 coals";
  69.     mes "- 2000 gp";
  70.     close;
  71. L_bye:
  72.     mes "[machinary]";
  73.     mes "you cannot put anything in the machinery and win something for free.";
  74.     close;
  75.    
  76. L_tooweight:
  77. set @this$, "this"
  78. if(@NR => 2) set @this$, "these";
  79.     mes "[machinary]";
  80.     mes "you won't be able to carry "+ @this$ +" "+ getitemname(@req_items[4]) +".";
  81.     close;
  82.  
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement