mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 08:07:46 +00:00
Merge pull request #809 from dude22072/ThreePointOh
[3.0] Add variables for quest achievement IDs
This commit is contained in:
commit
2df911238f
7 changed files with 183 additions and 0 deletions
|
@ -67,6 +67,7 @@ private:
|
|||
static constexpr auto LocSe1 = 42;
|
||||
static constexpr auto LocTalkshape1 = 6;
|
||||
static constexpr auto Territorytype0 = 212;
|
||||
static constexpr auto AchievementCompleteQuest = 785; //Those Who Wait
|
||||
|
||||
public:
|
||||
ManFst313() : Sapphire::ScriptAPI::QuestScript( 66053 ){};
|
||||
|
|
|
@ -66,6 +66,7 @@ private:
|
|||
static constexpr auto Territorytype1 = 331;
|
||||
static constexpr auto Territorytype2 = 130;
|
||||
static constexpr auto UnlockAddNewContentToCf = 3702;
|
||||
static constexpr auto AchievementCompleteQuest = 787; //Free Wing Night
|
||||
|
||||
public:
|
||||
ManFst404() : Sapphire::ScriptAPI::QuestScript( 66055 ){};
|
||||
|
|
177
src/scripts/quest/festivalquest/FesEvn001.cpp
Normal file
177
src/scripts/quest/festivalquest/FesEvn001.cpp
Normal file
|
@ -0,0 +1,177 @@
|
|||
// 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 <root>/scripts/
|
||||
|
||||
#include "Manager/EventMgr.h"
|
||||
#include <Actor/Player.h>
|
||||
#include <ScriptObject.h>
|
||||
#include <Service.h>
|
||||
|
||||
// Quest Script: FesEvn001_01287
|
||||
// Quest Name: Burgeoning Dread
|
||||
// Quest ID: 66823
|
||||
// Start NPC: 1005540
|
||||
// End NPC: 1000168
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class FesEvn001 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AH
|
||||
// UI8AL
|
||||
// UI8BH
|
||||
// UI8DL
|
||||
|
||||
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 5010000
|
||||
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 5010000
|
||||
// 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 = 1005540;//Khloe Pajhiri
|
||||
static constexpr auto Actor2 = 1000168;//Vorsaile Heuloix
|
||||
static constexpr auto CutEvent1 = 416;
|
||||
static constexpr auto Fate0 = 680;//Tower of Power (Lower La Noscea)
|
||||
static constexpr auto Fate1 = 682;//Tower of Power (South Shroud)
|
||||
static constexpr auto Fate2 = 684;//Tower of Power (Western Thanalan)
|
||||
static constexpr auto Fate3 = 686;//Tower of Power (Southern Thanalan)
|
||||
static constexpr auto Fate4 = 688;//Tower of Power (Middle La Noscea)
|
||||
static constexpr auto Fate5 = 690;//Tower of Power (Eastern La Noscea)
|
||||
//TODO: Might need FateIDs 679,681,683,685,687,689 for Embiggened Spriggans FATE
|
||||
static constexpr auto Item0 = 2001165;
|
||||
static constexpr auto ScreenimageAccepted = 127;
|
||||
static constexpr auto ScreenimageComplete = 128;
|
||||
|
||||
public:
|
||||
FesEvn001() : Sapphire::ScriptAPI::QuestScript( 66823 ){};
|
||||
~FesEvn001() = 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 Actor2:
|
||||
{
|
||||
if( quest.getSeq() == SeqFinish )
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: This func doesn't exist, leaving behind for future implementation
|
||||
void onFateComplete( World::Quest& quest, Entity::Player& player, uint32_t fateId )
|
||||
{
|
||||
if( fateId == Fate0 || fateId == Fate1 || fateId == Fate2 || fateId == Fate3 || fateId == Fate4 || fateId == Fate5 ) //Tower of Power FATE
|
||||
quest.setUI8AH( 1 );
|
||||
else if( quest.getUI8AH() > 0 && (fateId == 679 || fateId == 681 || fateId == 683 || fateId == 685 || fateId == 687 || fateId == 689) ) //Embiggened Spriggans FATE
|
||||
{
|
||||
quest.setUI8AH( 0 );
|
||||
quest.setUI8BH( 1 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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( &FesEvn001::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( &FesEvn001::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( &FesEvn001::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( &FesEvn001::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00004( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 4, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &FesEvn001::Scene00004Return ) );
|
||||
}
|
||||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00005( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &FesEvn001::Scene00005Return ) );
|
||||
}
|
||||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( FesEvn001 );
|
|
@ -42,6 +42,7 @@ private:
|
|||
static constexpr auto Actor1 = 1011731;//Lisette De Valentionne
|
||||
static constexpr auto Actor2 = 1011733;//House Valentione Emissary (Gridania)
|
||||
static constexpr auto LocActor0 = 1011799;
|
||||
static constexpr auto AchievementCompleteQuest = 1062; //Love Actually
|
||||
|
||||
public:
|
||||
FesVlt105() : Sapphire::ScriptAPI::QuestScript( 66083 ){};
|
||||
|
|
|
@ -62,6 +62,7 @@ private:
|
|||
static constexpr auto Territorytype0 = 132;
|
||||
static constexpr auto UnlockAddNewContentToCf = 3702;
|
||||
static constexpr auto UnlockImageDungeon = 84;
|
||||
static constexpr auto AchievementCompleteQuest = 786; //History Repeating
|
||||
|
||||
public:
|
||||
GaiUsc101() : Sapphire::ScriptAPI::QuestScript( 66488 ){};
|
||||
|
|
|
@ -46,6 +46,7 @@ private:
|
|||
static constexpr auto LocSe1 = 42;
|
||||
static constexpr auto LocTalkshape1 = 6;
|
||||
static constexpr auto Territorytype0 = 212;
|
||||
static constexpr auto AchievementCompleteQuest = 783; //Back form the Wood
|
||||
|
||||
public:
|
||||
GaiUsa404() : Sapphire::ScriptAPI::QuestScript( 66282 ){};
|
||||
|
|
|
@ -53,6 +53,7 @@ private:
|
|||
static constexpr auto Territorytype0 = 148;
|
||||
static constexpr auto UnlockAddNewContentToCf = 3702;
|
||||
static constexpr auto UnlockImageDungeonHaukke = 80;
|
||||
static constexpr auto AchievementCompleteQuest = 784; //Skeletons
|
||||
|
||||
public:
|
||||
GaiUsa906() : Sapphire::ScriptAPI::QuestScript( 66337 ){};
|
||||
|
|
Loading…
Add table
Reference in a new issue