Advertisement
Guest User

error in config_mining.lua

a guest
Jul 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.08 KB | None | 0 0
  1. AddCSLuaFile()
  2.  
  3. if SERVER then
  4. resource.AddWorkshop( "712302008" )
  5. end
  6.  
  7. -- http://steamcommunity.com/sharedfiles/filedetails/?id=712302008 (add this to your server collection it is already added to the client files)
  8. -- IF YOUR METAL BARS FLOAT THEN YOU DID NOT DO THIS ^^^
  9. -- ATTENTION!!!!!! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  10. -- If you do not do the above the ores and pickaxe will be errors~!
  11.  
  12.  
  13. -- YOU MUST USE THE Mining Locations WEAPON IN ORDER TO PLACE ROCK SPAWNS CORRECTLY
  14. -- IF YOU DONT WANT PLAYERS TO SPAWN REFINERIES AND CRAFTING TABLES (not Recomended) THEN PLACE THEM ON MAP AND USE COMMAND BELOW
  15.  
  16.  
  17. --[[ Console Commands
  18.  
  19. mining_resaverocks = Resaves the position of all rocks on the map allowing you to move rocks that the tool does not position correctly (allows you to remove single rocks by simply removing a rock and then saving)
  20. mining_savenpc = Spawn a npc and position it then save it with this command
  21. mining_saverefineries = Save Refineries (Dont use if your players have spawned refineries as it saves ALL refineries)
  22. mining_savecraftingtables = Same as above but with crafting tables
  23. mining_clearorebag PLAYERS64BITSTEAMID! = Clears the player's orebag who matches the 64bit steamid provided
  24. ]]--
  25.  
  26. SMS.SellAllButton = true -- Add a button to the ore seller to sell all ore at once (will add a "are you sure" prompt to this later)
  27. SMS.Debug = false
  28.  
  29. SMS.PickDamage = 15 -- How much damage the pickaxe does to npcs and players
  30. --REMOVED ADD TO EACH ORE ----------- SMS.RefinedValueMult = 1.7 -- How much more can you sell refined ore for compaired to raw ore (1.7 is 70% more then raw)
  31. SMS.GiveOrebagOnSpawn =true-- Should players spawn with the orebag (recomended as the orebag saves and you only need one to drop the ores)
  32. SMS.MaxDroppedRocks = 10 -- Maximum number of rocks a player can drop at one time
  33. SMS.OnlyOwnerRefinery = false -- Prevent all but the owner from using their refinery (do not use if you are using permanent refineries)
  34. --Rocks are no longer solid if you use this feature VVVV to counteract players getting stuck in respawning rocks
  35. SMS.RocksBreak = true -- Should rocks break after a number of hits? Each rock uses more resources, dont use this with a ton of rocks. Suggested max rocks while using this is about 25-30
  36. SMS.RockRespawnDelay = 10 -- How long before the rocks regain ore (after 10 seconds the rock will get 1 ore back so if you hit it 3 times, and the ore has a max ore of 10 then there are 7 ore left, after 10 seconds there will be 8)
  37. -- Experiance gain using https://github.com/vrondakis/Leveling-System WILL ERROR IF YOU DONT HAVE THIS ADDON
  38. SMS.GiveXPForMining = false -- Should experiance be given when a rock is successfully mined?
  39. SMS.GiveXPForCrafting = false -- Should experiance be given when crafting an item?
  40. SMS.OnlyOreOwnerCanTake =false-- Taking unfinished ores out of refinery (rock owner only?)
  41. SMS.UseFuel = false -- Should fuel be require? (cola is default fuel) fuel must be in both the SMSFuel and SMSRocks (if set to false coal can be smelted into bars otherwise it just fuels the refinery)
  42.  
  43.  
  44. -----------------------------------Place in config_mining
  45. -- Ranks listed here have access to the mining_addrocks command.
  46. -- mining_addrocks partofplayersname rockname state-Raw-or-Refined quantity
  47. -- Example: mining_addrocks void Tin Raw 100
  48. SMS.RankCanEditOrebag = {
  49. "owner",
  50. "superadmin",
  51. }
  52.  
  53. -- Ranks that are allowed to view a players orebag
  54. -- mining_view Playername Example: mining_view Void
  55.  
  56. SMS.RankCanViewPlayerOres =
  57. {
  58. "owner",
  59. "superadmin",
  60. }
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. SMSFuel["Coal"] = {
  68. NumberOfSmelts = 10 -- how many ores should be smelted on one ore
  69. }
  70.  
  71. -- Translation
  72. SMS.Language = "french" -- Language, must be a file in lua/mining_languagefiles
  73. SMS.Currancy = "$"
  74.  
  75.  
  76.  
  77. -- First example is showing all the possible changes, rest of the examples show the minimal requirements
  78.  
  79.  
  80.  
  81.  
  82.  
  83. -- First example is showing all the possible changes, rest of the examples show the minimal requirements
  84.  
  85. -----------Rock Types-----------
  86. SMSRocks["Cuivre"] = { -- Type of rock
  87. Color = Color(255,150,50), -- Color of rock
  88. Value = 0, -- How much you can sell raw material for
  89. Refinedmultiplier = 1.7, -- How much you can sell refined material for (multiplyer) NEW
  90. Difficulty = .60, -- How likely you are to get a rock on a single hit (1.0 will give you a rock every hit (max))
  91. XPReward = 1, -- How much experiance is rewarded for crafting?(You can leave out for 0 experiance)
  92. Smelttime = 3, -- How long does it take to refine ore? If 3 or nil the time will be 3 seconds
  93. MineRefined = false, -- Do you want this ore to not have to be refined?
  94. CustomRockModel = nil, -- "models/props/cs_militia/militiarock05.mdl" for a more round rock that you mine from
  95. CustomRawOreModel = nil, -- If you want the Raw ore to have a custom model put here (Keep it small or it messes with refinery view)
  96. CustomRefinedOreModel = nil,-- Same thing as above but with Refined Ore
  97. RefinedOreMaterial = nil, -- Material Overwrite for refined ore (if set nil then its shiny)
  98. RawOreMaterial = nil, -- Set to "models/shiny" for a shiny rock and ore
  99. MaxHits = 3, -- Max number of hits before rock breaks if "SMS.RocksBreak = true" (default number is 10 if none is set)
  100. }
  101.  
  102. SMSRocks["Etain"] = {
  103. Color = Color(200,200,200),
  104. Value = 0,
  105. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  106. Difficulty = .60,
  107. XPReward = 5,
  108. }
  109.  
  110. SMSRocks["Metal"] = {
  111. Color = Color(100,100,100),
  112. Value = 2,
  113. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  114. Difficulty = .20,
  115. XPReward = 2,
  116. }
  117.  
  118. SMSRocks["Mithril"] = {
  119. Color = Color(0,255,255),
  120. Value = 8,
  121. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  122. Difficulty = .05,
  123. XPReward = 5,
  124. RawOreMaterial = "models/shiny",
  125. }
  126.  
  127. SMSRocks["Adamantium"] = {
  128. Color = Color(255,0,255),
  129. Value = 14,
  130. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  131. Difficulty = .01,
  132. XPReward = 5,
  133. RawOreMaterial = "models/shiny",
  134. }
  135.  
  136.  
  137. SMSRocks["Bar de Bronze"] = { -- this ore is not mineable (used for seconday recipees allowing for multi teir crafting) dont place rocks on map for this ore
  138. Color = Color(250,200,0),
  139. Value = 1,
  140. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  141. Difficulty = 0,
  142. Smelttime = 6,
  143. XPReward = 5,
  144. }
  145.  
  146. SMSRocks["Bar de Metal"] = { -- this ore is not mineable (used for seconday recipees allowing for multi teir crafting) dont place rocks on map for this ore
  147. Color = Color(100,100,100),
  148. Value = 15,
  149. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  150. Difficulty = 0,
  151. Smelttime = 11,
  152. XPReward = 5,
  153. }
  154.  
  155. SMSRocks["Bar de Mithril"] = { -- this ore is not mineable (used for seconday recipees allowing for multi teir crafting) dont place rocks on map for this ore
  156. Color = Color(250,200,0),
  157. Value = 30,
  158. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  159. Difficulty = 0,
  160. Smelttime = 20,
  161. XPReward = 5,
  162. }
  163.  
  164. SMSRocks["Bar de Adamantium"] = { -- this ore is not mineable (used for seconday recipees allowing for multi teir crafting) dont place rocks on map for this ore
  165. Color = Color(250,200,0),
  166. Value = 50,
  167. Refinedmultiplier = 1.7, ----- MUST BE HERE!@
  168. Difficulty = 0,
  169. Smelttime = 30,
  170. XPReward = 5,
  171. }
  172.  
  173.  
  174.  
  175. SMSRocks["Coal"] = {
  176. Color = Color(0,0,0),
  177. Value = 0,
  178. Difficulty = 1,
  179. Refinedmultiplier = 1,
  180. XPReward = 5,
  181. }
  182.  
  183.  
  184.  
  185.  
  186. -- RECIPES -- Add and create recipes for the crafting table (uses refined ore)
  187.  
  188.  
  189. -- Weapons
  190. SMS.Recipes["lockpick"] = { -- Classname
  191. displayname = "Lockpick", -- Display name
  192. model = "models/weapons/w_crowbar.mdl", -- Model to display
  193. needed = {Bar de Metal = 6}, -- Ore Needed, (be sure to give it the same capitalization as you did above)
  194. Type = "weapon", -- Can be "weapon", "rawore", or "refinedore" or nothing for an entity
  195. jobs = {TEAM_FORGERON}, -- Restricted Jobs
  196. SortOrder = 1, -- Order it appears in crafting table
  197. XPReward = 1, -- How much experiance is rewarded for crafting?(You can leave out for 0 experiance)
  198. }
  199.  
  200. SMS.Recipes["item_ammo_crossbow"] = { -- hl2 crossbow bolts
  201. displayname = "Carreaux d'arbalète",
  202. model = "models/Items/CrossbowRounds.mdl",
  203. needed = {Bar de Metal = 3},
  204. jobs = {TEAM_FORGERON},
  205. SortOrder = 3,
  206. XPReward = 1,
  207. }
  208.  
  209. SMS.Recipes["ent_bs_kite"] = { -- hl2 crossbow bolts
  210. displayname = "Bouclier de Bertwick",
  211. model = "models/weapons/w_bs_shield_kite.mdl",
  212. needed = {Bar de Mithril = 6},
  213. jobs = {TEAM_FORGERON},
  214. SortOrder = 3,
  215. XPReward = 1,
  216. }
  217.  
  218. SMS.Recipes["ent_bs_scutum"] = { -- hl2 crossbow bolts
  219. displayname = "Bouclier de Cortium",
  220. model = "models/weapons/w_bs_shield_scutum.mdl",
  221. needed = {Bar de Mithril = 6},
  222. jobs = {TEAM_FORGERON},
  223. SortOrder = 3,
  224. XPReward = 1,
  225. }
  226.  
  227. SMS.Recipes["ent_bs_targe"] = { -- hl2 crossbow bolts
  228. displayname = "Bouclier de Bandit",
  229. model = "models/weapons/w_bs_shield_targe.mdl",
  230. needed = {Bar de Mithril = 6},
  231. jobs = {TEAM_FORGERON},
  232. SortOrder = 3,
  233. XPReward = 1,
  234. }
  235.  
  236. SMS.Recipes["weapon_bs_greatsword"] = { -- hl2 crossbow bolts
  237. displayname = "Greatsword",
  238. model = "models/weapons/w_bs_greatsword.mdl",
  239. needed = {Bar de Mithril = 8, Bar de Adamantium = 6, Bar de Bronze = 100},
  240. jobs = {TEAM_FORGERON},
  241. SortOrder = 3,
  242. XPReward = 1,
  243. }
  244.  
  245. SMS.Recipes["weapon_bs_raider"] = { -- hl2 crossbow bolts
  246. displayname = "Raider Sword",
  247. model = "models/weapons/w_bs_raider.mdl",
  248. needed = {Bar de Mithril = 5, Bar de Adamantium = 3, Bar de Bronze = 90},
  249. jobs = {TEAM_FORGERON},
  250. SortOrder = 3,
  251. XPReward = 1,
  252. }
  253.  
  254. SMS.Recipes["weapon_bs_longsword"] = { -- hl2 crossbow bolts
  255. displayname = "Long Sword",
  256. model = "models/weapons/w_bs_longsword.mdl",
  257. needed = {Bar de Metal = 8, Bar de Adamantium = 1, Bar de Bronze = 70},
  258. jobs = {TEAM_FORGERON},
  259. SortOrder = 3,
  260. XPReward = 1,
  261. }
  262.  
  263. SMS.Recipes["weapon_bs_longsword"] = { -- hl2 crossbow bolts
  264. displayname = "Long Sword",
  265. model = "models/weapons/w_bs_longsword.mdl",
  266. needed = {Bar de Metal = 6, Bar de Mithril = 5, Bar de Bronze = 70},
  267. jobs = {TEAM_FORGERON},
  268. SortOrder = 3,
  269. XPReward = 1,
  270. }
  271.  
  272. SMS.Recipes["weapon_bs_scimitar"] = { -- hl2 crossbow bolts
  273. displayname = "Scimitar",
  274. model = "models/weapons/w_bs_scimitar.mdl",
  275. needed = {Bar de Metal = 4, Bar de Mithril = 2, Bar de Bronze = 60},
  276. jobs = {TEAM_FORGERON},
  277. SortOrder = 3,
  278. XPReward = 1,
  279. }
  280.  
  281. SMS.Recipes["weapon_bs_broadsword"] = { -- hl2 crossbow bolts
  282. displayname = "Broadsword",
  283. model = "models/weapons/w_bs_broadsword.mdl",
  284. needed = {Bar de Metal = 10, Bar de Bronze = 50},
  285. jobs = {TEAM_FORGERON},
  286. SortOrder = 3,
  287. XPReward = 1,
  288. }
  289.  
  290. SMS.Recipes["models/weapons/w_bs_gladius.mdl"] = { -- hl2 crossbow bolts
  291. displayname = "Gladius",
  292. model = "models/weapons/w_bs_gladius.mdl",
  293. needed = {Bar de Metal = 3, Bar de Bronze = 40},
  294. jobs = {TEAM_FORGERON},
  295. SortOrder = 3,
  296. XPReward = 1,
  297. }
  298.  
  299. SMS.Recipes["Bar de Bronze"] = { -- This is the oretype if Type = "refinedore",
  300. displayname = "Bar de Bronze",
  301. model = "models/mining/metalbar.mdl",
  302. needed = {Cuivre = 1, Etain = 1},
  303. Type = "refinedore",
  304. jobs = {TEAM_FORGERON},
  305. SortOrder = 22,
  306. XPReward = 5,
  307. }
  308.  
  309. SMS.Recipes["Bar de Metal"] = { -- This is the oretype if Type = "refinedore",
  310. displayname = "Bar de Metal",
  311. model = "models/mining/metalbar.mdl",
  312. needed = {Metal = 2, Coal = 5},
  313. Type = "refinedore",
  314. jobs = {TEAM_FORGERON},
  315. SortOrder = 22,
  316. XPReward = 5,
  317. }
  318.  
  319. SMS.Recipes["Bar de Mithril"] = { -- This is the oretype if Type = "refinedore",
  320. displayname = "Bar de Mithril",
  321. model = "models/mining/metalbar.mdl",
  322. needed = {Mithril = 3, Coal = 8},
  323. Type = "refinedore",
  324. jobs = {TEAM_FORGERON},
  325. SortOrder = 22,
  326. XPReward = 5,
  327. }
  328.  
  329. SMS.Recipes["Bar de Adamantium"] = { -- This is the oretype if Type = "refinedore",
  330. displayname = "Bar de Adamantium",
  331. model = "models/mining/metalbar.mdl",
  332. needed = {Adamantium = 4, Coal = 12},
  333. Type = "refinedore",
  334. jobs = {TEAM_FORGERON},
  335. SortOrder = 22,
  336. XPReward = 5,
  337. }
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345. ------- Do Not Edit Below Line--------
  346. SMS.LangTab = {}
  347. include("mining_languagefiles/"..string.lower(SMS.Language)..".lua")
  348. AddCSLuaFile("mining_languagefiles/"..string.lower(SMS.Language)..".lua")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement