Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.24 KB | None | 0 0
  1. //===== By: ==================================================
  2. //= EL Dragon
  3. //===== Current Version: =====================================
  4. //= 1.00
  5. //===== Compatible With: =====================================
  6. //= rAthena SVN
  7. //============================================================
  8. - script restock -1,{
  9.  
  10. OnInit:
  11.  
  12. bindatcmd "restock", strnpcinfo(3) +"::OnRestock";
  13. // ========== Max. Restock ==========
  14. // HP Recovery
  15. .Siege_White_Potion = 500; //Woe White Potion
  16. .Light_White_Pot = 500; //Light White Potion
  17. .Fruit_Of_Mastela = 500; // Fruit Of Mastela
  18. // SP Recovery
  19. .Siege_Blue_Potion = 500; //Woe Blue Potion
  20. .Light_Blue_Pot = 500; //Light Blue Potion
  21. // ========== Restock Zeny Prize ==========
  22. // HP Recovery
  23. .Siege_White_Potion_Zeny = 3500; //Woe White Potion
  24. .Light_White_Pot_Zeny = 600; //Light White Potion
  25. .Fruit_Of_Mastela_Zeny = 4250; // Fruit Of Mastela
  26. // SP Recovery
  27. .Siege_Blue_Potion_Zeny = 5000; //Woe Blue Potion
  28. .Light_Blue_Pot_Zeny = 2500; //Light Blue Potion
  29. // ========== Restock Count ==========
  30. // ea. Count increases oneself the Zeny Costs 1~10 Zeny ea. Item
  31. .RestockCount = 0; // 1 = yes, 0 = no
  32. // ========== Restock Delay ==========
  33. .RestockDelay = 0; // 1 = yes, 0 = no
  34. // ========== Restock Delay Time ==========
  35. // ========== 60 = 1 minutes ==========
  36. // ========== 120 = 2 minutes usw. ==========
  37. .RestockDelayTime = 60;
  38. end;
  39.  
  40. OnRestock:
  41. if(.@atcmd_parameters$[0]==""){
  42. dispbottom "Use @restock ";
  43. dispbottom "====================================";
  44. dispbottom "List: HP Recovery";
  45. dispbottom "hp1 = WoE White Potion";
  46. dispbottom "hp2 = Light White Potion";
  47. dispbottom "hp3 = Mastela Fruit";
  48. dispbottom "====================================";
  49. dispbottom "List: SP Recovery";
  50. dispbottom "sp1 = WoE Blue Potion";
  51. dispbottom "sp2 = Light Blue Potion";
  52. end;
  53. }
  54.  
  55.  
  56.  
  57. // ========== @restock Delay ==========
  58. if(.RestockDelay == 1)
  59. {
  60. if ( ##restock_delay + .RestockDelayTime > gettimetick(2) ) {
  61. message strcharinfo(0), "You can only use this command every "+.RestockDelayTime+" Seconds!";
  62. end;
  63. }
  64. ##restock_delay = gettimetick(2);
  65. }
  66. // ========== HP Recovery ==========
  67. // #################################
  68. // ========== WoE White Potion ==========
  69. if(.@atcmd_parameters$[0]=="hp1"){
  70. if ( ( .@count = .Siege_White_Potion - countitem( "Siege_White_Potion" ) ) > 0 ) {
  71. if(Zeny<.@count*.Siege_White_Potion_Zeny+#Restock_Count) {
  72. dispbottom "Your have not "+ ((.@count*.Siege_White_Potion_Zeny)+#Restock_Count) +" Zeny.";
  73. end;
  74. }
  75.  
  76. if( Weight > ( MaxWeight / 2 ) ){
  77. dispbottom "Please make sure you are not OverWeight.";
  78. end;
  79. }
  80. set Zeny,Zeny - ((.@count*.Siege_White_Potion_Zeny)+#Restock_Count);
  81. getitem "Siege_White_Potion", .@count;
  82. dispbottom "Restock: "+.@count+"x Siege White Potion, your lose "+ ((.@count*.Siege_White_Potion_Zeny)+#Restock_Count) +" Zeny.";
  83. }
  84. set #Restock_Count, #Restock_Count + rand(1,10);
  85. end;
  86. }
  87.  
  88. // ========== Light White Potion ==========
  89. if(.@atcmd_parameters$[0]=="hp2"){
  90. if ( ( .@count = .Light_White_Pot - countitem( "Light_White_Pot" ) ) > 0 ) {
  91. if(Zeny<.@count*.Light_White_Pot_Zeny+#Restock_Count) {
  92. dispbottom "Your have not "+ ((.@count*.Light_White_Pot_Zeny)+#Restock_Count) +" Zeny.";
  93. end;
  94. }
  95.  
  96. if( Weight > ( MaxWeight / 2 ) ){
  97. dispbottom "Please make sure you are not OverWeight.";
  98. end;
  99. }
  100. set Zeny,Zeny - ((.@count*.Light_White_Pot_Zeny)+#Restock_Count);
  101. getitem "Light_White_Pot", .@count;
  102. dispbottom "Restock: "+.@count+"x Light White Potion, your lose "+ ((.@count*.Light_White_Pot_Zeny)+#Restock_Count) +" Zeny.";
  103. }
  104. set #Restock_Count, #Restock_Count + rand(1,10);
  105. end;
  106. }
  107. // ========== Mastela Fruit ==========
  108. if(.@atcmd_parameters$[0]=="hp3"){
  109. if ( ( .@count = .Fruit_Of_Mastela - countitem( "Fruit_Of_Mastela" ) ) > 0 ) {
  110. if(Zeny<.@count*.Fruit_Of_Mastela_Zeny+#Restock_Count) {
  111. dispbottom "Your have not "+ ((.@count*.Fruit_Of_Mastela_Zeny)+#Restock_Count) +" Zeny.";
  112. end;
  113. }
  114.  
  115. if( Weight > ( MaxWeight / 2 ) ){
  116. dispbottom "Please make sure you are not OverWeight.";
  117. end;
  118. }
  119. set Zeny,Zeny - ((.@count*.Fruit_Of_Mastela_Zeny)+#Restock_Count);
  120. getitem "Fruit_Of_Mastela", .@count;
  121. dispbottom "Restock: "+.@count+"x Mastela Fruit, your lose "+ ((.@count*.Fruit_Of_Mastela_Zeny)+#Restock_Count) +" Zeny.";
  122. }
  123. set #Restock_Count, #Restock_Count + rand(1,10);
  124. end;
  125. }
  126.  
  127. // ========== SP Recovery ==========
  128. // #################################
  129. // ========== WoE Blue Potion ==========
  130. if(.@atcmd_parameters$[0]=="sp1"){
  131. if ( ( .@count = .Siege_Blue_Potion - countitem( "Siege_Blue_Potion" ) ) > 0 ) {
  132. if(Zeny<.@count*.Siege_Blue_Potion_Zeny+#Restock_Count) {
  133. dispbottom "Your have not "+ ((.@count*.Siege_Blue_Potion_Zeny)+#Restock_Count) +" Zeny.";
  134. end;
  135. }
  136.  
  137. if( Weight > ( MaxWeight / 2 ) ){
  138. dispbottom "Please make sure you are not OverWeight.";
  139. end;
  140. }
  141. set Zeny,Zeny - ((.@count*.Siege_Blue_Potion_Zeny)+#Restock_Count);
  142. getitem "Siege_Blue_Potion", .@count;
  143. dispbottom "Restock: "+.@count+"x WoE Blue Potion, your lose "+ ((.@count*.Siege_Blue_Potion_Zeny)+#Restock_Count) +" Zeny.";
  144. }
  145. set #Restock_Count, #Restock_Count + rand(1,10);
  146. end;
  147. }
  148. // ========== Light Blue Potion ==========
  149. if(.@atcmd_parameters$[0]=="sp2"){
  150. if ( ( .@count = .Light_Blue_Pot - countitem( "Light_Blue_Pot" ) ) > 0 ) {
  151. if(Zeny<.@count*.Light_Blue_Pot_Zeny+#Restock_Count) {
  152. dispbottom "Your have not "+ ((.@count*.Light_Blue_Pot_Zeny)+#Restock_Count) +" Zeny.";
  153. end;
  154. }
  155.  
  156. if( Weight > ( MaxWeight / 2 ) ){
  157. dispbottom "Please make sure you are not OverWeight.";
  158. end;
  159. }
  160. set Zeny,Zeny - ((.@count*.Light_Blue_Pot_Zeny)+#Restock_Count);
  161. getitem "Light_Blue_Pot", .@count;
  162. dispbottom "Restock: "+.@count+"x Light Blue Potion, your lose "+ ((.@count*.Light_Blue_Pot_Zeny)+#Restock_Count) +" Zeny.";
  163. }
  164. set #Restock_Count, #Restock_Count + rand(1,10);
  165. end;
  166. }
  167. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement