Greetings TrinityCore users.
I am currently writing a script for.
http://www.wowhead.com/npc=55869
Random Cast part is fine for Events skewer and seething hate
[FONT=Arial]6-8 seconds in she will either cast [/FONT]http://wow.zamimg.com/images/wow/icons/tiny/ability_warrior_rampage.gif Seething Hate[FONT=Arial] OR [/FONT]http://wow.zamimg.com/images/wow/icons/tiny/ability_backstab.gif Skewer[FONT=Arial], which one is cast is random.[/FONT]
[FONT=Arial]2. About 8 seconds after first one, she’ll cast the one she didn’t cast[/FONT]
[FONT=Arial]^[/FONT]
This part i just don’t get how can we check if a event has occurred (without a timer?) then trigger the other event that wasn’t triggered from the random event.
edit hope this isn’t in the wrong section.
Bfx.
make Seething Hate be spell no.1 and Skewer be spell no.2 make then npc choose between 1 or 2 then make an if statement where it will find out what spell boss casted and then tell it to pick the other one for then next spell, like for example
Seething Hate = 1
Skewer = 2
onEnterCombat
{
6-8 seconds timer
npc picks either 1 or 2
if(no = 1)
cast seething hate
if(no = 2)
cast skewer
8 second timer
if(no = 1)
cast skewer
if(no = 2)
cast seething hate
}
like that, i hope this was some help to you, if it wasnt then i apologise but hopefully it should have given you an idea at least.
void EnterCombat(Unit* /*who*/)
{
me->setActive(true);
DoZoneInCombat();
instance->SetBossState(DATA_ALIZABAL, IN_PROGRESS);
events.ScheduleEvent(EVENT_BLADE_DANCE_INITIAL, urand(25000,40000));
events.ScheduleEvent(EVENT_SKEWER_OR_SEETHING_HATE, urand(6000,8000));
}
case EVENT_SKEWER_OR_SEETHING_HATE:
{
switch (urand(0, 1))
{
case 0:
events.ScheduleEvent(EVENT_SKEWER, 500);
break;
case 1:
events.ScheduleEvent(EVENT_SEETHING_HATE, 500);
break;
}
}
break;
Should have shared that prior sorry >.<.
I thought about having the events trigger the secondary event but haven’t thought any further, any more input would be nice.
@chovie23q Yeah that is the logical way of doing it, however we cannot check if the boss has casted a spell then schedule the event (at least to my knowledge unless its a channeled spell) because the spell is instant >.<.
^ feel free to correct me on that one.
I’m pretty sure there is an easy way to do this just i’m being an idiot ._.
Okay so put some thought into this.
Made two additional events that scheduled each other based on what event was triggered then got those events to cancel EVENT_SKEWER_OR_SEETHING_HATE as the random event only triggers once @ the start of combat.
edit seems i was wrong the random event also triggers after blade dance.
bfx.
Hmmmm well im not very good with events but if your using uint32 this is how it woud be done
[CODE] uint32 spellTimer;
uint32spellTimer2;
uint32 No = (urand(0,1));
voidReset()
{
uint32 spellTimer =( urand(6000,8000));
uint32 spellTimer2 =8000;
}
voidEnterCombat(Unit* who)
{
if(spellTimer <= uiDiff)
{
if(No = 1)
{
DoCast(me->getVictim(),SPELL_Name1);
}
if(No =2)
{
DoCast(me->getVictim(),SPELL_Name2);
}
spellTimer= (urand(6000,8000));
}
if(spellTimer2 <=uiDiff)
{
if(No = 2)
{
DoCast(me->getVictim(),SPELL_Name1);
}
if(No =1
{
DoCast(me->getVictim(),SPELL_Name2);
}
spellTimer2 = spellTimer2 + spellTimer;
}
}[/CODE]
Try this out i dont know if it will compile or not just something to giv you as an example you should try, it seems like it should do what you wanted
The problem is resolved, i didn’t use your method chovie23q with uint32 Timers as i’m using events but thanks for the response anyway /emoticons/default_smile.png !
Bfx.
Np mate tc /emoticons/default_biggrin.png