Jump to content

[Help] Script special Achievements (Leeeroy)


Schmoozerd

Recommended Posts

Hi folks,

I am writing the instance script for Blackrock Spire, and also wanted to support the Leeeeroy Achievement http://www.wowhead.com/achievement=2188

The Criteria Data from dbc:

7622,2188,0,10161,50,0,0,0,0,0.000000,0.000000,0.000000,"Kill within 15 sec. 50 Rookery Whelps",0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,16712190,1,7,10161,15,1,

The problem is: This criteria is a progress - having a (client based?) 15s countdown and a counter for killed mobs.

If I (by removing DB restrains, or with a bool for CheckInstanceAchievementRequirement) enable that the kill of a mob counts, the timer is also updated.

Hence you are able to get the progress to 50/50 if you kill in 15sec at least one whelp.

And the instance Requirement is not yet able (or I didn't see how) to only avoid resetting the timer

Hope for help

Link to comment
Share on other sites

I was working to this achievement too and, as far I recall, that's what I've found:

on every kill, the timer is extended (=reset) on AchievementMgr::SetCriteriaProgress

    if(entry->timeLimit)
   {
       time_t now = time(NULL);
       if(time_t(progress->date + entry->timeLimit) < now)
           progress->counter = 1;

       // also it seems illogical, the timeframe will be extended at every criteria update
       progress->date = now;
   }

and on struct AchievementCriteriaEntry there's

    //uint32 unk1;                                          // 28 Alway appears with timed events
                                                           // for timed spells it is spell id for
                                                           // timed kills it is creature id
   uint32  timeLimit;                                      // 29 time limit in seconds

so maybe the previus part of the code should check unk1 flag to not extend the timer in this case

Link to comment
Share on other sites

I was working to this achievement too and, as far I recall, that's what I've found:

on every kill, the timer is extended (=reset) on AchievementMgr::SetCriteriaProgress

    if(entry->timeLimit)
   {
       time_t now = time(NULL);
       if(time_t(progress->date + entry->timeLimit) < now)
{
           progress->counter = 1;
           progress->date = now;
}
   }

Are there Timers shich infact shall reset every update?

another idea could be, to reimplement a Hook there for checking

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

bump this,

I did a bit research about timed Achievements, and I found out a few things:

//uint32 unk1;                                          // 28 Alway appears with timed events
                                                           // for timed spells it is spell id for
                                                           // timed kills it is creature id

This description is not correct, there are _some_ achievements which have an entry in unk1 which has no relation to the killed Creature, any spell, item or quest I can think of,

example:

criteriaID, referredAchievement, requiredType, Field3, Field4, Field5, Filed6, Field7, Field8, name, nameFlags, completionFlag, groupFlag, CreatureOrSpellOrUnk, timeLimit, showOrder

12567, 4405, 0, 10184, 1, 0, 0, 0, 0, 'Onyxia', 16712190, 10, 1, 6601, 300, 1

That is unk1 = 6601 - if anybody has an idea.

So, there are these types of timed criterias:

Kill Creature, CreatureID -- unk1= creatureID

BeSpellTarget, spellID -- unk1= SpellId

UseItem, itemId -- unk1= ItemId

CastSpell2, <likely spellId>, -- unk1 = Spell ID

I think all these achievement types should _not_ reset (and would be 'fixed' if the code was changed)

Quest, questId -- unk1 = QuestId

These are three bomb-quests, I think this will need a new function to start this achievements progress on QuestAccept.

and then there are achievements, which differ between CreatureOrSpellOR... and unk1.

for these I only can think that they would be handled best with also an StartAchievementProgress function, which would for them be called on BG starting, on Creature-Aggro, on Creature Kill, etc..

at easiest with this unk1-data as param.

However also for these achievements, I don't see any reason at all to reset the timers every Achievement Criteria +1 Update :)

Link to comment
Share on other sites

  • 6 months later...
  • 3 weeks later...

hmm.. afaik, timed achievements are not hmm "mercyfull" meaning: it wont refresh the timer if the achieve already started

say you get 49 Whelps for leeroy and the 50th is out of the 15 second frame = fail

say you get another one (51th) this one is in the time window if we consider the second Whelp as starter (thats the idea) sadly second case will count as fail as well (since timed achievements start on first call(event/creature/quest)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use