mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 02:57:45 +00:00
Implement Gold Saucer unlock quest sequence and mahjong tables (against AI opponents).
This commit is contained in:
parent
6eb0151b2b
commit
d8ecedb93f
14 changed files with 1294 additions and 3 deletions
|
@ -76,7 +76,7 @@ namespace Sapphire::Network::Packets
|
||||||
SocialRequestResponse = 0x01C7, // updated 5.35 hotfix
|
SocialRequestResponse = 0x01C7, // updated 5.35 hotfix
|
||||||
SocialMessage = 0x0308, // updated 5.35 hotfix
|
SocialMessage = 0x0308, // updated 5.35 hotfix
|
||||||
SocialMessage2 = 0x037C, // updated 5.35 hotfix
|
SocialMessage2 = 0x037C, // updated 5.35 hotfix
|
||||||
CancelAllianceForming = 0x00C6, // updated 4.2
|
CancelAllianceForming = 0xF0C6, // updated 4.2
|
||||||
|
|
||||||
LogMessage = 0x00D0,
|
LogMessage = 0x00D0,
|
||||||
|
|
||||||
|
|
26
src/scripts/common/goldsaucer/CmnGscDailyLotDescription.cpp
Normal file
26
src/scripts/common/goldsaucer/CmnGscDailyLotDescription.cpp
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class CmnGscDailyLotDescription :
|
||||||
|
public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CmnGscDailyLotDescription() :
|
||||||
|
Sapphire::ScriptAPI::EventScript( 721122 )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.playScene( getId(), 0, HIDE_HOTBAR, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( CmnGscDailyLotDescription );
|
27
src/scripts/common/goldsaucer/CmnGscEMJGameTable.cpp
Normal file
27
src/scripts/common/goldsaucer/CmnGscEMJGameTable.cpp
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class CmnGscEMJGameTable :
|
||||||
|
public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CmnGscEMJGameTable() :
|
||||||
|
Sapphire::ScriptAPI::EventScript( 721443 )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.playScene( getId(), 0, HIDE_HOTBAR, 0, 0 );
|
||||||
|
// All client side magic!
|
||||||
|
}
|
||||||
|
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( CmnGscEMJGameTable );
|
206
src/scripts/quest/subquest/goldsaucer/SubGsc001.cpp
Normal file
206
src/scripts/quest/subquest/goldsaucer/SubGsc001.cpp
Normal file
|
@ -0,0 +1,206 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.2
|
||||||
|
// id hint used:
|
||||||
|
//ACTOR1 = dummy1
|
||||||
|
//SCENE_2 = dummy1
|
||||||
|
//SCENE_5 = ELYENORA
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc001 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubGsc001() : Sapphire::ScriptAPI::EventScript( 65970 ){};
|
||||||
|
~SubGsc001() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 2 entries
|
||||||
|
//SEQ_255, 3 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1011565
|
||||||
|
//ACTOR1 = 1011566
|
||||||
|
//ACTOR2 = 1004433
|
||||||
|
//BGM0 = 250
|
||||||
|
//ITEM0 = 2001555
|
||||||
|
//NCUT0 = 769
|
||||||
|
//NCUT1 = 770
|
||||||
|
//POPRANGE0 = 5654039
|
||||||
|
//SCREENIMAGE0 = 272
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( player.getQuestSeq( getId() ) )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
if( param1 == 1011565 || param2 == 1011565 ) // ACTOR0 = TRADER00434
|
||||||
|
{
|
||||||
|
Scene00000( player ); // Scene00000: Normal(QuestOffer), id=unknown
|
||||||
|
// +Callback Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=TRADER00434
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1011566 || param2 == 1011566 ) // ACTOR1 = dummy1
|
||||||
|
{
|
||||||
|
Scene00002( player ); // Scene00002: Normal(None), id=dummy1
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//seq 255 event item ITEM0 = UI8BH max stack 1
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
if( param1 == 1004433 || param2 == 1004433 ) // ACTOR2 = ELYENORA
|
||||||
|
{
|
||||||
|
Scene00003( player ); // Scene00003: NpcTrade(Talk, TargetCanMove), id=unknown
|
||||||
|
// +Callback Scene00004: Normal(Talk, YesNo, TargetCanMove, CanCancel), id=ELYENORA
|
||||||
|
// +Callback Scene00005: Normal(CutScene, FadeIn, QuestReward, QuestComplete, AutoFadeIn), id=ELYENORA
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1011565 || param2 == 1011565 ) // ACTOR0 = TRADER00434
|
||||||
|
{
|
||||||
|
Scene00006( player ); // Scene00006: Normal(Talk, TargetCanMove), id=TRADER00434
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1011566 || param2 == 1011566 ) // ACTOR1 = unknown
|
||||||
|
{
|
||||||
|
Scene00007( player ); // Scene00007: Normal(None), id=unknown
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 1, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( player, npcId, 0, 2, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param1, 3, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param2, 4, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 255 );
|
||||||
|
player.setQuestUI8BH( getId(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00000: Normal(QuestOffer), id=unknown" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=TRADER00434" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00002: Normal(None), id=dummy1" );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00003: NpcTrade(Talk, TargetCanMove), id=unknown" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00004( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00004: Normal(Talk, YesNo, TargetCanMove, CanCancel), id=ELYENORA" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 == 512 || ( result.param1 > 0 && result.param2 == 1 ) )
|
||||||
|
{
|
||||||
|
Scene00005( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 4, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00005: Normal(CutScene, FadeIn, QuestReward, QuestComplete, AutoFadeIn), id=ELYENORA" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
player.eventFinish( getId(), 1 );
|
||||||
|
player.setPos( -34.5, 0.64, 100, false );
|
||||||
|
player.setRot( -1.58 );
|
||||||
|
player.forceZoneing( 144 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00006: Normal(Talk, TargetCanMove), id=TRADER00434" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 6, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc001:65970 calling Scene00007: Normal(None), id=unknown" );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc001 );
|
283
src/scripts/quest/subquest/goldsaucer/SubGsc002.cpp
Normal file
283
src/scripts/quest/subquest/goldsaucer/SubGsc002.cpp
Normal file
|
@ -0,0 +1,283 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.2
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc002 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubGsc002() : Sapphire::ScriptAPI::EventScript( 65971 ){};
|
||||||
|
~SubGsc002() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 1 entries
|
||||||
|
//SEQ_1, 2 entries
|
||||||
|
//SEQ_2, 1 entries
|
||||||
|
//SEQ_3, 1 entries
|
||||||
|
//SEQ_4, 1 entries
|
||||||
|
//SEQ_5, 1 entries
|
||||||
|
//SEQ_6, 1 entries
|
||||||
|
//SEQ_255, 1 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1011022
|
||||||
|
//ACTOR1 = 1010448
|
||||||
|
//ACTOR2 = 1011038
|
||||||
|
//ACTOR3 = 1010478
|
||||||
|
//ACTOR4 = 1011080
|
||||||
|
//ACTOR5 = 1011079
|
||||||
|
//ACTOR6 = 1011084
|
||||||
|
//BGM0 = 250
|
||||||
|
//LOCACTIONTIMELINE001 = 1072
|
||||||
|
//LOCCHECKQUEST001 = 66996
|
||||||
|
//LOCCHECKQUEST002 = 65625
|
||||||
|
//LOCCHECKQUEST003 = 65964
|
||||||
|
//LOCENPC001 = 1011586
|
||||||
|
//LOCLEVELENPC001 = 5581118
|
||||||
|
//LOCLEVELENPC002 = 5581208
|
||||||
|
//LOCLEVELENPC003 = 5584143
|
||||||
|
//LOCLEVELENPC004 = 5653245
|
||||||
|
//LOCLEVELENPC005 = 5581064
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( player.getQuestSeq( getId() ) )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
Scene00000( player ); // Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown
|
||||||
|
// +Callback Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=RECEPTIONIDT00434
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
if( param1 == 1010448 || param2 == 1010448 ) // ACTOR1 = INFORMATION00435
|
||||||
|
{
|
||||||
|
if( player.getQuestUI8AL( getId() ) != 1 )
|
||||||
|
{
|
||||||
|
Scene00002( player ); // Scene00002: Normal(Talk, FadeIn, TargetCanMove), id=INFORMATION00435
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1011022 || param2 == 1011022 ) // ACTOR0 = RECEPTIONIDT00434
|
||||||
|
{
|
||||||
|
Scene00003( player ); // Scene00003: Normal(Talk, TargetCanMove), id=RECEPTIONIDT00434
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
Scene00004( player ); // Scene00004: Normal(Talk, TargetCanMove), id=EXCHANGE00435
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
Scene00005( player ); // Scene00005: Normal(Talk, FadeIn, TargetCanMove), id=CARDSHOP00435
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
Scene00006( player ); // Scene00006: Normal(Talk, FadeIn, TargetCanMove), id=GATENPCA00435
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
Scene00007( player ); // Scene00007: Normal(Talk, FadeIn, TargetCanMove), id=BUNNY00435
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 6:
|
||||||
|
{
|
||||||
|
Scene00008( player ); // Scene00008: Normal(Talk, FadeIn, TargetCanMove), id=GATENPCB00435
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
Scene00009( player ); // Scene00009: Normal(Talk, FadeIn, QuestReward, QuestComplete, TargetCanMove), id=INFORMATION00435
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 1, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( player, npcId, 0, 2, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param1, 3, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param2, 4, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 1 );
|
||||||
|
}
|
||||||
|
void checkProgressSeq1( Entity::Player& player )
|
||||||
|
{
|
||||||
|
if( player.getQuestUI8AL( getId() ) == 1 )
|
||||||
|
{
|
||||||
|
player.setQuestUI8AL( getId(), 0 );
|
||||||
|
player.updateQuest( getId(), 2 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void checkProgressSeq2( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 3 );
|
||||||
|
}
|
||||||
|
void checkProgressSeq3( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 4 );
|
||||||
|
}
|
||||||
|
void checkProgressSeq4( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 5 );
|
||||||
|
}
|
||||||
|
void checkProgressSeq5( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 6 );
|
||||||
|
}
|
||||||
|
void checkProgressSeq6( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 255 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=RECEPTIONIDT00434" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00002: Normal(Talk, FadeIn, TargetCanMove), id=INFORMATION00435" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
player.setQuestUI8AL( getId(), 1 );
|
||||||
|
checkProgressSeq1( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 2, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00003: Normal(Talk, TargetCanMove), id=RECEPTIONIDT00434" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00004: Normal(Talk, TargetCanMove), id=EXCHANGE00435" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq2( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 4, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00005: Normal(Talk, FadeIn, TargetCanMove), id=CARDSHOP00435" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq3( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00006: Normal(Talk, FadeIn, TargetCanMove), id=GATENPCA00435" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq4( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 6, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00007: Normal(Talk, FadeIn, TargetCanMove), id=BUNNY00435" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq5( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 7, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00008: Normal(Talk, FadeIn, TargetCanMove), id=GATENPCB00435" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq6( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 8, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc002:65971 calling Scene00009: Normal(Talk, FadeIn, QuestReward, QuestComplete, TargetCanMove), id=INFORMATION00435" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 9, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc002 );
|
139
src/scripts/quest/subquest/goldsaucer/SubGsc101.cpp
Normal file
139
src/scripts/quest/subquest/goldsaucer/SubGsc101.cpp
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.2
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc101 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubGsc101() : Sapphire::ScriptAPI::EventScript( 65972 ){};
|
||||||
|
~SubGsc101() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 1 entries
|
||||||
|
//SEQ_255, 2 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1010464
|
||||||
|
//ACTOR1 = 1010472
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( player.getQuestSeq( getId() ) )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
Scene00000( player ); // Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown
|
||||||
|
// +Callback Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=CHOCOBORACE00436
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
if( param1 == 1010472 || param2 == 1010472 ) // ACTOR1 = KATERING
|
||||||
|
{
|
||||||
|
Scene00002( player ); // Scene00002: Normal(Talk, QuestReward, QuestComplete, TargetCanMove, SystemTalk), id=KATERING
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1010464 || param2 == 1010464 ) // ACTOR0 = CHOCOBORACE00436
|
||||||
|
{
|
||||||
|
Scene00003( player ); // Scene00003: Normal(Talk, TargetCanMove), id=CHOCOBORACE00436
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 1, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( player, npcId, 0, 2, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param1, 3, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param2, 4, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 255 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc101:65972 calling Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc101:65972 calling Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=CHOCOBORACE00436" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc101:65972 calling Scene00002: Normal(Talk, QuestReward, QuestComplete, TargetCanMove, SystemTalk), id=KATERING" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 2, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc101:65972 calling Scene00003: Normal(Talk, TargetCanMove), id=CHOCOBORACE00436" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc101 );
|
63
src/scripts/quest/subquest/goldsaucer/SubGsc102.cpp
Normal file
63
src/scripts/quest/subquest/goldsaucer/SubGsc102.cpp
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: SubGsc102_00437
|
||||||
|
// Quest Name: Triple Triad Trial
|
||||||
|
// Quest ID: 65973
|
||||||
|
// Start NPC: 1011060
|
||||||
|
// End NPC: 1011060
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc102 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1011060;
|
||||||
|
static constexpr auto LevelNpc0 = 5581330;
|
||||||
|
|
||||||
|
public:
|
||||||
|
SubGsc102() : Sapphire::ScriptAPI::EventScript( 65973 ){};
|
||||||
|
~SubGsc102() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc102 );
|
62
src/scripts/quest/subquest/goldsaucer/SubGsc103.cpp
Normal file
62
src/scripts/quest/subquest/goldsaucer/SubGsc103.cpp
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: SubGsc103_00488
|
||||||
|
// Quest Name: Scratch It Rich
|
||||||
|
// Quest ID: 66024
|
||||||
|
// Start NPC: 1010445
|
||||||
|
// End NPC: 1010445
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc103 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1010445;
|
||||||
|
|
||||||
|
public:
|
||||||
|
SubGsc103() : Sapphire::ScriptAPI::EventScript( 66024 ){};
|
||||||
|
~SubGsc103() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc103 );
|
62
src/scripts/quest/subquest/goldsaucer/SubGsc104.cpp
Normal file
62
src/scripts/quest/subquest/goldsaucer/SubGsc104.cpp
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: SubGsc104_00489
|
||||||
|
// Quest Name: Hitting the Cactpot
|
||||||
|
// Quest ID: 66025
|
||||||
|
// Start NPC: 1010446
|
||||||
|
// End NPC: 1010446
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc104 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1010446;
|
||||||
|
|
||||||
|
public:
|
||||||
|
SubGsc104() : Sapphire::ScriptAPI::EventScript( 66025 ){};
|
||||||
|
~SubGsc104() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
Scene00000( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc104 );
|
140
src/scripts/quest/subquest/goldsaucer/SubGsc105.cpp
Normal file
140
src/scripts/quest/subquest/goldsaucer/SubGsc105.cpp
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.2
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc105 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubGsc105() : Sapphire::ScriptAPI::EventScript( 66101 ){};
|
||||||
|
~SubGsc105() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 1 entries
|
||||||
|
//SEQ_255, 2 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1010472
|
||||||
|
//ACTOR1 = 1010464
|
||||||
|
//LOCLEVELENPC001 = 5437010
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( player.getQuestSeq( getId() ) )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
Scene00000( player ); // Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown
|
||||||
|
// +Callback Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=KATERING
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
if( param1 == 1010464 || param2 == 1010464 ) // ACTOR1 = CHOCOBORACE00565
|
||||||
|
{
|
||||||
|
Scene00002( player ); // Scene00002: Normal(Talk, Message, QuestReward, QuestComplete, TargetCanMove, SystemTalk), id=CHOCOBORACE00565
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1010472 || param2 == 1010472 ) // ACTOR0 = KATERING
|
||||||
|
{
|
||||||
|
Scene00003( player ); // Scene00003: Normal(Talk, TargetCanMove), id=KATERING
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 1, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( player, npcId, 0, 2, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param1, 3, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param2, 4, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 255 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc105:66101 calling Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc105:66101 calling Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=KATERING" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc105:66101 calling Scene00002: Normal(Talk, Message, QuestReward, QuestComplete, TargetCanMove, SystemTalk), id=CHOCOBORACE00565" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 2, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc105:66101 calling Scene00003: Normal(Talk, TargetCanMove), id=KATERING" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc105 );
|
139
src/scripts/quest/subquest/goldsaucer/SubGsc106.cpp
Normal file
139
src/scripts/quest/subquest/goldsaucer/SubGsc106.cpp
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.2
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc106 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubGsc106() : Sapphire::ScriptAPI::EventScript( 66112 ){};
|
||||||
|
~SubGsc106() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 1 entries
|
||||||
|
//SEQ_255, 2 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1011030
|
||||||
|
//ACTOR1 = 1010472
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( player.getQuestSeq( getId() ) )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
Scene00000( player ); // Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown
|
||||||
|
// +Callback Scene00001: Normal(Talk, QuestAccept, TargetCanMove, SystemTalk), id=AUPHREY
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
if( param1 == 1010472 || param2 == 1010472 ) // ACTOR1 = KATERING
|
||||||
|
{
|
||||||
|
Scene00002( player ); // Scene00002: Normal(Talk, Message, QuestReward, QuestComplete, TargetCanMove), id=KATERING
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1011030 || param2 == 1011030 ) // ACTOR0 = AUPHREY
|
||||||
|
{
|
||||||
|
Scene00003( player ); // Scene00003: Normal(Talk, TargetCanMove), id=AUPHREY
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 1, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( player, npcId, 0, 2, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param1, 3, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param2, 4, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 255 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc106:66112 calling Scene00000: Normal(QuestOffer, TargetCanMove), id=unknown" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc106:66112 calling Scene00001: Normal(Talk, QuestAccept, TargetCanMove, SystemTalk), id=AUPHREY" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc106:66112 calling Scene00002: Normal(Talk, Message, QuestReward, QuestComplete, TargetCanMove), id=KATERING" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 2, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc106:66112 calling Scene00003: Normal(Talk, TargetCanMove), id=AUPHREY" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc106 );
|
142
src/scripts/quest/subquest/goldsaucer/SubGsc107.cpp
Normal file
142
src/scripts/quest/subquest/goldsaucer/SubGsc107.cpp
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.2
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubGsc107 : public Sapphire::ScriptAPI::EventScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubGsc107() : Sapphire::ScriptAPI::EventScript( 68737 ){};
|
||||||
|
~SubGsc107() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 1 entries
|
||||||
|
//SEQ_255, 2 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1011145
|
||||||
|
//ACTOR1 = 1016307
|
||||||
|
//LOCINSTANCECONTENTS0 = 61001
|
||||||
|
//LOCMOTION0 = 1062
|
||||||
|
//LOCSCREENIMAGE0 = 696
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( player.getQuestSeq( getId() ) )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
Scene00000( player ); // Scene00000: Normal(QuestOffer), id=unknown
|
||||||
|
// +Callback Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=LEWENA
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
if( param1 == 1016307 || param2 == 1016307 ) // ACTOR1 = JANSHIOFEAST
|
||||||
|
{
|
||||||
|
Scene00002( player ); // Scene00002: Normal(Talk, Message, FadeIn, QuestReward, QuestComplete, TargetCanMove, Menu), id=JANSHIOFEAST
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1011145 || param2 == 1011145 ) // ACTOR0 = LEWENA
|
||||||
|
{
|
||||||
|
Scene00003( player ); // Scene00003: Normal(Talk, TargetCanMove), id=LEWENA
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||||
|
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||||
|
onProgress( player, actorId, actor, 1, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( player, npcId, 0, 2, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param1, 3, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( player, param1, param2, 4, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.updateQuest( getId(), 255 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc107:68737 calling Scene00000: Normal(QuestOffer), id=unknown" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
Scene00001( player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 0, NONE, callback );
|
||||||
|
}
|
||||||
|
void Scene00001( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc107:68737 calling Scene00001: Normal(Talk, QuestAccept, TargetCanMove), id=LEWENA" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( player );
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 1, NONE, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc107:68737 calling Scene00002: Normal(Talk, Message, FadeIn, QuestReward, QuestComplete, TargetCanMove, Menu), id=JANSHIOFEAST" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param1 > 0 && result.param2 == 1 )
|
||||||
|
{
|
||||||
|
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 2, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.sendDebug( "SubGsc107:68737 calling Scene00003: Normal(Talk, TargetCanMove), id=LEWENA" );
|
||||||
|
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
};
|
||||||
|
player.playScene( getId(), 3, NONE, callback );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubGsc107 );
|
|
@ -148,8 +148,8 @@ bool Sapphire::World::Manager::TerritoryMgr::isDefaultTerritory( uint32_t territ
|
||||||
pTeri->territoryIntendedUse == TerritoryIntendedUse::Town ||
|
pTeri->territoryIntendedUse == TerritoryIntendedUse::Town ||
|
||||||
pTeri->territoryIntendedUse == TerritoryIntendedUse::OpenWorld ||
|
pTeri->territoryIntendedUse == TerritoryIntendedUse::OpenWorld ||
|
||||||
pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea ||
|
pTeri->territoryIntendedUse == TerritoryIntendedUse::OpeningArea ||
|
||||||
pTeri->territoryIntendedUse == 23;
|
pTeri->territoryIntendedUse == TerritoryIntendedUse::GoldSaucer ||
|
||||||
|
pTeri->territoryIntendedUse == TerritoryIntendedUse::ChocoboSquare;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sapphire::World::Manager::TerritoryMgr::isHousingTerritory( uint32_t territoryTypeId ) const
|
bool Sapphire::World::Manager::TerritoryMgr::isHousingTerritory( uint32_t territoryTypeId ) const
|
||||||
|
|
|
@ -48,8 +48,10 @@ namespace Sapphire::World::Manager
|
||||||
MSQPrivateArea = 15,
|
MSQPrivateArea = 15,
|
||||||
Raids = 16,
|
Raids = 16,
|
||||||
RaidFights = 17,
|
RaidFights = 17,
|
||||||
|
ChocoboSquare = 19,
|
||||||
ChocoboTutorial = 21,
|
ChocoboTutorial = 21,
|
||||||
Wedding = 22,
|
Wedding = 22,
|
||||||
|
GoldSaucer = 23,
|
||||||
DiademV1 = 26,
|
DiademV1 = 26,
|
||||||
BeginnerTutorial = 27,
|
BeginnerTutorial = 27,
|
||||||
PvPTheFeast = 28,
|
PvPTheFeast = 28,
|
||||||
|
|
Loading…
Add table
Reference in a new issue