Guest User

Untitled

a guest
Jun 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. // Set Cost here
  2. set @fee, 500000;
  3. function script Menu_BS {
  4. mes "[Status Sage]";
  5. mes "What would you like to do with your builds?";
  6. next;
  7. switch(select("Load a build (" + @fee + " zeny)":View Build:Save your build:Exit")) {
  8. Case 1:
  9. mes "Which build do you want to load?";
  10. switch(select("+build_name0$:+build_name1$:+build_name2$:+build_name3$:Go back")) {
  11. Case 1:
  12. set @id, 0;
  13. callfunc "Load_S2";
  14. Case 2:
  15. set @id, 1;
  16. callfunc "Load_S2";
  17. Case 3:
  18. set @id, 2;
  19. callfunc "Load_S2";
  20. Case 4:
  21. set @id, 3;
  22. callfunc "Load_S2";
  23. Case 5:
  24. callfunc "Menu_BS";
  25. }
  26. Case 2:
  27. mes "[Status Sage]";
  28. mes "Which build do you want to view?";
  29. next;
  30. switch(select("+build_name0$:+build_name1$:+build_name2$:+build_name3$:Go back")) {
  31. Case 1:
  32. set @id, 0;
  33. callfunc "View_S2";
  34. Case 2:
  35. set @id, 1;
  36. callfunc "View_S2";
  37. Case 3:
  38. set @id, 2;
  39. callfunc "View_S2";
  40. Case 4:
  41. set @id, 3;
  42. callfunc "View_S2";
  43. Case 5:
  44. callfunc "Menu_BS";
  45. }
  46. Case 3:
  47. mes "[Status Sage]";
  48. mes "Choose the slot to save in:";
  49. next;
  50. switch(select("+build_name0$:+build_name1$:+build_name2$:+build_name3$:Go back")) {
  51. Case 1:
  52. set @id, 0;
  53. callfunc "Save_S2";
  54. Case 2:
  55. set @id, 1;
  56. callfunc "Save_S2";
  57. Case 3:
  58. set @id, 2;
  59. callfunc "Save_S2";
  60. Case 4:
  61. set @id, 3;
  62. callfunc "Save_S2";
  63. Case 5:
  64. callfunc "Menu_BS";
  65. }
  66. Case 4:
  67. mes "[Status Sage]";
  68. mes "Bye!";
  69. close;
  70. end;
  71. }
  72. }
  73. //----------------------------------------------------
  74. // Functions
  75. //----------------------------------------------------
  76. function script Save_S2 {
  77. mes "[Status Sage]";
  78. mes "Choose a name for your build!";
  79. input @name$;
  80. setd "build_name" + @id + "$", @name$;
  81. setd "build_str" + @id, readparam(bStr);
  82. setd "build_agi" + @id, readparam(bAgi);
  83. setd "build_vit" + @id, readparam(bVit);
  84. setd "build_int" + @id, readparam(bInt);
  85. setd "build_dex" + @id, readparam(bDex);
  86. setd "build_luk" + @id, readparam(bLuk);
  87. set @id, 9;
  88. mes "Your build is saved!";
  89. next;
  90. callfunc "Menu_BS";
  91. }
  92. function script View_S2 {
  93. mes "[Status Sage]";
  94. mes "Here is your build number " + (@id + 1) + ":";
  95. mes "NAME: " + getd("build_name"+@id+"$");
  96. mes "Str " + getd("build_str"+@id);
  97. mes "Agi " + getd("build_agi"+@id);
  98. mes "Vit " + getd("build_vit"+@id);
  99. mes "Int " + getd("build_int"+@id);
  100. mes "Dex " + getd("build_dex"+@id);
  101. mes "Luk " + getd("build_luk"+@id);
  102. next;
  103. callfunc "Menu_BS";
  104. }
  105. function script Load_S2 {
  106. if (Zeny < @fee) {
  107. mes "[Status Sage]";
  108. mes "Sorry, but you don't have enough zeny.";
  109. close;
  110. }
  111. resetstatus;
  112. set @x, 0;
  113. callfunc "C_str";
  114. }
  115. function script C_str {
  116. if( @x < (getd("build_str"+@id)-1) ){
  117. statusup bStr;
  118. set @x, @x+1;
  119. callfunc "C_str";
  120. }
  121. set @x, 0;
  122. callfunc "C_agi";
  123. }
  124. function script C_agi: {
  125. if( @x < (getd("build_agi"+@id)-1) ){
  126. statusup bAgi;
  127. set @x, @x+1;
  128. callfunc "C_agi";
  129. }
  130. set @x, 0;
  131. callfunc "C_vit";
  132. }
  133. function script C_vit {
  134. if( @x < (getd("build_vit"+@id)-1) ){
  135. statusup bVit;
  136. set @x, @x+1;
  137. callfunc "C_vit";
  138. }
  139. set @x, 0;
  140. callfunc "C_int";
  141. }
  142. function script C_int {
  143. if( @x < (getd("build_int"+@id)-1) ){
  144. statusup bInt;
  145. set @x, @x+1;
  146. callfunc "C_int";
  147. }
  148. set @x, 0;
  149. callfunc "C_dex";
  150. }
  151. function script C_dex {
  152. if( @x < (getd("build_dex"+@id)-1) ){
  153. statusup bDex;
  154. set @x, @x+1;
  155. callfunc "C_dex";
  156. }
  157. set @x, 0;
  158. callfunc "C_luk";
  159. }
  160. function script C_luk {
  161. if( @x < (getd("build_luk"+@id)-1) ){
  162. statusup bLuk;
  163. set @x, @x+1;
  164. callfunc "C_luk";
  165. }
  166. set Zeny, Zeny - @fee;
  167. mes "[Status Sage]";
  168. mes "Your build has been succesfully loaded!";
  169. close;
  170. }
Add Comment
Please, Sign In to add comment