Skip to content

Q-895 Gizelton Caravan Escort Quest #102

Open

Description

Activity

  1. xfurry commented on Jun 5, 2014

    @xfurry
    Member

    One problem with this quest along with 5821 is how to handle availability:

    This is the first of two quests on the caravan trade route between Kormek's Hut and the Gelkis Village. It is also the easier of the two. After returning to Kormek's Hut, the caravan sets up shop and rests for 10 minutes. Then it departs headed east along the road and stops just north of the Kolkar Village. At this point the quest becomes available for only 4 minutes. If it is not recieved within that period, the caravan continues south along the road and then west straight to the Gelkis Village. You have to then wait for the caravan to complete it's circut before you can pick up the quest (which takes approx. 40-60 minutes! depending on the quests being picked up or not along the way)

    So this means that the caravan should move by itself, but at the same time should allow players to take quest only in certain locations.
    The only way I can think of is a combination of SD2 script and wp movement.

  2. Rog360 commented on Jun 6, 2014

    @Rog360
    Author

    Yeah, That would be a task to time correctly. Seems like this would be handled in core like the transports for the Caravan. Just a thought. There is also another one like this at the EP chappel. But that will be later on in another issue... :)

  3. Schmoozerd commented on Jun 6, 2014

    @Schmoozerd
    Member

    Condition last-reached waypoint might be helping.

    Infact i think at some other place there was already talk about adding condition support to quests
    probably here however changing npc-flags with db-scripts is what is supposed to happen.

  4. xfurry commented on Jun 13, 2014

    @xfurry
    Member

    The difficulty that we are facing with quests 5943 and 5821 is not really enabling / disabling the quest.
    That can be done by movement_scripts by changing the NPC flag.

    The tricky thing is that the caravan stops in point A and point B for a few min, allowing the player to take the quest. If any player takes the quest then escort starts, otherwise it will continue on its path without player support.
    This will work just fine with wp movement and db_scripts.

    The problem comes in when the quest start. The player will escort the caravan, and after the quest is completed, the caravan will continue on it's way.
    So the only way I can think of this is with a combination of dbscript and SD2 script. The SD2 part will not be an escortAI, but it should emulate that AI as close as possible.

  5. Schmoozerd commented on Jun 13, 2014

    @Schmoozerd
    Member

    well, there exists the possibility to toggle the wait-timer of waypoint-movement.

    Anyhow - either we postphone this quest until we support real waypoint-movement with sd2,
    or we make it by moving everything (including normal movement) into sd2,
    or we make it by "hacking" sd2 and db together in ways to ie use MovementInform - waypoint-id within SD2.

    the last will basicly resort to simply storing the player-guid, and giving quest-credit when a player-guid is set when a defined waypoint is reached.
    everything else can basicly be handled with DB-scripting.

    Also an idea might be to infact allow storing escort-like information in a place db-scripting can be accessed and as a condition
    (like escorting playerGuid, escorting quest-id somewhere, a new condition "IsEscorting" and a new action "GiveQuestCreditToEscortedPlayer" )
    Edit: The last part might be doable with expanding the buddy-concept to create a flag "BuddyIsEscortedPlayer"

  6. cala commented on Dec 22, 2014

    @cala
    Contributor

    Gentlemen,

    I'd like to draw your attention on a nice PR recently made on Classic DB repository by @Zingzah that addresses those two quests.
    I did not test it, but from what I read of the code, I don't think the timing issue discussed here is fixed by that PR. But I think that a good deal of the DB code of those quests is done in that PR.
    So it might be a good idea to have a look at it when doing the SD2 part. And of course, if you need any contribution, I'm your man (and Zingzah will probably help to I dare say).

  7. xfurry commented on Dec 22, 2014

    @xfurry
    Member

    I suppose that I can only take a look at https://github.com/Zingzah/database/commit/e4e1d720a5518f75473bcab6253b549c43cfb9e6 right?

    Also, I need to check if we actually have the same guids between classic db and udb, in order for me to be able to check this.

  8. Lumber-Jack-2 commented on Jan 8, 2015

    @Lumber-Jack-2

    the script for the first escort, its trinitystuff, but it can be ported maybe

    UPDATE `creature_template` SET `faction_A`=250, `faction_H`=250, `unit_flags`=0, `ScriptName`='npc_cork_gizelton' WHERE  `entry`=11625;
    UPDATE `creature_template` SET `faction_A`=250, `faction_H`=250, `unit_flags`=0 WHERE  `entry` IN (11626, 11564);
    
    DELETE FROM `creature_addon` WHERE  `guid`=28714;
    DELETE FROM `creature_addon` WHERE  `guid`=27290;
    DELETE FROM `creature_addon` WHERE  `guid`=28728;
    DELETE FROM `creature_addon` WHERE  `guid`=27289;
    
    DELETE FROM `creature_formations` WHERE `leaderGUID`=28714;
    INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `dist`, `angle`, `groupAI`) VALUES 
    (28714, 28714, 0, 0, 2),
    (28714, 27290, 6, 360, 2),
    (28714, 28728, 12, 360, 2),
    (28714, 27289, 18, 360, 2);
    
    UPDATE `creature` SET `position_x`=-843.581604, `position_y`=1184.901733, `position_z`=99.684212, `orientation`=3.114390 WHERE  `guid`=28714;
    UPDATE `creature` SET `position_x`=-836.918823, `position_y`=1183.982666, `position_z`=99.665321, `orientation`=3.076691 WHERE  `guid`=27290;
    UPDATE `creature` SET `position_x`=-829.472656, `position_y`=1182.002563, `position_z`=99.665321, `orientation`=2.914899 WHERE  `guid`=28728;
    UPDATE `creature` SET `position_x`=-822.671753, `position_y`=1180.433838, `position_z`=99.662346, `orientation`=2.914899 WHERE  `guid`=27289;
    
    DELETE FROM `script_waypoint` WHERE `entry`=11625;
    INSERT INTO `script_waypoint` (`entry`, `pointid`, `location_x`, `location_y`, `location_z`, `waittime`, `point_comment`)
    VALUES
    (11625,0,-847.221,1188.78,99,0,''),
    (11625,1,-847.221,1188.78,99,0,''),
    (11625,2,-857.324,1187.98,99,0,''),
    (11625,3,-869.854,1186.48,98,0,''),
    (11625,4,-883.781,1185.01,97,0,''),
    (11625,5,-904.03,1183.5,95,0,''),
    (11625,6,-935.499,1182.24,91,0,''),
    (11625,7,-958.267,1182.92,89,0,''),
    (11625,8,-974.384,1182.91,89,1000,'Attack 1'),
    (11625,9,-995.034,1177.64,89,0,''),
    (11625,10,-1009.27,1177.46,89,0,''),
    (11625,11,-1025.51,1181.81,89,0,''),
    (11625,12,-1056.65,1186.35,89,0,''),
    (11625,13,-1084.96,1184.87,89,0,''),
    (11625,14,-1098.32,1187.53,89,0,''),
    (11625,15,-1112.01,1190.48,89,0,''),
    (11625,16,-1153.93,1192.36,92,1000,'Attack 2'),
    (11625,17,-1170.62,1195.64,94,0,''),
    (11625,18,-1195.94,1208.73,98,0,''),
    (11625,19,-1206.27,1209.18,100,0,''),
    (11625,20,-1227.62,1205.96,103,0,''),
    (11625,21,-1282.13,1228.26,108,0,''),
    (11625,22,-1306.17,1233.9,109,1000,'Attack 3'),
    (11625,23,-1317.72,1233.58,110,0,''),
    (11625,24,-1343.73,1228.03,111,0,''),
    (11625,25,-1373.84,1218.94,111,0,''),
    (11625,26,-1412.23,1205.42,111,0,''),
    (11625,27,-1417.17,1202.14,111,0,''),
    (11625,28,-1446.66,1189.42,111,0,''),
    (11625,29,-1467.95,1185.75,110,0,''),
    (11625,30,-1485.08,1188.79,107,0,''),
    (11625,31,-1492.79,1191.12,105,0,''),
    (11625,32,-1505.44,1200.36,100,0,''),
    (11625,33,-1514.29,1213.33,94,0,''),
    (11625,34,-1521.29,1232.28,87,0,''),
    (11625,35,-1523.64,1246.41,82,0,''),
    (11625,36,-1521.45,1259.16,77,0,''),
    (11625,37,-1517.39,1273.3,71,0,''),
    (11625,38,-1513.56,1304.56,63,0,''),
    (11625,39,-1512.08,1325.5,60,0,''),
    (11625,40,-1502.82,1346.56,58,0,''),
    (11625,41,-1488.55,1384.94,58,0,''),
    (11625,42,-1485.31,1407.55,58,0,''),
    (11625,43,-1487.64,1438.56,58,0,''),
    (11625,44,-1490.62,1459.35,58,0,''),
    (11625,45,-1476.09,1496.85,58,0,''),
    (11625,46,-1457.39,1511.91,59,0,''),
    (11625,47,-1446.92,1514.49,59,0,''),
    (11625,48,-1426.87,1508.7,59,0,'Quest complete'),
    (11625,49,-1410.16,1499.86,59,15000,'Despawn');
    /*######
    ## npc_cork_gizelton
    ######*/
    
    enum CorkGizeltonMisc
    {
        NPC_GIZELTON_CARAVAN_KODO = 11564,
        NPC_RIGGER                = 11626,
        NPC_KOLKAR_BATTLE_LORD    = 4636,
        NPC_KOLKAR_WINDCHASER     = 4635,
        QUEST_BODYGUARD_TO_HIRE   = 5821
    };
    
    class npc_cork_gizelton : public CreatureScript
    {
    public:
        npc_cork_gizelton() : CreatureScript("npc_cork_gizelton") { }
    
        struct npc_cork_gizeltonAI : public npc_escortAI
        {
            npc_cork_gizeltonAI(Creature* creature) : npc_escortAI(creature) { }
    
            void WaypointReached(uint32 waypointId)
            {
                Player* player = GetPlayerForEscort();
                if (!player)
                    return;
    
                switch (waypointId)
                {
                    case 8:
                        me->SummonCreature(NPC_KOLKAR_BATTLE_LORD, -969.05f, 1174.91f, 90.39f, 2.17f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_WINDCHASER, -985.71f, 1173.95f, 91.02f, 1.16f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_BATTLE_LORD, -983.01f, 1192.88f, 90.01f, 5.42f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_WINDCHASER, -965.51f, 1193.58f, 92.15f, 3.88f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        break;
                    case 16:
                        me->SummonCreature(NPC_KOLKAR_BATTLE_LORD, -1147.83f, 1180.87f, 91.38f, 2.13f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_WINDCHASER, -1163.96f, 1183.72f, 93.79f, 0.84f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_BATTLE_LORD, -1160.97f, 1201.36f, 93.15f, 5.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_WINDCHASER, -1146.20f, 1199.75f, 91.37f, 4.03f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        break;
                    case 41:
                        me->SummonCreature(NPC_KOLKAR_BATTLE_LORD, -1277.78f, 1218.56f, 109.30f, 1.99f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_WINDCHASER, -1292.65f, 1221.28f, 109.99f, 0.73f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_BATTLE_LORD, -1289.25f, 1239.20f, 108.79f, 5.26f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        me->SummonCreature(NPC_KOLKAR_WINDCHASER, -1272.91f, 1234.39f, 108.14f, 3.83f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
                        break;
                    case 48:
                        player->GroupEventHappens(QUEST_BODYGUARD_TO_HIRE, me);
                        DespawnAll();
                        break;
                }
            }
    
            void JustSummoned(Creature* summoned)
            {
                summoned->AI()->AttackStart(me);
            }
    
            void DespawnAll()
            {
                std::list<Creature*> HelperList;
                me->GetCreatureListWithEntryInGrid(HelperList, NPC_RIGGER, 200.0f);
                me->GetCreatureListWithEntryInGrid(HelperList, NPC_GIZELTON_CARAVAN_KODO, 200.0f);
                if (!HelperList.empty())
                    for (std::list<Creature*>::iterator itr = HelperList.begin(); itr != HelperList.end(); itr++)
                        (*itr)->DespawnOrUnsummon();
            }
    
            void JustDied(Unit* /*killer*/)
            {
                if (Player* player = GetPlayerForEscort())
                    player->FailQuest(QUEST_BODYGUARD_TO_HIRE);
            }
    
            void Reset() { }
    
        };
    
        bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
        {
            if (quest->GetQuestId() == QUEST_BODYGUARD_TO_HIRE)
            {
                if (npc_escortAI* pEscortAI = CAST_AI(npc_cork_gizelton::npc_cork_gizeltonAI, creature->AI()))
                    pEscortAI->Start(true, false, player->GetGUID());
                creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
            }
            return true;
        }
    
        CreatureAI* GetAI(Creature* creature) const
        {
            return new npc_cork_gizeltonAI(creature);
        }
    };
  9. cala commented on Dec 20, 2015

    @cala
    Contributor

    Thanks @Rushor for the data.
    I've started working on those two quests. As I understand/remember it:

    • there are four NPCs (2 goblins, 2 kodos)
    • moving along a circular path
    • they stop here and there and perform emotes, yells and spawn NPCs
    • on two locations, one of the two goblins proposes a quest for a short time (different quest and different NPC at each location)
    • the two quests are typical escort quests with ambushes and emotes

    Based on this and all the comments above, I think most of the waypoint movement and quests availability could be handled by creature_movement table and DBScripts. However, the two escort quests required SD2 in order to handle the various scripted stages of the escort and more importantly to correctly reset the whole thing in case of quest failure.

    This raises a question that I hope @Schmoozerd of @xfurry can answer:

    • are the waypoints from creature_movement or creature_movement_template can be used in a switch (waypoint) the same way waypoints from script_waypoint are?
  10. Lumber-Jack-2 commented on Dec 21, 2015

    @Lumber-Jack-2

    just a side-node: i saw that you already got datas for the waypoints for both creatures. i don't know if these datas are from current retail, but if you want to sniff it on the current wod-version it will be really hard to find them. 4 months ago i spended like 3 hours to find these creatures in desolace, but they never appeared xD

  11. cala commented on Dec 21, 2015

    @cala
    Contributor

    The caravan was removed at MoP release unfortunately.

  12. xfurry commented on Dec 22, 2015

    @xfurry
    Member

    are the waypoints from creature_movement or creature_movement_template can be used in a switch (waypoint) the same way waypoints from script_waypoint are?

    @cala the answer is yes.

    Here is some example of create_template_movement points used in scripts:
    https://github.com/cmangos/mangos-wotlk/blob/master/src/scriptdev2/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp#L380

    You just have to use WAYPOINT_MOTION_TYPE as a way to switch between the waypoints defined in DB.

  13. cala commented on Jan 3, 2016

    @cala
    Contributor

    DB background is done in classicdb/database@936a9f2
    I've started working on the SD2 part for the two escort quests.

  14. cala commented on Apr 18, 2016

    @cala
    Contributor

    Partially fixed in: cmangos/mangos-wotlk@f4c562e
    The quest failure is not properly handled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions