Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.65 KB | None | 0 0
  1. BEModuleConfig = {}
  2. BEModuleFunctions = {}
  3.  
  4. local Config = BEModuleConfig
  5.  
  6. -- General Settings --
  7. Config.Version = 2.5 -- Which version of DarkRP, don't include second decimals INCORRECT: (2.5.0) Correct: (2.5)
  8. Config.Style = 1 -- The default VGUI style, players can change theirs (1-4) 1: "Sleek" Dark, 2: Dark/Black, 3: Pink, 4: Red
  9. Config.Currency = "$" -- The symbol displayed to represent money
  10. Config.LoadTime = 30 -- How long it takes for the initilization timers to take (to allow other things to load, basically)
  11.  
  12. -- Economy Settings --
  13. Config.Reputation = 50 -- Where the reputation progress starts at (0-100) (reloading the script resets the game value)
  14. Config.EconomyBank = 10000 -- How much money the bank begins with (reloading the script resets the game value)
  15.  
  16. Config.E_HUDPosition = "top" -- Where the economy meter and basic information is located: "top" or "bottom"
  17. Config.E_HUDHeight = 25 -- The height of the HUD displaying economy, reputation, and money
  18. Config.E_HUDWidth = 250 -- Same as height, but the width, which is horizontal
  19.  
  20. Config.EconomyStyleCommand = "estyle" -- The command used to change the VGUI style, no slash required
  21. Config.EconomyManagerCommand = "economy" -- The command that allows the mayor to manage the economy
  22. Config.EconomyManagerQuickKey = true -- If this is enabled, the mayor can press F2 (when not looking at a door) to open the economy manager
  23.  
  24. -- Bank Robbing Settings --
  25. Config.NoRobbingJobs = { "Police Officer", "Police Chief", "Mayor", "Gun Dealer", "Citizen", "Hobo" } -- The job names that aren't allowed to rob, can't use variables such as TEAM_POLICE
  26. Config.RequiredRobJobs = { "Police Officer" } -- How many players of one job there should be for robbing to work
  27. Config.MinimumRequired = 4 -- There must at least be this many required of the jobs above for robbing to work, set 0 to disable
  28. Config.AutoWant = true -- Want the player when being robbed
  29. Config.WantMessage = "The City Bank is now being robbed!" -- The message displayed when a player begins robbing
  30. Config.MoneyPickupSpeed = 0.33 -- How fast the player picks up money from money stacks
  31. Config.MoneyPickupSound = "physics/body/body_medium_impact_soft6.wav" -- The sound each time money is picked up from money stacks, set to "" to disable
  32. Config.MoneyWorth = 100 -- The worth of each individual money stack
  33. Config.MoneyStacks = 48 -- How many money stacks are in the money stack
  34. Config.MoneyRespawn = 600 -- How many seconds until money stacks respawn again
  35. Config.MoneyComesFromGovernment = true -- When money stacks are taken, that money will also be deducted from the government's bank
  36. Config.MoneyEmpty = "There's no more money to steal from the government!" -- The message displayed if there isn't any money left (and the above variable is enabled)
  37. Config.MoneyRespawnDelay = 5 -- The delay after all money has been taken, when it will respawn again
  38. Config.AlarmSound = "ambient/alarms/alarm1.wav" -- The sound played when the alarm is ringing
  39. Config.AlarmHealth = 150 -- How much health the alarm has, when it reaches 0 health any alarm will stop
  40. Config.AlarmSparkOnDamage = true -- When the alarm takes damage it will make spark sounds
  41. Config.AlarmStartAgain = 30 -- How long before the alarm will start again after being damaged to turn off
  42. Config.AlarmCooldown = 60 -- How long until the alarm stops (after the last robbing action)
  43.  
  44. Config.AlarmLocations = {
  45. -- Where alarms are put for bank robberies
  46. -- Remove these to disable alarms
  47.  
  48. { map = "rp_downtown_v4c_v2", model = "models/props_wasteland/speakercluster01a.mdl", pos = Vector(-1407, 214, -27), ang = Angle(0, 0, 0) },
  49. }
  50.  
  51. Config.MoneyStackLocations = {
  52. -- Individual money stacks that are placed
  53. -- Use "models/props_wasteland/speakercluster01a.mdl" as a refrence for placement
  54.  
  55. { map = "rp_downtown_v4c_v2", pos = Vector(-1502, 201, -112), ang = Angle(0, 122, 0) },
  56. }
  57.  
  58. Config.ShelfLocations = {
  59. -- Shelves of stacks of money
  60. -- Use "models/props/cs_office/shelves_metal.mdl" as a refrence for placement
  61.  
  62. { map = "rp_downtown_v4c_v2", pos = Vector(-1976, 332, -160), ang = Angle(0, -180, 0) },
  63. }
  64.  
  65. -- Mayor Settings --
  66. Config.MayorTeamName = "Mayor" -- The team name of the "mayor team" (economy privledges), can't use variables such as TEAM_MAYOR
  67.  
  68. Config.UnacceptableReputation = 5 -- When the reputation is considered "unacceptable," should be less than or equal to 20
  69. Config.AllowRecall = true -- When the reputation reaches unacceptable, people can recall the mayor (legal demotion)
  70.  
  71. -- Hints --
  72. Config.HintInterval = 90 -- The delay between showning hints
  73. Config.HintLength = 10 -- How long the hint stays before it fades away
  74. Config.SayHintBeforeHint = true -- Display "HINT: " before hints.
  75.  
  76. Config.Hints = {
  77. -- Remember to fit these to your configuration's specifications (it doesn't do it automatically)
  78.  
  79. "There are four different VGUI styles to choose from. You can change your current style by typing /estyle <style id>, you can enter numbers between 1-4.",
  80. "The mayor makes decisions that will effect the city's reputation and bank. If the city's reputation reaches unacceptable, the mayor can be recalled by typing /recall.",
  81. "Opportunities that the mayor must complete regulary occur. Sometimes there is a right answer, but even the right answer can go wrong.",
  82. "Good economy allows the government to better equip theirselves. Also, it could mean a better salary for everybody.",
  83. "If you're the mayor, you can use /economy or press F2 to access the Economy Manager.",
  84. "Everytime you receive a paycheck, some taxes might be taken.",
  85. "Work as a government officer, and you might be able to loadout with upgrades and weapons.",
  86. "The mayor is able to influence economic progression. They can invest as much money into the proccess, and in turn creates profit. The more money invested, though, the longer it takes.",
  87. }
  88.  
  89. -- Taxes --
  90. Config.EnableTaxes = true -- Whether people are taxed, and that tax money is put into the government's bank
  91. Config.GovernmentSalary = { "Police Officer", "Police Chief", "Mayor" } -- The team names of people paid using the government's bank, can't use variables such as TEAM_POLICE
  92. Config.TaxPayers = { "Citizen", "Gangster", "Mob boss", "Gun Dealer", "Medic", "Theater Manager", "Thief", "Security Guard", "Banker",
  93. "Weapons Dealer","Assault Weapons Dealer" } -- The team names of jobs that must pay taxes, can't use variables such as TEAM_CITIZEN
  94. Config.MaxTaxes = 100 -- The, percentage, limit that taxes can be set to (100 being all money can be taken from paychecks)
  95. Config.DefaultTaxes = 50 -- Where taxes begin
  96. Config.TaxNotificationLength = 10 -- How long it displays the new taxes for
  97.  
  98. -- Loadouts --
  99. Config.EnableLoadouts = true -- Whether loadouts are enabled, which allows for government to modify their weapons when they spawn
  100. Config.GovernmentJobs = { "Police Officer", "Police Chief" } -- The team names of government members, can't use variables such as TEAM_POLICE
  101.  
  102. Config.PerkNotificationLength = 10 -- How long the notification is displayed for when a perk is bought or expires
  103.  
  104. Config.Perks = {
  105. -- Duration is in minutes
  106. -- Make sure the ID values for weapon loadouts match
  107.  
  108. { id = "primaryWeapons", title = "Primary Weapons", cost = 10000, duration = 60, description = [[Unlocks two-handed weaponry for government officers in their loadout]] },
  109. { id = "secondaryWeapons", title = "Secondary Weapons", cost = 5000, duration = 60, description = [[Unlocks one-handed weaponry for government officers in their loadout]] },
  110.  
  111. -- Do not modify these ID values (you can remove the perks, though)
  112. { id = "upgrades", title = "Upgrades", cost = 15000, duration = 60, description = [[Allow government officers to upgrade their strength, resistance, and armor in their loadout]] },
  113. { id = "reputation", title = "Most Repuable", cost = 25000, duration = 60, description = [[Reputation will be doubled whenever reputation is gained]] },
  114. { id = "economy", title = "Better Economy", cost = 7500, duration = 60, description = [[People receiving a paycheck will receive twice their usual payday amount]] },
  115. }
  116.  
  117. Config.WeaponsLoadout = {
  118. -- In order to remove this from loadouts, just remove all of the tables (not the entire variable, just empty it)
  119. { id = "primaryWeapons", category = "Primary", reputationRequired = 70, classes = {"m9k_ak47","m9k_mp5","m9k_remington870"} },
  120. { id = "secondaryWeapons", category = "Secondary", reputationRequired = 50, classes = {"m9k_deagle","m9k_scoped_taurus"} },
  121. }
  122.  
  123. Config.UpgradesReputation = 45 -- How low the reputation is allowed for upgrades to be used
  124. Config.AvailableUpgradePoints = 10 -- How many points are available to be distributed into upgrades (default and minimum value is 1 and the maximum value is 10 for each perk)
  125.  
  126. Config.WalkSpeedUpgrade = 50 -- The maximum value that is added to the player's speed when using the leg strength upgrade
  127. Config.DamageScaleUpgrade = 0.5 -- The maximum scale that is subtracted from the player's damage scale with the resistance upgrade
  128.  
  129. Config.UpgradesLoadout = {
  130. -- WARNING: Do not modify the ID values
  131. -- You can remove the upgrades or modify the title
  132.  
  133. { id = "legStrength", title = "Leg Strength" },
  134. { id = "resistance", title = "Damage Resistance" },
  135. { id = "armor", title = "Protective Gear" },
  136. }
  137.  
  138. Config.CurrentPerks = {} -- Used for the current perks, also can work for default perks (use ID)
  139.  
  140. -- Opportunities --
  141. Config.OpportunityInterval = 480 -- The interval between opportunities given to the mayor (make this greater than the sum of the expirations)
  142. Config.OpportunityNotificationExpiration = 45 -- How long before the question to check the opportunity disappears
  143. Config.OpportunityDecisionExpiration = 300 -- How long to make an answer
  144. Config.OpportunityPostNotificationExpiration = 15 -- How long before the message displaying the outcome of the opportunity expires
  145. Config.OpportunityNotification = "A new opportunity has arisen." -- The message displayed
  146.  
  147. Config.OpportunitySkipped = 3 -- How much reputation is taken when an opportunity is skipped or there is no mayor
  148. Config.OpportunityMinPlayers = 4 -- How many players there must be for reputation to actually be lowered for missing an opportunity
  149.  
  150. Config.Opportunities = {
  151. { title = "Research",
  152. description = [[A local research center is requesting that you invest in one of their departments. You can ignore their request, but this research center has much influence. The researchers are some of the best in the world, and are sure to accomplish their goals with propper funding. There's a large demand for medical technology, but technology could be much more profitable, although risky.]],
  153. choices = {
  154. { choice = "Invest in Medicine", choiceCost = 5000,
  155. results = {
  156. { chance = 50, money = 7500, reputation = 4, message = [[Few medical advancements were made.]] },
  157. { chance = 20, money = 10000, reputation = 6, message = [[There was many advancements in medical technology.]] },
  158. { chance = 5, money = 25000, reputation = 10, message = [[Several cures for lethal diseases were found.]] },
  159. { chance = 5, money = 15000, reputation = 8, message = [[Several cures for non-lethal viruses were discovered.]] },
  160. { chance = 5, money = 25000, reputation = 2, message = [[Too few medical advancements were made to profit from.]] },
  161. { chance = 5, money = 0, reputation = 0, message = [[The researchers are seemingly incompetent now that they've accomplished nothing.]] },
  162. { chance = 5, money = 0, reputation = 0, message = [[There was an accident, setting back the research and rendering your investment lost.]] },
  163. { chance = 2, money = 90000, reputation = 15, message = [[A cure which practically solves everything was discovered.]] },
  164. { chance = 1, money = 0, reputation = -4, message = [[A large explosion went off at the facility. This probably wouldn't have happened if you didn't invest.]] },
  165. { chance = 1, money = 0, reputation = -2, message = [[Somebody went insane and used your investment to kill some people.]] },
  166. { chance = 1, money = 0, reputation = -2, message = [[A failure to follow protocal resulted in disaster.]] },
  167. }
  168. },
  169.  
  170. { choice = "Invest in Technology", choiceCost = 5000,
  171. results = {
  172. { chance = 45, money = 10000, reputation = 5, message = [[Some new technology was invented.]] },
  173. { chance = 15, money = 20000, reputation = 8, message = [[Many new technological devices were invented.]] },
  174. { chance = 10, money = 3500, reputation = 2, message = [[Too little technology was created to profit from.]] },
  175. { chance = 10, money = 500, reputation = 0, message = [[Barely any technology was made.]] },
  176. { chance = 5, money = 25000, reputation = 10, message = [[Life saving technology was invented.]] },
  177. { chance = 5, money = 0, reputation = 0, message = [[The researchers are seemingly incompetent now that they've accomplished nothing.]] },
  178. { chance = 5, money = 0, reputation = 0, message = [[There was an accident, setting back the research and rendering your investment lost.]] },
  179. { chance = 1, money = 100000, reputation = -4, message = [[Unlimited energy was discovered. It's not free, for the public at least.]] },
  180. { chance = 1, money = 10000, reputation = 12, message = [[Unlimited energy was discovered. It might not be free, but there's still money to be made.]] },
  181. { chance = 1, money = 0, reputation = -4, message = [[A large explosion went off at the facility. This probably wouldn't have happened if you didn't invest.]] },
  182. { chance = 1, money = 0, reputation = -6, message = [[Somebody went insane and made a weapon of mass destruction, then used it.]] },
  183. { chance = 1, money = 0, reputation = -2, message = [[A failure to follow protocal resulted in disaster.]] },
  184. }
  185. },
  186.  
  187. { choice = "Ignore", choiceCost = 0,
  188. results = {
  189. { chance = 50, money = 0, reputation = 0, message = [[You ignore the request without much problem.]] },
  190. { chance = 25, money = 0, reputation = -5, message = [[By ignoring the request, some people have lost respect for you.]] },
  191. { chance = 15, money = 0, reputation = -2, message = [[Not investing resulted in deaths that could have been prevented.]] },
  192. { chance = 5, money = 0, reputation = 2, message = [[People think it was a good choice to not invest.]] },
  193. { chance = 5, money = 0, reputation = 2, message = [[An anomaly was found that wouldn't have been if you invested, and lives were saved.]] },
  194. }
  195. }
  196. }},
  197.  
  198. { title = "Domestic Terrorism",
  199. description = [[Everything wasy going fine, until there was a threat to blow up a building. Mostly somebody tipping off that the person they knew was going to be rigging explosives to the structural foundation. What should you do about this threat?]],
  200. choices = {
  201. { choice = "Do Nothing", choiceCost = 0,
  202. results = {
  203. { chance = 60, money = 0, reputation = -10, message = [[The building exploded and a lot of people died.]] },
  204. { chance = 20, money = 0, reputation = -4, message = [[Nothing happened, but word got out about the threat and people are furious with your lack of action.]] },
  205. { chance = 10, money = 0, reputation = 0, message = [[Nothing happened, and the threats remain secret to the public.]] },
  206. { chance = 10, money = 0, reputation = -6, message = [[Somebody suspicious was caught with explosives and plans to destroy the building, but people are furious you didn't respond to the threat.]] },
  207. }
  208. },
  209.  
  210. { choice = "Call in the FBI", choiceCost = 5000,
  211. results = {
  212. { chance = 80, money = 0, reputation = 10, message = [[The FBI is led to a man stocked with explosives and plans to destroy the building.]] },
  213. { chance = 10, money = 20000, reputation = 8, message = [[The FBI didn't find any explosives, but they found lots of illegal contraband.]] },
  214. { chance = 5, money = 0, reputation = 2, message = [[The FBI found out the threat was fake, but arrested the caller.]] },
  215. { chance = 3, money = 0, reputation = 0, message = [[The FBI didn't find anything, and no explosion happened.]] },
  216. { chance = 2, money = 0, reputation = 0, message = [[An explosion went off killing a lot of people.]] },
  217. }
  218. },
  219.  
  220. { choice = "Evacuate the Building", choiceCost = 0,
  221. results = {
  222. { chance = 30, money = 0, reputation = 8, message = [[The building was evacuationed and bombs were found.]] },
  223. { chance = 30, money = 0, reputation = 0, message = [[The building was evacuationed, but no bombs were found.]] },
  224. { chance = 20, money = 0, reputation = 10, message = [[The building was evacuationed. Followed by an explosion, but nobody was killed.]] },
  225. { chance = 20, money = 0, reputation = -4, message = [[The evacuation was a failure, the bomber set off the bombs before everybody escape.]] },
  226. }
  227. }
  228. }},
  229.  
  230. { title = "Donations for a Cause",
  231. description = [[The community has raised over $100,000 to help improve the economy, but where it goes is up to you. Unemployment is at 10% and could use the money to lower it.]],
  232. choices = {
  233. { choice = "Raise Employment", choiceCost = 0,
  234. results = {
  235. { chance = 80, money = 50000, reputation = 6, message = [[Unemployment was lowered to 4%.]] },
  236. { chance = 10, money = 125000, reputation = 8, message = [[Unemployment was lowered to 2%.]] },
  237. { chance = 8, money = 5000, reputation = 2, message = [[Unemployment only lowered to 8%.]] },
  238. { chance = 2, money = 0, reputation = 2, message = [[Unemployment didn't change.]] },
  239. }
  240. },
  241.  
  242. { choice = "Keep the Money", choiceCost = 0,
  243. results = {
  244. { chance = 99, money = 100000, reputation = -75, message = [[You keep the money, but the community has never been so disappointed in you before.]] },
  245. { chance = 1, money = 100000, reputation = 0, message = [[Nobody seems to care that you stole all that money.]] },
  246. }
  247. }
  248. }},
  249. }
  250.  
  251. -- Functions (for versions) --
  252. Config.GiveMoney = function(ply, amount)
  253. if Config.Version == 2.5 then
  254. ply:addMoney(amount)
  255. elseif Config.Version < 2.5 then
  256. ply:AddMoney(amount)
  257. end
  258. end
  259.  
  260. Config.Notify = function(ply, msgType, time, message)
  261. if Config.Version == 2.5 then
  262. DarkRP.notify(ply, msgType, time, message)
  263. elseif Config.Version < 2.5 then
  264. GAMEMODE:Notify(ply, msgType, time, message)
  265. end
  266. end
  267.  
  268. Config.NotifyAll = function(msgType, time, message)
  269. if Config.Version == 2.5 then
  270. DarkRP.notifyAll(msgType, time, message)
  271. elseif Config.Version < 2.5 then
  272. GAMEMODE:NotifyAll(msgType, time, message)
  273. end
  274. end
  275.  
  276. Config.AddChatCommand = function(command, callback, description, delay)
  277. if Config.Version == 2.5 then
  278. if SERVER then
  279. DarkRP.defineChatCommand(command, callback)
  280. end
  281.  
  282. DarkRP.declareChatCommand{ command = command, description = description, delay = delay }
  283. elseif Config.Version < 2.5 then
  284. AddChatCommand("/"..command, callback)
  285. end
  286. end
  287.  
  288. Config.FormatNumber = function(n)
  289. if (!n) then
  290. return 0
  291. end
  292.  
  293. if n >= 1e14 then return tostring(n) end
  294.  
  295. n = tostring(n)
  296. sep = sep or ","
  297.  
  298. local dp = string.find(n, "%.") or #n+1
  299.  
  300. for i=dp-4, 1, -3 do
  301. n = n:sub(1, i) .. sep .. n:sub(i+1)
  302. end
  303.  
  304. return n
  305. end
  306.  
  307. Config.ChangeTeam = function(ply, t, force)
  308. if t == "Default" then
  309. t = GAMEMODE.DefaultTeam
  310. end
  311.  
  312. if Config.Version == 2.5 then
  313. ply:changeTeam(t, force)
  314. elseif Config.Version < 2.5 then
  315. ply:ChangeTeam(t, force)
  316. end
  317. end
  318.  
  319. Config.IsDoor = function(entity)
  320. if Config.Version == 2.5 then
  321. return entity:isDoor()
  322. elseif Config.Version < 2.5 then
  323. return entity:IsDoor()
  324. end
  325. end
  326.  
  327. Config.IsWanted = function(ply)
  328. if Config.Version == 2.5 then
  329. return ply:isWanted()
  330. elseif Config.Version < 2.5 then
  331. return ply:IsWanted()
  332. end
  333. end
  334.  
  335. Config.Wanted = function(ply, reason)
  336. if Config.Version == 2.5 then
  337. ply:wanted(ply, reason)
  338. elseif Config.Version < 2.5 then
  339. GAMEMODE:PlayerWanted(ply, ply, reason)
  340. end
  341. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement