mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-02 08:57:44 +00:00
Add Map actor controls
This commit is contained in:
commit
5c863ba81a
41 changed files with 8623 additions and 118 deletions
|
@ -218,7 +218,18 @@ namespace Sapphire::Network::ActorControl
|
||||||
SetFavorite = 0x1FC,
|
SetFavorite = 0x1FC,
|
||||||
LearnTeleport = 0x1FD,
|
LearnTeleport = 0x1FD,
|
||||||
|
|
||||||
OpenRecommendationGuide = 0x200,
|
/*!
|
||||||
|
* param1 = event type bitmask
|
||||||
|
* 1 = Quest
|
||||||
|
* 2 = GuildLeveAssignment
|
||||||
|
* 4 = GuildOrderGuide
|
||||||
|
* 8 = TripleTriad
|
||||||
|
* 16 = CustomTalk
|
||||||
|
* 32 = PreHandler
|
||||||
|
*/
|
||||||
|
BeginMapUpdate = 0x1FF,
|
||||||
|
FinishMapUpdate = 0x200,
|
||||||
|
|
||||||
ArmoryErrorMsg = 0x201,
|
ArmoryErrorMsg = 0x201,
|
||||||
|
|
||||||
AchievementPopup = 0x203,
|
AchievementPopup = 0x203,
|
||||||
|
|
|
@ -1399,6 +1399,60 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
uint32_t isNewFlags;
|
uint32_t isNewFlags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template< int ArgCount >
|
||||||
|
struct FFXIVIpcMapMarkerN
|
||||||
|
{
|
||||||
|
uint8_t numOfMarkers;
|
||||||
|
uint8_t __padding1;
|
||||||
|
uint8_t __padding2;
|
||||||
|
uint8_t __padding3;
|
||||||
|
uint32_t iconIds[ArgCount];
|
||||||
|
uint32_t layoutIds[ArgCount];
|
||||||
|
uint32_t handlerIds[ArgCount];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcMapMarker2 :
|
||||||
|
FFXIVIpcBasePacket< MapMarker2 >,
|
||||||
|
FFXIVIpcMapMarkerN< 2 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcMapMarker4 :
|
||||||
|
FFXIVIpcBasePacket< MapMarker4 >,
|
||||||
|
FFXIVIpcMapMarkerN< 4 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcMapMarker8 :
|
||||||
|
FFXIVIpcBasePacket< MapMarker8 >,
|
||||||
|
FFXIVIpcMapMarkerN< 8 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcMapMarker16 :
|
||||||
|
FFXIVIpcBasePacket< MapMarker16 >,
|
||||||
|
FFXIVIpcMapMarkerN< 16 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcMapMarker32 :
|
||||||
|
FFXIVIpcBasePacket< MapMarker32 >,
|
||||||
|
FFXIVIpcMapMarkerN< 32 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcMapMarker64 :
|
||||||
|
FFXIVIpcBasePacket< MapMarker64 >,
|
||||||
|
FFXIVIpcMapMarkerN< 64 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FFXIVIpcMapMarker128 :
|
||||||
|
FFXIVIpcBasePacket< MapMarker128 >,
|
||||||
|
FFXIVIpcMapMarkerN< 128 >
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
template< int ArgCount >
|
template< int ArgCount >
|
||||||
struct FFXIVIpcBattleTalkN
|
struct FFXIVIpcBattleTalkN
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,110 +0,0 @@
|
||||||
#include <ScriptObject.h>
|
|
||||||
#include <Territory/InstanceContent.h>
|
|
||||||
|
|
||||||
using namespace Sapphire;
|
|
||||||
|
|
||||||
class HeroontheHalfshell : public Sapphire::ScriptAPI::InstanceContentScript
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
HeroontheHalfshell() : Sapphire::ScriptAPI::InstanceContentScript( 10004 )
|
|
||||||
{ }
|
|
||||||
|
|
||||||
void onInit( InstanceContent& instance ) override
|
|
||||||
{
|
|
||||||
instance.addEObj( "Herbpatch", 2000269, 0, 3538830, 4, { -168.030701f, -29.340919f, 84.545708f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_0", 2000409, 0, 3747939, 4, { -212.848099f, -33.035831f, 113.542397f }, 0.930786f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_1", 2000409, 0, 3748525, 4, { -162.298599f, -31.120291f, 110.046402f }, 0.779493f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_2", 2000409, 0, 3748531, 4, { -275.623810f, -31.509951f, 92.423828f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "Entrance", 2001710, 4138533, 4138531, 5, { -152.954300f, -29.048920f, 89.609222f }, 1.000000f, 0.000000f, 0);
|
|
||||||
// States -> vf_lock_on (id: 11) vf_lock_of (id: 12)
|
|
||||||
instance.addEObj( "Cactusleaf", 2001219, 0, 4163996, 4, { 68.184372f, 2.507450f, -191.363205f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Cactusleaf_1", 2001219, 0, 4163997, 4, { 103.783699f, 1.089769f, -184.676102f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Cactusleaf_2", 2001219, 0, 4163998, 4, { 91.415398f, 3.350578f, -220.746307f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Cactusleaf_3", 2001219, 0, 4163999, 4, { 112.229103f, 1.290796f, -220.902802f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Cactusleaf_4", 2001219, 0, 4164000, 4, { 125.070099f, -0.567415f, -203.612198f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Cactusleaf_5", 2001219, 0, 4164001, 4, { 133.148895f, 1.388501f, -235.169098f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Cactusleaf_6", 2001219, 0, 4164002, 4, { 57.463402f, 0.891828f, -199.581604f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Cactusleaf_7", 2001219, 0, 4164003, 4, { 84.317146f, 1.130788f, -183.062500f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate", 2001222, 0, 4163983, 4, { 115.969299f, 28.946650f, -16.900860f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate_1", 2001222, 0, 4163984, 4, { 147.068100f, 28.574089f, -4.458593f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate_2", 2001222, 0, 4163985, 4, { 149.599197f, 28.624269f, -16.895611f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate_3", 2001222, 0, 4163986, 4, { 135.130203f, 28.626221f, -25.092680f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate_4", 2001222, 0, 4163987, 4, { 128.430801f, 28.722771f, -5.393469f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate_5", 2001222, 0, 4163988, 4, { 138.452301f, 28.674669f, -9.497550f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate_6", 2001222, 0, 4163989, 4, { 121.850197f, 28.614929f, -22.842150f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Stolenshippingcrate_7", 2001222, 0, 4163990, 4, { 134.542099f, 28.635111f, -18.532190f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "unknown_3", 2002390, 0, 4306245, 4, { -232.800003f, -28.933470f, 125.320000f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "unknown_4", 2004893, 0, 5375028, 4, { -56.192440f, -10.742790f, -71.522552f }, 0.772795f, -1.476827f, 0);
|
|
||||||
instance.addEObj( "Destination", 2005188, 0, 5658022, 4, { -314.058685f, -1.080676f, 44.011101f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_5", 2005168, 0, 5658066, 4, { -339.162292f, 0.289917f, 43.167721f }, 0.381470f, 1.401670f, 0);
|
|
||||||
instance.addEObj( "Destination_1", 2001426, 0, 3976856, 4, { 27.219780f, 12.999960f, 51.848911f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Destination_2", 2001756, 0, 4167293, 4, { 27.219801f, 13.000000f, 51.848900f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Pointofambush", 2001434, 0, 3983423, 4, { -115.745300f, 0.015855f, -149.218002f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_6", 2005626, 0, 5877369, 4, { 77.408943f, 0.414342f, -249.317200f }, 0.991760f, 0.373482f, 0);
|
|
||||||
instance.addEObj( "Destination_3", 2001349, 0, 3954552, 4, { -241.410797f, 8.100866f, -32.214520f }, 0.991789f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "Entrance_1", 2002704, 0, 4374431, 4, { -282.678894f, -6.417949f, -376.681305f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "unknown_7", 2004241, 1668222, 4740570, 4, { 118.988602f, 31.920019f, -392.048187f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Destination_4", 2002097, 0, 4296717, 4, { 200.596802f, -1.452231f, -312.203491f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "Destination_5", 2002098, 0, 4296718, 4, { 192.300797f, -0.025306f, -336.868805f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Destination_6", 2002099, 0, 4296720, 4, { 176.606506f, -0.096808f, -303.092194f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "Destination_7", 2002100, 0, 4296725, 4, { 164.392899f, -0.045770f, -315.728485f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "Destination_8", 2001019, 0, 4298981, 4, { -276.600311f, -3.799561f, -368.764801f }, 0.991760f, 0.740418f, 0);
|
|
||||||
instance.addEObj( "unknown_8", 2005071, 0, 5572885, 4, { -289.711914f, 22.829769f, -56.321770f }, 0.991760f, -0.956020f, 0);
|
|
||||||
instance.addEObj( "Faintlight", 2005072, 0, 5572886, 4, { -289.696686f, 22.834881f, -56.297989f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Destination_9", 2005069, 0, 5608173, 4, { -289.149292f, 22.816700f, -56.654640f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Destination_10", 2005070, 0, 5608174, 4, { -289.149292f, 22.816700f, -56.654598f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Destination_11", 2002439, 0, 4308108, 4, { -232.800003f, -28.782459f, 125.320000f }, 0.500000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Aetherometer", 2002440, 0, 4308110, 4, { -232.800003f, -28.933500f, 125.320000f }, 1.000000f, -0.000000f, 0);
|
|
||||||
instance.addEObj( "Sprigganscratchings", 2005969, 0, 5900203, 4, { -4.520000f, 27.709999f, -422.200012f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Sprigganscratchings_1", 2005970, 0, 5900225, 4, { -29.160000f, 27.430000f, -417.970001f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Sprigganscratchings_2", 2005971, 0, 5900229, 4, { -11.630000f, 34.040001f, -458.589996f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "unknown_9", 2001853, 0, 4236105, 4, { 202.637894f, 14.137880f, 536.905212f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Destination_12", 2001427, 0, 3978247, 4, { 246.948807f, -17.084700f, -131.469604f }, 1.000000f, 0.258268f, 0);
|
|
||||||
instance.addEObj( "unknown_10", 2004678, 0, 5020860, 4, { -97.079391f, -11.350000f, -51.853180f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "???", 2004109, 0, 4722044, 4, { -277.332794f, -0.215080f, -324.116913f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_11", 2004275, 0, 4745260, 4, { 71.205780f, 1.190876f, 250.311096f }, 1.000000f, 1.423589f, 0);
|
|
||||||
instance.addEObj( "Molehill", 2004276, 0, 4745261, 4, { 70.267899f, 1.233000f, 250.565201f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Weedbundle", 2004277, 0, 4745262, 4, { 70.267700f, 1.205444f, 250.537796f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_12", 2004617, 0, 4996407, 4, { -173.785004f, 16.128719f, 276.325592f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_13", 2004848, 0, 5617264, 4, { -199.578003f, 18.684820f, -435.402588f }, 1.000000f, 1.257978f, 0);
|
|
||||||
instance.addEObj( "unknown_14", 2004849, 0, 5617265, 4, { -201.573898f, 18.640739f, -435.082489f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "unknown_15", 2004852, 0, 5617283, 4, { -199.034897f, 18.694820f, -434.904205f }, 1.000000f, 1.085238f, 0);
|
|
||||||
instance.addEObj( "unknown_16", 2004853, 0, 5617285, 4, { -199.572800f, 18.631229f, -431.662506f }, 0.991760f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "unknown_17", 2004854, 0, 5617286, 4, { -201.211700f, 18.631580f, -434.045593f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Barreltrap", 2000741, 0, 3708874, 4, { 15.797450f, 0.709689f, -59.381630f }, 0.991789f, 0.514131f, 0);
|
|
||||||
instance.addEObj( "Barreltrap_1", 2000742, 0, 3708875, 4, { 10.260200f, 2.658585f, -28.125950f }, 1.000000f, 0.850329f, 0);
|
|
||||||
instance.addEObj( "Narrowfissure", 2000268, 0, 3505674, 4, { 25.690830f, 13.106330f, 47.828960f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Amajina&Sonscoffer", 2000300, 0, 3727742, 4, { -265.766388f, 22.903749f, -69.596443f }, 0.991760f, -0.009252f, 0);
|
|
||||||
instance.addEObj( "Amajina&Sonscoffer_1", 2000753, 0, 3739377, 4, { -225.100204f, 16.741150f, -57.722778f }, 0.991760f, 0.689701f, 0);
|
|
||||||
instance.addEObj( "Amajina&Sonscoffer_2", 2000754, 0, 3739388, 4, { -262.592499f, 29.007320f, -118.455803f }, 0.991760f, -1.191682f, 0);
|
|
||||||
instance.addEObj( "unknown_18", 2001851, 0, 4217146, 4, { -228.542099f, -30.788321f, 117.384300f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Shrewhill", 2000372, 0, 3630537, 4, { 57.299252f, 1.010623f, 247.151703f }, 1.287683f, 0.000336f, 0);
|
|
||||||
instance.addEObj( "Shrewhill_1", 2000374, 0, 3630544, 4, { 60.213860f, 1.177293f, 239.561600f }, 0.967427f, 0.000240f, 0);
|
|
||||||
instance.addEObj( "Shrewhill_2", 2000373, 0, 3630546, 4, { 68.021507f, 1.098406f, 245.075699f }, 1.213247f, 0.000144f, 0);
|
|
||||||
instance.addEObj( "Pockmarkedsilverore", 2000375, 0, 3632982, 4, { 159.001205f, -1.731532f, -232.957596f }, 1.000000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "Pockmarkedsilverore_1", 2000377, 0, 3632985, 4, { -134.696396f, 6.168209f, -116.593903f }, 0.961271f, 0.000144f, 0);
|
|
||||||
instance.addEObj( "Pockmarkedsilverore_2", 2000378, 0, 3632986, 4, { -95.958344f, -1.021936f, -163.731293f }, 0.961271f, 0.000144f, 0);
|
|
||||||
instance.addEObj( "Pockmarkedsilverore_3", 2000379, 0, 3632987, 4, { -103.937500f, 0.491295f, -213.694504f }, 0.900235f, 0.000336f, 0);
|
|
||||||
instance.addEObj( "Pockmarkedsilverore_4", 2000380, 0, 3632988, 4, { -1.174594f, -1.322406f, -111.266403f }, 0.991789f, 0.000048f, 0);
|
|
||||||
instance.addEObj( "RawNashachite", 2001378, 0, 3955833, 4, { 127.371201f, 28.603861f, -22.765230f }, 0.991760f, -1.270970f, 0);
|
|
||||||
instance.addEObj( "RawNashachite_1", 2001379, 0, 3955838, 4, { 143.765594f, 28.623640f, -17.852400f }, 0.991760f, 0.647398f, 0);
|
|
||||||
instance.addEObj( "RawNashachite_2", 2001380, 0, 3955842, 4, { 122.105797f, 28.727579f, -13.419090f }, 0.991789f, 0.472838f, 0);
|
|
||||||
instance.addEObj( "unknown_19", 2001740, 0, 4164999, 4, { 127.962799f, 28.633619f, -20.062349f }, 1.200000f, 0.000000f, 0);
|
|
||||||
instance.addEObj( "unknown_20", 2005030, 0, 5448851, 4, { -79.052963f, -11.720520f, -70.536484f }, 1.000000f, -0.464448f, 0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void onUpdate( InstanceContent& instance, uint64_t tickCount ) override
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void onEnterTerritory( InstanceContent& instance, Entity::Player& player, uint32_t eventId, uint16_t param1,
|
|
||||||
uint16_t param2 ) override
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
EXPOSE_SCRIPT( HeroontheHalfshell );
|
|
138
src/scripts/quest/ManFst309.cpp
Normal file
138
src/scripts/quest/ManFst309.cpp
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, move it to the correct folder in <root>/scripts/
|
||||||
|
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: ManFst309_00516
|
||||||
|
// Quest Name: Wrath of the Titan
|
||||||
|
// Quest ID: 66052
|
||||||
|
// Start NPC: 1006688
|
||||||
|
// End NPC: 1006264
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class ManFst309 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1003281
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006264
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006688;//Minfilia
|
||||||
|
static constexpr auto Actor1 = 1003281;//R'ashaht Rhiki
|
||||||
|
static constexpr auto Actor2 = 1006264;//Trachtoum
|
||||||
|
static constexpr auto CutManfst30910 = 97;
|
||||||
|
static constexpr auto LocActor0 = 1002441;
|
||||||
|
static constexpr auto LocActor1 = 1003782;
|
||||||
|
static constexpr auto LocActor3 = 1003248;
|
||||||
|
static constexpr auto LocPosActor0 = 4314583;
|
||||||
|
|
||||||
|
public:
|
||||||
|
ManFst309() : Sapphire::ScriptAPI::QuestScript( 66052 ){};
|
||||||
|
~ManFst309() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &ManFst309::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &ManFst309::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &ManFst309::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &ManFst309::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult(1) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( ManFst309 );
|
|
@ -78,7 +78,7 @@ private:
|
||||||
{
|
{
|
||||||
if( result.getResult( 0 ) == 1 )// accept quest
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
{
|
{
|
||||||
Scene00000( quest, player );
|
Scene00001( quest, player );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,8 +44,8 @@ private:
|
||||||
static constexpr auto Actor0 = 1011732;//HORTEFENSE
|
static constexpr auto Actor0 = 1011732;//HORTEFENSE
|
||||||
static constexpr auto Actor1 = 1011735;//House Valentione Emissary (Limsa)
|
static constexpr auto Actor1 = 1011735;//House Valentione Emissary (Limsa)
|
||||||
static constexpr auto Actor2 = 1011743;//Berndan
|
static constexpr auto Actor2 = 1011743;//Berndan
|
||||||
static constexpr auto Actor3 = 1011745;
|
static constexpr auto Actor3 = 1011745;//Philippe?
|
||||||
static constexpr auto Actor4 = 1011747;
|
static constexpr auto Actor4 = 1011747;//Thrydwulf
|
||||||
static constexpr auto Item0 = 2001558;
|
static constexpr auto Item0 = 2001558;
|
||||||
static constexpr auto LocActor0 = 1011742;
|
static constexpr auto LocActor0 = 1011742;
|
||||||
static constexpr auto LocActor1 = 1011796;
|
static constexpr auto LocActor1 = 1011796;
|
||||||
|
@ -98,10 +98,14 @@ public:
|
||||||
}
|
}
|
||||||
case Actor3:
|
case Actor3:
|
||||||
{
|
{
|
||||||
|
if( quest.getSeq() == Seq2 )
|
||||||
|
Scene00006( quest, player );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Actor4:
|
case Actor4:
|
||||||
{
|
{
|
||||||
|
if( quest.getSeq() == Seq2 )
|
||||||
|
Scene00008( quest, player );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -211,6 +215,8 @@ private:
|
||||||
|
|
||||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
{
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -235,8 +241,8 @@ private:
|
||||||
|
|
||||||
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
{
|
{
|
||||||
if( result.getResult( 0 ) == 1 )
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
Scene00010( quest, player );
|
quest.setSeq( SeqFinish );
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
137
src/scripts/quest/subquest/blackshroud_north/GaiUsa801.cpp
Normal file
137
src/scripts/quest/subquest/blackshroud_north/GaiUsa801.cpp
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, move it to the correct folder in <root>/scripts/
|
||||||
|
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: GaiUsa801_00785
|
||||||
|
// Quest Name: Ziz Is So Ridiculous
|
||||||
|
// Quest ID: 66321
|
||||||
|
// Start NPC: 1006241
|
||||||
|
// End NPC: 1006241
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsa801 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 5 Listener: 179
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006241
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006241;//Aideen
|
||||||
|
static constexpr auto Enemy0 = 224;//Ziz (INCORRECT: 179)
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsa801() : Sapphire::ScriptAPI::QuestScript( 66321 ){};
|
||||||
|
~GaiUsa801() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
else if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( nameId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 6 );
|
||||||
|
if( quest.getUI8AL() >= 6 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa801::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsa801 );
|
170
src/scripts/quest/subquest/blackshroud_north/GaiUsa802.cpp
Normal file
170
src/scripts/quest/subquest/blackshroud_north/GaiUsa802.cpp
Normal file
|
@ -0,0 +1,170 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, move it to the correct folder in <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: GaiUsa802_00786
|
||||||
|
// Quest Name: Seeing Eye to Winged Eye
|
||||||
|
// Quest ID: 66322
|
||||||
|
// Start NPC: 1006242
|
||||||
|
// End NPC: 1006242
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsa802 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2001982
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 5 Listener: 1899
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006242;//Ivaurault
|
||||||
|
static constexpr auto Enemy0 = 4285321;
|
||||||
|
static constexpr auto Eobject0 = 2001982;
|
||||||
|
static constexpr auto EventActionLookoutLong = 41;
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsa802() : Sapphire::ScriptAPI::QuestScript( 66322 ){};
|
||||||
|
~GaiUsa802() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
else if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionLookoutLong,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00003( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
auto enemySpawned = instance->getActiveBNpcByInstanceIdAndTriggerOwner( Enemy0, player.getId() );
|
||||||
|
|
||||||
|
if( !enemySpawned )
|
||||||
|
{
|
||||||
|
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa802::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult(1) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsa802 );
|
371
src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp
Normal file
371
src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp
Normal file
|
@ -0,0 +1,371 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, move it to the correct folder in <root>/scripts/
|
||||||
|
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: GaiUsa803_00787
|
||||||
|
// Quest Name: Rock of Rancor
|
||||||
|
// Quest ID: 66323
|
||||||
|
// Start NPC: 1006241
|
||||||
|
// End NPC: 1006241
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsa803 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AH
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
// UI8BL
|
||||||
|
// UI8CH
|
||||||
|
// UI8CL
|
||||||
|
// UI8DH
|
||||||
|
// UI8DL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2001983
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 8 Listener: 2001983
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2001984
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
Seq2 = 2,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006241; //Aideen
|
||||||
|
static constexpr auto Eobject0 = 2001983;//AOE Item Target
|
||||||
|
static constexpr auto Eobject1 = 2001984;//Humming Crystal
|
||||||
|
static constexpr auto Eobject2 = 2001985;//Humming Crystal
|
||||||
|
static constexpr auto Eobject3 = 2001986;//Humming Crystal
|
||||||
|
static constexpr auto Eobject4 = 2001987;//Humming Crystal
|
||||||
|
static constexpr auto Eobject5 = 2001988;//Humming Crystal
|
||||||
|
static constexpr auto EventActionSearchMiddle = 3;
|
||||||
|
static constexpr auto Item0 = 2000616;
|
||||||
|
static constexpr auto Item1 = 2000617;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsa803() : Sapphire::ScriptAPI::QuestScript( 66323 ){};
|
||||||
|
~GaiUsa803() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
else if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00014( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject1:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearchMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00004( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject2:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearchMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00006( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject3:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearchMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00008( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject4:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearchMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00010( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject5:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearchMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00012( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: This doesn't exist, leaving it behind as a note
|
||||||
|
void onEventAOEItem( World::Quest& quest, Entity::Player& player, uint64_t actorId )
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 && actorId == Eobject0 )
|
||||||
|
{
|
||||||
|
Scene00003( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AH(), 5 );//TODO:Show Item Icon
|
||||||
|
if( quest.getUI8AH() >= 5 )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( quest.getUI8DH() );
|
||||||
|
quest.setUI8BL( quest.getUI8DL() );
|
||||||
|
quest.setUI8AH( 0 );
|
||||||
|
quest.setUI8AL( 0 );
|
||||||
|
quest.setUI8CH( 0 );
|
||||||
|
quest.setUI8CL( 0 );
|
||||||
|
quest.setUI8DH( 0 );
|
||||||
|
quest.setUI8DL( 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setUI8DH( 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 1 );
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8DL( quest.getUI8DL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8DL( quest.getUI8DL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BL( 1 );
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8DL( quest.getUI8DL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00010( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 10, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00010Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8CH( 1 );
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8DL( quest.getUI8DL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00011( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 11, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00011Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00012( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 12, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00012Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00012Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8CL( 1 );
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8DL( quest.getUI8DL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00013( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 13, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00013Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00013Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00014( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 14, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00014Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00014Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00015( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00015( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 15, HIDE_HOTBAR, bindSceneReturn( &GaiUsa803::Scene00015Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00015Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsa803 );
|
250
src/scripts/quest/subquest/blackshroud_north/GaiUsa904.cpp
Normal file
250
src/scripts/quest/subquest/blackshroud_north/GaiUsa904.cpp
Normal file
|
@ -0,0 +1,250 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, move it to the correct folder in <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: GaiUsa904_00799
|
||||||
|
// Quest Name: Power of Deduction
|
||||||
|
// Quest ID: 66335
|
||||||
|
// Start NPC: 1006240
|
||||||
|
// End NPC: 1002780
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsa904 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 10 Listener: 5000000
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1007541
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006240;
|
||||||
|
static constexpr auto Actor1 = 1007541;//Mangled Corpse
|
||||||
|
static constexpr auto Actor2 = 1002780;//Aethelmaer
|
||||||
|
static constexpr auto Enemy0 = 4299601;//Floating Eye
|
||||||
|
static constexpr auto Eobject0 = 2002462;
|
||||||
|
static constexpr auto Eventrange0 = 4299594;
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto Item0 = 2000861;//Ravaged Corpse (UI8BH)
|
||||||
|
static constexpr auto LocAction1 = 788;
|
||||||
|
static constexpr auto LocAction2 = 981;
|
||||||
|
static constexpr auto LocActor0 = 1006240;
|
||||||
|
static constexpr auto LocActor1 = 1006241;
|
||||||
|
static constexpr auto LocActor2 = 1006242;
|
||||||
|
static constexpr auto LocActor4 = 1007541;
|
||||||
|
static constexpr auto LocActor5 = 1007643;
|
||||||
|
static constexpr auto LocPosActor = 4329140;
|
||||||
|
static constexpr auto LocPosActor1 = 4256813;
|
||||||
|
static constexpr auto LocPosActor2 = 4256814;
|
||||||
|
static constexpr auto LocPosActor4 = 4329223;
|
||||||
|
static constexpr auto LocPosActor5 = 4329392;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsa904() : Sapphire::ScriptAPI::QuestScript( 66335 ){};
|
||||||
|
~GaiUsa904() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getUI8AL() != 0 )
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00004( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
else
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00007( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 1 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( World::Quest& quest, Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
if( param1 == Eventrange0 )
|
||||||
|
{
|
||||||
|
Scene00002( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa904::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
|
||||||
|
auto enemySpawned = instance->getActiveBNpcByInstanceIdAndTriggerOwner( Enemy0, player.getId() );
|
||||||
|
|
||||||
|
if( !enemySpawned && quest.getUI8AL() < 1)
|
||||||
|
{
|
||||||
|
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//The Enemy is still about!
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsa904::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa904::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsa904 );
|
232
src/scripts/quest/subquest/blackshroud_north/GaiUsa905.cpp
Normal file
232
src/scripts/quest/subquest/blackshroud_north/GaiUsa905.cpp
Normal file
|
@ -0,0 +1,232 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, move it to the correct folder in <root>/scripts/
|
||||||
|
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: GaiUsa905_00800
|
||||||
|
// Quest Name: Secret of the White Lily
|
||||||
|
// Quest ID: 66336
|
||||||
|
// Start NPC: 1002780
|
||||||
|
// End NPC: 1006263
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsa905 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1000100
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 1000146
|
||||||
|
/// Countable Num: 0 Seq: 3 Event: 1 Listener: 1000248
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006263
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
Seq2 = 2,
|
||||||
|
Seq3 = 3,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1002780;//Aethelmaer
|
||||||
|
static constexpr auto Actor1 = 1000100;//Mother Miounne
|
||||||
|
static constexpr auto Actor2 = 1000146;//Bernadette
|
||||||
|
static constexpr auto Actor3 = 1000248;//Ceinguled
|
||||||
|
static constexpr auto Actor4 = 1006263;//Ursandel
|
||||||
|
static constexpr auto Item0 = 2000630;//Lily Button (UI8BH)
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsa905() : Sapphire::ScriptAPI::QuestScript( 66336 ){};
|
||||||
|
~GaiUsa905() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq2 )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor3:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq3 )
|
||||||
|
Scene00006( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor4:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00005( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setSeq( Seq3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00007( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 2, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00009( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsa905::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsa905 );
|
258
src/scripts/quest/subquest/blackshroud_south/GaiUsb008.cpp
Normal file
258
src/scripts/quest/subquest/blackshroud_south/GaiUsb008.cpp
Normal file
|
@ -0,0 +1,258 @@
|
||||||
|
// 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: GaiUsb008_00815
|
||||||
|
// Quest Name: The Penitent Man
|
||||||
|
// Quest ID: 66351
|
||||||
|
// Start NPC: 1006279
|
||||||
|
// End NPC: 1006279
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb008 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002038
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 5 Listener: 2194
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 8 Listener: 2194
|
||||||
|
// 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 = 1006279;//Landenel
|
||||||
|
static constexpr auto Enemy0 = 4292783;
|
||||||
|
static constexpr auto Enemy1 = 2194;
|
||||||
|
static constexpr auto Eobject0 = 2002038;//Brownie Brush (Seq1)
|
||||||
|
static constexpr auto Eobject1 = 2002037;
|
||||||
|
static constexpr auto Eobject2 = 2002039;//Brownie Brush (Seq2)
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto EventActionSearchMiddle = 3;
|
||||||
|
static constexpr auto Item0 = 2000959;
|
||||||
|
static constexpr auto Item1 = 2000638;
|
||||||
|
static constexpr auto LocActor0 = 1006283;
|
||||||
|
static constexpr auto LocPosActor0 = 4256141;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb008() : Sapphire::ScriptAPI::QuestScript( 66351 ){};
|
||||||
|
~GaiUsb008() = 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 )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00003( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject2:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearchMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00005( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
quest.setUI8BH( 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Enemy1:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
if( actorId == Enemy0 )
|
||||||
|
{
|
||||||
|
//TODO:Debuff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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( &GaiUsb008::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb008::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsb008::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( &GaiUsb008::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
enemy0->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb008::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( &GaiUsb008::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb008::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( &GaiUsb008::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb008::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00009( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsb008::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult(1) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb008 );
|
187
src/scripts/quest/subquest/blackshroud_south/GaiUsb009.cpp
Normal file
187
src/scripts/quest/subquest/blackshroud_south/GaiUsb009.cpp
Normal file
|
@ -0,0 +1,187 @@
|
||||||
|
// 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: GaiUsb009_00816
|
||||||
|
// Quest Name: Changing of the Guard
|
||||||
|
// Quest ID: 66352
|
||||||
|
// Start NPC: 1006279
|
||||||
|
// End NPC: 1006279
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb009 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AH
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
// UI8BL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006280
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006281
|
||||||
|
// 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 = 1006279;//Landenel
|
||||||
|
static constexpr auto Actor1 = 1006280;
|
||||||
|
static constexpr auto Actor2 = 1006281;
|
||||||
|
static constexpr auto Actor3 = 1006282;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb009() : Sapphire::ScriptAPI::QuestScript( 66352 ){};
|
||||||
|
~GaiUsb009() = 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 )
|
||||||
|
Scene00005( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor3:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AH(), 3 );
|
||||||
|
if( quest.getUI8AH() >= 3 )
|
||||||
|
{
|
||||||
|
quest.setUI8AH( 0 );
|
||||||
|
quest.setUI8AL( 0 );
|
||||||
|
quest.setUI8BH( 0 );
|
||||||
|
quest.setUI8BL( 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb009::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( &GaiUsb009::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( &GaiUsb009::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8AL( 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb009::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb009::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );
|
||||||
|
quest.setUI8BL( 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsb009::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb009 );
|
288
src/scripts/quest/subquest/blackshroud_south/GaiUsb012.cpp
Normal file
288
src/scripts/quest/subquest/blackshroud_south/GaiUsb012.cpp
Normal file
|
@ -0,0 +1,288 @@
|
||||||
|
// 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: GaiUsb012_00819
|
||||||
|
// Quest Name: Trial by Turtle
|
||||||
|
// Quest ID: 66355
|
||||||
|
// Start NPC: 1006279
|
||||||
|
// End NPC: 1004917
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb012 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002646
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 5 Listener: 1888
|
||||||
|
/// Countable Num: 0 Seq: 3 Event: 1 Listener: 2002043
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002574
|
||||||
|
// 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 = 1006279;//Landenel
|
||||||
|
static constexpr auto Actor1 = 1004917;//U'odh Nunh
|
||||||
|
static constexpr auto Enemy0 = 4292977;
|
||||||
|
static constexpr auto Eobject0 = 2002646;//Adamantoise Egg (Seq1)
|
||||||
|
static constexpr auto Eobject1 = 2002043;
|
||||||
|
static constexpr auto Eobject2 = 2002574;//Adanantoise Egg (Seq2)
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto Item0 = 2000641;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb012() : Sapphire::ScriptAPI::QuestScript( 66355 ){};
|
||||||
|
~GaiUsb012() = 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() == Seq3 )
|
||||||
|
Scene00010( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00012( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00003( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject2:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00005( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::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( &GaiUsb012::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( &GaiUsb012::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( &GaiUsb012::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
auto enemySpawned = instance->getActiveBNpcByInstanceIdAndTriggerOwner( Enemy0, player.getId() );
|
||||||
|
if( !enemySpawned )
|
||||||
|
{
|
||||||
|
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::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( &GaiUsb012::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
quest.setSeq( Seq3 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::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( &GaiUsb012::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::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, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00010( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 10, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::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, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::Scene00011Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 2, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
quest.setUI8BH( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00012( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 12, HIDE_HOTBAR, bindSceneReturn( &GaiUsb012::Scene00012Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00012Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult( 1 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb012 );
|
198
src/scripts/quest/subquest/gridania/GaiUsa906.cpp
Normal file
198
src/scripts/quest/subquest/gridania/GaiUsa906.cpp
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
// This is an automatically generated C++ script template
|
||||||
|
// Content needs to be added by hand to make it function
|
||||||
|
// In order for this script to be loaded, move it to the correct folder in <root>/scripts/
|
||||||
|
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
|
||||||
|
// Quest Script: GaiUsa906_00801
|
||||||
|
// Quest Name: Skeletons in Her Closet
|
||||||
|
// Quest ID: 66337
|
||||||
|
// Start NPC: 1006263
|
||||||
|
// End NPC: 1006688
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsa906 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2001999
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 5010000
|
||||||
|
/// Countable Num: 0 Seq: 3 Event: 15 Listener: 5020000
|
||||||
|
/// Countable Num: 0 Seq: 4 Event: 1 Listener: 1006263
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006688
|
||||||
|
// Steps in this quest ( 0 is before accepting,
|
||||||
|
// 1 is first, 255 means ready for turning it in
|
||||||
|
enum Sequence : uint8_t
|
||||||
|
{
|
||||||
|
Seq0 = 0,
|
||||||
|
Seq1 = 1,
|
||||||
|
Seq2 = 2,
|
||||||
|
Seq3 = 3,//Fake Sequence for cutscene
|
||||||
|
Seq4 = 4,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006263;//Ursandel
|
||||||
|
static constexpr auto Actor2 = 1006688;
|
||||||
|
static constexpr auto CutScene01 = 370;
|
||||||
|
static constexpr auto Eobject0 = 2001999;//Manor Gate
|
||||||
|
static constexpr auto EventActionTouchMiddle = 46;
|
||||||
|
static constexpr auto Instancedungeon0 = 6;
|
||||||
|
static constexpr auto LocFace0 = 604;
|
||||||
|
static constexpr auto LocFace1 = 617;
|
||||||
|
static constexpr auto Poprange0 = 4332869;
|
||||||
|
static constexpr auto Territorytype0 = 148;
|
||||||
|
static constexpr auto UnlockAddNewContentToCf = 3702;
|
||||||
|
static constexpr auto UnlockImageDungeonHaukke = 80;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsa906() : Sapphire::ScriptAPI::QuestScript( 66337 ){};
|
||||||
|
~GaiUsa906() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
else if( quest.getSeq() == Seq4 )
|
||||||
|
Scene00005( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00006( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionTouchMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00003( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( World::Quest& quest, Entity::Player& player, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq3 )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa906::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//TODO: Unlock Haukke Manor
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa906::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 2, 0 );
|
||||||
|
quest.setSeq( Seq4 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsa906::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 3, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsa906::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult(1) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsa906 );
|
271
src/scripts/quest/subquest/lanoscea_east/GaiUsb005.cpp
Normal file
271
src/scripts/quest/subquest/lanoscea_east/GaiUsb005.cpp
Normal file
|
@ -0,0 +1,271 @@
|
||||||
|
// 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: GaiUsb005_00812
|
||||||
|
// Quest Name: Nix That
|
||||||
|
// Quest ID: 66348
|
||||||
|
// Start NPC: 1006266
|
||||||
|
// End NPC: 1006266
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb005 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002035
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 8 Listener: 2002035
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002639
|
||||||
|
// 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 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Enemy0 = 4292674;
|
||||||
|
static constexpr auto Eobject0 = 2002035;//Destination (Seq1)
|
||||||
|
static constexpr auto Eobject1 = 2002639;//Destination (Seq2)
|
||||||
|
static constexpr auto Eobject2 = 2002638;
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto EventActionWaiting2Middle = 12;
|
||||||
|
static constexpr auto Item0 = 2000636;
|
||||||
|
static constexpr auto Item1 = 2000637;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb005() : Sapphire::ScriptAPI::QuestScript( 66348 ){};
|
||||||
|
~GaiUsb005() = 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 )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject1:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionWaiting2Middle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00005( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 && actorId == Eobject0 )
|
||||||
|
{
|
||||||
|
Scene00003( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::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( &GaiUsb005::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//Opens KeyItem Inventory
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setUI8BH( 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::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( &GaiUsb005::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
|
||||||
|
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
|
||||||
|
enemy0->hateListAddDelayed( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::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( &GaiUsb005::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00009( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00010( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 10, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::Scene00010Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00011( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 11, HIDE_HOTBAR, bindSceneReturn( &GaiUsb005::Scene00011Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb005 );
|
111
src/scripts/quest/subquest/lanoscea_east/GaiUsb007.cpp
Normal file
111
src/scripts/quest/subquest/lanoscea_east/GaiUsb007.cpp
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
// 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: GaiUsb007_00814
|
||||||
|
// Quest Name: A Modest Proposal
|
||||||
|
// Quest ID: 66350
|
||||||
|
// Start NPC: 1006266
|
||||||
|
// End NPC: 1006279
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb007 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006279
|
||||||
|
// 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 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Actor1 = 1006279;//Landenel
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb007() : Sapphire::ScriptAPI::QuestScript( 66350 ){};
|
||||||
|
~GaiUsb007() = 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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( &GaiUsb007::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( &GaiUsb007::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsb007::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb007 );
|
207
src/scripts/quest/subquest/lanoscea_east/GaiUsb201.cpp
Normal file
207
src/scripts/quest/subquest/lanoscea_east/GaiUsb201.cpp
Normal file
|
@ -0,0 +1,207 @@
|
||||||
|
// 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: GaiUsb201_00832
|
||||||
|
// Quest Name: The Things We Do for Cheese
|
||||||
|
// Quest ID: 66368
|
||||||
|
// Start NPC: 1006266
|
||||||
|
// End NPC: 1006266
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb201 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006267
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 1006268
|
||||||
|
/// Countable Num: 0 Seq: 3 Event: 1 Listener: 5010000
|
||||||
|
/// Countable Num: 0 Seq: 4 Event: 1 Listener: 1006268
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006268
|
||||||
|
// 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,
|
||||||
|
Seq4 = 4,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Actor1 = 1006267;//Ozun Nazun
|
||||||
|
static constexpr auto Actor2 = 1006268;//Brayflox Alltalks
|
||||||
|
static constexpr auto ContentStart = 8;
|
||||||
|
static constexpr auto GobMotBow = 957;
|
||||||
|
static constexpr auto GobMotTalk = 949;
|
||||||
|
static constexpr auto Instancedungeon0 = 8;
|
||||||
|
static constexpr auto Item0 = 2000864;
|
||||||
|
static constexpr auto LocAction1 = 957;
|
||||||
|
static constexpr auto LocAction2 = 945;
|
||||||
|
static constexpr auto UnlockAddNewContentToCf = 3702;
|
||||||
|
static constexpr auto UnlockImageDungeon = 79;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb201() : Sapphire::ScriptAPI::QuestScript( 66368 ){};
|
||||||
|
~GaiUsb201() = 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 )
|
||||||
|
Scene00006( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq2 )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
else if( quest.getSeq() == Seq3 )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
else if( quest.getSeq() == Seq4 )
|
||||||
|
Scene00005( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb201::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( &GaiUsb201::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( &GaiUsb201::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( &GaiUsb201::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//TODO:Unlock Dungeon
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setSeq( Seq3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb201::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, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb201::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 3, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb201::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00007( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsb201::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb201 );
|
149
src/scripts/quest/subquest/lanoscea_east/GaiUsb208.cpp
Normal file
149
src/scripts/quest/subquest/lanoscea_east/GaiUsb208.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: GaiUsb208_00839
|
||||||
|
// Quest Name: What Do You Mean You Forgot the Wine
|
||||||
|
// Quest ID: 66375
|
||||||
|
// Start NPC: 1006266
|
||||||
|
// End NPC: 1006305
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb208 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006272
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006305
|
||||||
|
// 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 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Actor1 = 1006272;//Dyrstweitz
|
||||||
|
static constexpr auto Actor2 = 1006305;//Shamani Lohmani
|
||||||
|
static constexpr auto Item0 = 2000653;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb208() : Sapphire::ScriptAPI::QuestScript( 66375 ){};
|
||||||
|
~GaiUsb208() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb208::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( &GaiUsb208::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( &GaiUsb208::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb208::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb208::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( GaiUsb208 );
|
128
src/scripts/quest/subquest/lanoscea_east/GaiUsb209.cpp
Normal file
128
src/scripts/quest/subquest/lanoscea_east/GaiUsb209.cpp
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
// 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: GaiUsb209_00840
|
||||||
|
// Quest Name: An Offer You Can Refuse
|
||||||
|
// Quest ID: 66376
|
||||||
|
// Start NPC: 1006305
|
||||||
|
// End NPC: 1006305
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb209 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006306
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006305
|
||||||
|
// 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 = 1006305;//Shamani Lohmani
|
||||||
|
static constexpr auto Actor1 = 1006306;//Byrglaent
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb209() : Sapphire::ScriptAPI::QuestScript( 66376 ){};
|
||||||
|
~GaiUsb209() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
else if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb209::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( &GaiUsb209::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( &GaiUsb209::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb209::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( GaiUsb209 );
|
160
src/scripts/quest/subquest/lanoscea_east/GaiUsb212.cpp
Normal file
160
src/scripts/quest/subquest/lanoscea_east/GaiUsb212.cpp
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
// 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: GaiUsb212_00843
|
||||||
|
// Quest Name: It Won't Work
|
||||||
|
// Quest ID: 66379
|
||||||
|
// Start NPC: 1006305
|
||||||
|
// End NPC: 1006305
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb212 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006308
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006309
|
||||||
|
// 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 = 1006305;//Shamani Lohmani
|
||||||
|
static constexpr auto Actor1 = 1006308;//Durim Falurim
|
||||||
|
static constexpr auto Actor2 = 1006309;//Jungbhar
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb212() : Sapphire::ScriptAPI::QuestScript( 66379 ){};
|
||||||
|
~GaiUsb212() = 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;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 2 );
|
||||||
|
if( quest.getUI8AL() >= 2 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb212::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( &GaiUsb212::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( &GaiUsb212::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb212::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 2, true );
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb212::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( GaiUsb212 );
|
149
src/scripts/quest/subquest/lanoscea_east/GaiUsb304.cpp
Normal file
149
src/scripts/quest/subquest/lanoscea_east/GaiUsb304.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: GaiUsb304_00845
|
||||||
|
// Quest Name: Give a Man a Drink
|
||||||
|
// Quest ID: 66381
|
||||||
|
// Start NPC: 1006305
|
||||||
|
// End NPC: 1006312
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb304 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006311
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006312
|
||||||
|
// 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 = 1006305;//Shamani Lohmani
|
||||||
|
static constexpr auto Actor1 = 1006311;//RHIITSKYLT
|
||||||
|
static constexpr auto Actor2 = 1006312;//DREST
|
||||||
|
static constexpr auto Item0 = 2000655;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb304() : Sapphire::ScriptAPI::QuestScript( 66381 ){};
|
||||||
|
~GaiUsb304() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb304::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( &GaiUsb304::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( &GaiUsb304::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb304::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb304::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb304 );
|
126
src/scripts/quest/subquest/lanoscea_east/GaiUsb305.cpp
Normal file
126
src/scripts/quest/subquest/lanoscea_east/GaiUsb305.cpp
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
// 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: GaiUsb305_00846
|
||||||
|
// Quest Name: That Weight
|
||||||
|
// Quest ID: 66382
|
||||||
|
// Start NPC: 1006312
|
||||||
|
// End NPC: 1006312
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb305 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 5 Listener: 136
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006312
|
||||||
|
// 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 = 1006312;//Drest
|
||||||
|
static constexpr auto Enemy0 = 396;//Dung Midge Swarm (INCORRECT:136)
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb305() : Sapphire::ScriptAPI::QuestScript( 66382 ){};
|
||||||
|
~GaiUsb305() = 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 layoutId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( nameId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 5 );
|
||||||
|
if( quest.getUI8AL() >= 5 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb305::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( &GaiUsb305::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( &GaiUsb305::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( GaiUsb305 );
|
140
src/scripts/quest/subquest/lanoscea_east/GaiUsb306.cpp
Normal file
140
src/scripts/quest/subquest/lanoscea_east/GaiUsb306.cpp
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
// 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: GaiUsb306_00847
|
||||||
|
// Quest Name: Not My War
|
||||||
|
// Quest ID: 66383
|
||||||
|
// Start NPC: 1006312
|
||||||
|
// End NPC: 1006312
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb306 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 9 Listener: 117
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006312
|
||||||
|
// 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 = 1006312;//Drest
|
||||||
|
static constexpr auto Enemy0 = 352; //Jungle Coeurl (INCORRECT:117)
|
||||||
|
static constexpr auto Item0 = 2000656;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb306() : Sapphire::ScriptAPI::QuestScript( 66383 ){};
|
||||||
|
~GaiUsb306() = 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 layoutId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( nameId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
quest.setUI8BH( quest.getUI8BH() + 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8BH(), 4 );
|
||||||
|
|
||||||
|
if( quest.getUI8BH() >= 4 )
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb306::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( &GaiUsb306::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( &GaiUsb306::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( &GaiUsb306::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( GaiUsb306 );
|
253
src/scripts/quest/subquest/lanoscea_east/GaiUsb307.cpp
Normal file
253
src/scripts/quest/subquest/lanoscea_east/GaiUsb307.cpp
Normal file
|
@ -0,0 +1,253 @@
|
||||||
|
// 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: GaiUsb307_00848
|
||||||
|
// Quest Name: Battle Scars
|
||||||
|
// Quest ID: 66384
|
||||||
|
// Start NPC: 1006312
|
||||||
|
// End NPC: 1006305
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb307 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AH
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
// UI8BL
|
||||||
|
// UI8CH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002059
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002060
|
||||||
|
// 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 = 1006312;//Drest
|
||||||
|
static constexpr auto Actor1 = 1006305;//Shamani Lohmani
|
||||||
|
static constexpr auto Eobject0 = 2002059;
|
||||||
|
static constexpr auto Eobject1 = 2002060;
|
||||||
|
static constexpr auto Eobject2 = 2002061;
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto Item0 = 2000657;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb307() : Sapphire::ScriptAPI::QuestScript( 66384 ){};
|
||||||
|
~GaiUsb307() = 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 )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00002( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject1:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00004( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject2:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00006( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AH(), 3 );
|
||||||
|
if( quest.getUI8CH() >= 3 && quest.getUI8AH() >= 3 )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( quest.getUI8CH() );
|
||||||
|
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( &GaiUsb307::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( &GaiUsb307::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( &GaiUsb307::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 1 ); //Hide EObj
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );//Increment journal list
|
||||||
|
quest.setUI8CH( quest.getUI8CH() + 1 );//Increment KeyItem
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb307::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( &GaiUsb307::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 ); //Hide EObj
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );//Increment journal list
|
||||||
|
quest.setUI8CH( quest.getUI8CH() + 1 );//Increment KeyItem
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsb307::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb307::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BL( 1 ); //Hide EObj
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );//Increment journal list
|
||||||
|
quest.setUI8CH( quest.getUI8CH() + 1 );//Increment KeyItem
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsb307::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb307::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00009( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsb307::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult( 1 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb307 );
|
261
src/scripts/quest/subquest/lanoscea_east/GaiUsb309.cpp
Normal file
261
src/scripts/quest/subquest/lanoscea_east/GaiUsb309.cpp
Normal file
|
@ -0,0 +1,261 @@
|
||||||
|
// 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: GaiUsb309_00850
|
||||||
|
// Quest Name: It Was a Very Good Year
|
||||||
|
// Quest ID: 66386
|
||||||
|
// Start NPC: 1006305
|
||||||
|
// End NPC: 1006266
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb309 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006312
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 2002062
|
||||||
|
/// Countable Num: 0 Seq: 3 Event: 9 Listener: 1910
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006305
|
||||||
|
// 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 = 1006305;//Shamani Lohmani
|
||||||
|
static constexpr auto Actor1 = 1006312;//Drest
|
||||||
|
static constexpr auto Actor2 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Enemy0 = 4293297;
|
||||||
|
static constexpr auto Eobject0 = 2002062;//Destination
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto EventActionWaitingShor = 11;
|
||||||
|
static constexpr auto Item0 = 2000946;
|
||||||
|
static constexpr auto Item1 = 2000658;
|
||||||
|
static constexpr auto Item2 = 2000659;
|
||||||
|
static constexpr auto LocActor0 = 1006306;
|
||||||
|
static constexpr auto LocBgm1 = 82;
|
||||||
|
static constexpr auto LocFace1 = 617;
|
||||||
|
static constexpr auto LocFace2 = 605;
|
||||||
|
static constexpr auto LocFace3 = 619;
|
||||||
|
static constexpr auto LocPosActor0 = 4329615;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb309() : Sapphire::ScriptAPI::QuestScript( 66386 ){};
|
||||||
|
~GaiUsb309() = 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() == Seq3 )
|
||||||
|
Scene00006( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionWaitingShor,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00005( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
quest.setSeq( Seq3 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb309::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( &GaiUsb309::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsb309::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( &GaiUsb309::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setUI8BH( 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb309::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( &GaiUsb309::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value, Lv33*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
enemy0->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb309::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00007( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb309::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 2, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb309::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00009( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsb309::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb309 );
|
701
src/scripts/quest/subquest/lanoscea_east/GaiUsb313.cpp
Normal file
701
src/scripts/quest/subquest/lanoscea_east/GaiUsb313.cpp
Normal file
|
@ -0,0 +1,701 @@
|
||||||
|
// 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: GaiUsb313_00854
|
||||||
|
// Quest Name: A Final Ignominy
|
||||||
|
// Quest ID: 66390
|
||||||
|
// Start NPC: 1006266
|
||||||
|
// End NPC: 1006266
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb313 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
// UI8BL
|
||||||
|
// UI8CH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006272
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 2002676
|
||||||
|
/// Countable Num: 0 Seq: 3 Event: 1 Listener: 2002675
|
||||||
|
/// Countable Num: 0 Seq: 4 Event: 1 Listener: 2002072
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002073
|
||||||
|
// 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,
|
||||||
|
Seq4 = 4,
|
||||||
|
SeqFinish = 255,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Entities found in the script data of the quest
|
||||||
|
static constexpr auto Actor0 = 1006266; //Wheiskaet
|
||||||
|
static constexpr auto Actor1 = 1006272; //Dyrstweitz
|
||||||
|
static constexpr auto Eobject0 = 2002676;//Feasting Table (Seq2)
|
||||||
|
static constexpr auto Eobject1 = 2002675;//Feasting Table (Seq3)
|
||||||
|
static constexpr auto Eobject2 = 2002072;//Unknown/Decoration
|
||||||
|
static constexpr auto Eobject3 = 2002073;//Unknown/Decoration
|
||||||
|
static constexpr auto Eobject4 = 2002074;//Unknown/Decoration
|
||||||
|
static constexpr auto Eobject5 = 2002067;//Empty Space (Far)
|
||||||
|
static constexpr auto Eobject6 = 2002068;//Empty Space (Left)
|
||||||
|
static constexpr auto Eobject7 = 2002069;//Empty Space (Right)
|
||||||
|
static constexpr auto Eobject8 = 2002070;//Unknown/Decoration
|
||||||
|
static constexpr auto Eobject9 = 2002071;//Unknown/Decoration
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto Item0 = 2000662;
|
||||||
|
static constexpr auto Item1 = 2000663;
|
||||||
|
static constexpr auto Item2 = 2000664;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb313() : Sapphire::ScriptAPI::QuestScript( 66390 ){};
|
||||||
|
~GaiUsb313() = 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 )
|
||||||
|
Scene00029( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq1 )
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
Scene00003( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject1:
|
||||||
|
{
|
||||||
|
Scene00005( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject5:
|
||||||
|
{
|
||||||
|
Scene00013( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject6:
|
||||||
|
{
|
||||||
|
Scene00015( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject7:
|
||||||
|
{
|
||||||
|
Scene00017( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq4 )
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Eobject5:
|
||||||
|
{
|
||||||
|
Scene00014( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject6:
|
||||||
|
{
|
||||||
|
Scene00016( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject7:
|
||||||
|
{
|
||||||
|
Scene00018( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 3, 2, quest.getUI8AL(), 3 );
|
||||||
|
if( quest.getUI8AL() >= 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( &GaiUsb313::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( &GaiUsb313::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( &GaiUsb313::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setUI8BH( 3 );
|
||||||
|
quest.setUI8BL( 3 );
|
||||||
|
quest.setUI8CH( 2 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setUI8BL( 2 );
|
||||||
|
quest.setUI8CH( 0 );
|
||||||
|
quest.setSeq( Seq3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::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( &GaiUsb313::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 2, 0 );
|
||||||
|
quest.setUI8BL( 0 );
|
||||||
|
quest.setSeq( Seq4 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::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, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00010( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 10, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00010Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00011( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 11, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00011Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00012( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 12, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00012Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00012Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00013( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 13, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00013Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00013Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//Opens KeyItem Inventory
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00014( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 14, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00014Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00014Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true ); //Hide EObj
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );//Increment Journal
|
||||||
|
quest.setUI8BH( quest.getUI8BH() - 1 );//Decrement KeyItem
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00015( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 15, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00015Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00015Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//Opens KeyItem Inventory
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00016( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 16, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00016Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00016Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 2, true ); //Hide EObj
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );//Increment Journal
|
||||||
|
quest.setUI8BH( quest.getUI8BH() - 1 );//Decrement KeyItem
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00017( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 17, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00017Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00017Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//Opens KeyItem Inventory
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00018( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 18, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00018Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00018Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 3, true ); //Hide EObj
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );//Increment Journal
|
||||||
|
quest.setUI8BH( quest.getUI8BH() - 1 );//Decrement KeyItem
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00019( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 19, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00019Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00019Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00020( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 20, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00020Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00020Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00021( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 21, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00021Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00021Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00022( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 22, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00022Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00022Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00023( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 23, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00023Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00023Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00024( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 24, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00024Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00024Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00025( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 25, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00025Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00025Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00026( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 26, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00026Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00026Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00027( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 27, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00027Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00027Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00028( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 28, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00028Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00028Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00029( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 29, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00029Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00029Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00030( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 30, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00030Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00030Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00031( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 31, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00031Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00031Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00032( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 32, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00032Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00032Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00033( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 33, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00033Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00033Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00034( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 34, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00034Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00034Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00035( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 35, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00035Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00035Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00036( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 36, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00036Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00036Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00037( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 37, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00037Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00037Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00038( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 38, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00038Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00038Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00039( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 39, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00039Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00039Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00040( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 40, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00040Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00040Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00041( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 41, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00041Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00041Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00042( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 42, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00042Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00042Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00043( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 43, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00043Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00043Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00044( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 44, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00044Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00044Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00045( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 45, HIDE_HOTBAR, bindSceneReturn( &GaiUsb313::Scene00045Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00045Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb313 );
|
1264
src/scripts/quest/subquest/lanoscea_east/GaiUsb314.cpp
Normal file
1264
src/scripts/quest/subquest/lanoscea_east/GaiUsb314.cpp
Normal file
File diff suppressed because it is too large
Load diff
234
src/scripts/quest/subquest/lanoscea_east/GaiUsb315.cpp
Normal file
234
src/scripts/quest/subquest/lanoscea_east/GaiUsb315.cpp
Normal file
|
@ -0,0 +1,234 @@
|
||||||
|
// 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: GaiUsb315_00856
|
||||||
|
// Quest Name: As You Wish
|
||||||
|
// Quest ID: 66392
|
||||||
|
// Start NPC: 1006266
|
||||||
|
// End NPC: 1006341
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb315 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AH
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
// UI8BL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002083
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002084
|
||||||
|
// 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 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Actor1 = 1006341;//Riol
|
||||||
|
static constexpr auto Eobject0 = 2002083;
|
||||||
|
static constexpr auto Eobject1 = 2002084;
|
||||||
|
static constexpr auto Eobject2 = 2002085;
|
||||||
|
static constexpr auto EventAction = 30;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb315() : Sapphire::ScriptAPI::QuestScript( 66392 ){};
|
||||||
|
~GaiUsb315() = 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 )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventAction,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00002( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject1:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventAction,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00004( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject2:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventAction,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00006( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AH(), 3 );
|
||||||
|
if( quest.getUI8AH() >= 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( &GaiUsb315::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( &GaiUsb315::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( &GaiUsb315::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 1 ); //Hide EObj
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );//Increment Journal
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb315::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( &GaiUsb315::Scene00004Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 ); //Hide EObj
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );//Increment Journal
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, bindSceneReturn( &GaiUsb315::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb315::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8BL( 1 ); //Hide EObj
|
||||||
|
quest.setUI8AH( quest.getUI8AH() + 1 );//Increment Journal
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &GaiUsb315::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb315::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb315 );
|
199
src/scripts/quest/subquest/lanoscea_lower/GaiUsb002.cpp
Normal file
199
src/scripts/quest/subquest/lanoscea_lower/GaiUsb002.cpp
Normal file
|
@ -0,0 +1,199 @@
|
||||||
|
// 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: GaiUsb002_00809
|
||||||
|
// Quest Name: Tales from the Tidus Slayer
|
||||||
|
// Quest ID: 66345
|
||||||
|
// Start NPC: 1006264
|
||||||
|
// End NPC: 1006264
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb002 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002033
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 5 Listener: 2239
|
||||||
|
// 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 = 1006264;//Trachtoum
|
||||||
|
static constexpr auto Enemy0 = 4291274;
|
||||||
|
static constexpr auto Enemy1 = 4291279;
|
||||||
|
static constexpr auto Enemy2 = 4291283;
|
||||||
|
static constexpr auto Enemy3 = 4291284;
|
||||||
|
static constexpr auto Enemy4 = 4291285;
|
||||||
|
static constexpr auto Eobject0 = 2002033;
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto LocBgm1 = 87;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb002() : Sapphire::ScriptAPI::QuestScript( 66345 ){};
|
||||||
|
~GaiUsb002() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
else if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00004( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00003( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
case Enemy1:
|
||||||
|
case Enemy2:
|
||||||
|
case Enemy3:
|
||||||
|
case Enemy4:
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
checkQuestCompletion( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
if( quest.getUI8AL() == 4 )
|
||||||
|
{
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
|
||||||
|
auto enemy4 = instance->createBNpcFromInstanceId( Enemy4, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
|
||||||
|
enemy4->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
else if( quest.getUI8AL() >= 5 )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb002::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb002::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
quest.setUI8AL( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsb002::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( &GaiUsb002::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
|
||||||
|
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
auto enemy1 = instance->createBNpcFromInstanceId( Enemy1, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
auto enemy2 = instance->createBNpcFromInstanceId( Enemy2, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
auto enemy3 = instance->createBNpcFromInstanceId( Enemy3, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
|
||||||
|
enemy0->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
enemy1->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
enemy2->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
enemy3->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb002::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( GaiUsb002 );
|
392
src/scripts/quest/subquest/lanoscea_lower/GaiUsb003.cpp
Normal file
392
src/scripts/quest/subquest/lanoscea_lower/GaiUsb003.cpp
Normal file
|
@ -0,0 +1,392 @@
|
||||||
|
// 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: GaiUsb003_00810
|
||||||
|
// Quest Name: Hungry Hungry Goobbues
|
||||||
|
// Quest ID: 66346
|
||||||
|
// Start NPC: 1006264
|
||||||
|
// End NPC: 1006264
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb003 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002034
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 5 Listener: 1900
|
||||||
|
// 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 = 1006264;//Trachtoum
|
||||||
|
static constexpr auto Enemy0 = 4291318;//Goobbue Farmer
|
||||||
|
static constexpr auto Eobject0 = 2002034;//Destination
|
||||||
|
static constexpr auto Eobject1 = 2002633;//Untargetable/Decoration
|
||||||
|
static constexpr auto Eobject2 = 2002634;//Untargetable/Decoration
|
||||||
|
static constexpr auto Eobject3 = 2002635;//Untargetable/Decoration
|
||||||
|
static constexpr auto Eobject4 = 2002636;//Untargetable/Decoration
|
||||||
|
static constexpr auto Eobject5 = 2002637;//Untargetable/Decoration
|
||||||
|
static constexpr auto EventActionLookoutLong = 41;
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb003() : Sapphire::ScriptAPI::QuestScript( 66346 ){};
|
||||||
|
~GaiUsb003() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
else if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00014( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionLookoutLong,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00003( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::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( &GaiUsb003::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( &GaiUsb003::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( &GaiUsb003::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
|
||||||
|
auto enemy = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
|
||||||
|
enemy->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::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( &GaiUsb003::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::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( &GaiUsb003::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::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, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00010( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 10, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00010Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00011( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 11, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00011Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00012( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 12, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00012Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00012Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00013( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 13, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00013Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00013Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00014( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 14, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00014Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00014Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult(1) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00015( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 15, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00015Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00015Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00016( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 16, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00016Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00016Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00017( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 17, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00017Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00017Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00018( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 18, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00018Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00018Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00019( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 19, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00019Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00019Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00020( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 20, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00020Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00020Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00021( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 21, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00021Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00021Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00022( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 22, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00022Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00022Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00023( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 23, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00023Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00023Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00024( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 24, HIDE_HOTBAR, bindSceneReturn( &GaiUsb003::Scene00024Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00024Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb003 );
|
180
src/scripts/quest/subquest/lanoscea_lower/GaiUsb004.cpp
Normal file
180
src/scripts/quest/subquest/lanoscea_lower/GaiUsb004.cpp
Normal file
|
@ -0,0 +1,180 @@
|
||||||
|
// 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: GaiUsb004_00811
|
||||||
|
// Quest Name: The Lominsan Way
|
||||||
|
// Quest ID: 66347
|
||||||
|
// Start NPC: 1006264
|
||||||
|
// End NPC: 1006266
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb004 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AH
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 1006265
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002284
|
||||||
|
// 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 = 1006264;//Trachtoum
|
||||||
|
static constexpr auto Actor1 = 1006265;//Grey Fleet Miller
|
||||||
|
static constexpr auto Actor2 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Eobject0 = 2002284;
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto LocAction0 = 1005;
|
||||||
|
static constexpr auto LocActor0 = 1005259;
|
||||||
|
static constexpr auto LocActor1 = 1003782;
|
||||||
|
static constexpr auto LocActor9 = 1006676;
|
||||||
|
static constexpr auto LocBgm1 = 101;
|
||||||
|
static constexpr auto LocFace0 = 604;
|
||||||
|
static constexpr auto LocFace1 = 620;
|
||||||
|
static constexpr auto LocSe1 = 39;
|
||||||
|
static constexpr auto LocSe2 = 40;
|
||||||
|
static constexpr auto Questbattle0 = 59;
|
||||||
|
static constexpr auto Seq0Actor0Lq = 90;
|
||||||
|
static constexpr auto Territorytype0 = 307;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb004() : Sapphire::ScriptAPI::QuestScript( 66347 ){};
|
||||||
|
~GaiUsb004() = 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 )
|
||||||
|
{
|
||||||
|
playerMgr().sendUrgent( player, "QuestBattle unimplemented, skipping..." );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
//Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00005( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb004::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00090( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsb004::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
auto& pTeriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||||
|
|
||||||
|
eventMgr().eventFinish( player, result.eventId, 0 );
|
||||||
|
pTeriMgr.createAndJoinQuestBattle( player, Questbattle0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb004::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( &GaiUsb004::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, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb004::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00090( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 90, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb004::Scene00090Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00090Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb004 );
|
193
src/scripts/quest/subquest/lanoscea_upper/GaiUsb401.cpp
Normal file
193
src/scripts/quest/subquest/lanoscea_upper/GaiUsb401.cpp
Normal file
|
@ -0,0 +1,193 @@
|
||||||
|
// 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: GaiUsb401_00857
|
||||||
|
// Quest Name: Lord of Crags
|
||||||
|
// Quest ID: 66393
|
||||||
|
// Start NPC: 1006341
|
||||||
|
// End NPC: 1006343
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb401 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002086
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 5010000
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1007711
|
||||||
|
// 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 = 1006341;//Riol
|
||||||
|
static constexpr auto Actor2 = 1007711;
|
||||||
|
static constexpr auto Actor3 = 1007712;//Y'shtola (Seq2)
|
||||||
|
static constexpr auto Actor4 = 1006343;//Y'shtola (SeqFinish)
|
||||||
|
static constexpr auto CutScene01 = 243;
|
||||||
|
static constexpr auto CutScene02 = 371;
|
||||||
|
static constexpr auto Eobject0 = 2002086;//Beastman Aetheryte
|
||||||
|
static constexpr auto EventActionProcessUpperMiddle = 32;
|
||||||
|
static constexpr auto Instancedungeon0 = 20002;
|
||||||
|
static constexpr auto Poprange0 = 4332843;
|
||||||
|
static constexpr auto ScreenImageUnlock = 111;
|
||||||
|
static constexpr auto UnlockAddNewContentToCf = 3702;
|
||||||
|
static constexpr auto UnlockImageVsTitan = 77;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb401() : Sapphire::ScriptAPI::QuestScript( 66393 ){};
|
||||||
|
~GaiUsb401() = default;
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Event Handlers
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
switch( actorId )
|
||||||
|
{
|
||||||
|
case Actor0:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq0 )
|
||||||
|
Scene00000( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor2:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor3:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == Seq2 )
|
||||||
|
Scene00005( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor4:
|
||||||
|
{
|
||||||
|
if( quest.getSeq() == SeqFinish )
|
||||||
|
Scene00006( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionProcessUpperMiddle,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00003( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb401::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb401::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( &GaiUsb401::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( &GaiUsb401::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//TODO: Unlock Titan
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &GaiUsb401::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( &GaiUsb401::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb401::Scene00006Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb401 );
|
150
src/scripts/quest/subquest/limsa/SubSea052.cpp
Normal file
150
src/scripts/quest/subquest/limsa/SubSea052.cpp
Normal file
|
@ -0,0 +1,150 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.9
|
||||||
|
// fake IsAnnounce table
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include "Territory/Territory.h"
|
||||||
|
#include <Manager/WarpMgr.h>
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubSea052 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubSea052() : Sapphire::ScriptAPI::QuestScript( 66000 ){};
|
||||||
|
~SubSea052() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 1 entries
|
||||||
|
//SEQ_1, 1 entries
|
||||||
|
//SEQ_255, 1 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1002627
|
||||||
|
//ENEMY0 = 118
|
||||||
|
//SEQ0ACTOR0 = 0
|
||||||
|
//SEQ2ACTOR0 = 1
|
||||||
|
|
||||||
|
static constexpr auto EVENT_ON_TALK = 0;
|
||||||
|
static constexpr auto EVENT_ON_EMOTE = 1;
|
||||||
|
static constexpr auto EVENT_ON_BNPC_KILL = 2;
|
||||||
|
static constexpr auto EVENT_ON_WITHIN_RANGE = 3;
|
||||||
|
static constexpr auto EVENT_ON_ENTER_TERRITORY = 4;
|
||||||
|
static constexpr auto EVENT_ON_EVENT_ITEM = 5;
|
||||||
|
static constexpr auto EVENT_ON_EOBJ_HIT = 6;
|
||||||
|
static constexpr auto EVENT_ON_SAY = 7;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( World::Quest& quest, Entity::Player& player, uint32_t type, uint64_t param1, uint32_t param2, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( quest.getSeq() )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
if( type != EVENT_ON_BNPC_KILL ) Scene00000( quest, player ); // Scene00000: Normal(Talk, QuestOffer, QuestAccept, TargetCanMove), id=GURCANT
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
if( quest.getUI8AL() < 5 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 5 );
|
||||||
|
checkProgressSeq1( quest, player );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
if( type != EVENT_ON_BNPC_KILL ) Scene00001( quest, player ); // Scene00001: Normal(Talk, QuestReward, QuestComplete, TargetCanMove), id=GURCANT
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
playerMgr().sendUrgent( player, "Sequence {} not defined.", quest.getSeq() );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_TALK, actorId, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( World::Quest& quest, uint64_t actorId, uint32_t emoteId, Sapphire::Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "emote: {}", emoteId );
|
||||||
|
onProgress( quest, player, EVENT_ON_EMOTE, actorId, 0, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Sapphire::Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_BNPC_KILL, static_cast< uint64_t >( nameId ), entityId, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( World::Quest& quest, Sapphire::Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_WITHIN_RANGE, static_cast< uint64_t >( param1 ), 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( World::Quest& quest, Sapphire::Entity::Player& player, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_ENTER_TERRITORY, static_cast< uint64_t >( param1 ), static_cast< uint32_t >( param2 ), 0 );
|
||||||
|
}
|
||||||
|
void onEventItem( World::Quest& quest, Sapphire::Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_EVENT_ITEM, actorId, 0, 0 );
|
||||||
|
}
|
||||||
|
void onEObjHit( World::Quest& quest, Sapphire::Entity::Player& player, uint64_t actorId, uint32_t actionId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_EOBJ_HIT, actorId, actionId, 0 );
|
||||||
|
}
|
||||||
|
void onSay( World::Quest& quest, Sapphire::Entity::Player& player, uint64_t actorId, uint32_t sayId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_SAY, actorId, sayId, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
quest.setSeq( 1 );
|
||||||
|
}
|
||||||
|
void checkProgressSeq1( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
if( quest.getUI8AL() == 5 )
|
||||||
|
{
|
||||||
|
quest.setSeq( 255 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player ) //SEQ_0: , <No Var>, <No Flag>
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea052:66000 calling Scene00000: Normal(Talk, QuestOffer, QuestAccept, TargetCanMove), id=GURCANT" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.numOfResults > 0 && result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( quest, player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player ) //SEQ_255: , <No Var>, <No Flag>
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea052:66000 calling Scene00001: Normal(Talk, QuestReward, QuestComplete, TargetCanMove), id=GURCANT" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.numOfResults > 0 && result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult( 1 ) );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubSea052 );
|
274
src/scripts/quest/subquest/limsa/SubSea053.cpp
Normal file
274
src/scripts/quest/subquest/limsa/SubSea053.cpp
Normal file
|
@ -0,0 +1,274 @@
|
||||||
|
// FFXIVTheMovie.ParserV3.9
|
||||||
|
// param used:
|
||||||
|
//ID_ACTOR1 = 4298896548
|
||||||
|
//ID_ACTOR2 = 4298896549
|
||||||
|
//ID_ACTOR3 = 4298896550
|
||||||
|
//ID_ACTOR4 = 4298896551
|
||||||
|
//ID_ACTOR5 = 4298896552
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
#include <ScriptObject.h>
|
||||||
|
#include <Service.h>
|
||||||
|
#include "Manager/TerritoryMgr.h"
|
||||||
|
#include "Manager/EventMgr.h"
|
||||||
|
#include "Territory/Territory.h"
|
||||||
|
#include <Manager/WarpMgr.h>
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class SubSea053 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SubSea053() : Sapphire::ScriptAPI::QuestScript( 66001 ){};
|
||||||
|
~SubSea053() = default;
|
||||||
|
|
||||||
|
//SEQ_0, 1 entries
|
||||||
|
//SEQ_1, 5 entries
|
||||||
|
//SEQ_255, 1 entries
|
||||||
|
|
||||||
|
//ACTOR0 = 1002626
|
||||||
|
//ACTOR1 = 1002635
|
||||||
|
//ACTOR2 = 1002636
|
||||||
|
//ACTOR3 = 1002637
|
||||||
|
//ACTOR4 = 1002638
|
||||||
|
//ACTOR5 = 1002639
|
||||||
|
//QSTACCEPTCHECK = 66000
|
||||||
|
|
||||||
|
static constexpr auto EVENT_ON_TALK = 0;
|
||||||
|
static constexpr auto EVENT_ON_EMOTE = 1;
|
||||||
|
static constexpr auto EVENT_ON_BNPC_KILL = 2;
|
||||||
|
static constexpr auto EVENT_ON_WITHIN_RANGE = 3;
|
||||||
|
static constexpr auto EVENT_ON_ENTER_TERRITORY = 4;
|
||||||
|
static constexpr auto EVENT_ON_EVENT_ITEM = 5;
|
||||||
|
static constexpr auto EVENT_ON_EOBJ_HIT = 6;
|
||||||
|
static constexpr auto EVENT_ON_SAY = 7;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onProgress( World::Quest& quest, Entity::Player& player, uint32_t type, uint64_t param1, uint32_t param2, uint32_t param3 )
|
||||||
|
{
|
||||||
|
switch( quest.getSeq() )
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
if( type != EVENT_ON_BNPC_KILL ) Scene00000( quest, player ); // Scene00000: Normal(Talk, QuestOffer, QuestAccept, TargetCanMove, SystemTalk, CanCancel), id=STAELWYRN
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
if( param1 == 1002635 || param1 == 4298896548 ) // ACTOR1 = SEVRIN
|
||||||
|
{
|
||||||
|
if( !quest.getBitFlag8( 1 ) )
|
||||||
|
{
|
||||||
|
Scene00001( quest, player ); // Scene00001: Normal(Talk, NpcDespawn, TargetCanMove), id=SEVRIN
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1002636 || param1 == 4298896549 ) // ACTOR2 = AYLMER
|
||||||
|
{
|
||||||
|
if( !quest.getBitFlag8( 2 ) )
|
||||||
|
{
|
||||||
|
Scene00002( quest, player ); // Scene00002: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=AYLMER
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1002637 || param1 == 4298896550 ) // ACTOR3 = EYRIMHUS
|
||||||
|
{
|
||||||
|
if( !quest.getBitFlag8( 3 ) )
|
||||||
|
{
|
||||||
|
Scene00003( quest, player ); // Scene00003: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=EYRIMHUS
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1002638 || param1 == 4298896551 ) // ACTOR4 = SOZAIRARZAI
|
||||||
|
{
|
||||||
|
if( !quest.getBitFlag8( 4 ) )
|
||||||
|
{
|
||||||
|
Scene00004( quest, player ); // Scene00004: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=SOZAIRARZAI
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( param1 == 1002639 || param1 == 4298896552 ) // ACTOR5 = WAUTER
|
||||||
|
{
|
||||||
|
if( !quest.getBitFlag8( 5 ) )
|
||||||
|
{
|
||||||
|
Scene00005( quest, player ); // Scene00005: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=WAUTER
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 255:
|
||||||
|
{
|
||||||
|
if( type != EVENT_ON_BNPC_KILL ) Scene00006( quest, player ); // Scene00006: Normal(Talk, QuestReward, QuestComplete, TargetCanMove), id=STAELWYRN
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
playerMgr().sendUrgent( player, "Sequence {} not defined.", quest.getSeq() );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_TALK, actorId, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEmote( World::Quest& quest, uint64_t actorId, uint32_t emoteId, Sapphire::Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "emote: {}", emoteId );
|
||||||
|
onProgress( quest, player, EVENT_ON_EMOTE, actorId, 0, emoteId );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Sapphire::Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_BNPC_KILL, static_cast< uint64_t >( nameId ), entityId, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onWithinRange( World::Quest& quest, Sapphire::Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_WITHIN_RANGE, static_cast< uint64_t >( param1 ), 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEnterTerritory( World::Quest& quest, Sapphire::Entity::Player& player, uint16_t param1, uint16_t param2 ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_ENTER_TERRITORY, static_cast< uint64_t >( param1 ), static_cast< uint32_t >( param2 ), 0 );
|
||||||
|
}
|
||||||
|
void onEventItem( World::Quest& quest, Sapphire::Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_EVENT_ITEM, actorId, 0, 0 );
|
||||||
|
}
|
||||||
|
void onEObjHit( World::Quest& quest, Sapphire::Entity::Player& player, uint64_t actorId, uint32_t actionId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_EOBJ_HIT, actorId, actionId, 0 );
|
||||||
|
}
|
||||||
|
void onSay( World::Quest& quest, Sapphire::Entity::Player& player, uint64_t actorId, uint32_t sayId ) override
|
||||||
|
{
|
||||||
|
onProgress( quest, player, EVENT_ON_SAY, actorId, sayId, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
void checkProgressSeq0( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
quest.setSeq( 1 );
|
||||||
|
}
|
||||||
|
void checkProgressSeq1( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
if( quest.getUI8AL() == 5 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( 0 );
|
||||||
|
quest.setBitFlag8( 1, false );
|
||||||
|
quest.setBitFlag8( 2, false );
|
||||||
|
quest.setBitFlag8( 3, false );
|
||||||
|
quest.setBitFlag8( 4, false );
|
||||||
|
quest.setBitFlag8( 5, false );
|
||||||
|
quest.setSeq( 255 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player ) //SEQ_0: , <No Var>, <No Flag>
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea053:66001 calling Scene00000: Normal(Talk, QuestOffer, QuestAccept, TargetCanMove, SystemTalk, CanCancel), id=STAELWYRN" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.numOfResults > 0 && result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
checkProgressSeq0( quest, player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player ) //SEQ_1: ACTOR1, UI8AL = 5, Flag8(1)=True(Todo:0)
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea053:66001 calling Scene00001: Normal(Talk, NpcDespawn, TargetCanMove), id=SEVRIN" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 5 );
|
||||||
|
checkProgressSeq1( quest, player );
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player ) //SEQ_1: ACTOR2, UI8AL = 5, Flag8(2)=True(Todo:0)
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea053:66001 calling Scene00002: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=AYLMER" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.errorCode == 0 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
quest.setBitFlag8( 2, true );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 5 );
|
||||||
|
checkProgressSeq1( quest, player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player ) //SEQ_1: ACTOR3, UI8AL = 5, Flag8(3)=True(Todo:0)
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea053:66001 calling Scene00003: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=EYRIMHUS" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.errorCode == 0 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
quest.setBitFlag8( 3, true );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 5 );
|
||||||
|
checkProgressSeq1( quest, player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00004( World::Quest& quest, Entity::Player& player ) //SEQ_1: ACTOR4, UI8AL = 5, Flag8(4)=True(Todo:0)
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea053:66001 calling Scene00004: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=SOZAIRARZAI" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.errorCode == 0 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
quest.setBitFlag8( 4, true );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 5 );
|
||||||
|
checkProgressSeq1( quest, player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005( World::Quest& quest, Entity::Player& player ) //SEQ_1: ACTOR5, UI8AL = 5, Flag8(5)=True(Todo:0)
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea053:66001 calling Scene00005: Normal(Talk, NpcDespawn, TargetCanMove, Menu), id=WAUTER" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.errorCode == 0 )
|
||||||
|
{
|
||||||
|
quest.setUI8AL( quest.getUI8AL() + 1 );
|
||||||
|
quest.setBitFlag8( 5, true );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 5 );
|
||||||
|
checkProgressSeq1( quest, player );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 5, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player ) //SEQ_255: , <No Var>, <No Flag>
|
||||||
|
{
|
||||||
|
playerMgr().sendDebug( player, "SubSea053:66001 calling Scene00006: Normal(Talk, QuestReward, QuestComplete, TargetCanMove), id=STAELWYRN" );
|
||||||
|
auto callback = [ & ]( World::Quest& quest, Entity::Player& player , const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.numOfResults > 0 && result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult( 1 ) );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, callback );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( SubSea053 );
|
139
src/scripts/quest/subquest/thanalan_south/GaiUsb101.cpp
Normal file
139
src/scripts/quest/subquest/thanalan_south/GaiUsb101.cpp
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
// 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: GaiUsb101_00820
|
||||||
|
// Quest Name: The Drake Exception
|
||||||
|
// Quest ID: 66356
|
||||||
|
// Start NPC: 1004917
|
||||||
|
// End NPC: 1004917
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb101 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 9 Listener: 190
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1004917
|
||||||
|
// 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 = 1004917;//U'odh Nunh
|
||||||
|
static constexpr auto Enemy0 = 264;//Sundrake (INCORRECT:190)
|
||||||
|
static constexpr auto Item0 = 2000642;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb101() : Sapphire::ScriptAPI::QuestScript( 66356 ){};
|
||||||
|
~GaiUsb101() = 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.setUI8BH( quest.getUI8BH() + 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8BH(), 7 );
|
||||||
|
|
||||||
|
if( quest.getUI8BH() >= 7 )
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb101::Scene00000Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )// accept quest
|
||||||
|
{
|
||||||
|
Scene00001( quest, player );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, bindSceneReturn( &GaiUsb101::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( &GaiUsb101::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( &GaiUsb101::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( GaiUsb101 );
|
241
src/scripts/quest/subquest/thanalan_south/GaiUsb102.cpp
Normal file
241
src/scripts/quest/subquest/thanalan_south/GaiUsb102.cpp
Normal file
|
@ -0,0 +1,241 @@
|
||||||
|
// 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: GaiUsb102_00821
|
||||||
|
// Quest Name: The Perfect Prey
|
||||||
|
// Quest ID: 66357
|
||||||
|
// Start NPC: 1004917
|
||||||
|
// End NPC: 1004917
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb102 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 1 Listener: 2002044
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 8 Listener: 2002044
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002045
|
||||||
|
// 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 = 1004917;//U'odh Nunh
|
||||||
|
static constexpr auto Enemy0 = 4293187;
|
||||||
|
static constexpr auto Eobject0 = 2002044;//Destination (Seq1)
|
||||||
|
static constexpr auto Eobject1 = 2002045;//Destination (Seq2)
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto EventActionWaiting2Middle = 12;
|
||||||
|
static constexpr auto Item0 = 2000643;
|
||||||
|
static constexpr auto Item1 = 2000644;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb102() : Sapphire::ScriptAPI::QuestScript( 66357 ){};
|
||||||
|
~GaiUsb102() = 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 )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
Scene00002( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject1:
|
||||||
|
{
|
||||||
|
Scene00005( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
switch( entityId )
|
||||||
|
{
|
||||||
|
case Enemy0:
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
if( actorId == Eobject0 )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
quest.setUI8BH( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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( &GaiUsb102::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( &GaiUsb102::Scene00001Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setSeq( Seq1 );
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &GaiUsb102::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//Opens KeyItem Inventort
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb102::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( &GaiUsb102::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( &GaiUsb102::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
auto enemy0 = instance->createBNpcFromInstanceId( Enemy0, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
enemy0->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb102::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( &GaiUsb102::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb102::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00009( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsb102::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb102 );
|
260
src/scripts/quest/subquest/thanalan_south/GaiUsb103.cpp
Normal file
260
src/scripts/quest/subquest/thanalan_south/GaiUsb103.cpp
Normal file
|
@ -0,0 +1,260 @@
|
||||||
|
// 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: GaiUsb103_00822
|
||||||
|
// Quest Name: When the Worm Turns
|
||||||
|
// Quest ID: 66358
|
||||||
|
// Start NPC: 1004917
|
||||||
|
// End NPC: 1004917
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb103 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// BitFlag8
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 1 Event: 9 Listener: 356
|
||||||
|
/// Countable Num: 0 Seq: 2 Event: 1 Listener: 2002046
|
||||||
|
/// Countable Num: 0 Seq: 3 Event: 8 Listener: 2002046
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 2002576
|
||||||
|
// 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 = 1004917;//U'odh Nunh
|
||||||
|
static constexpr auto Actor1 = 1007626;
|
||||||
|
static constexpr auto Enemy0 = 307;//Angler (INCORRECT:356)
|
||||||
|
static constexpr auto Enemy1 = 4293190;
|
||||||
|
static constexpr auto Eobject0 = 2002046;//Wellwick Worm Teritory (Seq2)
|
||||||
|
static constexpr auto Eobject1 = 2002576;//Wellwick Worm Teritory (Seq3)
|
||||||
|
static constexpr auto EventActionSearch = 1;
|
||||||
|
static constexpr auto EventActionWaiting = 10;
|
||||||
|
static constexpr auto Item0 = 2000645;
|
||||||
|
static constexpr auto Item1 = 2000833;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb103() : Sapphire::ScriptAPI::QuestScript( 66358 ){};
|
||||||
|
~GaiUsb103() = 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 )
|
||||||
|
Scene00008( quest, player );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Actor1:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject0:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionSearch,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00002( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Eobject1:
|
||||||
|
{
|
||||||
|
eventMgr().eventActionStart(
|
||||||
|
player, getId(), EventActionWaiting,
|
||||||
|
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional ) {
|
||||||
|
Scene00005( quest, player );
|
||||||
|
},
|
||||||
|
nullptr, 0 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onEventItem( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||||
|
{
|
||||||
|
if( actorId == Eobject0 )
|
||||||
|
{
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 1, 0 );
|
||||||
|
quest.setSeq( Seq3 );
|
||||||
|
quest.setUI8BH( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void onBNpcKill( World::Quest& quest, uint16_t nameId, uint32_t entityId, Entity::Player& player ) override
|
||||||
|
{
|
||||||
|
if(nameId == Enemy0)
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 0, 0 );
|
||||||
|
quest.setSeq( Seq2 );
|
||||||
|
}
|
||||||
|
else if( entityId == Enemy1 )
|
||||||
|
{
|
||||||
|
quest.setUI8BH( 1 );
|
||||||
|
eventMgr().sendEventNotice( player, getId(), 2, 0 );
|
||||||
|
quest.setSeq( SeqFinish );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// Available Scenes in this quest, not necessarly all are used
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &GaiUsb103::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( &GaiUsb103::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( &GaiUsb103::Scene00002Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
//Opens KeyItem Inventory
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &GaiUsb103::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( &GaiUsb103::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( &GaiUsb103::Scene00005Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
quest.setBitFlag8( 1, true );
|
||||||
|
auto instance = teriMgr().getTerritoryByGuId( player.getTerritoryId() );
|
||||||
|
auto enemy1 = instance->createBNpcFromInstanceId( Enemy1, 413 /*TODO: Find the right value*/, Common::BNpcType::Enemy, player.getId() );
|
||||||
|
enemy1->hateListAdd( player.getAsPlayer(), 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &GaiUsb103::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( &GaiUsb103::Scene00007Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &GaiUsb103::Scene00008Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
Scene00009( quest, player );
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||||
|
{
|
||||||
|
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &GaiUsb103::Scene00009Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId(), result.getResult(1) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb103 );
|
127
src/scripts/quest/subquest/thanalan_south/GaiUsb112.cpp
Normal file
127
src/scripts/quest/subquest/thanalan_south/GaiUsb112.cpp
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
// 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: GaiUsb112_00831
|
||||||
|
// Quest Name: There and Back Again
|
||||||
|
// Quest ID: 66367
|
||||||
|
// Start NPC: 1004917
|
||||||
|
// End NPC: 1006266
|
||||||
|
|
||||||
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
class GaiUsb112 : public Sapphire::ScriptAPI::QuestScript
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
// Basic quest information
|
||||||
|
// Quest vars / flags used
|
||||||
|
// UI8AL
|
||||||
|
// UI8BH
|
||||||
|
|
||||||
|
/// Countable Num: 0 Seq: 255 Event: 1 Listener: 1006266
|
||||||
|
// 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 = 1004917;//U'odh Nunh
|
||||||
|
static constexpr auto Actor1 = 1006266;//Wheiskaet
|
||||||
|
static constexpr auto Item0 = 2000649;//Onyx Brandwine (UI8BH)
|
||||||
|
|
||||||
|
public:
|
||||||
|
GaiUsb112() : Sapphire::ScriptAPI::QuestScript( 66367 ){};
|
||||||
|
~GaiUsb112() = 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
// 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( &GaiUsb112::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( &GaiUsb112::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( &GaiUsb112::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( &GaiUsb112::Scene00003Return ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
|
||||||
|
if( result.getResult( 0 ) == 1 )
|
||||||
|
{
|
||||||
|
player.finishQuest( getId() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPOSE_SCRIPT( GaiUsb112 );
|
|
@ -83,8 +83,10 @@ namespace Sapphire::Event
|
||||||
Aetheryte = 0x0005,
|
Aetheryte = 0x0005,
|
||||||
GuildLeveAssignment = 0x0006,
|
GuildLeveAssignment = 0x0006,
|
||||||
DefaultTalk = 0x0009,
|
DefaultTalk = 0x0009,
|
||||||
|
Crafting = 0x000A,
|
||||||
CustomTalk = 0x000B,
|
CustomTalk = 0x000B,
|
||||||
CompanyLeveOfficer = 0x000C,
|
CompanyLeveOfficer = 0x000C,
|
||||||
|
Array = 0x000D,
|
||||||
CraftLeve = 0x000E,
|
CraftLeve = 0x000E,
|
||||||
GimmickAccessor = 0x000F,
|
GimmickAccessor = 0x000F,
|
||||||
GimmickBill = 0x0010,
|
GimmickBill = 0x0010,
|
||||||
|
@ -92,6 +94,7 @@ namespace Sapphire::Event
|
||||||
ChocoboTaxiStand = 0x0012,
|
ChocoboTaxiStand = 0x0012,
|
||||||
Opening = 0x0013,
|
Opening = 0x0013,
|
||||||
ExitRange = 0x0014,
|
ExitRange = 0x0014,
|
||||||
|
Fish = 0x0015,
|
||||||
GCShop = 0x0016,
|
GCShop = 0x0016,
|
||||||
GuildOrderGuide = 0x0017,
|
GuildOrderGuide = 0x0017,
|
||||||
GuildOrderOfficer = 0x0018,
|
GuildOrderOfficer = 0x0018,
|
||||||
|
@ -99,8 +102,11 @@ namespace Sapphire::Event
|
||||||
Story = 0x001A,
|
Story = 0x001A,
|
||||||
SpecialShop = 0x001B,
|
SpecialShop = 0x001B,
|
||||||
BahamutGuide = 0x001C,
|
BahamutGuide = 0x001C,
|
||||||
|
InstanceContentGuide = 0x001D,
|
||||||
HousingAethernet = 0x001E,
|
HousingAethernet = 0x001E,
|
||||||
FcTalk = 0x001F,
|
SwitchTalk = 0x001F,
|
||||||
|
Adventure = 0x0020,
|
||||||
|
DailyQuestSupply = 0x0021,
|
||||||
ICDirector = 0x8003,
|
ICDirector = 0x8003,
|
||||||
QuestBattleDirector = 0x8006,
|
QuestBattleDirector = 0x8006,
|
||||||
};
|
};
|
||||||
|
|
|
@ -137,7 +137,7 @@ std::string EventMgr::getEventName( uint32_t eventId )
|
||||||
//return unknown + "GilShop";
|
//return unknown + "GilShop";
|
||||||
}
|
}
|
||||||
|
|
||||||
case Event::EventHandler::EventHandlerType::FcTalk:
|
case Event::EventHandler::EventHandlerType::SwitchTalk:
|
||||||
{
|
{
|
||||||
return "FcTalk";
|
return "FcTalk";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue