Advertisement
Guest User

change herbe 1:2

a guest
Oct 10th, 2010
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.25 KB | None | 0 0
  1. //####################################
  2. // changer of herb                   #
  3. // change herb for another herb      #
  4. //                                   #
  5. //####################################
  6.  
  7. //---------------------------
  8. //map and his name can change
  9. //---------------------------
  10. 001-1.gat,45,40,0   script  Elf 130,{
  11.     mes "[Elf]";
  12.     mes "\"I'm a herb changer\"";
  13.     next;
  14.     mes "[Elf]";
  15.     mes "\"well, do you want trade your herbs for mine ? you can change what type of herb you want.\"";
  16.     menu
  17.         "yes, why not", L_herbwanted,
  18.         "not for the moment", -;
  19.     close;
  20.  
  21. //----------------------|
  22. //herb who you want/need|
  23. //----------------------|
  24.     L_herbwanted:
  25.     mes "[Elf]";
  26.     mes "\"what's kind of herb you want ?\"";
  27.     menu
  28.         "Cobalt herb", L_cobaltw,
  29.         "Alizarin herb", L_alizarinw,
  30.         "Gamboge herb", L_gambogew,
  31.         "Mauve herb", L_mauvew;
  32.     close;
  33.     L_cobaltw:
  34.     set @want,681;
  35.     goto L_Many;
  36.         close;
  37.     L_alizarinw:
  38.     set @want,683;
  39.     goto L_Many;
  40.     close;
  41.     L_gambogew:
  42.     set @want,682;
  43.     goto L_Many;
  44.         close;
  45.     L_mauvew:
  46.     set @want,680;
  47.     goto L_Many;
  48.         close;
  49. //-----------------
  50. //herb who you have
  51. //-----------------
  52.     L_echange:
  53.     mes "[Elf]";
  54.     mes "\"what's kind of herb you want to change with me? but you have to give me "+ @num*2 +" herbs.\"";
  55.     menu
  56.         "Cobalt herb", L_Cobalt,
  57.         "Alizarin herb", L_Alizarin,
  58.         "Gamboge herb", L_Gamboge,
  59.         "Mauve herb", L_Mauve;
  60.     close;
  61.     L_Cobalt:
  62.     set @hkind,681;
  63.     goto L_change;
  64.         close;
  65.     L_Alizarin:
  66.     set @hkind,683;
  67.     goto L_change;
  68.     close;
  69.     L_Gamboge:
  70.     set @hkind,682;
  71.     goto L_change;
  72.         close;
  73.     L_Mauve:
  74.     set @hkind,680;
  75.     goto L_change;
  76.         close;
  77. //-------------------
  78. //who many you need ?  
  79. //-------------------
  80.     L_Many:
  81.     mes "[Elf]";
  82.     mes "\"How many herb you want to have ?\"";
  83.     input @num;
  84.     goto L_echange;
  85.     L_Noplace:
  86.     mes "[Elf]";
  87.     mes "\"where you can put all My herbs ?\"";
  88.     close;
  89.  
  90.     L_notherb:
  91.     mes "[Elf]";
  92.     mes "\"You don't have "+ @num*2 +" herb of this kind.\"";
  93.     close;
  94.  
  95. //-----------|
  96. //the trade  |
  97. //-----------|
  98.     L_change:
  99.     if(@num*2 > countitem(@hkind)) goto L_notherb;
  100.     if(@inventorylist_count == 100) goto L_Noplace;
  101.     mes "[Elf]";
  102.     mes "\"well, there is .\"";
  103.     delitem @hkind,@num*2;
  104.     getitem @want,@num;
  105.     close;
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement