• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] PvP Quest Ideas

Status
Not open for further replies.

Portals

Banned
I kinda figure that the PvP achievements have C++ scripting towards them for instance the Warsong Gulch Achievement http://prntscr.com/anegja I am wondering if it is possible to use the achievement script and convert it to a quest script also, kind of like copy paste the achievement version and make it into a quest version also? If any is able to sorta help point me in the direction I would have to go in order to pull this off that would be nice.
 

Tommy

Founder
I'd go to BattlegroundWS.cpp and inside the function and code below

Code:
[URL="https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp#L285"]void BattlegroundWS::EventPlayerCapturedFlag(Player* player)[/URL]

Check if the player has the quest (I assume there will be both Alliance and Horde specific quests) and complete the quest if they captured the flag where the capture flag code is. Code I added is in lime.
Code:
    if (player->GetTeam() == ALLIANCE)
    {
        if (!IsHordeFlagPickedup())
            return;
        SetHordeFlagPicker(ObjectGuid::Empty);              // must be before aura remove to prevent 2 events (drop+capture) at the same time
                                                            // horde flag in base (but not respawned yet)
        _flagState[TEAM_HORDE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
                                                            // Drop Horde Flag from Player
        player->RemoveAurasDueToSpell(BG_WS_SPELL_WARSONG_FLAG);
        if (_flagDebuffState == 1)
          player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
        else if (_flagDebuffState == 2)
          player->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);

        if (GetTeamScore(TEAM_ALLIANCE) < BG_WS_MAX_TEAM_SCORE)
            AddPoint(ALLIANCE, 1);
        PlaySoundToAll(BG_WS_SOUND_FLAG_CAPTURED_ALLIANCE);
        RewardReputationToTeam(890, m_ReputationCapture, ALLIANCE);
[COLOR="#00FF00"]        if (player->hasQuest(1234) && player->GetQuestStatus(1234) == QUEST_STATUS_INCOMPLETE)
            player->AreaExploredOrEventHappens(1234)[/COLOR]
    }
    else
    {
        if (!IsAllianceFlagPickedup())
            return;
        SetAllianceFlagPicker(ObjectGuid::Empty);           // must be before aura remove to prevent 2 events (drop+capture) at the same time
                                                            // alliance flag in base (but not respawned yet)
        _flagState[TEAM_ALLIANCE] = BG_WS_FLAG_STATE_WAIT_RESPAWN;
                                                            // Drop Alliance Flag from Player
        player->RemoveAurasDueToSpell(BG_WS_SPELL_SILVERWING_FLAG);
        if (_flagDebuffState == 1)
          player->RemoveAurasDueToSpell(WS_SPELL_FOCUSED_ASSAULT);
        else if (_flagDebuffState == 2)
          player->RemoveAurasDueToSpell(WS_SPELL_BRUTAL_ASSAULT);

        if (GetTeamScore(TEAM_HORDE) < BG_WS_MAX_TEAM_SCORE)
            AddPoint(HORDE, 1);
        PlaySoundToAll(BG_WS_SOUND_FLAG_CAPTURED_HORDE);
        RewardReputationToTeam(889, m_ReputationCapture, HORDE);
[COLOR="#00FF00"]        if (player->hasQuest(12345) && player->GetQuestStatus(12345) == QUEST_STATUS_INCOMPLETE)
            player->AreaExploredOrEventHappens(12345)[/COLOR]
    }
 
Status
Not open for further replies.
Top