Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- EmuDevs - (http://emudevs.com)
- Use this as your template. Make sure to point credits towards ED.
- */
- class go_tut_quest : public GameObjectScript // go_tut_quest - Class constructor, name this anything that doesn't conflict with another name
- {
- public:
- go_tut_quest() : GameObjectScript("go_tut_quest") { } // go_tut_quest, should be the same as class go_tut_quest -- GameObjectScript("go_tut_quest") - This is your 'ScriptName' that you will assign in your database
- bool OnQuestAccept(Player* player, GameObject* go, Quest const* quest) override // Calls when a player accepts a quest from the gameobject
- {
- if (quest->GetQuestId() != 30000) // This can be used on the same gameobject if it has multiple quests -- 30000 is an example of a questId
- return false;
- return true;
- }
- bool OnQuestSelect(Player* player, GameObject* go, Quest const* quest) override // Calls when a player selects a quest from the quest menu
- {
- if (quest->GetQuestId() != 30000) // This can be used on the same gameobject if it has multiple quests -- 30000 is an example of a questId
- return false;
- return true;
- }
- bool OnQuestComplete(Player* player, GameObject* go, Quest const* quest) override // Calls when a player completes a quest
- {
- if (quest->GetQuestId() != 30000) // This can be used on the same gameobject if it has multiple quests -- 30000 is an example of a questId
- return false;
- return true;
- }
- bool OnQuestReward(Player* player, GameObject* go, Quest const* quest) override // Calls when a player selects a reward
- {
- return true;
- }
- };
- void AddSC_quest_tutorial() // This is your ScriptLoader.cpp setup function
- {
- new go_tut_quest(); // Call any new classes here as 'new classname();'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement