README
Visit our Discord / Homepage / Store !
Table of contents
Requirements / Dependencies
The following resources are required for nss_quest to work:
Changelog
See CHANGELOG.md for more information.
Setup script
Ensure that the
nss_questfolder is in yourresourcesfolder.Rename config.demo.lua to
config.luaand fill in the values.Rename secure.demo.lua to
secure.luaand fill in the values.Ensure that the quest log item exists (see Setup quest log item)
Execute
db.sqlon your database.Add
ensure nss_questto yourserver.cfg.Restart your server.
Setup quests
Important: See Quest properties and Quest step properties for more information.
Create a new file with the name of your quest, e.g.
my_quest.lua, in quests folder.Copy the following blueprint code into the file to create the basic quest. Adjust it to your needs.
Go into
config.luafile and add your new questMyQuestto theConfig.Queststable.Restart your server and test your quest. Tip: You can use
refreshin the console to reload the resources without restarting the server. And after that userestart nss_questto reload the quest data.
Setup quest log item
New since version 1.2.0.
Add quest log item (see example below) to your inventory database:
Important: Item should be configured as non-removable, usable and with a limit of 1.
Add
YOUR_QUEST_LOG_ITEM_NAMEtoConfig.QuestLogItemNameproperty in the config file.Copy
html_quest/img/quest_log_item.pngtovorp_inventory/html/img/items/YOUR_QUEST_LOG_ITEM_NAME.png(or use your own image).Note:
YOUR_QUEST_LOG_ITEM_NAMEis a placeholder, you can choose any name you want.
Known issues / bugs
No known issues/bugs at the moment.
FAQ
Can I give weapons to the player as reward?
Yes (since version 1.3.0), see the rewards section in the Quest step properties for more information.
How many steps can a quest have?
Unlimited.
How many quests can be configured?
Unlimited.
What means "optional" for attributes?
If an attribute like blip, requirements, markers or rewards is optional, it means that you can leave out the complete attribute section or set the attribute to nil if you don't want to use it.
Example with blip:
Example without blip:
Another example without blip:
Type definitions
table
tableA table is a collection of values or key-value pairs. In this script we use key-value pairs as tables.
Note: Tables are often named as objects (or confusing as lists).
Example:
list
listA list is a collection of values.
Example:
string
stringA string is a sequence of characters wrapped by double or single quotes. In this script we often use strings for texts.
Example for a string:
boolean
booleanA boolean is a logical value. In this script we often use booleans for true/false checks.
Example for a boolean:
number
numberA number is a numeric value. In this script we often use numbers for coordinates, radius, amount, etc.
Example for a number:
function
functionA function is a block of code that can be called by name. In this script we often use functions for callbacks.
Example for a simple named function:
Example for usage of a function as callback:
Last updated
Was this helpful?