mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-06-07 16:47:44 +00:00
Merge branch 'quest_scripts' of https://github.com/AussieGlenn/Sapphire into quest_scripts
This commit is contained in:
commit
d9f09cd85e
1 changed files with 11 additions and 17 deletions
|
@ -42,11 +42,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SubSea012() :
|
SubSea012() :
|
||||||
Sapphire::ScriptAPI::EventScript(65658)
|
Sapphire::ScriptAPI::EventScript( 65658 )
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
~SubSea012()
|
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -71,18 +67,17 @@ public:
|
||||||
|
|
||||||
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
|
||||||
{
|
{
|
||||||
if(npcId != Enemy0)
|
if( npcId != Enemy0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto currentKC = player.getQuestUI8AL( getId() ) + 1;
|
auto currentKC = player.getQuestUI8AL( getId() ) + 1;
|
||||||
player.setQuestUI8BH( getId(), currentKC );
|
player.setQuestUI8BH( getId(), currentKC );
|
||||||
player.setQuestUI8AL( getId(), currentKC );
|
player.setQuestUI8AL( getId(), currentKC );
|
||||||
if(currentKC >= 4)
|
|
||||||
|
if( currentKC >= 4 )
|
||||||
player.updateQuest( getId(), SeqFinish );
|
player.updateQuest( getId(), SeqFinish );
|
||||||
else
|
else
|
||||||
{
|
|
||||||
player.sendQuestMessage( getId(), 1, 2, currentKC, 4 );
|
player.sendQuestMessage( getId(), 1, 2, currentKC, 4 );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -90,7 +85,7 @@ private:
|
||||||
void Scene00000( Entity::Player& player )
|
void Scene00000( Entity::Player& player )
|
||||||
{
|
{
|
||||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
{
|
{
|
||||||
if( result.param2 == 1 )
|
if( result.param2 == 1 )
|
||||||
player.updateQuest( getId(), 1 );
|
player.updateQuest( getId(), 1 );
|
||||||
|
@ -99,16 +94,13 @@ private:
|
||||||
|
|
||||||
void Scene00001( Entity::Player& player )
|
void Scene00001( Entity::Player& player )
|
||||||
{
|
{
|
||||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
player.playScene( getId(), 0, HIDE_HOTBAR, nullptr );
|
||||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
|
||||||
{
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scene00002( Entity::Player& player )
|
void Scene00002( Entity::Player& player )
|
||||||
{
|
{
|
||||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
{
|
{
|
||||||
player.updateQuest( getId(), 2 );
|
player.updateQuest( getId(), 2 );
|
||||||
});
|
});
|
||||||
|
@ -117,7 +109,7 @@ private:
|
||||||
void Scene00003( Entity::Player& player )
|
void Scene00003( Entity::Player& player )
|
||||||
{
|
{
|
||||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
{
|
{
|
||||||
if( result.param2 == 1 )
|
if( result.param2 == 1 )
|
||||||
Scene00004( player );
|
Scene00004( player );
|
||||||
|
@ -127,13 +119,15 @@ private:
|
||||||
void Scene00004( Entity::Player& player )
|
void Scene00004( Entity::Player& player )
|
||||||
{
|
{
|
||||||
player.playScene( getId(), 0, HIDE_HOTBAR,
|
player.playScene( getId(), 0, HIDE_HOTBAR,
|
||||||
[&]( Entity::Player& player, const Event::SceneResult& result )
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
{
|
{
|
||||||
if( result.param2 == 1 )
|
if( result.param2 == 1 )
|
||||||
|
{
|
||||||
if( player.giveQuestRewards( getId(), 0 ) )
|
if( player.giveQuestRewards( getId(), 0 ) )
|
||||||
{
|
{
|
||||||
player.finishQuest( getId() );
|
player.finishQuest( getId() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue