Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[---------------------------------------------------------
- Name: Servers
- -----------------------------------------------------------]]
- If you're looking for very good servers whether it's for garry's mod or other games, then please check out www.KDServers.com
- --[[---------------------------------------------------------
- Name: Creating a Quest.
- -----------------------------------------------------------]]
- If you would like to know where to start & what to look for when you're creating a quest please watch this video: https://www.youtube.com/watch?v=5cYiKu2_N-I -- old will be updated.
- --[[---------------------------------------------------------
- Name: Quest Variables & Functions.
- -----------------------------------------------------------]]
- JILL.CreateQuest( "unique_quest_identifier", "Quest name", {
- description = string; description of quest,
- objective = string; objective of quest
- reward = table; reward you're giving the player for completing the quest, available rewards are, "darkrp_money", "pointshop_points", "vrondakis_xp", "weapon"
- repeatable = boolean; Is the quest repeatable?
- cooldown = number; If the user fails to complete the quest and or completes it, what should the cooldown be for it? - If this is not set then we will be using the default cooldown time which is in the config.
- completiontime = number; How long does the user have to complete it? - If this is not set then we will be using the default completion time which is in the config.
- entity = string; the entity you're using for this quest, I used "book" for the 'Retreive the Book' Quest, and "noodles" for the 'Starvation Quest.' - If you're not going to use an entity, simply put NULL inside of a string
- refusetype = string; available options are "whitelist"; "blacklist" - all lowercase, remember that.
- refuse = table; A table of team names that are unable to accept this quest.
- OnAccept = function; has the "player" argument( function( ply ) ). This is called when a player accepts this quest.
- OnComplete = function; has the "player" argument( function( ply ) ). This is called when a player completes this quest.
- } )
- Heres an example of using JILL.CreateQuest.
- JILL.CreateQuest( "Custom_Quest_1", "My super example quest", {
- description = "Our description",
- objective = "Our objective.",
- reward = { [ "darkrp_money" ] = 1000, [ "weapon" ] = "weapon_357" },
- entity = "NULL",
- refusetype = "whitelist",
- refuse = { [ "Civil Protection" ] = true, [ "Civil Protection Chief" ] = true, [ "Citizen" ] = true },
- repeatable = false,
- cooldown = 5,
- completiontime = 600
- OnAccept = function( ply )
- ply:MessageClient( "good", "This is an exmaple" )
- end,
- OnComplete = function( ply )
- ply:MessageClient( "good", "This is another example" )
- end
- } )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement