void AIUpdate() override { if (_isTimerFinished(mLocaleEnrageTimerId)) { _castAISpell(mLocaleEnrageSpell); _removeTimer(mLocaleEnrageTimerId); } // Bear Form if (_isTimerFinished(MorphTimer) && isScriptPhase(1)) { setScriptPhase(2); // Morph into a bear since the spell doesnt work _setDisplayId(21635); // 20 Seconds until switch to Troll Form _resetTimer(MorphTimer, 20000); } // Troll Form else if (_isTimerFinished(MorphTimer) && isScriptPhase(2)) { // Remove Bear Form _removeAura(42377); // Transform back into a Troll _setDisplayId(21631); setScriptPhase(1); // 45 Seconds until switch to Bear Form _resetTimer(MorphTimer, 45000); sendChatMessage(CHAT_MSG_MONSTER_YELL, 12073, "Make way for Nalorakk!"); } }
void AIUpdate() override { if (_isTimerFinished(mSummonTimer)) { spawnCreature(SKELETON_ADD, getCreature()->GetPositionX() + 6, getCreature()->GetPositionY() + 4, getCreature()->GetPositionZ(), 0); spawnCreature(SKELETON_ADD, getCreature()->GetPositionX() - 6, getCreature()->GetPositionY() + 4, getCreature()->GetPositionZ(), 0); _resetTimer(mSummonTimer, 15000); } }
void AIUpdate() override { if (SpawnTimer && _isTimerFinished(SpawnTimer)) { switch (getScriptPhase()) { case 2: Moccasin(); _resetTimer(SpawnTimer, 100000); setScriptPhase(3); break; case 3: Ectoplasm(); _resetTimer(SpawnTimer, 100000); setScriptPhase(4); break; case 4: BMutanus(); _resetTimer(SpawnTimer, 100000); setScriptPhase(5); break; default: break; } } if (isScriptPhase(5) && (!Mutanus || !Mutanus->isAlive())) { CreatureAIScript* Naralex = getNearestCreatureAI(3679); if (Naralex && Naralex->isAlive()) { _setDisplayId(17089); Naralex->_setDisplayId(17089); Naralex->sendChatMessage(CHAT_MSG_MONSTER_SAY, 5789, "I am awake... at last"); Naralex->getCreature()->setStandState(STANDSTATE_STAND); setFlyMode(true); Naralex->setFlyMode(true); moveTo(-6.704030f, 200.308838f, -26.938824f); Naralex->moveTo(-6.704030f, 200.308838f, -26.938824f); } setScriptPhase(6); } }
void AIUpdate() override { // Every 25% Halazzi calls on the lynx if (!mLynx && _getHealthPercent() <= (100 - SplitCount * 25)) Split(); // Lynx OR Halazzi is at 20% HP Merge them together again if (mLynx && (mLynx->getHealthPct() <= 20 || _getHealthPercent() <= 20)) Merge(); // At <25% Phase 3 begins if (_getHealthPercent() < 25 && isScriptPhase(1)) { _resetTimer(mTotemTimer, 30000); setScriptPhase(3); } if (isScriptPhase(2) || isScriptPhase(3)) { if (_isTimerFinished(mTotemTimer)) { CreatureAIScript* Totem = spawnCreatureAndGetAIScript(CN_TOTEM, (getCreature()->GetPositionX() + Util::getRandomFloat(3) - 3), (getCreature()->GetPositionY() + Util::getRandomFloat(3) - 3), getCreature()->GetPositionZ(), 0, getCreature()->getFactionTemplate()); if (Totem) { Totem->despawn(60000); // Despawn in 60 seconds } switch (getScriptPhase()) { case 2: _resetTimer(mTotemTimer, 60000); break; case 3: _resetTimer(mTotemTimer, 30000); break; // Spawn them faster then phase 2 } } } }
void AIUpdate() override { if (_isTimerFinished(mSummonTime)) { // Spawn 3 Soaring Eagles for (uint8 x = 0; x < 3; x++) { /*CreatureAIScript* Eagle =*/ spawnCreatureAndGetAIScript(CN_SOARING_EAGLE, (getCreature()->GetPositionX() + Util::getRandomFloat(12) - 10), (getCreature()->GetPositionY() + Util::getRandomFloat(12) - 15), getCreature()->GetPositionZ(), getCreature()->GetOrientation(), getCreature()->getFactionTemplate()); } sendChatMessage(CHAT_MSG_MONSTER_YELL, 12019, "Feed, me bruddahs!"); // Restart the timer _resetTimer(mSummonTime, 120000); } }
MRESULT EXPENTRY threadTimerMgrProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) { if (msg == WM_TIMER) { switch (LONGFROMMP(mp1)) { // scadenza ritardo sparizione puntatore mouse --------------------- case TID_MOUSEPTR: g.is.hidePtrTmr = 0; WinStopTimer(g.timerThrd.hab, g.timerThrd.hwnd, TID_MOUSEPTR); msg = _sysValue(SV_POINTERLEVEL); if (!msg) { WinShowPointer(HWND_DESKTOP, FALSE); WinShowPointer(HWND_DESKTOP, FALSE); } else if (msg > 0x7fff) { do { WinShowPointer(HWND_DESKTOP, FALSE); } while (_sysValue(SV_POINTERLEVEL) > 0x7fff); WinShowPointer(HWND_DESKTOP, FALSE); } /* endif */ g.is.ptrHidden = 1; break; // scadenza ritardo attivazione automatica finestre ---------------- case TID_AUTOFOCUS: _resetTimer(g.hwnd.autoFocus, TID_AUTOFOCUS); break; // scadenza ritardo sparizione barra titolo ------------------------ case TID_HIDETITLE: _resetTimer(g.hwnd.hideTitle, TID_HIDETITLE); break; // scadenza ritardo apparizione barra titolo ----------------------- case TID_UNHIDETITLE: _resetTimer(g.hwnd.unhideTitle, TID_UNHIDETITLE); break; // scadenza ritardo attivazione automatica barra menu -------------- // case TID_MENUACTIVATE: // _resetTimer(g.hwndActMenu, TID_MENUACTIVATE); // break; } /* endswitch */ return (MRESULT)FALSE; } /* endif */ // reset all the bitmaps if (msg == SMWM_RESETBITMAPS) { HINI hini; if (o.tb.on || o.tb.htbar || o.tb.roll) { if (freeBitmapResources() && (NULLHANDLE != (hini = stlrOpenProfile()))) { initResources(hini, FALSE); repaintAll(); PrfCloseProfile(hini); } /* endif */ } /* endif */ return (MRESULT)FALSE; } /* endif */ if ((msg == SMWM_DISABLE) && ((HWND)mp2 == hwnd)) { if ((BOOL)mp1) { // disabilita tutte le funzioni o.gen.disabled = 1; g.hwnd.menu = 0; g.is.cinitmenu = 0; freeBitmapResources(); stlrStopHitTestCheck(); } else if (!g.is.expired) { // riabilita funzioni HINI hini; o.gen.disabled = 0; if (NULLHANDLE != (hini = stlrOpenProfile())) initResources(hini, FALSE); } /* endif */ WinBroadcastMsg(HWND_DESKTOP, WM_STYLER2, (MPARAM)STLR_DISABLED, (MPARAM)o.gen.disabled, BMSG_POST | BMSG_FRAMEONLY | BMSG_DESCENDANTS); return (MRESULT)FALSE; } // end if if (msg == WM_STYLER2) { if ((ULONG)mp1 == STLR_HIDEALL) { g.is.hideall = !g.is.hideall; _stlrMsgPostAll(STLR_HIDEALL, 0); } else if ((ULONG)mp1 == STLR_ROLLALL) { g.is.rollall = !g.is.rollall; _stlrMsgPostAll(STLR_ROLLALL, 0); } /* endif */ return (MRESULT)FALSE; } /* endif */ return WinDefWindowProc(hwnd, msg, mp1, mp2); }