Advertisement
Guest User

Untitled

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