Skip to content

The Sleeper has Awakened across all cores. #169

Open

Description

@scotty0100

Kerlonian Evershade (ID: 11218) is using the wrong model of bear form when you are not on the quest, he should be sleeping in the model of the druid class bear form (currently he has a normal bear model).

I believe the model ID is 2281.

After you start the quest he should shapeshift into his normal form and stay like that until reaching to the end of the destination of the quest.
http://s.cdn.wowinterface.com/preview/pvw28517.jpg
http://old.wowdata.ru/data/userimg/3/3077.jpg

When you wake him up using the Horn of Awakening (ID: 13536) a voice sound should be played saying "I'm awake, I'm awake" or "The sleeper has awakened!" and written so in the chat too.

There should be 2 scripted encounters while moving on the road (only on the road). one encounter is with 3 furbolgs, the other is with 2 undead (Forsaken Scout).

Tagging @cala just in case the scripted road events could possibly be done via DB :)

Activity

  1. scotty0100 commented on May 29, 2015

    @scotty0100
    Author

    Note: Currently you CAN complete the quest. Just that none of the scripted road events work & model is wrong.

  2. cala commented on Jun 24, 2015

    @cala
    Contributor

    Model is probably a DB issue.
    The NPCs audio and text emotes can be handled in various way. I'll look at it.

    Thanks for your report. :)

  3. xfurry commented on Oct 26, 2015

    @xfurry
    Member

    @cala can you find any video of this event, so we can check and correct it?

  4. Grz3s commented on Oct 26, 2015

    @Grz3s
  5. xfurry commented on Nov 2, 2015

    @xfurry
    Member

    Does this patch help?
    I know that the road events are not scripted, but this should help with the model on evade.

    DELETE FROM creature_template_addon WHERE entry=11218;
    INSERT INTO creature_template_addon VALUES
    (11218, 0, 3, 1, 1, 0, 0, '');
    diff --git a/src/scriptdev2/scripts/kalimdor/darkshore.cpp b/src/scriptdev2/scripts/kalimdor/darkshore.cpp
    index f5507fc..7bab514 100644
    --- a/src/scriptdev2/scripts/kalimdor/darkshore.cpp
    +++ b/src/scriptdev2/scripts/kalimdor/darkshore.cpp
    @@ -58,16 +58,23 @@ enum
    
         SAY_KER_END                 = -1000444,
    
    +    SPELL_BEAR_FORM             = 18309,
         SPELL_SLEEP_VISUAL          = 25148,
         SPELL_AWAKEN                = 17536,
    +
         QUEST_SLEEPER_AWAKENED      = 5321,
    +
         NPC_LILADRIS                = 11219                     // attackers entries unknown
     };
    
     // TODO: make concept similar as "ringo" -escort. Find a way to run the scripted attacks, _if_ player are choosing road.
     struct npc_kerlonianAI : public FollowerAI
     {
    -    npc_kerlonianAI(Creature* pCreature) : FollowerAI(pCreature) { Reset(); }
    +    npc_kerlonianAI(Creature* pCreature) : FollowerAI(pCreature)
    +    {
    +        DoCastSpellIfCan(m_creature, SPELL_BEAR_FORM);
    +        Reset();
    +    }
    
         uint32 m_uiFallAsleepTimer;
    
    @@ -97,12 +104,16 @@ struct npc_kerlonianAI : public FollowerAI
             }
         }
    
    -    void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpell) override
    +    void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override
         {
    -        if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED) && pSpell->Id == SPELL_AWAKEN)
    -            ClearSleeping();
    +        if (eventType == AI_EVENT_CUSTOM_A && pInvoker->GetTypeId() == TYPEID_PLAYER)
    +        {
    +            if (HasFollowState(STATE_FOLLOW_INPROGRESS | STATE_FOLLOW_PAUSED))
    +                ClearSleeping();
    +        }
         }
    
    +    // Function to set npc to sleep mode
         void SetSleeping()
         {
             SetFollowPaused(true);
    @@ -122,10 +133,11 @@ struct npc_kerlonianAI : public FollowerAI
                 case 3: DoScriptText(SAY_KER_SLEEP_4, m_creature); break;
             }
    
    -        m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);
    -        m_creature->CastSpell(m_creature, SPELL_SLEEP_VISUAL, false);
    +        if (DoCastSpellIfCan(m_creature, SPELL_SLEEP_VISUAL) == CAST_OK)
    +            m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);
         }
    
    +    // Function to clear sleep mode
         void ClearSleeping()
         {
             m_creature->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL);
    @@ -172,6 +184,7 @@ bool QuestAccept_npc_kerlonian(Player* pPlayer, Creature* pCreature, const Quest
         {
             if (npc_kerlonianAI* pKerlonianAI = dynamic_cast<npc_kerlonianAI*>(pCreature->AI()))
             {
    +            pCreature->RemoveAurasDueToSpell(SPELL_BEAR_FORM);
                 pCreature->SetStandState(UNIT_STAND_STATE_STAND);
                 DoScriptText(SAY_KER_START, pCreature, pPlayer);
                 pKerlonianAI->StartFollow(pPlayer, FACTION_ESCORT_N_FRIEND_PASSIVE, pQuest);
    @@ -181,6 +194,17 @@ bool QuestAccept_npc_kerlonian(Player* pPlayer, Creature* pCreature, const Quest
         return true;
     }
    
    +bool EffectDummyCreature_awaken_kerlonian(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/)
    +{
    +    if (uiSpellId == SPELL_AWAKEN && uiEffIndex == EFFECT_INDEX_0)
    +    {
    +        pCreatureTarget->AI()->SendAIEvent(AI_EVENT_CUSTOM_A, pCaster, pCreatureTarget);
    +        return true;
    +    }
    +
    +    return false;
    +}
    +
     /*####
     # npc_prospector_remtravel
     ####*/
    @@ -748,6 +772,7 @@ void AddSC_darkshore()
         pNewScript->Name = "npc_kerlonian";
         pNewScript->GetAI = &GetAI_npc_kerlonian;
         pNewScript->pQuestAcceptNPC = &QuestAccept_npc_kerlonian;
    +    pNewScript->pEffectDummyNPC = &EffectDummyCreature_awaken_kerlonian;
         pNewScript->RegisterSelf();
    
         pNewScript = new Script;
  6. cala commented on Nov 6, 2015

    @cala
    Contributor

    Nice! I will test this, but expect some delay in the feedback: my todo list is very long at the moment.

  7. Grz3s commented on Dec 12, 2015

    @Grz3s

    hi @xfurry just tested your patch....

    • he has now correct bear form.. and also starting quest will change to human's one
    • and he will keep that form all the way... aggroin etc... so this part is ok ;)

    but :)

    • in final part where he says smth and despawns... he will respawn with human model and on possition where he despawned :/ ... (i had to kill him.. to force respawn at spawn point - also with human model) , so smth is not right still

    Also... we still missing both sounds for him... and that 2-part event with ambush...(i have an idea how to do it...and will try soon*
    thank you.

    Udpate: 13/12/15
    Script should do a check... if player has quest available...(if not ... druid should despawn)
    Currently... player can easy abandon quest (during it) ... and keep druid forever (like a pet).. we need to prevent this somehow..
    Also:
    good news: I have found both missing voices for him:

    -- sound_id = 6209 -- The sleeper has aweken ( this sound comes only when quest starts)
    -- sound_id = 6700 -- using the Horn of Awakening (ID: 13536) - this one is 4 random voices...
    -- and you can hear on vid i gave above.. 2 voices from it.

  8. Grz3s commented on Feb 10, 2016

    @Grz3s

    hi small update to this:
    correct sound on quest start added:
    unified-db/Database@62b958f

  9. Grz3s commented on Feb 22, 2016

    @Grz3s

    @xfurry
    As i said before... I made all missing stuff working:

    • his voices on item (horn) use
    • ambush (both of them)

    unfortunately this req. Both sd2_script and EAI (ACID) to work together
    You said once that is possible.. to make it work (in special ocasions) ...
    Can u show me how to? or give me example...
    So i could make more tests... and maybe finally finish this quest ;)

    BTW this a sample for 1st ambush (made only for tests)
    https://www.youtube.com/watch?v=FCynFo4PTFE&feature=youtu.be

  10. xfurry commented on Feb 23, 2016

    @xfurry
    Member

    @Grz3s You can try this for the sound: http://paste2.org/xse5UWJ1
    However it's kind of tricky to find a way to trigger the ambush. Since this is a "follower" quest, the only way to do this, is to constantly check for map coords. Unless you know something which I don't (like some hidden map trigger.
    I noticed that for the Furbolg ambush the event starts around this location: X: 4493.221680 Y: 275.150818 Z: 58.861740

  11. Grz3s commented on Feb 24, 2016

    @Grz3s

    tested new patch - sound works fine ;) 👍
    About ambush:
    Few facts:

    • both ambushes happens in exact same place always! (you can see on vid where)
    • first ambush can be avoid by player using path through forrest (but 99% ppl will choose road) ;)
    • second abush will never be avoided ..because they're is no other way :)

    my plan was to use .. not used by anything - trigger:
    npc:14495
    spawn him in both locations:

    • first: 4484.9 270.564 59.4335
    • and by db_scripts with command 35, send AI_EVENT. (event 5 for first ambush and event 6 for second)
    • from this point was easy to create script for Kerlonian Evershade - he could respond for that call by EAI (using anything i liked to)

    You can check how working script looked like: (only for first ambush)

    DELETE FROM creature WHERE guid=151050;
    INSERT INTO creature VALUES (151050,14495,1,1,1,0,0,4484.9,270.564,59.4335,0.237152,120,0,0,64,0,0,0);
    --
    UPDATE creature SET MovementType = 2, spawndist = 0 WHERE guid IN (151050);
    DELETE FROM creature_movement WHERE id IN (151050);
    INSERT INTO creature_movement (id, point, position_x, position_y, position_z, waittime, script_id, orientation, model1, model2) VALUES
    (151050,1,4484.9,270.564,59.4335,5000,1449501,0.237152,0,0);
    DELETE FROM dbscripts_on_creature_movement WHERE id = 1449501; 
    INSERT INTO dbscripts_on_creature_movement (id, delay, command, datalong, datalong2, buddy_entry, search_radius, data_flags, dataint, dataint2, dataint3, dataint4, x, y, z, o, comments) VALUES  
    (1449501,1,35,5,30,0,0,0,0,0,0,0,0,0,0,0,'SEND_AI_EVENT'),
    (1449501,3,31,11218,30,0,0,0,0,0,0,0,0,0,0,0,'search for 11218'), -- desp only if 11218 has been found
    (1449501,4,18,0,0,0,0,0x04,0,0,0,0,0,0,0,0,'desp');
    
    -- npc_kerlonian
    -- http://www.wowhead.com/spell=17536/awaken-kerlonian#used-by-item
    DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 11218;
    INSERT INTO `creature_ai_scripts` VALUES
    ('1121801','11218','11','0','100','0','0','0','0','0','22','0','0','0','0','0','0','0','0','0','0','0','Kerlonian Evershade - Set Phase 0 on Spawn'),
    ('1121802','11218','8','0','100','1','17536','-1','0','0','4','6700','0','0','0','0','0','0','0','0','0','0','Kerlonian Evershade - play sound on SpellHIT'),
    ('1121803','11218','30','0','100','1','5','14495','0','0','1','-10000','0','0','22','1','0','0','0','0','0','0','Kerlonian Evershade - Say and set PHASE 1 on Receive AI Event A'),
    ('1121804','11218','29','1','100','1','2000','2000','0','0','32','2169','0','29','32','2169','0','30','32','2171','0','31','Kerlonian Evershade - summon first ambush(Phase1)'),
    ('1121805','11218','29','1','100','1','3000','3000','0','0','22','0','0','0','0','0','0','0','0','0','0','0','Kerlonian Evershade - set PHASE 0(Phase1)'),
    ('1121806','11218','7','0','100','1','0','0','0','0','22','0','0','0','0','0','0','0','0','0','0','0','Shadow Council Warlock - Set Phase to 0 on Evade');
    UPDATE creature_template SET AIName = 'EventAI' WHERE `entry` = '11218';
    
    -- texts
    DELETE FROM `creature_ai_texts` WHERE `entry` IN ('-10000','-10001');
    INSERT into `creature_ai_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`comment`,`emote`) VALUES
    ('-10000','Be on the alert! The Blackwood furbolgs are numerous in this area...','0','0','0','11218','0'), -- first ambush
    ('-10001','It\'s quiet... Too quiet...','0','0','0','11218','0'); -- second ambush
    -- summons
    Delete from `creature_ai_summons` where `id` IN (29,30,31);
    Insert into `creature_ai_summons` values 
    ('29','4480.79','248.848','60.5918','1.06','300000','2169'),  -- correct xyz
    ('30','4470.68','260.508','59.0824','0.59','300000','2169'),  -- correct xyz
    ('31','4461.42','271.358,','61.7843','6.22188','300000','2171');  -- correct xyz
  12. added a commit that references this issue on May 21, 2016
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