In PSDK you manage quests through
$quests. All the methods are explained in the documentation : PFM::Quests.
We'll see how to use this variable
1st Step : Start Quests
To start a quest, call
id is the id of the quest in Ruby Host.
$quests.start(id) was called you need to tell the System to check started quests:
This method checks the quest from start to finish. It also shows the quest name in the screen.
2nd step : Validate the Goal
There are various methods to validate goals:
quest_idis the quest id and
npc_name_indexis the index of the name of the NPC to beat in the goal order of Ruby Host
$quests.speak_to_npc(quest_id, npc_name_index)where the parameters are the same
The other objectives are automatically validated by PSDK.
2nd Step Continued : Showing a Hidden Goal
To show a hidden goal call:
The parameters are:
quest_idthe quest id.
goal_indexthe index of the goal in the goal order.
3rd Step: Check If the Quest Is Finished and Give the Reward
To finish a quest you have two things to do, check if all the goals are done & distribute the reward.
Check If All the Goals Are Done
To check if all the goals are done, write the following line in a condition:
Check If the Rewards Were Distributed
To check if the rewards were distributed write this line in a condition:
To distribute them use the following command: