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

  1. Ensure that the nss_quest folder is in your resources folder.

  2. Rename config.demo.lua to config.lua and fill in the values.

  3. Rename secure.demo.lua to secure.lua and fill in the values.

  4. Ensure that the quest log item exists (see Setup quest log item)

  5. Execute db.sql on your database.

  6. Add ensure nss_quest to your server.cfg.

  7. Restart your server.


Setup quests

Important: See Quest properties and Quest step properties for more information.

  1. Create a new file with the name of your quest, e.g. my_quest.lua, in quests folder.

  2. Copy the following blueprint code into the file to create the basic quest. Adjust it to your needs.

  3. Go into config.lua file and add your new quest MyQuest to the Config.Quests table.

  4. Restart your server and test your quest. Tip: You can use refresh in the console to reload the resources without restarting the server. And after that use restart nss_quest to reload the quest data.


Setup quest log item

New since version 1.2.0.

  1. 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.

  2. Add YOUR_QUEST_LOG_ITEM_NAME to Config.QuestLogItemName property in the config file.

  3. Copy html_quest/img/quest_log_item.png to vorp_inventory/html/img/items/YOUR_QUEST_LOG_ITEM_NAME.png (or use your own image).

  4. Note: YOUR_QUEST_LOG_ITEM_NAME is 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

A 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

A list is a collection of values.

Example:


string

A 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

A boolean is a logical value. In this script we often use booleans for true/false checks.

Example for a boolean:


number

A number is a numeric value. In this script we often use numbers for coordinates, radius, amount, etc.

Example for a number:


function

A 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?