diff --git a/src/scripts/quest/ManFst309.cpp b/src/scripts/quest/ManFst309.cpp new file mode 100644 index 00000000..28dc5638 --- /dev/null +++ b/src/scripts/quest/ManFst309.cpp @@ -0,0 +1,138 @@ +// 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 "Manager/EventMgr.h" +#include +#include +#include + +// Quest Script: ManFst309_00516 +// Quest Name: Wrath of the Titan +// Quest ID: 66052 +// Start NPC: 1006688 +// End NPC: 1006264 + +using namespace Sapphire; + +class ManFst309 : public Sapphire::ScriptAPI::QuestScript +{ +private: + // Basic quest information + // Quest vars / flags used + // UI8AL + + /// Countable Num: 0 Seq: 1 Event: 1 Listener: 1003281 + /// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006264 + // Steps in this quest ( 0 is before accepting, + // 1 is first, 255 means ready for turning it in + enum Sequence : uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1006688;//Minfilia + static constexpr auto Actor1 = 1003281;//R'ashaht Rhiki + static constexpr auto Actor2 = 1006264;//Trachtoum + static constexpr auto CutManfst30910 = 97; + static constexpr auto LocActor0 = 1002441; + static constexpr auto LocActor1 = 1003782; + static constexpr auto LocActor3 = 1003248; + static constexpr auto LocPosActor0 = 4314583; + +public: + ManFst309() : Sapphire::ScriptAPI::QuestScript( 66052 ){}; + ~ManFst309() = default; + + ////////////////////////////////////////////////////////////////////// + // Event Handlers + void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override + { + switch( actorId ) + { + case Actor0: + { + if( quest.getSeq() == Seq0 ) + Scene00000( quest, player ); + break; + } + case Actor1: + { + if( quest.getSeq() == Seq1 ) + Scene00002( quest, player ); + break; + } + case Actor2: + { + if( quest.getSeq() == SeqFinish ) + Scene00003( quest, player ); + break; + } + } + } + + +private: + ////////////////////////////////////////////////////////////////////// + // Available Scenes in this quest, not necessarly all are used + ////////////////////////////////////////////////////////////////////// + + void Scene00000( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &ManFst309::Scene00000Return ) ); + } + + void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 )// accept quest + { + Scene00001( quest, player ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00001( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &ManFst309::Scene00001Return ) ); + } + + void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setSeq( Seq1 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00002( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 2, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &ManFst309::Scene00002Return ) ); + } + + void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 0, 0 ); + quest.setSeq( SeqFinish ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00003( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &ManFst309::Scene00003Return ) ); + } + + void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + + if( result.getResult( 0 ) == 1 ) + { + player.finishQuest( getId(), result.getResult(1) ); + } + } +}; + +EXPOSE_SCRIPT( ManFst309 ); \ No newline at end of file diff --git a/src/scripts/quest/subquest/blackshroud_north/GaiUsa801.cpp b/src/scripts/quest/subquest/blackshroud_north/GaiUsa801.cpp new file mode 100644 index 00000000..1ed19abf --- /dev/null +++ b/src/scripts/quest/subquest/blackshroud_north/GaiUsa801.cpp @@ -0,0 +1,137 @@ +// 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 "Manager/EventMgr.h" +#include +#include +#include + +// Quest Script: GaiUsa801_00785 +// Quest Name: Ziz Is So Ridiculous +// Quest ID: 66321 +// Start NPC: 1006241 +// End NPC: 1006241 + +using namespace Sapphire; + +class GaiUsa801 : public Sapphire::ScriptAPI::QuestScript +{ +private: + // Basic quest information + // Quest vars / flags used + // UI8AL + + /// Countable Num: 0 Seq: 1 Event: 5 Listener: 179 + /// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006241 + // Steps in this quest ( 0 is before accepting, + // 1 is first, 255 means ready for turning it in + enum Sequence : uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1006241;//Aideen + static constexpr auto Enemy0 = 224;//Ziz (INCORRECT: 179) + +public: + GaiUsa801() : Sapphire::ScriptAPI::QuestScript( 66321 ){}; + ~GaiUsa801() = default; + + ////////////////////////////////////////////////////////////////////// + // Event Handlers + void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override + { + switch( actorId ) + { + case Actor0: + { + if( quest.getSeq() == Seq0 ) + Scene00000( quest, player ); + else if( quest.getSeq() == SeqFinish ) + Scene00003( quest, player ); + break; + } + } + } + + void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override + { + switch( nameId ) + { + case Enemy0: + { + quest.setUI8AL( quest.getUI8AL() + 1 ); + eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 6 ); + if( quest.getUI8AL() >= 6 ) + { + quest.setUI8AL( 0 ); + quest.setSeq( SeqFinish ); + } + break; + } + } + } + +private: + ////////////////////////////////////////////////////////////////////// + // Available Scenes in this quest, not necessarly all are used + ////////////////////////////////////////////////////////////////////// + + void Scene00000( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00000Return ) ); + } + + void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 )// accept quest + { + Scene00001( quest, player ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00001( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00001Return ) ); + } + + void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setSeq( Seq1 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00002( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00002Return ) ); + } + + void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00003( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00003Return ) ); + } + + void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + + if( result.getResult( 0 ) == 1 ) + { + player.finishQuest( getId() ); + } + } +}; + +EXPOSE_SCRIPT( GaiUsa801 ); \ No newline at end of file diff --git a/src/scripts/quest/subquest/blackshroud_north/GaiUsa802.cpp b/src/scripts/quest/subquest/blackshroud_north/GaiUsa802.cpp new file mode 100644 index 00000000..6f709bbd --- /dev/null +++ b/src/scripts/quest/subquest/blackshroud_north/GaiUsa802.cpp @@ -0,0 +1,170 @@ +// 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 "Manager/EventMgr.h" +#include +#include +#include + +#include "Actor/BNpc.h" +#include "Manager/TerritoryMgr.h" +#include "Territory/Territory.h" + +// Quest Script: GaiUsa802_00786 +// Quest Name: Seeing Eye to Winged Eye +// Quest ID: 66322 +// Start NPC: 1006242 +// End NPC: 1006242 + +using namespace Sapphire; + +class GaiUsa802 : public Sapphire::ScriptAPI::QuestScript +{ +private: + // Basic quest information + // Quest vars / flags used + // BitFlag8 + // UI8AL + + /// Countable Num: 0 Seq: 1 Event: 1 Listener: 2001982 + /// Countable Num: 0 Seq: 255 Event: 5 Listener: 1899 + // Steps in this quest ( 0 is before accepting, + // 1 is first, 255 means ready for turning it in + enum Sequence : uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1006242;//Ivaurault + static constexpr auto Enemy0 = 4285321; + static constexpr auto Eobject0 = 2001982; + static constexpr auto EventActionLookoutLong = 41; + static constexpr auto EventActionSearch = 1; + +public: + GaiUsa802() : Sapphire::ScriptAPI::QuestScript( 66322 ){}; + ~GaiUsa802() = default; + + ////////////////////////////////////////////////////////////////////// + // Event Handlers + void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override + { + switch( actorId ) + { + case Actor0: + { + if( quest.getSeq() == Seq0 ) + Scene00000( quest, player ); + else if( quest.getSeq() == SeqFinish ) + Scene00004( quest, player ); + break; + } + case Eobject0: + { + eventMgr().eventActionStart( + player, getId(), EventActionLookoutLong, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00003( quest, player ); + }, + nullptr, 0 ); + break; + } + } + } + + void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override + { + switch( entityId ) + { + case Enemy0: + { + eventMgr().sendEventNotice( player, getId(), 0, 0 ); + quest.setSeq( SeqFinish ); + break; + } + } + } + +private: + ////////////////////////////////////////////////////////////////////// + // Available Scenes in this quest, not necessarly all are used + ////////////////////////////////////////////////////////////////////// + + void Scene00000( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00000Return ) ); + } + + void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 )// accept quest + { + Scene00001( quest, player ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00001( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00001Return ) ); + } + + void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setSeq( Seq1 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00002( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00002Return ) ); + } + + void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00003( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00003Return ) ); + } + + void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setBitFlag8( 1, true ); + auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() ); + auto enemySpawned = instance->getActiveBNpcByInstanceIdAndTriggerOwner( Enemy0, player.getId() ); + + if( !enemySpawned ) + { + auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() ); + enemy->hateListAdd( player.getAsPlayer(), 1 ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00004( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00004Return ) ); + } + + void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + + if( result.getResult( 0 ) == 1 ) + { + player.finishQuest( getId(), result.getResult(1) ); + } + } +}; + +EXPOSE_SCRIPT( GaiUsa802 ); \ No newline at end of file diff --git a/src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp b/src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp new file mode 100644 index 00000000..e6f549ce --- /dev/null +++ b/src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp @@ -0,0 +1,371 @@ +// 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 "Manager/EventMgr.h" +#include +#include +#include + +// Quest Script: GaiUsa803_00787 +// Quest Name: Rock of Rancor +// Quest ID: 66323 +// Start NPC: 1006241 +// End NPC: 1006241 + +using namespace Sapphire; + +class GaiUsa803 : public Sapphire::ScriptAPI::QuestScript +{ +private: + // Basic quest information + // Quest vars / flags used + // BitFlag8 + // UI8AH + // UI8AL + // UI8BH + // UI8BL + // UI8CH + // UI8CL + // UI8DH + // UI8DL + + /// Countable Num: 0 Seq: 1 Event: 1 Listener: 2001983 + /// Countable Num: 0 Seq: 2 Event: 8 Listener: 2001983 + /// Countable Num: 0 Seq: 255 Event: 1 Listener: 2001984 + // Steps in this quest ( 0 is before accepting, + // 1 is first, 255 means ready for turning it in + enum Sequence : uint8_t + { + Seq0 = 0, + Seq1 = 1, + Seq2 = 2, + SeqFinish = 255, + }; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1006241; //Aideen + static constexpr auto Eobject0 = 2001983;//AOE Item Target + static constexpr auto Eobject1 = 2001984;//Humming Crystal + static constexpr auto Eobject2 = 2001985;//Humming Crystal + static constexpr auto Eobject3 = 2001986;//Humming Crystal + static constexpr auto Eobject4 = 2001987;//Humming Crystal + static constexpr auto Eobject5 = 2001988;//Humming Crystal + static constexpr auto EventActionSearchMiddle = 3; + static constexpr auto Item0 = 2000616; + static constexpr auto Item1 = 2000617; + +public: + GaiUsa803() : Sapphire::ScriptAPI::QuestScript( 66323 ){}; + ~GaiUsa803() = default; + + ////////////////////////////////////////////////////////////////////// + // Event Handlers + void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override + { + switch( actorId ) + { + case Actor0: + { + if( quest.getSeq() == Seq0 ) + Scene00000( quest, player ); + else if( quest.getSeq() == SeqFinish ) + Scene00014( quest, player ); + break; + } + case Eobject1: + { + eventMgr().eventActionStart( + player, getId(), EventActionSearchMiddle, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00004( quest, player ); + }, + nullptr, 0 ); + break; + } + case Eobject2: + { + eventMgr().eventActionStart( + player, getId(), EventActionSearchMiddle, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00006( quest, player ); + }, + nullptr, 0 ); + break; + } + case Eobject3: + { + eventMgr().eventActionStart( + player, getId(), EventActionSearchMiddle, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00008( quest, player ); + }, + nullptr, 0 ); + break; + } + case Eobject4: + { + eventMgr().eventActionStart( + player, getId(), EventActionSearchMiddle, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00010( quest, player ); + }, + nullptr, 0 ); + break; + } + case Eobject5: + { + eventMgr().eventActionStart( + player, getId(), EventActionSearchMiddle, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00012( quest, player ); + }, + nullptr, 0 ); + break; + } + } + } + + //TODO: This doesn't exist, leaving it behind as a note + void onEventAOEItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) + { + if( quest.getSeq() == Seq1 && actorId == Eobject0 ) + { + Scene00003( quest, player ); + } + } + + +private: + void checkQuestCompletion( World::Quest& quest, Entity::Player& player ) + { + eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AH(), 5 );//TODO:Show Item Icon + if( quest.getUI8AH() >= 5 ) + { + quest.setUI8BH( quest.getUI8DH() ); + quest.setUI8BL( quest.getUI8DL() ); + quest.setUI8AH( 0 ); + quest.setUI8AL( 0 ); + quest.setUI8CH( 0 ); + quest.setUI8CL( 0 ); + quest.setUI8DH( 0 ); + quest.setUI8DL( 0 ); + quest.setSeq( SeqFinish ); + } + } + ////////////////////////////////////////////////////////////////////// + // Available Scenes in this quest, not necessarly all are used + ////////////////////////////////////////////////////////////////////// + + void Scene00000( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00000Return ) ); + } + + void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 )// accept quest + { + Scene00001( quest, player ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00001( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00001Return ) ); + } + + void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setUI8BH( 1 ); + quest.setSeq( Seq1 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00002( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00002Return ) ); + } + + void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00003( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00003Return ) ); + } + + void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 0, 0 ); + quest.setUI8DH( 0 ); + quest.setSeq( Seq2 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00004( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00004Return ) ); + } + + void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setUI8AL( 1 ); + quest.setUI8AH( quest.getUI8AH() + 1 ); + quest.setUI8DL( quest.getUI8DL() + 1 ); + checkQuestCompletion( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00005( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00005Return ) ); + } + + void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00006( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00006Return ) ); + } + + void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setUI8BH( 1 ); + quest.setUI8AH( quest.getUI8AH() + 1 ); + quest.setUI8DL( quest.getUI8DL() + 1 ); + checkQuestCompletion( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00007( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00007Return ) ); + } + + void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00008( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00008Return ) ); + } + + void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setUI8BL( 1 ); + quest.setUI8AH( quest.getUI8AH() + 1 ); + quest.setUI8DL( quest.getUI8DL() + 1 ); + checkQuestCompletion( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00009( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00009Return ) ); + } + + void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00010( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 10, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00010Return ) ); + } + + void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setUI8CH( 1 ); + quest.setUI8AH( quest.getUI8AH() + 1 ); + quest.setUI8DL( quest.getUI8DL() + 1 ); + checkQuestCompletion( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00011( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 11, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00011Return ) ); + } + + void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00012( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 12, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00012Return ) ); + } + + void Scene00012Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setUI8CL( 1 ); + quest.setUI8AH( quest.getUI8AH() + 1 ); + quest.setUI8DL( quest.getUI8DL() + 1 ); + checkQuestCompletion( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00013( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 13, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00013Return ) ); + } + + void Scene00013Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00014( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 14, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00014Return ) ); + } + + void Scene00014Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 ) + Scene00015( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00015( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 15, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00015Return ) ); + } + + void Scene00015Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + + if( result.getResult( 0 ) == 1 ) + { + player.finishQuest( getId() ); + } + } +}; + +EXPOSE_SCRIPT( GaiUsa803 ); \ No newline at end of file diff --git a/src/scripts/quest/subquest/blackshroud_north/GaiUsa904.cpp b/src/scripts/quest/subquest/blackshroud_north/GaiUsa904.cpp new file mode 100644 index 00000000..18abb08b --- /dev/null +++ b/src/scripts/quest/subquest/blackshroud_north/GaiUsa904.cpp @@ -0,0 +1,250 @@ +// 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 "Manager/EventMgr.h" +#include +#include +#include + +#include "Actor/BNpc.h" +#include "Manager/TerritoryMgr.h" +#include "Territory/Territory.h" + +// Quest Script: GaiUsa904_00799 +// Quest Name: Power of Deduction +// Quest ID: 66335 +// Start NPC: 1006240 +// End NPC: 1002780 + +using namespace Sapphire; + +class GaiUsa904 : public Sapphire::ScriptAPI::QuestScript +{ +private: + // Basic quest information + // Quest vars / flags used + // BitFlag8 + // UI8AL + // UI8BH + + /// Countable Num: 0 Seq: 1 Event: 10 Listener: 5000000 + /// Countable Num: 0 Seq: 255 Event: 1 Listener: 1007541 + // Steps in this quest ( 0 is before accepting, + // 1 is first, 255 means ready for turning it in + enum Sequence : uint8_t + { + Seq0 = 0, + Seq1 = 1, + SeqFinish = 255, + }; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1006240; + static constexpr auto Actor1 = 1007541;//Mangled Corpse + static constexpr auto Actor2 = 1002780;//Aethelmaer + static constexpr auto Enemy0 = 4299601;//Floating Eye + static constexpr auto Eobject0 = 2002462; + static constexpr auto Eventrange0 = 4299594; + static constexpr auto EventActionSearch = 1; + static constexpr auto Item0 = 2000861;//Ravaged Corpse (UI8BH) + static constexpr auto LocAction1 = 788; + static constexpr auto LocAction2 = 981; + static constexpr auto LocActor0 = 1006240; + static constexpr auto LocActor1 = 1006241; + static constexpr auto LocActor2 = 1006242; + static constexpr auto LocActor4 = 1007541; + static constexpr auto LocActor5 = 1007643; + static constexpr auto LocPosActor = 4329140; + static constexpr auto LocPosActor1 = 4256813; + static constexpr auto LocPosActor2 = 4256814; + static constexpr auto LocPosActor4 = 4329223; + static constexpr auto LocPosActor5 = 4329392; + +public: + GaiUsa904() : Sapphire::ScriptAPI::QuestScript( 66335 ){}; + ~GaiUsa904() = default; + + ////////////////////////////////////////////////////////////////////// + // Event Handlers + void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override + { + switch( actorId ) + { + case Actor0: + { + if( quest.getSeq() == Seq0 ) + Scene00000( quest, player ); + break; + } + case Actor1: + { + if( quest.getUI8AL() != 0 ) + eventMgr().eventActionStart( + player, getId(), EventActionSearch, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00004( quest, player ); + }, + nullptr, 0 ); + else + Scene00003( quest, player ); + break; + } + case Actor2: + { + if( quest.getSeq() == SeqFinish ) + Scene00007( quest, player ); + break; + } + } + } + + void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override + { + switch( entityId ) + { + case Enemy0: + { + quest.setUI8AL( 1 ); + break; + } + } + } + + void onWithinRange( World::Quest& quest, Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override + { + if( param1 == Eventrange0 ) + { + Scene00002( quest, player ); + } + } + +private: + ////////////////////////////////////////////////////////////////////// + // Available Scenes in this quest, not necessarly all are used + ////////////////////////////////////////////////////////////////////// + + void Scene00000( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00000Return ) ); + } + + void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 )// accept quest + { + Scene00001( quest, player ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00001( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa904::Scene00001Return ) ); + } + + void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setSeq( Seq1 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00002( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00002Return ) ); + } + + void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() ); + + auto enemySpawned = instance->getActiveBNpcByInstanceIdAndTriggerOwner( Enemy0, player.getId() ); + + if( !enemySpawned && quest.getUI8AL() < 1) + { + auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() ); + enemy->hateListAdd( player.getAsPlayer(), 1 ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00003( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00003Return ) ); + } + + void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + //The Enemy is still about! + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00004( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00004Return ) ); + } + + void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 0, 0 ); + quest.setUI8BH( 1 ); + quest.setSeq( SeqFinish ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00005( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00005Return ) ); + } + + void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00006( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00006Return ) ); + } + + void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00007( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00007Return ) ); + } + + void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 ) + Scene00008( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00008( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 8, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa904::Scene00008Return ) ); + } + + void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + + if( result.getResult( 0 ) == 1 ) + { + player.finishQuest( getId() ); + } + } +}; + +EXPOSE_SCRIPT( GaiUsa904 ); \ No newline at end of file diff --git a/src/scripts/quest/subquest/blackshroud_north/GaiUsa905.cpp b/src/scripts/quest/subquest/blackshroud_north/GaiUsa905.cpp new file mode 100644 index 00000000..1fe32c44 --- /dev/null +++ b/src/scripts/quest/subquest/blackshroud_north/GaiUsa905.cpp @@ -0,0 +1,232 @@ +// 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 "Manager/EventMgr.h" +#include +#include +#include + +// Quest Script: GaiUsa905_00800 +// Quest Name: Secret of the White Lily +// Quest ID: 66336 +// Start NPC: 1002780 +// End NPC: 1006263 + +using namespace Sapphire; + +class GaiUsa905 : public Sapphire::ScriptAPI::QuestScript +{ +private: + // Basic quest information + // Quest vars / flags used + // UI8AL + // UI8BH + + /// Countable Num: 0 Seq: 1 Event: 1 Listener: 1000100 + /// Countable Num: 0 Seq: 2 Event: 1 Listener: 1000146 + /// Countable Num: 0 Seq: 3 Event: 1 Listener: 1000248 + /// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006263 + // Steps in this quest ( 0 is before accepting, + // 1 is first, 255 means ready for turning it in + enum Sequence : uint8_t + { + Seq0 = 0, + Seq1 = 1, + Seq2 = 2, + Seq3 = 3, + SeqFinish = 255, + }; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1002780;//Aethelmaer + static constexpr auto Actor1 = 1000100;//Mother Miounne + static constexpr auto Actor2 = 1000146;//Bernadette + static constexpr auto Actor3 = 1000248;//Ceinguled + static constexpr auto Actor4 = 1006263;//Ursandel + static constexpr auto Item0 = 2000630;//Lily Button (UI8BH) + +public: + GaiUsa905() : Sapphire::ScriptAPI::QuestScript( 66336 ){}; + ~GaiUsa905() = default; + + ////////////////////////////////////////////////////////////////////// + // Event Handlers + void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override + { + switch( actorId ) + { + case Actor0: + { + if( quest.getSeq() == Seq0 ) + Scene00000( quest, player ); + break; + } + case Actor1: + { + if( quest.getSeq() == Seq1 ) + Scene00002( quest, player ); + break; + } + case Actor2: + { + if( quest.getSeq() == Seq2 ) + Scene00004( quest, player ); + break; + } + case Actor3: + { + if( quest.getSeq() == Seq3 ) + Scene00006( quest, player ); + break; + } + case Actor4: + { + if( quest.getSeq() == SeqFinish ) + Scene00008( quest, player ); + break; + } + } + } + + +private: + ////////////////////////////////////////////////////////////////////// + // Available Scenes in this quest, not necessarly all are used + ////////////////////////////////////////////////////////////////////// + + void Scene00000( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00000Return ) ); + } + + void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 )// accept quest + { + Scene00001( quest, player ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00001( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00001Return ) ); + } + + void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setSeq( Seq1 ); + quest.setUI8BH( 1 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00002( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00002Return ) ); + } + + void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 ) + Scene00003( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00003( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00003Return ) ); + } + + void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 0, 0 ); + quest.setSeq( Seq2 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00004( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00004Return ) ); + } + + void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 ) + Scene00005( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00005( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00005Return ) ); + } + + void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 1, 0 ); + quest.setSeq( Seq3 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00006( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00006Return ) ); + } + + void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 ) + Scene00007( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00007( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00007Return ) ); + } + + void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 2, 0 ); + quest.setSeq( SeqFinish ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00008( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00008Return ) ); + } + + void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 ) + Scene00009( quest, player ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00009( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00009Return ) ); + } + + void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + + if( result.getResult( 0 ) == 1 ) + { + player.finishQuest( getId() ); + } + } +}; + +EXPOSE_SCRIPT( GaiUsa905 ); \ No newline at end of file diff --git a/src/scripts/quest/subquest/gridania/GaiUsa906.cpp b/src/scripts/quest/subquest/gridania/GaiUsa906.cpp new file mode 100644 index 00000000..ff79d489 --- /dev/null +++ b/src/scripts/quest/subquest/gridania/GaiUsa906.cpp @@ -0,0 +1,198 @@ +// 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 "Manager/EventMgr.h" +#include +#include +#include + +// Quest Script: GaiUsa906_00801 +// Quest Name: Skeletons in Her Closet +// Quest ID: 66337 +// Start NPC: 1006263 +// End NPC: 1006688 + +using namespace Sapphire; + +class GaiUsa906 : public Sapphire::ScriptAPI::QuestScript +{ +private: + // Basic quest information + // Quest vars / flags used + // UI8AL + + /// Countable Num: 0 Seq: 1 Event: 1 Listener: 2001999 + /// Countable Num: 0 Seq: 2 Event: 1 Listener: 5010000 + /// Countable Num: 0 Seq: 3 Event: 15 Listener: 5020000 + /// Countable Num: 0 Seq: 4 Event: 1 Listener: 1006263 + /// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006688 + // Steps in this quest ( 0 is before accepting, + // 1 is first, 255 means ready for turning it in + enum Sequence : uint8_t + { + Seq0 = 0, + Seq1 = 1, + Seq2 = 2, + Seq3 = 3,//Fake Sequence for cutscene + Seq4 = 4, + SeqFinish = 255, + }; + + // Entities found in the script data of the quest + static constexpr auto Actor0 = 1006263;//Ursandel + static constexpr auto Actor2 = 1006688; + static constexpr auto CutScene01 = 370; + static constexpr auto Eobject0 = 2001999;//Manor Gate + static constexpr auto EventActionTouchMiddle = 46; + static constexpr auto Instancedungeon0 = 6; + static constexpr auto LocFace0 = 604; + static constexpr auto LocFace1 = 617; + static constexpr auto Poprange0 = 4332869; + static constexpr auto Territorytype0 = 148; + static constexpr auto UnlockAddNewContentToCf = 3702; + static constexpr auto UnlockImageDungeonHaukke = 80; + +public: + GaiUsa906() : Sapphire::ScriptAPI::QuestScript( 66337 ){}; + ~GaiUsa906() = default; + + ////////////////////////////////////////////////////////////////////// + // Event Handlers + void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override + { + switch( actorId ) + { + case Actor0: + { + if( quest.getSeq() == Seq0 ) + Scene00000( quest, player ); + else if( quest.getSeq() == Seq4 ) + Scene00005( quest, player ); + break; + } + case Actor2: + { + if( quest.getSeq() == SeqFinish ) + Scene00006( quest, player ); + break; + } + case Eobject0: + { + eventMgr().eventActionStart( + player, getId(), EventActionTouchMiddle, + [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) { + Scene00003( quest, player ); + }, + nullptr, 0 ); + break; + } + } + } + + void onEnterTerritory( World::Quest& quest, Entity::Player& player, uint16_t param1, uint16_t param2 ) override + { + if( quest.getSeq() == Seq3 ) + Scene00004( quest, player ); + } + + +private: + ////////////////////////////////////////////////////////////////////// + // Available Scenes in this quest, not necessarly all are used + ////////////////////////////////////////////////////////////////////// + + void Scene00000( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00000Return ) ); + } + + void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + if( result.getResult( 0 ) == 1 )// accept quest + { + Scene00001( quest, player ); + } + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00001( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa906::Scene00001Return ) ); + } + + void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + quest.setSeq( Seq1 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00002( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00002Return ) ); + } + + void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00003( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00003Return ) ); + } + + void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + //TODO: Unlock Haukke Manor + eventMgr().sendEventNotice( player, getId(), 0, 0 ); + quest.setSeq( Seq2 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00004( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 4, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa906::Scene00004Return ) ); + } + + void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 2, 0 ); + quest.setSeq( Seq4 ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00005( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00005Return ) ); + } + + void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + eventMgr().sendEventNotice( player, getId(), 3, 0 ); + quest.setSeq( SeqFinish ); + } + + ////////////////////////////////////////////////////////////////////// + + void Scene00006( World::Quest& quest, Entity::Player& player ) + { + eventMgr().playQuestScene( player, getId(), 6, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa906::Scene00006Return ) ); + } + + void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result ) + { + + if( result.getResult( 0 ) == 1 ) + { + player.finishQuest( getId(), result.getResult(1) ); + } + } +}; + +EXPOSE_SCRIPT( GaiUsa906 ); \ No newline at end of file