TheMisticogamer

Untitled

Mar 5th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.52 KB | None | 0 0
  1. /*
  2.  
  3. Main configuration for non-persistent market system
  4. Will need triggers to hook into vanilla pricing methods
  5.  
  6. */
  7.  
  8. //Schema: SHORTNAME, Default, Min, Max, changes in action, [Sales multiplied by 1, Purchase multiplied by -1]
  9. //["gold", 1500, 450, 2300, 8, 5],
  10.  
  11. ////////////MAIN CONFIG
  12.  
  13. life_market_resources = [
  14.  
  15. // Default İsler
  16.  
  17. ["oil_processed", 5500, 0, 6250, 3, 1,
  18. [
  19. ["diamond_cut",1],
  20. ["iron_refined",1],
  21. ["copper_refined",1],
  22. ["gold_refined",1],
  23. ["cement",1],
  24. ["glass",1]
  25. ]
  26. ],
  27.  
  28. ["diamond_cut", 4530, 0, 5250, 5, 2,
  29. [
  30. ["oil_processed",1],
  31. ["iron_refined",1],
  32. ["copper_refined",1],
  33. ["gold_refined",1],
  34. ["salt_refined",1],
  35. ["cement",1],
  36. ["glass",1]
  37. ]
  38. ],
  39.  
  40. ["copper_refined", 2500, 0, 3500, 2, 1,
  41. [
  42. ["diamond_cut",1],
  43. ["oil_processed",1],
  44. ["iron_refined",1],
  45. ["gold_refined",1],
  46. ["cement",1],
  47. ["glass",1]
  48. ]
  49. ],
  50.  
  51. ["iron_refined", 3500, 0, 4250, 3, 1,
  52. [
  53. ["diamond_cut",1],
  54. ["oil_processed",1],
  55. ["copper_refined",1],
  56. ["gold_refined",1],
  57. ["salt_refined",1],
  58. ["cement",1],
  59. ["glass",1]
  60. ]
  61. ],
  62.  
  63. ["salt_refined", 4850, 0, 5750, 2, 1,
  64. [
  65.  
  66. ["copper_refined",1],
  67. ["gold_refined",1],
  68. ["glass",1]
  69. ]
  70. ],
  71.  
  72. ["glass", 3450, 0, 4550, 2, 1,
  73. [
  74. ["diamond_cut",1],
  75. ["oil_processed",1],
  76. ["iron_refined",1],
  77. ["copper_refined",1]
  78. ]
  79. ],
  80.  
  81. ["cement", 3350, 0, 4100, 2, 1,
  82. [
  83.  
  84. ["oil_processed",1],
  85. ["iron_refined",1],
  86. ["copper_refined",1],
  87. ["glass",1]
  88. ]
  89. ],
  90.  
  91. ["goldbar", 55000, 0, 75000, 2, 1,
  92. [
  93. ["diamond_cut",1],
  94. ["oil_processed",1],
  95. ["iron_refined",1],
  96. ["copper_refined",1],
  97. ["glass",1]
  98. ]
  99. ],
  100.  
  101. ["marijuana", 5750, 0, 7500, 10, 7,
  102. [
  103. ["cocaine_processed",1],
  104. ["heroin_processed",1]
  105. ]
  106. ],
  107.  
  108. ["cocaine_processed", 6300, 0, 7850, 15, 10,
  109. [
  110. ["marijuana",1],
  111. ["heroin_processed",1]
  112. ]
  113. ],
  114.  
  115. ["heroin_processed", 6500, 0, 8700, 15, 10,
  116. [
  117. ["marijuana",1],
  118. ["cocaine_processed",1]
  119. ]
  120. ],
  121.  
  122. ["tobacco_processed", 2700, 0, 4700, 15, 10,
  123. [
  124. ["tobacco",1]
  125. ]
  126. ],
  127.  
  128. ["mushrooms_processed", 6000, 0, 10000, 15, 10,
  129. [
  130. ["mushrooms",1]
  131. ]
  132. ],
  133.  
  134. ["meth_processed", 7500, 0, 17000, 15, 10,
  135. [
  136. ["meth",1]
  137. ]
  138. ],
  139.  
  140. ["kebab", 1720, 0, 5500, 15, 10,
  141. [
  142. ["kebab",1]
  143. ]
  144. ],
  145. ["collier_3", 1500, 0, 3700, 15, 10,
  146. [
  147. ["collier_3",1]
  148. ]
  149. ]
  150. ];
  151. publicVariable "life_market_resources";
  152.  
  153. ////////////GENERATED CONFIG
  154. //life_market_changes = []; //[SHORTNAME,SELL,BUY]
  155. life_market_shortnames = []; //shortnames if in market
  156. //life_market_clampprices = []; //[SHORTNAME,MIN,MAX]
  157.  
  158. {
  159. life_market_shortnames set [count life_market_shortnames, _x select 0];
  160. //life_market_clampprices set [count life_market_clampprices, [_x select 0, _x select 2, _x select 3] ];
  161. //life_market_changes set [count life_market_changes, [_x select 0, _x select 4, _x select 5] ];
  162. }
  163. foreach life_market_resources;
  164.  
  165. publicVariable "life_market_shortnames";
  166. //publicVariable "life_market_clampprices";
  167.  
  168. ////////////SYNC PRICES WITH SERVER IF EMPTY
  169. //if(isNil("life_market_prices")) then
  170. //{
  171. life_market_prices = []; //[SHORTNAME,CURRENTPRICE,DIRECTIONGLOBAL,DIRECTIONLOCAL]
  172. {
  173.  
  174. life_market_prices set [count life_market_prices, [_x select 0, _x select 1, 0, 0] ];
  175. }
  176. foreach life_market_resources;
  177.  
  178. publicVariable "life_market_prices";
  179.  
  180. systemChat "Market Prices Generated!";
  181. //};
Add Comment
Please, Sign In to add comment