mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
Merge pull request #812 from dude22072/FestivalWork
[3.0] Little Ladies Day 2015
This commit is contained in:
commit
cbdbb65562
3 changed files with 469 additions and 0 deletions
173
src/scripts/quest/festivalquest/FesPdy101.cpp
Normal file
173
src/scripts/quest/festivalquest/FesPdy101.cpp
Normal file
|
@ -0,0 +1,173 @@
|
|||
// 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: FesPdy101_00499
|
||||
// Quest Name: A Thorne-y Relationship
|
||||
// Quest ID: 66035
|
||||
// Start NPC: 1011778
|
||||
// End NPC: 1011780
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class FesPdy101 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
// UI8AL
|
||||
|
||||
/// Countable Num: 1 Seq: 1 Event: 1 Listener: 1011779
|
||||
/// Countable Num: 1 Seq: 255 Event: 1 Listener: 1011786
|
||||
// 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 = 1011778;//Sophisticated Servitor
|
||||
static constexpr auto Actor1 = 1011779;//Nanapasi (Seq1)
|
||||
static constexpr auto Actor2 = 1011786;//Ninimo
|
||||
static constexpr auto Actor3 = 1011780;//Nanapai (SeqFinish)
|
||||
static constexpr auto LcutActor01 = 1011785;
|
||||
static constexpr auto LcutLevelHide01 = 4996401;
|
||||
static constexpr auto LcutLevelHide02 = 4996400;
|
||||
static constexpr auto LocBgm01 = 93;
|
||||
static constexpr auto LocBgm02 = 88;
|
||||
static constexpr auto LocFace1 = 614;
|
||||
static constexpr auto LocFace2 = 613;
|
||||
static constexpr auto LocPos01 = 5668095;
|
||||
static constexpr auto LocQuestCheck01 = 65572;
|
||||
|
||||
public:
|
||||
FesPdy101() : Sapphire::ScriptAPI::QuestScript( 66035 ){};
|
||||
~FesPdy101() = 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() == Seq1 )
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
if( quest.getSeq() == Seq1 )
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
if( quest.getSeq() == Seq1 )
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor3:
|
||||
{
|
||||
if( quest.getSeq() == SeqFinish )
|
||||
Scene00005( 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( &FesPdy101::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( &FesPdy101::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( &FesPdy101::Scene00002Return ) );
|
||||
}
|
||||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &FesPdy101::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &FesPdy101::Scene00004Return ) );
|
||||
}
|
||||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &FesPdy101::Scene00005Return ) );
|
||||
}
|
||||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( FesPdy101 );
|
124
src/scripts/quest/festivalquest/FesPdy102.cpp
Normal file
124
src/scripts/quest/festivalquest/FesPdy102.cpp
Normal file
|
@ -0,0 +1,124 @@
|
|||
// 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: FesPdy102_00500
|
||||
// Quest Name: Digging for Dolls
|
||||
// Quest ID: 66036
|
||||
// Start NPC: 1011781
|
||||
// End NPC: 1011781
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class FesPdy102 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
|
||||
/// Countable Num: 1 Seq: 255 Event: 1 Listener: 1011781
|
||||
// Steps in this quest ( 0 is before accepting,
|
||||
// 1 is first, 255 means ready for turning it in
|
||||
enum Sequence : uint8_t
|
||||
{
|
||||
Seq0 = 0,
|
||||
SeqFinish = 255,
|
||||
};
|
||||
|
||||
// Entities found in the script data of the quest
|
||||
static constexpr auto Actor0 = 1011781;//Disciplined Domestic
|
||||
static constexpr auto LocQuest01 = 66036;
|
||||
static constexpr auto LocQuest02 = 66747;
|
||||
static constexpr auto LocQuest03 = 66037;
|
||||
static constexpr auto LocRitem01 = 9900;
|
||||
static constexpr auto Ritem0 = 10089;
|
||||
|
||||
public:
|
||||
FesPdy102() : Sapphire::ScriptAPI::QuestScript( 66036 ){};
|
||||
~FesPdy102() = 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 )
|
||||
Scene00002( 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( &FesPdy102::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( &FesPdy102::Scene00001Return ) );
|
||||
}
|
||||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &FesPdy102::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( &FesPdy102::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.collectHandInItems( { Ritem0 } );
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( FesPdy102 );
|
172
src/scripts/quest/festivalquest/FesPdy103.cpp
Normal file
172
src/scripts/quest/festivalquest/FesPdy103.cpp
Normal file
|
@ -0,0 +1,172 @@
|
|||
// 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: FesPdy103_00501
|
||||
// Quest Name: A Father's Folly
|
||||
// Quest ID: 66037
|
||||
// Start NPC: 1011780
|
||||
// End NPC: 1011780
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class FesPdy103 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
// UI8AL
|
||||
|
||||
/// Countable Num: 1 Seq: 1 Event: 1 Listener: 2005193
|
||||
/// Countable Num: 1 Seq: 255 Event: 1 Listener: 1011780
|
||||
// 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 = 1011780;//Nanapasi
|
||||
static constexpr auto Eobject0 = 2005193;//Destination
|
||||
static constexpr auto EventActionWaiting2Middle = 12;
|
||||
static constexpr auto LcutActor01 = 1011878;
|
||||
static constexpr auto LcutActor02 = 1011785;
|
||||
static constexpr auto LcutLevelHide01 = 4996401;
|
||||
static constexpr auto LcutLevelHide02 = 4996400;
|
||||
static constexpr auto LocBgm01 = 87;
|
||||
static constexpr auto LocBgm02 = 98;
|
||||
static constexpr auto LocEmote1 = 3754;
|
||||
static constexpr auto LocFace1 = 605;
|
||||
static constexpr auto LocLevelEnpcId01 = 5668092;
|
||||
static constexpr auto LocPosActor1 = 5668682;
|
||||
static constexpr auto LocPosActor2 = 5762414;
|
||||
static constexpr auto LocQuestCheck01 = 65572;
|
||||
static constexpr auto AchievementCompleteQuest = 1062;//Welcome to the Dollhouse
|
||||
|
||||
public:
|
||||
FesPdy103() : Sapphire::ScriptAPI::QuestScript( 66037 ){};
|
||||
~FesPdy103() = 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() == Seq1 )
|
||||
Scene00004( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00005( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(
|
||||
player, getId(), EventActionWaiting2Middle,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||
Scene00003( quest, player );
|
||||
},
|
||||
nullptr, 0 );
|
||||
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( &FesPdy103::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( &FesPdy103::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( &FesPdy103::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, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &FesPdy103::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &FesPdy103::Scene00004Return ) );
|
||||
}
|
||||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &FesPdy103::Scene00005Return ) );
|
||||
}
|
||||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
//TODO:Achievement
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( FesPdy103 );
|
Loading…
Add table
Reference in a new issue