The next thing I need to make is the player getting the quest info. The quest title, description, etc. How would I do that using the module script table and sending it to the server?
Thank you, I was wondering how to do that. How would I have multiple values inside that table. For example I want the exp you gain for a mission. The name of the mission then the description of the mission after. Just an example.
You can have a separate module that outlines all your quests for easy editing.
In said module
local quests = {
{
NAME = "Talk to Merchant"
EXP = 30,
DESC = "Travel to the Farlands and talk to the Merchant!",
},
{
-- repeat the same format so that your other module can read it!!
},
-- and so on...
}
return quests
Then in your “Quest Giving” module…
local questsList = require(path.to.the.quests.module)
function module.AddQuest (player)
local randomQuest = questsList[math.random(1,#questsList)] -- now we have a random array from the last module we made
local Folder = ...
local QuestName = ...
QuestName.Name = randomQuest["NAME"] -- or randomQuest.NAME (it's your preference for this)
-- now imma let you fill in the other parts :)
end