Advertisement
Guest User

market

a guest
Jan 2nd, 2019
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 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. ["turtle_raw", 35000, 10000, 55000, 3, 1,
  29. [
  30. ["diamond_cut",1],
  31. ["gold_refined",1]
  32. ]
  33. ],
  34.  
  35. ["diamond_cut", 4530, 0, 5250, 5, 2,
  36. [
  37. ["oil_processed",1],
  38. ["iron_refined",1],
  39. ["copper_refined",1],
  40. ["gold_refined",1],
  41. ["salt_refined",1],
  42. ["cement",1],
  43. ["glass",1]
  44. ]
  45. ],
  46.  
  47. ["copper_refined", 2500, 0, 3500, 2, 1,
  48. [
  49. ["diamond_cut",1],
  50. ["oil_processed",1],
  51. ["iron_refined",1],
  52. ["gold_refined",1],
  53. ["cement",1],
  54. ["glass",1]
  55. ]
  56. ],
  57.  
  58. ["iron_refined", 3500, 0, 4250, 3, 1,
  59. [
  60. ["diamond_cut",1],
  61. ["oil_processed",1],
  62. ["copper_refined",1],
  63. ["gold_refined",1],
  64. ["salt_refined",1],
  65. ["cement",1],
  66. ["glass",1]
  67. ]
  68. ],
  69.  
  70. ["salt_refined", 4850, 0, 5750, 2, 1,
  71. [
  72.  
  73. ["copper_refined",1],
  74. ["gold_refined",1],
  75. ["glass",1]
  76. ]
  77. ],
  78.  
  79. ["glass", 3450, 0, 4550, 2, 1,
  80. [
  81. ["diamond_cut",1],
  82. ["oil_processed",1],
  83. ["iron_refined",1],
  84. ["copper_refined",1]
  85. ]
  86. ],
  87.  
  88. ["cement", 3350, 0, 4100, 2, 1,
  89. [
  90.  
  91. ["oil_processed",1],
  92. ["iron_refined",1],
  93. ["copper_refined",1],
  94. ["glass",1]
  95. ]
  96. ],
  97.  
  98. ["goldbar", 55000, 0, 75000, 2, 1,
  99. [
  100. ["diamond_cut",1],
  101. ["oil_processed",1],
  102. ["iron_refined",1],
  103. ["copper_refined",1],
  104. ["glass",1]
  105. ]
  106. ],
  107.  
  108. ["marijuana", 5750, 0, 7500, 10, 7,
  109. [
  110. ["cocaine_processed",1],
  111. ["heroin_processed",1]
  112. ]
  113. ],
  114.  
  115. ["cocaine_processed", 6300, 0, 7850, 15, 10,
  116. [
  117. ["marijuana",1],
  118. ["heroin_processed",1]
  119. ]
  120. ],
  121.  
  122. ["heroin_processed", 6500, 0, 8700, 15, 10,
  123. [
  124. ["marijuana",1],
  125. ["cocaine_processed",1]
  126. ]
  127. ]
  128. ];
  129. publicVariable "life_market_resources";
  130.  
  131. ////////////GENERATED CONFIG
  132. //life_market_changes = []; //[SHORTNAME,SELL,BUY]
  133. life_market_shortnames = []; //shortnames if in market
  134. //life_market_clampprices = []; //[SHORTNAME,MIN,MAX]
  135.  
  136. {
  137. life_market_shortnames set [count life_market_shortnames, _x select 0];
  138. //life_market_clampprices set [count life_market_clampprices, [_x select 0, _x select 2, _x select 3] ];
  139. //life_market_changes set [count life_market_changes, [_x select 0, _x select 4, _x select 5] ];
  140. }
  141. foreach life_market_resources;
  142.  
  143. publicVariable "life_market_shortnames";
  144. //publicVariable "life_market_clampprices";
  145.  
  146. ////////////SYNC PRICES WITH SERVER IF EMPTY
  147. //if(isNil("life_market_prices")) then
  148. //{
  149. life_market_prices = []; //[SHORTNAME,CURRENTPRICE,DIRECTIONGLOBAL,DIRECTIONLOCAL]
  150. {
  151.  
  152. life_market_prices set [count life_market_prices, [_x select 0, _x select 1, 0, 0] ];
  153. }
  154. foreach life_market_resources;
  155.  
  156. publicVariable "life_market_prices";
  157.  
  158. systemChat "Market Prices Generated!";
  159. //};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement