// This is an automatically generated C++ script template // Content needs to be added by hand to make it function // In order for this script to be loaded, move it to the correct folder in /scripts/ #include #include "Manager/EventMgr.h" #include #include // Quest Script: ClsGla001_00177 // Quest Name: So You Want to Be a Gladiator // Quest ID: 65713 // Start NPC: 1002277 // End NPC: 1002277 using namespace Sapphire; class ClsGla001 : public Sapphire::ScriptAPI::EventScript { private: // Basic quest information // Quest vars / flags used // Steps in this quest ( 0 is before accepting, // 1 is first, 255 means ready for turning it in enum Sequence : uint8_t { }; // Entities found in the script data of the quest public: ClsGla001() : Sapphire::ScriptAPI::EventScript( 65713 ){}; ~ClsGla001() = default; ////////////////////////////////////////////////////////////////////// // Event Handlers void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override { Scene00000( player ); } private: ////////////////////////////////////////////////////////////////////// // Available Scenes in this quest, not necessarly all are used void Scene00000( Entity::Player& player ) { auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result ) { if( result.param1 > 0 && result.param2 == 1 ) { if( player.giveQuestRewards( getId(), result.param3 ) ) { player.finishQuest( getId() ); } } }; player.playScene( getId(), 0, HIDE_UI, callback ); } }; EXPOSE_SCRIPT( ClsGla001 );