marcinhuUu

m-Mining

Jul 20th, 2022
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.92 KB | None | 0 0
  1. Config = {}
  2.  
  3.  
  4. ----------------------
  5. -- Utility
  6. ----------------------
  7. Config.Framework = "ESX" -- QBCore or ESX
  8. Config.CoreName = "esx:getSharedObject" -- qb-core or esx:getSharedObject
  9. Config.SkillBar = "qb-skillbar" -- qb-skillbar [ Only QBCore ]
  10. Config.QBMenu = "qb-menu" -- Name of qb-menu
  11. Config.Target = "qb-target" -- Target [ Only QBCore ]
  12. Config.LocalizacaoBlip = vector3(-567.14, 5345.54, 70.23) -- Location of map blip
  13. Config.NeedJob = false -- Need job to work?
  14. Config.JobName = "" -- Name of job
  15. Config.SkillbarESX = 1000,math.random(3,5) -- Time to reload-skillbar
  16.  
  17. ----------------------
  18. -- Location of Stones Legal
  19. ----------------------
  20. Config.BlipStones = {
  21. Enable = true,
  22. Name = "Stone",
  23. Sprite = 253,
  24. Scale = 0.6,
  25. Colour = 4,
  26. OneBlip = true, -- If true, only one blip will appear instead of a blip at each mining site
  27. OneBlipLocation = vector3(2955.54, 2773.44, 39.56), -- if EnableOneBlip this is the coords of blip
  28. }
  29.  
  30.  
  31. Config["Minar"] = {
  32. [1] = { x = 2955.54, y = 2773.44, z = 39.56 }, -- Loc of mining stones
  33. [2] = { x = 2952.56, y = 2770.17, z = 39.04 }, -- Loc of mining stones
  34. [3] = { x = 2947.85, y = 2768.32, z = 38.94 }, -- Loc of mining stones
  35. }
  36.  
  37. ----------------------
  38. -- Location of Stones Ilegal
  39. ----------------------
  40. Config.NeedPolice = true -- Police needed?
  41. Config.JobPolice = "police" -- Name of job police
  42. Config.AmountPolice = 1 -- Amount of police needed
  43.  
  44. Config.BlipIllegal = {
  45. Enable = true,
  46. Name = "Illegal Mining",
  47. Sprite = 253,
  48. Scale = 0.6,
  49. Colour = 4,
  50. OneBlip = true, -- If true, only one blip will appear instead of a blip at each mining site
  51. OneBlipLocation = vector3(-590.68, 2074.51, 131.28), -- if EnableOneBlip this is the coords of blip
  52. }
  53.  
  54. Config["MinarIlegal"] = {
  55. [1] = { x = -590.68, y = 2074.51, z = 131.28, distance = 3.0 }, -- Loc of mining stones ilegal
  56. [2] = { x = -590.84, y = 2064.01, z = 130.98, distance = 3.0 }, -- Loc of mining stones ilegal
  57. [3] = { x = -586.73, y = 2052.52, z = 130.13, distance = 3.0 }, -- Loc of mining stones ilegal
  58. }
  59.  
  60. ----------------------
  61. -- Location of wash stones
  62. ----------------------
  63. Config.WashReward = { -- Amount of ores you received after wash the stones
  64. Min = 2,
  65. Max = 4,
  66. }
  67.  
  68. Config.BlipWash = {
  69. Enable = true,
  70. Name = "Wash Stones",
  71. Sprite = 468,
  72. Scale = 0.8,
  73. Colour = 38,
  74. OneBlip = true, -- If true, only one blip will appear instead of a blip at each mining site
  75. OneBlipLocation = vector3(1180.43, -119.41, 56.49), -- if EnableOneBlip this is the coords of blip
  76. }
  77.  
  78. Config["Lavagem"] = {
  79. [1] = { x = 1180.43, y = -119.41, z = 56.49, distance = 5.0 }, -- Loc of washing stones
  80. [2] = { x = 1173.98, y = -122.48, z = 56.25, distance = 5.0 }, -- Loc of washing stones
  81. }
  82. Config.Maquina = {
  83. ["maquina"] = {model = `prop_cementmixer_01a`, freeze = false}, -- Prop spawn with item "machine" to brake rocks
  84. }
  85.  
  86. ----------------------
  87. -- Rewards of Level System Pickaxe
  88. ----------------------
  89. Config.RewardPicaretaLevel_1 = 1 -- Amount received with pickaxe level 1
  90. Config.RewardPicaretaLevel_2 = 2 -- Amount received with pickaxe level 2
  91. Config.RewardPicaretaLevel_3 = 3 -- Amount received with pickaxe level 3
  92. Config.RewardPicaretaLevel_4 = 4 -- Amount received with pickaxe level 4
  93. Config.RewardPicaretaLevel_5 = 5 -- Amount received with pickaxe level 5
  94.  
  95. ----------------------
  96. -- Itens necessários para dar upgrade ao maxado
  97. ----------------------
  98. Config.ItemNecessario = "pedras" -- Item 1 to upgrade
  99. Config.ItemNecessario2 = "phone" -- Item 2 to upgrade
  100. Config.QuantidadeNecessariaLevel2 = 15 -- Required amount of both items to upgrade to level 2
  101. Config.QuantidadeNecessariaLevel3 = 25 -- Required amount of both items to upgrade to level 3
  102. Config.QuantidadeNecessariaLevel4 = 35 -- Required amount of both items to upgrade to level 4
  103. Config.QuantidadeNecessariaLevel5 = 45 -- Required amount of both items to upgrade to level 5
  104.  
  105. ----------------------
  106. -- Ores after wash
  107. ----------------------
  108. Config.Ores = {
  109. "ouro",
  110. "ferro",
  111. "carvao",
  112. "ruby",
  113. "esmeralda",
  114. "diamante",
  115. "safira",
  116. "magnesio",
  117. "titanite",
  118. "wolframite",
  119. "perovskite",
  120. "baryte",
  121. "rainbowpyrite"
  122. }
  123.  
  124. ----------------------
  125. -- Ores mining on mine illegal
  126. ----------------------
  127. Config.OresIlegal = {
  128. "ouro",
  129. "ferro",
  130. "carvao",
  131. "ruby",
  132. "esmeralda",
  133. "diamante",
  134. "safira",
  135. "magnesio",
  136. "titanite",
  137. "wolframite",
  138. "perovskite",
  139. "baryte",
  140. "rainbowpyrite"
  141. }
  142.  
  143. ----------------------
  144. -- Ores prices when sell
  145. ----------------------
  146. Config.Prices = {
  147. ['ouro'] = { name = 'ouro', amount = 1 },
  148. ['ferro'] = { name = 'ferro', amount = 1 },
  149. ['carvao'] = { name = 'carvao', amount = 1 },
  150. ['ruby'] = { name = 'ruby', amount = 1 },
  151. ['esmeralda'] = { name = 'esmeralda', amount = 1 },
  152. ['diamante'] = { name = 'diamante', amount = 1 },
  153. ['safira'] = { name = 'safira', amount = 1 },
  154. ['magnesio'] = { name = 'magnesio', amount = 1 },
  155. ['titanite'] = { name = 'titanite', amount = 1 },
  156. ['wolframite'] = { name = 'wolframite', amount = 1 },
  157. ['perovskite'] = { name = 'perovskite', amount = 1 },
  158. ['baryte'] = { name = 'baryte', amount = 1 },
  159. ['rainbowpyrite'] = { name = 'rainbowpyrite', amount = 1 },
  160. }
  161.  
  162. ----------------------
  163. -- Targets
  164. ----------------------
  165.  
  166. Config.Targets = {
  167. -- Mining Rocks
  168. CutMinerLabel = "Mine",
  169. CutMinerIcon = "fa-solid fa-minimize",
  170. -- Break Stones
  171. BreakStonesLabel = "Break Stones",
  172. BreakStonesIcon = "fa-solid fa-hand",
  173. -- Machine
  174. MachineLabel = "Save Machine",
  175. MachineIcon = "fa-solid fa-clock-rotate-left",
  176. -- Wash Stones
  177. SeparateMinerLabel = "Wash Stone",
  178. SeparateMinerIcon = "fa-solid fa-water",
  179. -- Shop / Boss of wood
  180. ShopMinerLabel = "Talk to the boss",
  181. ShopMinerIcon = "fa-solid fa-person",
  182. -- Vehicles
  183. VehiclesLabel = "Vehicles",
  184. TargetVehiclesIcon = "fa-solid fa-person",
  185. -- Sell ores
  186. SellMinerLabel = "Sell Ores",
  187. SellMinerIcon = "fas fa-sack-dollar",
  188. }
  189.  
  190. -- Vehicles
  191. Config.LocalizacaoVehicles = vector3(2957.67, 2745.84, 43.54) -- Location of vehicles
  192.  
  193. -- Sell Ores
  194. Config.EnableBlipSell = true
  195. Config.NameOfSellOres = "Sell Ores" -- Name of blip
  196. Config.TargetSellMinerLocation = vector3(-623.23, -230.23, 38.06) -- Location of sell
  197.  
  198. Config["Mineiros"] = { -- Shops
  199. [1] = { x = 2959.14, y = 2753.43, z = 43.71},
  200. [2] = { x = -595.07, y = 2091.42, z = 130.46},
  201. -- You can add more locations
  202. }
  203. ----------------------
  204. -- Notification
  205. ----------------------
  206. Config["Notificacoes"] = {
  207. ["Falhaste"] = "You failed!",
  208. ["CorreuMal"] = "Something went wrong!",
  209. ["JaTensMachado"] = "You already have an pickaxe with you!",
  210. ["NaoTensNecessario"] = "You don't have what you need.",
  211. ["NadaParaVender"] = "You have nothing to sell.",
  212. ["VeiculoDisponivel"] = "Vehicle loaned successfully.",
  213. ["NaoTensPicaretas"] = "You don't have any pickaxe!",
  214. ["NaoTensPedras"] = "You don't have any stones!",
  215. ["Cancelado"] = "Canceled.",
  216. ["SpawnBloqueado"] = "There is a vehicle blocking the spawn.",
  217. ["AguardaPeloSpawn"] = "You recently removed a vehicle. wait.",
  218. ["NoPolice"] = "There are not enough police",
  219. ["NoJob"] = "You don't work on miners!"
  220. }
  221.  
  222. ----------------------
  223. -- Progressbars
  224. ----------------------
  225. Config["ProgressBars"] = {
  226. ["MinerarPedras"] = "Mining....",
  227. ["LavarPedras"] = "Washing stones..",
  228. ["PartirPedras"] = "Break stones..",
  229. ["PutMachine"] = "Put Machine..",
  230. ["SaveMachine"] = "Save Machine",
  231.  
  232. }
  233.  
  234. ----------------------
  235. -- Menus ( qb-menu )
  236. ----------------------
  237. -- Shop
  238. Config.QBMenuShopHeader = "Boss of Miners"
  239. Config.QBMenuShopGiveAxe = "I want a pickaxe!"
  240. Config.QBMenuShopGiveVehicle = "I need a vehicle!"
  241. Config.QBMenuShopDeleteVehicle = "Deliver vehicle"
  242. Config.QBMenuShopOpenShop = "Open Shop"
  243. Config.QBMenuShopEvolveAxe = "I want to evolve my pickaxe!"
  244. Config.QBMenuShopClose = "< Close"
  245. -- Envolve
  246. Config.QBMenuEnvolveHeader = "Evolution of Pickaxes"
  247. Config.QBMenuEnvolveLevel2 = "Upgrade to level 2"
  248. Config.QBmenuEnvolveTxtLevel2 = "You need: <br> 50x Stone <br> 1x Pickaxe Level 1 <br> 50x "..Config.ItemNecessario2
  249. Config.QBMenuEnvolveLevel3 = "Upgrade to level 3"
  250. Config.QBmenuEnvolveTxtLevel3 = "You need: <br> 100x Stone <br> 1x Pickaxe Level 2 <br> 100x "..Config.ItemNecessario2
  251. Config.QBMenuEnvolveLevel4 = "Upgrade to level 4"
  252. Config.QBmenuEnvolveTxtLevel4 = "You need: <br> 150x Stone <br> 1x Pickaxe Level 3 <br> 150x"..Config.ItemNecessario2
  253. Config.QBMenuEnvolveLevel5 = "Upgrade to level 5"
  254. Config.QBmenuEnvolveTxtLevel5 = "You need: <br> 200x Stone <br> 1x Pickaxe Level 4 <br> 200x"..Config.ItemNecessario2
  255. Config.QBMenuEnvolveClose = "< Close"
  256. -- Selling
  257. Config.QBMenuSellingHeader = "Sell Miners"
  258. Config.QBMenuSellingOption1 = "Sell all"
  259. Config.QBMenuSellingOption2 = ""
  260. Config.QBMenuSellingClose = "< Close"
  261.  
  262.  
  263. ----------------------
  264. -- Car
  265. ----------------------
  266. Config.PayForVehicle = true -- Pay the vehicle? [ Only available for QBCore ]
  267. Config.AmountPayForVehicle = 250 -- Amout of the payment vehicle
  268. Config.TempoParaSpawnarNovamente = 60000 -- Time to spawn another vehicle. 60000 = 1 Min
  269. Config.Fuel = "LegacyFuel" -- Name of your fuel script
  270. Config.VehicleKeysTrigger = "vehiclekeys:client:SetOwner" -- Trigger to give vehiclekeys ! [ Only available for QBCore ] !
  271.  
  272. Config.Carros = {
  273. [1] = {carro = "biff"},-- Name of car
  274. }
  275.  
  276. Config.SpawnCarrinho = {
  277. [1] = {x = 2958.51, y = 2749.64, z = 43.47, h = 282.22}, -- Location to spawn car
  278. }
  279.  
  280. ----------------------
  281. -- Bag ! [ Only available for QBCore ] !
  282. ----------------------
  283. Config.Slots = 4
  284. Config.Weight = 5000
  285.  
  286. -----------------
  287. -- Shop ! [ Only available for QBCore ] !
  288. -----------------
  289. Config.OpenInvTrigger = "inventory:server:OpenInventory"
  290. Config.ShopName = "Miners Shop"
  291. Config.Products = {
  292. ["Miners"] = {
  293. [1] = {
  294. name = "water_bottle",
  295. price = 5,
  296. amount = 25,
  297. info = {},
  298. type = "item",
  299. slot = 1,
  300. },
  301. [2] = {
  302. name = "weapon_bread",
  303. price = 5,
  304. amount = 25,
  305. info = {},
  306. type = "item",
  307. slot = 2,
  308. },
  309. [3] = {
  310. name = "oculosmineiro",
  311. price = 5,
  312. amount = 25,
  313. info = {},
  314. type = "item",
  315. slot = 3,
  316. },
  317. [4] = {
  318. name = "fonesmineiro",
  319. price = 5,
  320. amount = 25,
  321. info = {},
  322. type = "item",
  323. slot = 4,
  324. },
  325. [5] = {
  326. name = "sacomineiros",
  327. price = 5,
  328. amount = 25,
  329. info = {},
  330. type = "item",
  331. slot = 5,
  332. },
  333. [6] = {
  334. name = "maquina",
  335. price = 5,
  336. amount = 25,
  337. info = {},
  338. type = "item",
  339. slot = 6,
  340. },
  341. },
  342. }
  343.  
  344. Config.Lojinha = {
  345. ["Miners"] = {
  346. ["label"] = "Miners",
  347. ["type"] = "BM",
  348. ["coords"] = {
  349. [1] = {
  350. ["x"] = 1333.06, -- Dont touch, is using qb-target.
  351. ["y"] = 4326.86, -- Dont touch, is using qb-target.
  352. ["z"] = 38.017, -- Dont touch, is using qb-target.
  353. },
  354. },
  355. ["CoisasBoas"] = Config.Products["Miners"],
  356. },
  357. }
  358.  
  359. ----------------------
  360. -- Peds
  361. ----------------------
  362. Config.PedListMineiros = { -- Peds that will be spawned in
  363. {
  364. model = "s_m_y_armymech_01",
  365. coords = vector3(2959.14, 2753.43, 42.71),
  366. heading = 203.72,
  367. gender = "male",
  368. scenario = "WORLD_HUMAN_STAND_MOBILE_UPRIGHT"
  369. },
  370. {
  371. model = "s_m_y_armymech_01",
  372. coords = vector3(2957.67, 2745.84, 42.54),
  373. heading = 325.34,
  374. gender = "male",
  375. scenario = "WORLD_HUMAN_STAND_MOBILE_UPRIGHT"
  376. },
  377. {
  378. model = "cs_jimmyboston",
  379. coords = vector3(-623.23, -230.23, 37.06),
  380. heading = 68.34,
  381. gender = "male",
  382. scenario = "WORLD_HUMAN_STAND_MOBILE_UPRIGHT"
  383. },
  384. {
  385. model = "S_M_Y_Construct_01",
  386. coords = vector3(-595.07, 2091.42, 130.46),
  387. heading = 49.89,
  388. gender = "male",
  389. scenario = "WORLD_HUMAN_CLIPBOARD"
  390. },
  391. }
  392.  
  393. -------------
  394. --- Police Alert Ilegal Mining
  395. ------------
  396. Config.ChanceChamarPolicia = 50 --The higher the value, the lower the probability
  397. function ChamarPolicia()
  398. TriggerServerEvent('qb-dispatch:illegalmining')
  399. -- You can trigger your dispatch
  400. end
  401.  
  402. -------------
  403. --- Notify
  404. ------------
  405. function Notify(msg)
  406. if Config.Framework == "QBCore" then
  407. QBCore.Functions.Notify(msg)
  408. elseif Config.Framework == "ESX" then
  409. exports['mythic_notify']:DoHudText('inform', msg, 5000)
  410. end
  411. end
Add Comment
Please, Sign In to add comment