mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
Implements some random sidequests
This commit is contained in:
parent
3cc27daabd
commit
c694256c4e
9 changed files with 1720 additions and 0 deletions
169
src/scripts/quest/subquest/blackshroud_east/GaiUsa005.cpp
Normal file
169
src/scripts/quest/subquest/blackshroud_east/GaiUsa005.cpp
Normal file
|
@ -0,0 +1,169 @@
|
|||
// 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: GaiUsa005_00711
|
||||
// Quest Name: The Replacement Culler
|
||||
// Quest ID: 66247
|
||||
// Start NPC: 1000536
|
||||
// End NPC: 1000536
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class GaiUsa005 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
||||
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1000619
|
||||
/// Countable Num: 0 Seq: 2 Event: 5 Listener: 38
|
||||
/// Countable Num: 0 Seq: 3 Event: 1 Listener: 1000619
|
||||
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1000536
|
||||
// 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 = 1000536;//Florimond
|
||||
static constexpr auto Actor1 = 1000619;//Aniud
|
||||
static constexpr auto Enemy0 = 38; //Black Bats
|
||||
|
||||
public:
|
||||
GaiUsa005() : Sapphire::ScriptAPI::QuestScript( 66247 ){};
|
||||
~GaiUsa005() = 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 Actor1:
|
||||
{
|
||||
if( quest.getSeq() == Seq1 )
|
||||
Scene00002( quest, player );
|
||||
else if( quest.getSeq() == Seq3 )
|
||||
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(), 1, 2, quest.getUI8AL(), 6 );
|
||||
checkQuestCompletion( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
if( quest.getUI8AL() >= 6 )
|
||||
{
|
||||
quest.setUI8AL( 0 );
|
||||
quest.setSeq( Seq3 );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// 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( &GaiUsa005::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( &GaiUsa005::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( &GaiUsa005::Scene00002Return ) );
|
||||
}
|
||||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||
quest.setSeq( Seq2 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa005::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa005::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( GaiUsa005 );
|
129
src/scripts/quest/subquest/blackshroud_east/GaiUsa008.cpp
Normal file
129
src/scripts/quest/subquest/blackshroud_east/GaiUsa008.cpp
Normal file
|
@ -0,0 +1,129 @@
|
|||
// 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: GaiUsa008_00714
|
||||
// Quest Name: Swinophobia
|
||||
// Quest ID: 66250
|
||||
// Start NPC: 1006189
|
||||
// End NPC: 1006189
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class GaiUsa008 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
||||
/// Countable Num: 0 Seq: 1 Event: 5 Listener: 15
|
||||
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006189
|
||||
// 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 = 1006189;//Piralnaut
|
||||
static constexpr auto Enemy0 = 16; //Wild Boar (INCORRECT:15)
|
||||
|
||||
public:
|
||||
GaiUsa008() : Sapphire::ScriptAPI::QuestScript( 66250 ){};
|
||||
~GaiUsa008() = 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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(), 5 );
|
||||
checkQuestCompletion( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
if( quest.getUI8AL() >= 5 )
|
||||
{
|
||||
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, NONE, bindSceneReturn( &GaiUsa008::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, NONE, bindSceneReturn( &GaiUsa008::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, NONE, bindSceneReturn( &GaiUsa008::Scene00002Return ) );
|
||||
}
|
||||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId(), result.getResult(1) );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( GaiUsa008 );
|
342
src/scripts/quest/subquest/blackshroud_east/GaiUsc303.cpp
Normal file
342
src/scripts/quest/subquest/blackshroud_east/GaiUsc303.cpp
Normal file
|
@ -0,0 +1,342 @@
|
|||
// 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>
|
||||
|
||||
#include "Actor/BNpc.h"
|
||||
#include "Manager/TerritoryMgr.h"
|
||||
#include "Territory/Territory.h"
|
||||
|
||||
// Quest Script: GaiUsc303_00970
|
||||
// Quest Name: Some Seedy Business
|
||||
// Quest ID: 66506
|
||||
// Start NPC: 1000617
|
||||
// End NPC: 1006715
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class GaiUsc303 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
// UI8AH
|
||||
// UI8AL
|
||||
// UI8BH
|
||||
// UI8CH
|
||||
|
||||
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1000587
|
||||
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 2002190
|
||||
/// Countable Num: 0 Seq: 255 Event: 9 Listener: 762
|
||||
// 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 = 1000617;//Jeulerand
|
||||
static constexpr auto Actor1 = 1000587;//Dellexia
|
||||
static constexpr auto Actor2 = 1006715;//Kain
|
||||
static constexpr auto Enemy0 = 4300392;
|
||||
static constexpr auto Enemy1 = 4300395;
|
||||
static constexpr auto Enemy2 = 4300397;
|
||||
static constexpr auto Eobject0 = 2002190;//Sylvan Lily Seed (Southern-most)
|
||||
static constexpr auto Eobject1 = 2002191;//Sylvan Lily Seed (Center)
|
||||
static constexpr auto Eobject2 = 2002192;//Sylvan Lily Seed (Northern-most)
|
||||
static constexpr auto EventActionGatherShort = 6;
|
||||
static constexpr auto EventActionSearch = 1;
|
||||
static constexpr auto Item0 = 2000749;
|
||||
static constexpr auto Item1 = 2000750;
|
||||
|
||||
public:
|
||||
GaiUsc303() : Sapphire::ScriptAPI::QuestScript( 66506 ){};
|
||||
~GaiUsc303() = 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 )
|
||||
Scene00010( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(
|
||||
player, getId(), 0x02,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||
Scene00005( quest, player );
|
||||
},
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
eventMgr().eventActionStart(
|
||||
player, getId(), 0x02,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||
Scene00007( quest, player );
|
||||
},
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject2:
|
||||
{
|
||||
eventMgr().eventActionStart(
|
||||
player, getId(), 0x02,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||
Scene00009( quest, player );
|
||||
},
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
}
|
||||
|
||||
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||
{
|
||||
switch( entityId )
|
||||
{
|
||||
case Enemy0:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case Enemy1:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case Enemy2:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
if( quest.getUI8AH() >= 3 && quest.getUI8CH() >= 3 )
|
||||
{
|
||||
quest.setUI8BH( 3 );
|
||||
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( &GaiUsc303::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( &GaiUsc303::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, NONE, bindSceneReturn( &GaiUsc303::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, NONE, bindSceneReturn( &GaiUsc303::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq( Seq2 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 4, NONE, bindSceneReturn( &GaiUsc303::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, NONE, bindSceneReturn( &GaiUsc303::Scene00005Return ) );
|
||||
}
|
||||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||
quest.setUI8CH( quest.getUI8CH() + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AH(), 3 );
|
||||
quest.setBitFlag8( 1, true );
|
||||
if( quest.getUI8CH() < 3 )
|
||||
{
|
||||
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy0->setTriggerOwnerId( player.getId() );
|
||||
enemy0->hateListAddDelayed( player.getAsPlayer(), 1 );
|
||||
}
|
||||
checkQuestCompletion( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 6, NONE, bindSceneReturn( &GaiUsc303::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, NONE, bindSceneReturn( &GaiUsc303::Scene00007Return ) );
|
||||
}
|
||||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||
quest.setUI8CH( quest.getUI8CH() + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AH(), 3 );
|
||||
quest.setBitFlag8( 2, true );
|
||||
if( quest.getUI8CH() < 3 )
|
||||
{
|
||||
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy1 = instance->createBNpcFromInstanceId( Enemy1, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy1->setTriggerOwnerId( player.getId() );
|
||||
enemy1->hateListAddDelayed( player.getAsPlayer(), 1 );
|
||||
}
|
||||
checkQuestCompletion( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 8, NONE, bindSceneReturn( &GaiUsc303::Scene00008Return ) );
|
||||
}
|
||||
|
||||
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 9, NONE, bindSceneReturn( &GaiUsc303::Scene00009Return ) );
|
||||
}
|
||||
|
||||
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||
quest.setUI8CH( quest.getUI8CH() + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AH(), 3 );
|
||||
quest.setBitFlag8( 3, true );
|
||||
if( quest.getUI8CH() < 3 )
|
||||
{
|
||||
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||
auto enemy2 = instance->createBNpcFromInstanceId( Enemy2, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy );
|
||||
enemy2->setTriggerOwnerId( player.getId() );
|
||||
enemy2->hateListAddDelayed( player.getAsPlayer(), 1 );
|
||||
}
|
||||
checkQuestCompletion( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00010( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 10, NONE, bindSceneReturn( &GaiUsc303::Scene00010Return ) );
|
||||
}
|
||||
|
||||
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00011( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00011( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 11, NONE, bindSceneReturn( &GaiUsc303::Scene00011Return ) );
|
||||
}
|
||||
|
||||
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId(), result.getResult(1) );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( GaiUsc303 );
|
214
src/scripts/quest/subquest/blackshroud_east/GaiUsc305.cpp
Normal file
214
src/scripts/quest/subquest/blackshroud_east/GaiUsc305.cpp
Normal file
|
@ -0,0 +1,214 @@
|
|||
// 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: GaiUsc305_00972
|
||||
// Quest Name: This One's for the Lovers
|
||||
// Quest ID: 66508
|
||||
// Start NPC: 1006715
|
||||
// End NPC: 1006715
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class GaiUsc305 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
// UI8AL
|
||||
// UI8BH
|
||||
|
||||
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1007569
|
||||
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1007570
|
||||
// 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 = 1006715;//Kain
|
||||
static constexpr auto Actor1 = 1007569;
|
||||
static constexpr auto Actor2 = 1007570;
|
||||
static constexpr auto Actor3 = 1007568;//Nervy Nipper
|
||||
static constexpr auto Item0 = 2000865;
|
||||
|
||||
public:
|
||||
GaiUsc305() : Sapphire::ScriptAPI::QuestScript( 66508 ){};
|
||||
~GaiUsc305() = 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 )
|
||||
Scene00007( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case Actor3:
|
||||
{
|
||||
if( quest.getSeq() == Seq1 )
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
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( &GaiUsc305::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( &GaiUsc305::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, NONE, bindSceneReturn( &GaiUsc305::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, NONE, bindSceneReturn( &GaiUsc305::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( &GaiUsc305::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( &GaiUsc305::Scene00005Return ) );
|
||||
}
|
||||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 6, NONE, bindSceneReturn( &GaiUsc305::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( &GaiUsc305::Scene00007Return ) );
|
||||
}
|
||||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 8, NONE, bindSceneReturn( &GaiUsc305::Scene00008Return ) );
|
||||
}
|
||||
|
||||
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 9, NONE, bindSceneReturn( &GaiUsc305::Scene00009Return ) );
|
||||
}
|
||||
|
||||
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( GaiUsc305 );
|
149
src/scripts/quest/subquest/blackshroud_east/GaiUsc306.cpp
Normal file
149
src/scripts/quest/subquest/blackshroud_east/GaiUsc306.cpp
Normal file
|
@ -0,0 +1,149 @@
|
|||
// 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: GaiUsc306_00973
|
||||
// Quest Name: Windy Wedding
|
||||
// Quest ID: 66509
|
||||
// Start NPC: 1006717
|
||||
// End NPC: 1006717
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class GaiUsc306 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
// UI8BH
|
||||
|
||||
/// Countable Num: 0 Seq: 1 Event: 9 Listener: 133
|
||||
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006717
|
||||
// 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 = 1006717;//Eldleda
|
||||
static constexpr auto Enemy0 = 115; //Wind Sprite (INCORRECT: 133)
|
||||
static constexpr auto Item0 = 2000751;
|
||||
|
||||
public:
|
||||
GaiUsc306() : Sapphire::ScriptAPI::QuestScript( 66509 ){};
|
||||
~GaiUsc306() = 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
}
|
||||
|
||||
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||
{
|
||||
switch( nameId )
|
||||
{
|
||||
case Enemy0:
|
||||
{
|
||||
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||
quest.setUI8BH( quest.getUI8BH() + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 4 );
|
||||
checkQuestCompletion( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
if( quest.getUI8AL() >= 4 )
|
||||
{
|
||||
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( &GaiUsc306::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( &GaiUsc306::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( &GaiUsc306::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( &GaiUsc306::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( GaiUsc306 );
|
132
src/scripts/quest/subquest/gridania/GaiUsc302.cpp
Normal file
132
src/scripts/quest/subquest/gridania/GaiUsc302.cpp
Normal file
|
@ -0,0 +1,132 @@
|
|||
// 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: GaiUsc302_00969
|
||||
// Quest Name: Adventurer for Hire
|
||||
// Quest ID: 66505
|
||||
// Start NPC: 1006711
|
||||
// End NPC: 1000617
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class GaiUsc302 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
// UI8BH
|
||||
|
||||
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1000617
|
||||
// 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 = 1006711;
|
||||
static constexpr auto Actor1 = 1000617;
|
||||
static constexpr auto Item0 = 2000950;
|
||||
|
||||
public:
|
||||
GaiUsc302() : Sapphire::ScriptAPI::QuestScript( 66505 ){};
|
||||
~GaiUsc302() = 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() == SeqFinish )
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
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( &GaiUsc302::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( &GaiUsc302::Scene00001Return ) );
|
||||
}
|
||||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq( SeqFinish );
|
||||
quest.setUI8BH( 1 );
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 2, NONE, bindSceneReturn( &GaiUsc302::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, NONE, bindSceneReturn( &GaiUsc302::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( GaiUsc302 );
|
237
src/scripts/quest/subquest/gridania/SubFst000.cpp
Normal file
237
src/scripts/quest/subquest/gridania/SubFst000.cpp
Normal file
|
@ -0,0 +1,237 @@
|
|||
// 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: SubFst000_00020
|
||||
// Quest Name: Incense and Sensibility
|
||||
// Quest ID: 65556
|
||||
// Start NPC: 1000786
|
||||
// End NPC: 1000705
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class SubFst000 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
// UI8AL
|
||||
// UI8BH
|
||||
|
||||
/// Countable Num: 1 Seq: 1 Event: 1 Listener: 1000705
|
||||
/// Countable Num: 2 Seq: 2 Event: 1 Listener: 2000070
|
||||
/// Countable Num: 1 Seq: 255 Event: 8 Listener: 2000070
|
||||
// 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 = 1000786; //Mellaine
|
||||
static constexpr auto Actor1 = 1000705; //Braya
|
||||
static constexpr auto Eobject0 = 2000070;//Censer (Northern)
|
||||
static constexpr auto Eobject1 = 2000071;//Censer (Western)
|
||||
static constexpr auto Item0 = 2000101;
|
||||
static constexpr auto Seq0Actor0 = 0;
|
||||
static constexpr auto Seq1Actor1 = 1;
|
||||
static constexpr auto Seq2Eobject0 = 2;
|
||||
static constexpr auto Seq2Eobject0Useitemno = 99;
|
||||
static constexpr auto Seq2Eobject0Useitemok = 100;
|
||||
static constexpr auto Seq2Eobject1 = 3;
|
||||
static constexpr auto Seq2Eobject1Useitemno = 97;
|
||||
static constexpr auto Seq2Eobject1Useitemok = 98;
|
||||
static constexpr auto Seq3Actor1 = 4;
|
||||
|
||||
public:
|
||||
SubFst000() : Sapphire::ScriptAPI::QuestScript( 65556 ){};
|
||||
~SubFst000() = 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 )
|
||||
Scene00001( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
if( actorId == Eobject0 )
|
||||
Scene00100( quest, player );
|
||||
else if( actorId == Eobject1 )
|
||||
Scene00098( quest, player );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
if( quest.getUI8AL() >= 2 )
|
||||
{
|
||||
quest.setUI8AL( 0 );
|
||||
quest.setBitFlag8( 1, false );
|
||||
quest.setBitFlag8( 2, false );
|
||||
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( &SubFst000::Scene00000Return ) );
|
||||
}
|
||||
|
||||
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.getResult( 0 ) == 1 )// accept quest
|
||||
{
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &SubFst000::Scene00001Return ) );
|
||||
}
|
||||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||
quest.setSeq( Seq2 );
|
||||
quest.setUI8BH( 2 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &SubFst000::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( &SubFst000::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, NONE, bindSceneReturn( &SubFst000::Scene00004Return ) );
|
||||
}
|
||||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId(), result.getResult( 1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00097( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 97, NONE, bindSceneReturn( &SubFst000::Scene00097Return ) );
|
||||
}
|
||||
|
||||
void Scene00097Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00098( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 98, NONE, bindSceneReturn( &SubFst000::Scene00098Return ) );
|
||||
}
|
||||
|
||||
void Scene00098Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setBitFlag8( 2, true );
|
||||
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||
quest.setUI8BH( quest.getUI8BH() - 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AL(), 2 );
|
||||
checkQuestCompletion( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00099( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 99, NONE, bindSceneReturn( &SubFst000::Scene00099Return ) );
|
||||
}
|
||||
|
||||
void Scene00099Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00100( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 100, NONE, bindSceneReturn( &SubFst000::Scene00100Return ) );
|
||||
}
|
||||
|
||||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setBitFlag8( 1, true );
|
||||
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||
quest.setUI8BH( quest.getUI8BH() - 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AL(), 2 );
|
||||
checkQuestCompletion( quest, player );
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( SubFst000 );
|
152
src/scripts/quest/subquest/gridania/SubFst910.cpp
Normal file
152
src/scripts/quest/subquest/gridania/SubFst910.cpp
Normal file
|
@ -0,0 +1,152 @@
|
|||
// 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: SubFst910_00194
|
||||
// Quest Name: Unicorn Power
|
||||
// Quest ID: 65730
|
||||
// Start NPC: 1000705
|
||||
// End NPC: 1000705
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class SubFst910 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
||||
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1008174
|
||||
/// Countable Num: 0 Seq: 255 Event: 18 Listener: 1008174
|
||||
// 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 Action0 = 120; //Cure
|
||||
static constexpr auto Actor0 = 1000705;//Braya
|
||||
static constexpr auto Actor1 = 1008174;//Injured Mare
|
||||
static constexpr auto LocAction1 = 953;
|
||||
static constexpr auto LocSe1 = 47;
|
||||
|
||||
public:
|
||||
SubFst910() : Sapphire::ScriptAPI::QuestScript( 65730 ){};
|
||||
~SubFst910() = 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 Actor1:
|
||||
{
|
||||
if( quest.getSeq() == Seq1 )
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void onEObjHit( World::Quest& quest, Sapphire::Entity::Player& player, uint64_t actor, uint32_t actionId ) override
|
||||
{
|
||||
if( actor == Actor1 && actionId == Action0 )
|
||||
{
|
||||
//TODO:Temportaty because you can't call cutscenes from onEobjHit
|
||||
eventMgr().eventStart( player, actor, getId(), Event::EventHandler::ActionResult, 0, 0 );
|
||||
Scene00003( 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( &SubFst910::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( &SubFst910::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( &SubFst910::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( &SubFst910::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, NONE, bindSceneReturn( &SubFst910::Scene00004Return ) );
|
||||
}
|
||||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( SubFst910 );
|
196
src/scripts/quest/subquest/thanalan_west/SubCts809.cpp
Normal file
196
src/scripts/quest/subquest/thanalan_west/SubCts809.cpp
Normal file
|
@ -0,0 +1,196 @@
|
|||
// 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: SubCts809_01424
|
||||
// Quest Name: Seeds of Change
|
||||
// Quest ID: 66960
|
||||
// Start NPC: 1008758
|
||||
// End NPC: 1008758
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class SubCts809 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
// UI8AL
|
||||
// UI8BH
|
||||
// UI8BL
|
||||
// UI8CH
|
||||
|
||||
/// Countable Num: 1 Seq: 1 Event: 1 Listener: 1008760
|
||||
/// Countable Num: 1 Seq: 255 Event: 1 Listener: 1008758
|
||||
// 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 = 1008758;//Tatafu
|
||||
static constexpr auto Actor1 = 1008760;//Nanalai
|
||||
static constexpr auto EventActionSearch = 1;
|
||||
static constexpr auto Item0 = 2001240;
|
||||
static constexpr auto Item1 = 2001241;
|
||||
static constexpr auto Item2 = 2001242;
|
||||
|
||||
public:
|
||||
SubCts809() : Sapphire::ScriptAPI::QuestScript( 66960 ){};
|
||||
~SubCts809() = 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 Actor1:
|
||||
{
|
||||
if( quest.getSeq() == Seq1 )
|
||||
Scene00002( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00007( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
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( &SubCts809::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( &SubCts809::Scene00001Return ) );
|
||||
}
|
||||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq( Seq1 );
|
||||
quest.setUI8BH( 1 );
|
||||
quest.setUI8BL( 1 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &SubCts809::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( &SubCts809::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setUI8BH( 1 );
|
||||
quest.setUI8BL( 0 );
|
||||
quest.setSeq( SeqFinish );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &SubCts809::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( &SubCts809::Scene00005Return ) );
|
||||
}
|
||||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00006( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &SubCts809::Scene00006Return ) );
|
||||
}
|
||||
|
||||
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &SubCts809::Scene00007Return ) );
|
||||
}
|
||||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( SubCts809 );
|
Loading…
Add table
Reference in a new issue