Advertisement
Guest User

jillconfig

a guest
May 5th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.63 KB | None | 0 0
  1. --[[---------------------------------------------------------
  2. Name: Jill Config.
  3. -----------------------------------------------------------]]
  4.  
  5. JILL = JILL or {}
  6.  
  7. --[[---------------------------------------------------------
  8. This is where we make the front-end of the Quests, the ones
  9. that are to be displayed. Copy one line and place it under
  10. the other. If you don't want the default quests to show
  11. make CanAccept to false: CanAccept = false
  12.  
  13. If you would like to know how to create quests
  14. and or dont know how to get start or what to look for
  15. please read the README file which was provided
  16. within the purchase.
  17.  
  18. Do not replace and or remove the default quests!
  19. Do not replace and or remove the default quests!
  20. -----------------------------------------------------------]]
  21. JILL.Quests =
  22. {
  23.  
  24. { Title = "Retrieve The Book", Description = "Woah, glad someone came up to me! It seems that I have lost my favorite book. If you could be a peach and find it for me I'll give you some phat bread.", Objectives = "Find Jill's favorite book in return for some phat bread", Reward = 1000, Taken = false, CanAccept = true, IsCompleted = false },
  25. { Title = "Skulls...", Description = "I don't like to admit it but I have quite the obsession for skulls. I need some more to complete my collection, if you could get me some fresh ones I'd be happy to give you some money in return. Whatcha say?", Objectives = "Kill 5 players and take their skulls & retrieve them back to Jill.", Reward = 5000, Taken = false, CanAccept = true, IsCompleted = false },
  26. { Title = "You're a rebel you", Description = "A few weeks ago I was caught with a blunt in my hands, the guy that tipped the Police off is actually a Police Officer. I need you take one of the Police Officers down then come back to me un noticed.", Objectives = "Kill one Police Officer then come back to Jill to get your reward.", Reward = 7500, Taken = false, CanAccept = true, IsCompleted = false },
  27. { Title = "Cases of Beer", Description = "Hello! I'm going to host a party this weekend but we're all out of alcohol, if you could get a few cases of beer for us you're definitely invited! I'll throw in a few hundred bucks too. You down?", Objectives = "Retrieve 3 cases of beer from all around the city", Reward = 1250, Taken = false, CanAccept = true, IsCompleted = false },
  28. { Title = "Starvation", Description = "Hey! Glad you came along, I've been standing here for some time and and I'm very hungry, you think you could bring some food back for me?", Objectives = "Bring a couple of noodle boxes back to Jill.", Reward = 1000, Taken = false, CanAccept = true, IsCompleted = false },
  29. { Title = "Lost Gun", Description = "Hey there! After the hunting season I kind of lost my gun. It's a really old gun so if you find it you can keep it!", Objectives = "Find Jill's lost gun.", Reward = "Jill's lost gun", Taken = false, CanAccept = true, IsCompleted = false },
  30. { Title = "Brains....", Description = "Hey You! You seem like the type of guy that should be able to take out some zombies, you think you can do that for us? What I'm asking you may seem very dangerous so you can expect the payout to be high.", Objectives = "Take out 5 zombies.", Reward = 10000, Taken = false, CanAccept = true, IsCompleted = false },
  31. { Title = "Break and Entry", Description = "You there! You seem like the type of guy that knows how to handle a gun. A couple of days ago the government raided our place and took all of our drugs - I Was the only one who managed to get out and now I'm requesting your help. I need you to Break and Entry into the Police Department retrieve our drugs and bring them back to me.", Objectives = "Theres about 5 cocaine plants in the Police Department - The more you take the more you get. There is a lot of security and once you get one bag the alarm will go off. You should probably carry a gun for this one.", Reward = 10000, Taken = false, CanAccept = true, IsCompleted = false },
  32. //Your custom quests goes under this line!
  33.  
  34. }
  35.  
  36. //Key to open the quest log
  37. //uses KEY_ENUMS
  38. JILL.QuestKey = KEY_L
  39.  
  40. //What usergroups shall see our admin notifications?
  41. JILL.AdminNotification =
  42. {
  43.  
  44. [ "admin" ] = true,
  45. [ "superadmin" ] = true,
  46.  
  47. }
  48.  
  49. if ( SERVER ) then
  50.  
  51. --[[---------------------------------------------------------
  52. This is where the NPC Position is set, the first value
  53. needs to be the map you want this NPC to spawn at
  54.  
  55. Example: rp_downtown_v2 = { vector = Vector( 1, 1, 1 ), angle = Angle( 1, 1, 1 ) }
  56. Type getpos into console to get your current position.
  57. -----------------------------------------------------------]]
  58. JILL.NPCPos =
  59. {
  60.  
  61. rp_stalker_new = { vector = Vector( -1523.355469 -11273.028320 -575.968750 ), angle = Angle( 59.381836 179.097748 -0.000000 ) } --For floofs map[testing / dev purposes.]
  62.  
  63. }
  64.  
  65. //The model of the NPC
  66. JILL.NPCModel = "models/mossman.mdl"
  67.  
  68. //Can we kill the NPC?
  69. JILL.CanDie = false
  70.  
  71. //If the above is set to true change its health accordingly
  72. JILL.HP = 100
  73.  
  74. //Global Quest cooldown in seconds. 300 = 5 min
  75. JILL.Cooldown = 300
  76.  
  77. //Beer spawn position for the 'Case of Beer' quest. Make sure you edit all three values.
  78. //you can create as many as you like.
  79. JILL.BeerPosition =
  80. {
  81.  
  82. rp_stalker_new = { vector1 = Vector( -1551.682373 -6746.765625 112.031250 ), vector2 = Vector( -2645.499756 -2692.571045 64.031250 ), vector3 = Vector( -4053.827637 -11288.031250 -575.968750 ) }
  83.  
  84. }
  85.  
  86. //Noodle spawn position for the 'Starvation' quest.
  87. //you can create as many as you like.
  88. JILL.NoodlePosition =
  89. {
  90.  
  91. rp_stalker_new = { vector1 = Vector( 403.145813, 699.574219, 520.031250 ), vector2 = Vector( 395.574829, 933.629211, 520.031250 ) }
  92.  
  93. }
  94.  
  95. //Book spawn position for the 'Retrieve the book' quest.
  96. JILL.BookSpawn = Vector( 991.013000, 1051.633911, 520.031250 )
  97.  
  98. //Weapons to spawn for the 'Lost Gun' quest.
  99. //This will draw one weapon and spawn it, you can create as many as you like.
  100. JILL.WeaponsSpawn =
  101. {
  102.  
  103. { weapon = "weapon_ak472", vector = Vector( 1165.635986, 1163.733276, 520.031250 ) },
  104. { weapon = "weapon_pumpshotgun2", vector = Vector( 1004.932068, 422.305054, 520.031250 ) },
  105. { weapon = "weapon_mac102", vector = Vector( -119.527122, 292.664825, 528.031250 ) },
  106.  
  107. }
  108.  
  109. //Zombie spawns for the 'Infection' quest.
  110. //This will the spawn position for all the zombies, you can delete or create as many as you like.
  111. JILL.ZombieSpawns =
  112. {
  113.  
  114. { zombie = "npc_headcrab", vector1 = Vector( -10597.555664, -3914.591064, -639.968750 ) },
  115. { zombie = "npc_fastzombie", vector2 = Vector( -10590.322266, -3398.555908, -639.968750 ) },
  116. { zombie = "npc_zombie", vector3 = Vector( -10581.607422, -3038.965820, -639.968750 ) },
  117. { zombie = "npc_zombie", vector4 = Vector( -10571.183594, -2554.344238, -639.968750 ) },
  118. { zombie = "npc_zombie", vector5 = Vector( -10562.388672, -2104.680664, -639.968811 ) },
  119.  
  120. }
  121.  
  122. //If someone kills a zombie and they don't have the quest
  123. //how long should it take for the zombie to spawn back
  124. //so the user who have the qeust can complete it?
  125. JILL.ZombieResetCooldown = 30
  126.  
  127. //The spawn position for the Cocaine Plants
  128. //You can remove or add as many as you like.
  129. //The more you add the more money the user gets when he completes the quest
  130. //The more you remove the less money the user gets when he completes the quest.
  131. JILL.CocainePlantSpawns =
  132. {
  133.  
  134. { vector1 = Vector( -11572.376953, -1105.194214, -639.968750 ) },
  135. { vector2 = Vector( -11595.363281, -4063.125732, -639.968750 ) },
  136. { vector3 = Vector( -10358.220703, -4079.985596, -639.968750 ) },
  137. { vector4 = Vector( -10396.228516, -1044.812744, -639.968750 ) },
  138. { vector5 = Vector( -10983.937500, -2551.960938, -671.968750 ) },
  139.  
  140. }
  141.  
  142. //When we pick up the Cocaine how much should we increase the reward with?
  143. JILL.CocainePlantReward = 2000
  144.  
  145. //If the player already has a quest can he accept another?
  146. JILL.MultipleQuests = true
  147.  
  148. //Alright, this next part may be a little confusing for you because
  149. //this is where we handle the quest functions
  150. //if you would like to create your own quests, read the README file
  151. //which was provided within the purchase.
  152. JILL.Functions =
  153. {
  154.  
  155. Quest1 = function()
  156.  
  157. local Book = ents.Create( "Book" )
  158. Book:SetPos( JILL.BookSpawn )
  159. Book:Spawn()
  160.  
  161. local phys = Book:GetPhysicsObject()
  162.  
  163. if ( IsValid( phys ) ) then
  164.  
  165. phys:Wake()
  166.  
  167. end
  168.  
  169. end,
  170.  
  171. Quest2 = function( victim, inflictor, attacker )
  172.  
  173. hook.Remove( "PlayerDeath", "SpawnSkullOnDeath" )
  174.  
  175. hook.Add( "PlayerDeath", "SpawnSkullOnDeath", function( victim, inflictor, attacker )
  176.  
  177. if ( not IsValid( victim ) ) then return end
  178. if ( not IsValid( inflictor ) ) then return end
  179. if ( not IsValid( attacker ) ) then return end
  180.  
  181. if ( not victim:IsPlayer() ) then return end
  182. if ( not attacker:IsPlayer() ) then return end
  183.  
  184. if ( tobool( attacker:GetPData( "Quest2", false ) ) == true ) then
  185.  
  186. local skull = ents.Create( "Skull" )
  187. skull:SetPos( Vector( victim:GetPos().x, victim:GetPos().y, victim:GetPos().z + 90) )
  188. skull:Spawn()
  189.  
  190. local phys = skull:GetPhysicsObject()
  191.  
  192. if ( IsValid( phys ) ) then
  193.  
  194. phys:Wake()
  195.  
  196. end
  197.  
  198. for k, v in pairs( player.GetAll() ) do
  199.  
  200. v:QuestAdminNotify( attacker:Nick() .. " killed " .. victim:Nick() .. " because of the 'Skulls...' Quest." )
  201.  
  202. end
  203.  
  204. end
  205.  
  206. end )
  207.  
  208. end,
  209.  
  210. Quest3 = function()
  211.  
  212. //This is for the 'You're a rebel you' quest - Who should we kill? - Remember to add a comma(,) at the end.
  213. JILL.PoliceTeams = { [ TEAM_POLICE ] = true, [ TEAM_CHIEF ] = true }
  214.  
  215. hook.Remove( "PlayerDeath", "ImaMurderer" )
  216.  
  217. hook.Add( "PlayerDeath", "ImaMurderer", function( victim, inflictor, attacker )
  218.  
  219. if ( not IsValid( victim ) ) then return end
  220. if ( not IsValid( inflictor ) ) then return end
  221. if ( not IsValid( attacker ) ) then return end
  222.  
  223. if ( not victim:IsPlayer() ) then return end
  224. if ( not attacker:IsPlayer() ) then return end
  225.  
  226. if ( tobool( attacker:GetPData( "Quest3", false ) ) == true ) then
  227.  
  228. if ( JILL.PoliceTeams[ victim:Team() ] ) then
  229.  
  230. attacker:SetPData( "Completed3", true )
  231. attacker:PrintMessage( HUD_PRINTTALK, "I'm a murderer! I should get back to jill before they find me!" )
  232.  
  233. for k, v in pairs( player.GetAll() ) do
  234.  
  235. v:QuestAdminNotify( attacker:Nick() .. " killed " .. victim:Nick() .. " because of the 'You're a rebel you' Quest." )
  236.  
  237. end
  238.  
  239. end
  240.  
  241. end
  242.  
  243. end )
  244.  
  245. end,
  246.  
  247. Quest4 = function()
  248.  
  249. local Count = 1
  250.  
  251. for k, v in pairs( JILL.BeerPosition ) do
  252.  
  253. for _, vectors in pairs( v ) do
  254.  
  255. local Beer = ents.Create( "Beer" )
  256. Beer:SetPos( v[ "vector" .. Count ] )
  257. Beer:Spawn()
  258.  
  259. Count = Count + 1
  260.  
  261. local phys = Beer:GetPhysicsObject()
  262.  
  263. if ( IsValid( phys ) ) then
  264.  
  265. phys:Wake()
  266.  
  267. end
  268.  
  269. end
  270.  
  271. end
  272.  
  273. end,
  274.  
  275. Quest5 = function()
  276.  
  277. local Count = 1
  278.  
  279. for k, v in pairs( JILL.NoodlePosition ) do
  280.  
  281. for _, vectors in pairs( v ) do
  282.  
  283. local Noodle = ents.Create( "Noodles" )
  284. Noodle:SetPos( v[ "vector" .. Count ] )
  285. Noodle:Spawn()
  286.  
  287. Count = Count + 1
  288.  
  289. local phys = Noodle:GetPhysicsObject()
  290.  
  291. if ( IsValid( phys ) ) then
  292.  
  293. phys:Wake()
  294.  
  295. end
  296.  
  297. end
  298.  
  299. end
  300.  
  301. end,
  302.  
  303. Quest6 = function()
  304.  
  305. local id = math.random( 1, #JILL.WeaponsSpawn )
  306.  
  307. local wep = ents.Create( JILL.WeaponsSpawn[ id ][ "weapon" ] )
  308. wep:SetPos( JILL.WeaponsSpawn[ id ][ "vector" ] )
  309. wep:Spawn()
  310.  
  311. //Some addons return false in PlayerCanPickUpWeapon so they have to press E to pickup
  312. //So we have this just in-case.
  313. hook.Remove( "AllowPlayerPickup", "DontAllowUnlessQuest" )
  314. hook.Add( "AllowPlayerPickup", "DontAllowUnlessQuest", function( ply, ent )
  315.  
  316. if ( not IsValid( ply ) ) then return end
  317. if ( not IsValid( ent ) ) then return end
  318. if ( not IsValid( wep ) ) then return end
  319.  
  320. if ( ent:GetClass() == wep:GetClass() ) then
  321.  
  322. if ( tobool( ply:GetPData( "Quest6", false ) ) == false ) then return false end
  323.  
  324. ply:SetPData( "Completed6", true )
  325. JILL.Quests[ 6 ][ "Reward" ] = ent:GetClass()
  326. ply:PrintMessage( HUD_PRINTTALK, "This is probably the gun Jill talked about, let's find out." )
  327. ent:Remove()
  328.  
  329. end
  330.  
  331. end )
  332.  
  333. //If they don't have that.
  334. hook.Remove( "PlayerCanPickupWeapon", "DontAllowPickupUnlessQuest" )
  335. hook.Add( "PlayerCanPickupWeapon", "DontAllowPickupUnlessQuest", function( ply, weapon )
  336.  
  337. if ( not IsValid( ply ) ) then return end
  338. if ( not IsValid( weapon ) ) then return end
  339. if ( not IsValid( wep ) ) then return end
  340.  
  341. if ( weapon:GetClass() == wep:GetClass() ) then
  342.  
  343. if ( tobool( ply:GetPData( "Quest6", false ) ) == false ) then return false end
  344.  
  345. ply:SetPData( "Completed6", true )
  346. JILL.Quests[ 6 ][ "Reward" ] = weapon:GetClass()
  347. ply:PrintMessage( HUD_PRINTTALK, "This is probably the gun Jill talked about, let's find out." )
  348. weapon:Remove()
  349.  
  350. end
  351.  
  352. end )
  353.  
  354. end,
  355.  
  356. Quest7 = function()
  357.  
  358. local Count = 1
  359. local Zombies = {}
  360. local RemoveRagdollModels = { "models/zombie/classic.mdl", "models/headcrabclassic.mdl", "models/zombie/fast.mdl", "models/headcrab.mdl", "models/zombie/classic_torso.mdl", "models/zombie/classic_legs.mdl" }
  361. Zombies.Count = 0
  362.  
  363. for k, v in pairs( JILL.ZombieSpawns ) do
  364.  
  365. local Zombie = ents.Create( v[ "zombie" ] )
  366. Zombie:SetPos( v[ "vector" .. Count ] )
  367. Zombie:Spawn()
  368.  
  369. Count = Count + 1
  370. Zombies.Count = Zombies.Count + 1
  371.  
  372. Zombies[ Zombies.Count ] = { zombie = Zombie, vector = Zombie:GetPos() }
  373.  
  374. end
  375.  
  376. hook.Remove( "OnNPCKilled", "JillOnNPCKilled" )
  377. hook.Add( "OnNPCKilled", "JillOnNPCKilled", function( npc, ent )
  378.  
  379. if ( not IsValid( npc ) ) then return end
  380.  
  381. for k, v in pairs( JILL.ZombieSpawns ) do
  382.  
  383. if ( Zombies[ k ] == nil ) then return end
  384.  
  385. if ( Zombies[ k ][ "zombie" ] == npc ) then
  386.  
  387. JILL.ZombieSpawns[ k ][ "zombie" ] = Zombies[ k ][ "zombie" ]:GetClass()
  388.  
  389. //If the user that is killing the npcs does not have the right quest
  390. //Then we just spawn the exact npc he killed x seconds later
  391. //so people can't ruin for other people.
  392. if ( tobool( ent:GetPData( "Quest7", false ) ) == false ) then
  393.  
  394. timer.Simple( JILL.ZombieResetCooldown, function()
  395.  
  396. local ReSpawn = ents.Create( JILL.ZombieSpawns[ k ][ "zombie" ] )
  397. ReSpawn:SetPos( Zombies[ k ][ "vector" ] )
  398. ReSpawn:Spawn()
  399.  
  400. Zombies[ k ] = { zombie = ReSpawn, vector = ReSpawn:GetPos() }
  401.  
  402. end )
  403.  
  404. else
  405.  
  406. ent:SetPData( "Collected7", ent:GetPData( "Collected7", 0 ) + 1 )
  407.  
  408. if ( tonumber( ent:GetPData( "Collected7", 0 ) ) >= Zombies.Count ) then
  409.  
  410. ent:PrintMessage( HUD_PRINTTALK, "Phew, that was a lot of zombies. I should get back to Jill." )
  411. ent:SetPData( "Completed7", true )
  412.  
  413. table.Empty( Zombies )
  414.  
  415. end
  416.  
  417. end
  418.  
  419. //Remove the zombie ragdoll
  420. timer.Simple( 10, function()
  421.  
  422. for k, v in pairs( ents.GetAll() ) do
  423.  
  424. if ( IsValid( v ) and v:GetClass() == "prop_ragdoll" ) then
  425.  
  426. if ( table.HasValue( RemoveRagdollModels, v:GetModel() ) ) then
  427.  
  428. v:Remove()
  429.  
  430. end
  431.  
  432. end
  433.  
  434. end
  435.  
  436. end )
  437.  
  438. end
  439.  
  440. end
  441.  
  442. end )
  443.  
  444. end,
  445.  
  446. Quest8 = function()
  447.  
  448. local Count = 1
  449.  
  450. for k, v in pairs( JILL.CocainePlantSpawns ) do
  451.  
  452. local Plant = ents.Create( "JillPlant" )
  453. Plant:SetPos( v[ "vector" .. Count ] )
  454. Plant:Spawn()
  455.  
  456. Count = Count + 1
  457.  
  458. end
  459.  
  460. end,
  461.  
  462. }
  463.  
  464. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement