Index: base/guard_ai.cpp =================================================================== --- base/guard_ai.cpp (revision 1633) +++ base/guard_ai.cpp (working copy) @@ -34,31 +34,133 @@ guardAI::guardAI(Creature* pCreature) : ScriptedAI(pCreature), GlobalCooldown(0), - BuffTimer(0) + ZoneAttackMsgTimer(0), + _Aggro(0) {} void guardAI::Reset() { + if(_Aggro == 2) + _Aggro = 1; GlobalCooldown = 0; - BuffTimer = 0; //Rebuff as soon as we can + Bandage = 0; + Potion = 0; + OffHand = 0; + Help = urand(30000, 50000); + yell = false; + //m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+750,true); + if(!(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 4423)) + { + m_creature->setPowerType(POWER_RAGE); + m_creature->SetMaxPower(POWER_RAGE,500); + m_creature->SetPower(POWER_RAGE,0); + bool elite = false; + int temp3 = 0; + int temp4 = 0; + int temp5 = 0; + int temp6 = 0; + temp3 = m_creature->getLevel(); + elite = m_creature->isElite(); + if(elite) + { + temp4 = temp3 * 200; + temp5 = temp3 * 120; + temp6 = temp3 * 8; + } + else + { + if(temp3 < 71) + { + temp4 = temp3 * 125; + temp5 = temp3 * 75; + temp6 = temp3 * 5; + } + else + { + temp4 = temp3 * 175; + temp5 = temp3 * 105; + temp6 = temp3 * 7; + } + } + if(m_creature->GetEntry() == 12481) + temp4 = temp4 * 4; + if(m_creature->GetEntry() == 12480) + temp4 = temp4 * 6; + if(m_creature->GetEntry() == 5624) + temp4 = temp4 * 3; + m_creature->SetMaxHealth(temp4); + m_creature->SetHealth(temp4); + m_creature->SetArmor(temp5); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,temp6); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,temp6); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,temp6); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,temp6); + m_creature->SetResistance(SPELL_SCHOOL_FROST,temp6); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,temp6); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,temp6); + } } void guardAI::Aggro(Unit *who) { - if (m_creature->GetEntry() == 15184) + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) { switch(urand(0, 2)) { case 0: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; - case 1: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; - case 2: DoScriptText(SAY_GUARD_SIL_AGGRO1, m_creature, who); break; + case 1: DoScriptText(SAY_GUARD_SIL_AGGRO2, m_creature, who); break; + case 2: DoScriptText(SAY_GUARD_SIL_AGGRO3, m_creature, who); break; } + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; } +} - if (SpellEntry const *spell = m_creature->reachWithSpellAttack(who)) - DoCastSpell(who, spell); +void guardAI::DamageDeal(Unit *done_to, uint32 &damage) +{ + if(m_creature->GetEntry() == 4423) + return; + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0: temp1 = temp2 + 40;break; + case 1: temp1 = temp2 + 50;break; + case 2: temp1 = temp2 + 60;break; + case 3: temp1 = temp2 + 70;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); } +void guardAI::DamageTaken(Unit *done_by, uint32 &damage) +{ + if(damage > m_creature->GetHealth()) + return; + + if(m_creature->GetEntry() == 4423) + return; + + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0: temp1 = temp2 + 20;break; + case 1: temp1 = temp2 + 30;break; + case 2: temp1 = temp2 + 40;break; + case 3: temp1 = temp2 + 50;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + void guardAI::JustDied(Unit *Killer) { //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels @@ -73,61 +175,273 @@ GlobalCooldown -= diff; else GlobalCooldown = 0; - //Buff timer (only buff when we are alive and not in combat - if (m_creature->isAlive() && !m_creature->isInCombat()) - if (BuffTimer < diff) - { - //Find a spell that targets friendly and applies an aura (these are generally buffs) - SpellEntry const *info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_AURA); + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; - if (info && !GlobalCooldown) - { - //Cast the buff spell - DoCastSpell(m_creature, info); + //Always decrease Bandage + if (Bandage > diff) + Bandage -= diff; + else Bandage = 0; - //Set our global cooldown - GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + //Always decrease OffHand + if (OffHand > diff) + OffHand -= diff; + else OffHand = 0; - //Set our timer to 10 minutes before rebuff - BuffTimer = 600000; - } //Try agian in 30 seconds - else BuffTimer = 30000; - }else BuffTimer -= diff; + //Always decrease Potion + if (Potion > diff) + Potion -= diff; + else Potion = 0; + if(!m_creature->isAlive()) + return; + + if (!m_creature->isInCombat() && !(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 4423)) + { + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = temp1; + temp1 = temp2 - 3; + if(temp1 > 0) + m_creature->SetPower(POWER_RAGE,temp1); + else + m_creature->SetPower(POWER_RAGE,0); + } + //Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help && !(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 4423)) + { + int entry = m_creature->GetEntry(); + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + 20; + else + X = x - 20; + if(y > Y) + Y = y + 20; + else + Y = y - 20; + m_creature->GetRespawnCoord(x,y,z); + + if(entry != 12480 && entry != 12481) + { + Helper = DoSpawnCreature(entry, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + /* Helper = DoSpawnCreature(entry, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); */ + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); + }else + { + Helper = DoSpawnCreature(68, (float) (X - x + 3), (float) (Y - y - 3), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); + Creature* Helper2 = NULL; + Helper2 = DoSpawnCreature(68, (float) (X - x - 3), (float) (Y - y + 3), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper2 && enemy) + ((CreatureAI*)Helper2->AI())->AttackStart(enemy); + Creature* Helper3 = NULL; + Helper3 = DoSpawnCreature(68, (float) (X - x + 3), (float) (Y - y + 3), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper3 && enemy) + ((CreatureAI*)Helper3->AI())->AttackStart(enemy); + } + + Help = urand(45000, 75000); + } + // Make sure our attack is ready and we arn't currently casting if (m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) { + if(m_creature->getVictim() && m_creature->SelectHostileTarget() && m_creature->GetEntry() == 3084 && OffHand > 0 && OffHand < 500) + { + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKOFF); + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + OffHand = 0; + } //If we are within range melee the target if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) { + + if(_Aggro != 2 && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 5624) + { + _Aggro = 2; + DoCastSpellIfCan(m_creature,2457); + return; + } + + if(m_creature->GetHealthPercent() > 39.0f && m_creature->HasAura(2458,EFFECT_INDEX_0) && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 5624) + { + DoCastSpellIfCan(m_creature,2457); + return; + } + bool Healing = false; - SpellEntry const *info = NULL; + int info = 0; + int Change = 0; //Select a healing spell if less than 30% hp - if (m_creature->GetHealthPercent() < 30.0f) - info = SelectSpell(m_creature, -1, -1, SELECT_TARGET_ANY_FRIEND, 0, 0, 0, 0, SELECT_EFFECT_HEALING); + if (m_creature->GetHealthPercent() < 40.0f) + { + if(Potion == 0 && !Healing) + { + Potion = 60000; + info = 17534; + Healing = true; + } + else + { + if(Bandage == 0 && !Healing) + { + Bandage = 60000; + info = 38919; + Healing = true; + } + else + if(m_creature->HasAura(2457,EFFECT_INDEX_0)) + { + info = 2458; + Change = 3; + } + }//if bandage + }//if health <40% + else + { + if(!m_creature->HasAura(2048,EFFECT_INDEX_0) && m_creature->GetPower(POWER_RAGE) > 100) + { + info = 2048; + Change = 3; + } + else + { + if(enemy && !enemy->HasAura(25203,EFFECT_INDEX_0) && m_creature->GetPower(POWER_RAGE) > 100) + { + info = 25203; + Change = 4; + } + //select a hostile spell + else + { + if(enemy && m_creature->GetPower(POWER_RAGE) > 100) + { + switch(urand(0, 7)) + { + case 0: + info = 29707; + break; + case 1: + info = 11574; + break; + case 2: + info = 30022; + break; + case 3: + info = 11597; + break; + case 4: + if(m_creature->HasAura(2457,EFFECT_INDEX_0)) + info = 25248; + else info = 20569; + break; + case 5: + if(m_creature->HasAura(2457,EFFECT_INDEX_0)) + info = 20560; + else info = 6554; + break; + case 6: + if(m_creature->HasAura(2457,EFFECT_INDEX_0)) + info = 11581; + else info = 1680; + break; + case 7: + info = 11597; + break; + }//switch + }//if rage + }//else hostile spell + }//if no demoralizing + }//if no battle shout - //No healing spell available, select a hostile spell - if (info) Healing = true; - else info = SelectSpell(m_creature->getVictim(), -1, -1, SELECT_TARGET_ANY_ENEMY, 0, 0, 0, 0, SELECT_EFFECT_DONTCARE); + if(m_creature->GetEntry() == 4423) + info = 0; - //20% chance to replace our white hit with a spell - if (info && !urand(0, 4) && !GlobalCooldown) + if(m_creature->GetEntry() == 5624) { + info = 0; + if(!m_creature->HasAura(41924,EFFECT_INDEX_0)) + DoCastSpellIfCan(m_creature, 41924); + } + + //50% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { //Cast the spell - if (Healing)DoCastSpell(m_creature, info); - else DoCastSpell(m_creature->getVictim(), info); - + if (Healing)DoCastSpellIfCan(m_creature, info); + else + { + if(Change == 3) + { + DoCastSpellIfCan(m_creature, info); + } + else + { + if(Change == 4) + DoCastSpellIfCan(enemy, info); + else + DoCastSpellIfCan(enemy, info); + } + } //Set our global cooldown GlobalCooldown = GENERIC_CREATURE_COOLDOWN; } else m_creature->AttackerStateUpdate(m_creature->getVictim()); m_creature->resetAttackTimer(); + if(m_creature->GetEntry() == 3084) + OffHand = 1000; } } else @@ -164,7 +478,7 @@ GlobalCooldown = GENERIC_CREATURE_COOLDOWN; } //If no spells available and we arn't moving run to target - else if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=CHASE_MOTION_TYPE) + else if ((*m_creature).GetMotionMaster()->GetCurrentMovementGeneratorType()!=CHASE_MOTION_TYPE) { //Cancel our current spell and then mutate new movement generator m_creature->InterruptNonMeleeSpells(false); Index: base/guard_ai.h =================================================================== --- base/guard_ai.h (revision 1633) +++ base/guard_ai.h (working copy) @@ -14,7 +14,17 @@ ~guardAI() {} uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) - uint32 BuffTimer; //This variable keeps track of buffs + uint32 Bandage; + uint32 Potion; + uint32 Help; + uint32 OffHand; + uint32 ZoneAttackMsgTimer; + bool yell; + int _Aggro; + float temp1; + float temp2; + Unit* enemy; + Creature* Helper; void Reset(); @@ -22,6 +32,10 @@ void JustDied(Unit *Killer); + void DamageDeal(Unit *done_to, uint32 &damage); + + void DamageTaken(Unit *done_by, uint32 &damage); + void UpdateAI(const uint32 diff); //common used for guards in main cities Index: scripts/custom/buffer.cpp =================================================================== --- scripts/custom/buffer.cpp (revision 0) +++ scripts/custom/buffer.cpp (revision 0) @@ -0,0 +1,2005 @@ +/* проверка русского */ +#include "precompiled.h" +long long int dengi; +int cena; + +bool GossipHello_buffer(Player *player, Creature *_Creature) + +{ + +player->ADD_GOSSIP_ITEM( 7, "Свитки" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "Заклинания" , GOSSIP_SENDER_MAIN, 4001); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +return true; + +} + + +void SendDefaultMenu_buffer(Player *player, Creature *_Creature, uint32 action ) +{ + +if(!player->getAttackers().empty()) + +{ +player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("Вы в бою!", LANG_UNIVERSAL, NULL); +return; + } + +dengi = player-> GetMoney(); +cena = 100; + +if (dengi < cena ) +{ +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Недостаточно денег", LANG_UNIVERSAL, NULL); +return; +} + +switch(action) + +{ + +case 4000: //Scrolls +player->ADD_GOSSIP_ITEM( 7, "Agility" , GOSSIP_SENDER_MAIN, 4010); +player->ADD_GOSSIP_ITEM( 7, "Intellect" , GOSSIP_SENDER_MAIN, 4011); +player->ADD_GOSSIP_ITEM( 7, "Protection" , GOSSIP_SENDER_MAIN, 4012); +player->ADD_GOSSIP_ITEM( 7, "Spirit" , GOSSIP_SENDER_MAIN, 4013); +player->ADD_GOSSIP_ITEM( 7, "Stamina" , GOSSIP_SENDER_MAIN, 4014); +player->ADD_GOSSIP_ITEM( 7, "Strength" , GOSSIP_SENDER_MAIN, 4015); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4001: //Class +player->ADD_GOSSIP_ITEM( 7, "Друид" , GOSSIP_SENDER_MAIN, 4016); +player->ADD_GOSSIP_ITEM( 7, "Маг" , GOSSIP_SENDER_MAIN, 4017); +player->ADD_GOSSIP_ITEM( 7, "Паладин" , GOSSIP_SENDER_MAIN, 4018); +player->ADD_GOSSIP_ITEM( 7, "Жрец" , GOSSIP_SENDER_MAIN, 4019); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4010: //Scrolls of Agility +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 1 (50 sp, 10 lvl)" , GOSSIP_SENDER_MAIN, 2000); +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 2 (75 sp, 15 lvl)" , GOSSIP_SENDER_MAIN, 2001); +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 3 (1 gp, 20 lvl)" , GOSSIP_SENDER_MAIN, 2002); +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 4 (1.5 gp, 25 lvl)" , GOSSIP_SENDER_MAIN, 2003); +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 5 (2 gp, 30 lvl)" , GOSSIP_SENDER_MAIN, 2004); +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 6 (2.5 gp, 35 lvl)" , GOSSIP_SENDER_MAIN, 2005); +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 7 (3 gp, 40 lvl)" , GOSSIP_SENDER_MAIN, 2006); +player->ADD_GOSSIP_ITEM( 5, "Agility Rank 8 (4 gp, 50 lvl)" , GOSSIP_SENDER_MAIN, 2007); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4011: //Scrolls of Intellect +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 1 (50 sp, 10 lvl)" , GOSSIP_SENDER_MAIN, 2008); +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 2 (75 sp, 15 lvl)" , GOSSIP_SENDER_MAIN, 2009); +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 3 (1 gp, 20 lvl)" , GOSSIP_SENDER_MAIN, 2010); +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 4 (1.5 gp, 25 lvl)" , GOSSIP_SENDER_MAIN, 2011); +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 5 (2 gp, 30 lvl)" , GOSSIP_SENDER_MAIN, 2012); +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 6 (2.5 gp, 35 lvl)" , GOSSIP_SENDER_MAIN, 2013); +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 7 (3 gp, 40 lvl)" , GOSSIP_SENDER_MAIN, 2014); +player->ADD_GOSSIP_ITEM( 5, "Intellect Rank 8 (4 gp, 50 lvl)" , GOSSIP_SENDER_MAIN, 2015); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4012: //Scrolls of Protection +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 1 (50 sp, 10 lvl)" , GOSSIP_SENDER_MAIN, 2016); +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 2 (75 sp, 15 lvl)" , GOSSIP_SENDER_MAIN, 2017); +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 3 (1 gp, 20 lvl)" , GOSSIP_SENDER_MAIN, 2018); +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 4 (1.5 gp, 25 lvl)" , GOSSIP_SENDER_MAIN, 2019); +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 5 (2 gp, 30 lvl)" , GOSSIP_SENDER_MAIN, 2020); +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 6 (2.5 gp, 35 lvl)" , GOSSIP_SENDER_MAIN, 2021); +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 7 (3 gp, 40 lvl)" , GOSSIP_SENDER_MAIN, 2022); +player->ADD_GOSSIP_ITEM( 5, "Protection Rank 8 (4 gp, 50 lvl)" , GOSSIP_SENDER_MAIN, 2023); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4013: //Scrolls of Spirit +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 1 (50 sp, 10 lvl)" , GOSSIP_SENDER_MAIN, 2024); +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 2 (75 sp, 15 lvl)" , GOSSIP_SENDER_MAIN, 2025); +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 3 (1 gp, 20 lvl)" , GOSSIP_SENDER_MAIN, 2026); +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 4 (1.5 gp, 25 lvl)" , GOSSIP_SENDER_MAIN, 2027); +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 5 (2 gp, 30 lvl)" , GOSSIP_SENDER_MAIN, 2028); +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 6 (2.5 gp, 35 lvl)" , GOSSIP_SENDER_MAIN, 2029); +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 7 (3 gp, 40 lvl)" , GOSSIP_SENDER_MAIN, 2030); +player->ADD_GOSSIP_ITEM( 5, "Spirit Rank 8 (4 gp, 50 lvl)" , GOSSIP_SENDER_MAIN, 2031); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4014: //Scrolls of Stamina +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 1 (50 sp, 10 lvl)" , GOSSIP_SENDER_MAIN, 2032); +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 2 (75 sp, 15 lvl)" , GOSSIP_SENDER_MAIN, 2033); +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 3 (1 gp, 20 lvl)" , GOSSIP_SENDER_MAIN, 2034); +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 4 (1.5 gp, 25 lvl)" , GOSSIP_SENDER_MAIN, 2035); +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 5 (2 gp, 30 lvl)" , GOSSIP_SENDER_MAIN, 2036); +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 6 (2.5 gp, 35 lvl)" , GOSSIP_SENDER_MAIN, 2037); +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 7 (3 gp, 40 lvl)" , GOSSIP_SENDER_MAIN, 2038); +player->ADD_GOSSIP_ITEM( 5, "Stamina Rank 8 (4 gp, 50 lvl)" , GOSSIP_SENDER_MAIN, 2039); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4015: //Scrolls of Strength +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 1 (50 sp, 10 lvl)" , GOSSIP_SENDER_MAIN, 2040); +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 2 (75 sp, 15 lvl)" , GOSSIP_SENDER_MAIN, 2041); +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 3 (1 gp, 20 lvl)" , GOSSIP_SENDER_MAIN, 2042); +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 4 (1.5 gp, 25 lvl)" , GOSSIP_SENDER_MAIN, 2043); +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 5 (2 gp, 30 lvl)" , GOSSIP_SENDER_MAIN, 2044); +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 6 (2.5 gp, 35 lvl)" , GOSSIP_SENDER_MAIN, 2045); +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 7 (3 gp, 40 lvl)" , GOSSIP_SENDER_MAIN, 2046); +player->ADD_GOSSIP_ITEM( 5, "Strength Rank 8 (4 gp, 50 lvl)" , GOSSIP_SENDER_MAIN, 2047); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4016: //Druid +player->ADD_GOSSIP_ITEM( 7, "Mark of the Wild" , GOSSIP_SENDER_MAIN, 4020); +player->ADD_GOSSIP_ITEM( 7, "Thorns" , GOSSIP_SENDER_MAIN, 4021); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4017: //Mage +player->ADD_GOSSIP_ITEM( 7, "Arcane Intellect" , GOSSIP_SENDER_MAIN, 4022); +player->ADD_GOSSIP_ITEM( 7, "Dampen Magic" , GOSSIP_SENDER_MAIN, 4023); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4018: //Paladin +player->ADD_GOSSIP_ITEM( 7, "Blessing of Might" , GOSSIP_SENDER_MAIN, 4024); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Kings (50 sp, 10 lvl)" , GOSSIP_SENDER_MAIN, 3041); +player->ADD_GOSSIP_ITEM( 5, "Greater Blessing of Kings (2 gp, 30 lvl)" , GOSSIP_SENDER_MAIN, 3042); +player->ADD_GOSSIP_ITEM( 7, "Blessing of Wisdom" , GOSSIP_SENDER_MAIN, 4025); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4019: //Priest +player->ADD_GOSSIP_ITEM( 7, "Power Word: Fortitude" , GOSSIP_SENDER_MAIN, 4026); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4020: //Mark of the Wild +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 1 (50 sp, 10 lvl)", GOSSIP_SENDER_MAIN, 3000); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 2 (75 sp, 15 lvl)", GOSSIP_SENDER_MAIN, 3001); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 3 (1 gp, 20 lvl)", GOSSIP_SENDER_MAIN, 3002); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 4 (1.5 gp, 25 lvl)", GOSSIP_SENDER_MAIN, 3003); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 5 (2 gp, 30 lvl)", GOSSIP_SENDER_MAIN, 3004); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 6 (2.5 gp, 35 lvl)", GOSSIP_SENDER_MAIN, 3005); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 7 (3 gp, 40 lvl)", GOSSIP_SENDER_MAIN, 3006); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 8 (4 gp, 50 lvl)", GOSSIP_SENDER_MAIN, 3007); +player->ADD_GOSSIP_ITEM( 5, "Mark of the Wild Rank 9 (5 gp, 60 lvl)", GOSSIP_SENDER_MAIN, 3008); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4016); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4021: //Thorns +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 1 (50 sp, 10 lvl)", GOSSIP_SENDER_MAIN, 3009); +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 2 (75 sp, 15 lvl)", GOSSIP_SENDER_MAIN, 3010); +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 3 (1 gp, 20 lvl)", GOSSIP_SENDER_MAIN, 3011); +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 4 (1.5 gp, 25 lvl)", GOSSIP_SENDER_MAIN, 3012); +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 5 (2 gp, 30 lvl)", GOSSIP_SENDER_MAIN, 3013); +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 6 (2.5 gp, 35 lvl)", GOSSIP_SENDER_MAIN, 3014); +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 7 (3 gp, 40 lvl)", GOSSIP_SENDER_MAIN, 3015); +player->ADD_GOSSIP_ITEM( 5, "Thorns Rank 8 (4 gp, 50 lvl)", GOSSIP_SENDER_MAIN, 3016); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4016); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4022: //Arcane Intellect +player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect Rank 1 (50 sp, 10 lvl)", GOSSIP_SENDER_MAIN, 3017); +player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect Rank 2 (75 sp, 15 lvl)", GOSSIP_SENDER_MAIN, 3018); +player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect Rank 3 (1 gp, 20 lvl)", GOSSIP_SENDER_MAIN, 3019); +player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect Rank 4 (1.5 gp, 25 lvl)", GOSSIP_SENDER_MAIN, 3020); +player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect Rank 5 (2 gp, 30 lvl)", GOSSIP_SENDER_MAIN, 3021); +player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect Rank 6 (2.5 gp, 35 lvl)", GOSSIP_SENDER_MAIN, 3022); +player->ADD_GOSSIP_ITEM( 5, "Arcane Intellect Rank 7 (3 gp, 40 lvl)", GOSSIP_SENDER_MAIN, 3023); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4017); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4023: //Dampen Magic +player->ADD_GOSSIP_ITEM( 5, "Dampen Magic Rank 1 (50 sp, 10 lvl)", GOSSIP_SENDER_MAIN, 3024); +player->ADD_GOSSIP_ITEM( 5, "Dampen Magic Rank 2 (75 sp, 15 lvl)", GOSSIP_SENDER_MAIN, 3025); +player->ADD_GOSSIP_ITEM( 5, "Dampen Magic Rank 3 (1 gp, 20 lvl)", GOSSIP_SENDER_MAIN, 3026); +player->ADD_GOSSIP_ITEM( 5, "Dampen Magic Rank 4 (1.5 gp, 25 lvl)", GOSSIP_SENDER_MAIN, 3027); +player->ADD_GOSSIP_ITEM( 5, "Dampen Magic Rank 5 (2 gp, 30 lvl)", GOSSIP_SENDER_MAIN, 3028); +player->ADD_GOSSIP_ITEM( 5, "Dampen Magic Rank 6 (2.5 gp, 35 lvl)", GOSSIP_SENDER_MAIN, 3029); +player->ADD_GOSSIP_ITEM( 5, "Dampen Magic Rank 7 (3 gp, 40 lvl)", GOSSIP_SENDER_MAIN, 3030); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4017); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4024: //Blessing of Might +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 1 (50 sp, 10 lvl)", GOSSIP_SENDER_MAIN, 3031); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 2 (75 sp, 15 lvl)", GOSSIP_SENDER_MAIN, 3032); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 3 (1 gp, 20 lvl)", GOSSIP_SENDER_MAIN, 3033); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 4 (1.5 gp, 25 lvl)", GOSSIP_SENDER_MAIN, 3034); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 5 (2 gp, 30 lvl)", GOSSIP_SENDER_MAIN, 3035); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 6 (2.5 gp, 35 lvl)", GOSSIP_SENDER_MAIN, 3036); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 7 (3 gp, 40 lvl)", GOSSIP_SENDER_MAIN, 3037); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 8 (4 gp, 50 lvl)", GOSSIP_SENDER_MAIN, 3038); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 9 (5 gp, 60 lvl)", GOSSIP_SENDER_MAIN, 3039); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Might Rank 10 (6 gp, 70 lvl)", GOSSIP_SENDER_MAIN, 3040); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4018); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4025: //Blessing of Wisdom +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 1 (50 sp, 10 lvl)", GOSSIP_SENDER_MAIN, 3043); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 2 (75 sp, 15 lvl)", GOSSIP_SENDER_MAIN, 3044); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 3 (1 gp, 20 lvl)", GOSSIP_SENDER_MAIN, 3045); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 4 (1.5 gp, 25 lvl)", GOSSIP_SENDER_MAIN, 3046); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 5 (2 gp, 30 lvl)", GOSSIP_SENDER_MAIN, 3047); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 6 (2.5 gp, 35 lvl)", GOSSIP_SENDER_MAIN, 3048); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 7 (3 gp, 40 lvl)", GOSSIP_SENDER_MAIN, 3049); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 8 (4 gp, 50 lvl)", GOSSIP_SENDER_MAIN, 3050); +player->ADD_GOSSIP_ITEM( 5, "Blessing of Wisdom Rank 9 (5 gp, 60 lvl)", GOSSIP_SENDER_MAIN, 3051); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4018); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4026: //Power Word: Fortitude +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 1 (50 sp, 10 lvl)", GOSSIP_SENDER_MAIN, 3052); +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 2 (75 sp, 15 lvl)", GOSSIP_SENDER_MAIN, 3053); +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 3 (1 gp, 20 lvl)", GOSSIP_SENDER_MAIN, 3054); +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 4 (1.5 gp, 25 lvl)", GOSSIP_SENDER_MAIN, 3055); +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 5 (2 gp, 30 lvl)", GOSSIP_SENDER_MAIN, 3056); +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 6 (2.5 gp, 35 lvl)", GOSSIP_SENDER_MAIN, 3057); +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 7 (3 gp, 40 lvl)", GOSSIP_SENDER_MAIN, 3058); +player->ADD_GOSSIP_ITEM( 5, "Power Word: Fortitude Rank 8 (4 gp, 50 lvl)", GOSSIP_SENDER_MAIN, 3059); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 4019); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 4009); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 4009: //Back To Main Menu +player->ADD_GOSSIP_ITEM( 7, "Свитки" , GOSSIP_SENDER_MAIN, 4000); +player->ADD_GOSSIP_ITEM( 7, "Магия" , GOSSIP_SENDER_MAIN, 4001); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 2000: // Scroll of Agility. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8115,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2001: // Scroll of Agility II. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8116,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2002: // Scroll of Agility III. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8117,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2003: // Scroll of Agility IV. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,12174,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2004: // Scroll of Agility V. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,33077,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2005: // Scroll of Agility VI. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,43194,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2006: // Scroll of Agility VII. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,58450,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2007: // Scroll of Agility VIII. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,58451,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2008: // Scroll of Intellect. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8096,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2009: // Scroll of Intellect II. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8097,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2010: // Scroll of Intellect III. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8098,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2011: // Scroll of Intellect IV. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,12176,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2012: // Scroll of Intellect V. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,33078,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2013: // Scroll of Intellect VI. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,43195,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2014: // Scroll of Intellect VII. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48099,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2015: // Scroll of Intellect VIII. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48100,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2016: // Scroll of Protection. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8091,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2017: // Scroll of Protection II. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8094,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2018: // Scroll of Protection III. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8095,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2019: // Scroll of Protection IV. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,12175,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2020: // Scroll of Protection V. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,33079,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2021: // Scroll of Protection VI. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,43196,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + + +case 2022: // Scroll of Protection VII. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,58452,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2023: // Scroll of Protection VIII. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,58453,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2024: // Scroll of Spirit. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8112,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2025: // Scroll of Spirit II. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8113,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2026: // Scroll of Spirit III. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8114,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2027: // Scroll of Spirit IV. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,12177,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2028: // Scroll of Spirit V. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,33080,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2029: // Scroll of Spirit VI. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,43197,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2030: // Scroll of Spirit VII. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48103,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2031: // Scroll of Spirit VIII. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48104,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2032: // Scroll of Stamina. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8099,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2033: // Scroll of Stamina II. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8100,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2034: // Scroll of Stamina III. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8101,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2035: // Scroll of Stamina IV. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,12178,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2036: // Scroll of Stamina V. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,33081,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2037: // Scroll of Stamina VI. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,43198,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2038: // Scroll of Stamina VII. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48101,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2039: // Scroll of Stamina VIII. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48102,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2040: // Scroll of Strength. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8118,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2041: // Scroll of Strength II. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8119,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2042: // Scroll of Strength III. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8120,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2043: // Scroll of Strength IV. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,12179,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2044: // Scroll of Strength V. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,33082,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2045: // Scroll of Strength VI. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,43199,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2046: // Scroll of Strength VII. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,58448,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 2047: // Scroll of Strength VIII. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,58449,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3000: // Mark of the Wild Rank 1. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1126,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3001: // Mark of the Wild Rank 2. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,5232,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3002: // Mark of the Wild Rank 3. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,6756,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3003: // Mark of the Wild Rank 4. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,5234,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3004: // Mark of the Wild Rank 5. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8907,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3005: // Mark of the Wild Rank 6. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,9884,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3006: // Mark of the Wild Rank 7. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,9885,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3007: // Mark of the Wild Rank 8. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,26990,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3008: // Mark of the Wild Rank 9. + +if( player->getLevel() >= 60) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48469,true); +player->ModifyMoney(-500*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 60 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3009: // Thorns Rank 1. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,467,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3010: // Thorns Rank 2. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,782,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3011: // Thorns Rank 3. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1075,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3012: // Thorns Rank 4. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8914,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3013: // Thorns Rank 5. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,9756,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3014: // Thorns Rank 6. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,9910,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3015: // Thorns Rank 7. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,26992,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3016: // Thorns Rank 8. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,53307,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3017: // Arcane Intellect Rank 1. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1459,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3018: // Arcane Intellect Rank 2. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1460,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3019: // Arcane Intellect Rank 3. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1461,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3020: // Arcane Intellect Rank 4. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,10156,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3021: // Arcane Intellect Rank 5. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,10157,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3022: // Arcane Intellect Rank 6. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,27126,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3023: // Arcane Intellect Rank 7. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,42995,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3024: // Dampen Magic Rank 1. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,604,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3025: // Dampen Magic Rank 2. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8450,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3026: // Dampen Magic Rank 3. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,8451,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3027: // Dampen Magic Rank 4. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,10173,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3028: // Dampen Magic Rank 5. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,10174,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3029: // Dampen Magic Rank 6. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,33944,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3030: // Dampen Magic Rank 7. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,43015,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3031: // Blessing of Might Rank 1. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19740,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3032: // Blessing of Might Rank 2. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19834,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3033: // Blessing of Might Rank 3. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19835,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3034: // Blessing of Might Rank 4. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19836,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3035: // Blessing of Might Rank 5. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19837,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3036: // Blessing of Might Rank 6. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19838,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3037: // Blessing of Might Rank 7. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,25291,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3038: // Blessing of Might Rank 8. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,27140,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3039: // Blessing of Might Rank 9. + +if( player->getLevel() >= 60) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48931,true); +player->ModifyMoney(-500*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 60 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3040: // Blessing of Might Rank 10. + +if( player->getLevel() >= 70) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48932,true); +player->ModifyMoney(-600*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 70 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3041: // Blessing of Kings. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,20217,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3042: // Greater Blessing of Kings. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,25898,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3043: // Blessing of Wisdom Rank 1. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19742,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3044: // Blessing of Wisdom Rank 2. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19850,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3045: // Blessing of Wisdom Rank 3. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19852,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3046: // Blessing of Wisdom Rank 4. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19853,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3047: // Blessing of Wisdom Rank 5. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,19854,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3048: // Blessing of Wisdom Rank 6. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,25290,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3049: // Blessing of Wisdom Rank 7. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,27142,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + + +case 3050: // Blessing of Wisdom Rank 8. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48935,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3051: // Blessing of Wisdom Rank 9. + +if( player->getLevel() >= 60) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48936,true); +player->ModifyMoney(-500*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 60 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3052: // Power Word: Fortitude Rank 1. + +if( player->getLevel() >= 10) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1243,true); +player->ModifyMoney(-50*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 10 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3053: // Power Word: Fortitude Rank 2. + +if( player->getLevel() >= 15) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1244,true); +player->ModifyMoney(-75*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 15 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3054: // Power Word: Fortitude Rank 3. + +if( player->getLevel() >= 20) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,1245,true); +player->ModifyMoney(-100*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 20 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3055: // Power Word: Fortitude Rank 4. + +if( player->getLevel() >= 25) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,2791,true); +player->ModifyMoney(-150*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 25 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3056: // Power Word: Fortitude Rank 5. + +if( player->getLevel() >= 30) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,10937,true); +player->ModifyMoney(-200*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 30 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3057: // Power Word: Fortitude Rank 6. + +if( player->getLevel() >= 35) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,23948,true); +player->ModifyMoney(-250*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 35 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3058: // Power Word: Fortitude Rank 7. + +if( player->getLevel() >= 40) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,25389,true); +player->ModifyMoney(-300*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 40 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + +case 3059: // Power Word: Fortitude Rank 8. + +if( player->getLevel() >= 50) + +{ +player->CLOSE_GOSSIP_MENU(); +player->CastSpell(player,48161,true); +player->ModifyMoney(-400*cena); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Необходимо иметь 50 уровень!", LANG_UNIVERSAL, NULL); +} + +break; + + +} + + +} + +bool GossipSelect_buffer(Player *player, Creature *_Creature, uint32 + +sender, uint32 action ) + +{ +// Main menu +if (sender == GOSSIP_SENDER_MAIN) +SendDefaultMenu_buffer(player, _Creature, action ); + +return true; + +} +void AddSC_buffer() +{ + Script *newscript; + +newscript = new Script; +newscript->Name = "buffer"; +newscript->pGossipHello = &GossipHello_buffer; +newscript->pGossipSelect = &GossipSelect_buffer; +newscript->pItemHello = NULL; +newscript->pGOHello = NULL; +newscript->pAreaTrigger = NULL; +newscript->pItemQuestAccept = NULL; +newscript->pGOQuestAccept = NULL; +newscript->pGOChooseReward = NULL; + +newscript->RegisterSelf(); +} Index: scripts/custom/go_drink.cpp =================================================================== --- scripts/custom/go_drink.cpp (revision 0) +++ scripts/custom/go_drink.cpp (revision 0) @@ -0,0 +1,89 @@ +/* проверка русского */ +#include "precompiled.h" + +#define SPELL_DRINK 39980 +#define SPELL_BUEEE 49867 +#define BUEEE_CHANCE_PERCENT 4 //chance of random "buuuueeeee" +#define MAXUINT16 65535 +#define DRUNK_LIMIT_MAX 5 +#define DRUNK_LIMIT_HIGH 4 +#define DRUNK_LIMIT_AVERAGE 3 +#define DRUNK_LIMIT_LOW 2 +#define DRUNK_LIMIT_MIN 1 +#define DRUNK_LIMIT_SEED_MAX 10 + +bool GOHello_go_fanta(Player *player, GameObject* _GO) +{ + if (!player || !_GO) + return true; + if (player->getLevel() < 18) + { + player->GetSession()->SendNotification("Детям до 18 уровня алкоголь не подается!"); + return true; + } + //check spell cooldown + if (player->GetSpellCooldownDelay(SPELL_DRINK) != 0) + { + player->GetSession()->SendNotification("Между первой и второй - перерывчик небольшой!"); + return true; + } + //barrier indicates how much player can drink before "buuuueeeee" occurs + uint32 barrier = player->GetGUIDLow() % DRUNK_LIMIT_SEED_MAX; + //depend barrier from character's race + switch (player->getRace()) + { + case RACE_TAUREN: barrier += DRUNK_LIMIT_MAX; break; + case RACE_DRAENEI: + case RACE_DWARF: barrier += DRUNK_LIMIT_HIGH; break; + case RACE_ORC: + case RACE_HUMAN: barrier += DRUNK_LIMIT_AVERAGE; break; + case RACE_BLOODELF: + case RACE_NIGHTELF: + case RACE_UNDEAD_PLAYER: barrier += DRUNK_LIMIT_LOW; break; + case RACE_GNOME: break; + } + //so we going to adapt maximum of barrier to maximum of drunk + barrier *= MAXUINT16 / (DRUNK_LIMIT_SEED_MAX + DRUNK_LIMIT_MAX); + player->CastSpell(player, SPELL_DRINK, false); + uint16 drunkValue = player->GetDrunkValue(); + if (drunkValue > barrier || rand() % (100 / BUEEE_CHANCE_PERCENT) == 0) + { + player->Say("Ой, меня сейчас стошнит!", LANG_UNIVERSAL); + player->CastSpell(NULL, SPELL_BUEEE, true); + } + return true; +} + +bool GOHello_go_pomoi(Player *player, GameObject* _GO) +{ + if (!player || !_GO) + return true; + uint16 drunkValue = player->GetDrunkValue(); + if ( drunkValue == 0) + { + player->GetSession()->SendNotification("Больше ни в одном глазу!"); + return true; + } + player->CastSpell(NULL, 49867, false); + if (drunkValue <= 10000) + drunkValue = 0; + else + drunkValue -= 10000; + player->SetDrunkValue(drunkValue); + return true; +} + +void AddSC_go_drink() +{ + Script *newscript; + + newscript = new Script; + newscript->Name= "go_fanta"; + newscript->pGOHello = GOHello_go_fanta; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="go_pomoi"; + newscript->pGOHello = GOHello_go_pomoi; + newscript->RegisterSelf(); +} Index: scripts/custom/guildmaster.cpp =================================================================== --- scripts/custom/guildmaster.cpp (revision 0) +++ scripts/custom/guildmaster.cpp (revision 0) @@ -0,0 +1,342 @@ +/* проверка русского */ +#include "precompiled.h" + +extern DatabaseMysql SD2Database; + +#define MSG_GOSSIP_TELE "Отправиться в Резиденцию гильдии" +#define MSG_GOSSIP_BUY "Купить Резиденцию гильдии (35 000 золотых)" +#define MSG_GOSSIP_SELL "Продать Резиденцию гильдии (20 000 золотых)" +#define MSG_GOSSIP_NEXTPAGE "Далее -->" +#define MSG_INCOMBAT "Вы в бою!" +#define MSG_NOGUILDHOUSE "Ваша гильдия не имеет Резиденции!" +#define MSG_NOFREEGH "Все Резиденции куплены." +#define MSG_ALREADYHAVEGH "У вас уже есть Резиденция (%s)." +#define MSG_NOTENOUGHMONEY "Денег не хватает. Требуется %u золотых для покупки Резиденции." +#define MSG_GHOCCUPIED "Эта Резиденция уже выкуплена" +#define MSG_CONGRATULATIONS "Поздравляю! Теперь у вашей гильдии есть Резиденция." +#define MSG_SOLD "Вы продали Резиденцию гильдии и получили %u золотых." +#define MSG_NOTINGUILD "Вы не состоите в гильдии, найдите себе что-нибудь." + +#define CODE_SELL "SELL" +#define MSG_CODEBOX_SELL "Введите \"" CODE_SELL "\" в следующем окне, если и правда хотите продать Резиденцию гильдии." + +#define OFFSET_GH_ID_TO_ACTION 1500 +#define OFFSET_SHOWBUY_FROM 10000 + +#define ACTION_TELE 1001 +#define ACTION_SHOW_BUYLIST 1002 //deprecated. Use (OFFSET_SHOWBUY_FROM + 0) instead +#define ACTION_SELL_GUILDHOUSE 1003 + +#define ICON_GOSSIP_BALOON 0 +#define ICON_GOSSIP_WING 2 +#define ICON_GOSSIP_BOOK 3 +#define ICON_GOSSIP_WHEEL1 4 +#define ICON_GOSSIP_WHEEL2 5 +#define ICON_GOSSIP_GOLD 6 +#define ICON_GOSSIP_BALOONDOTS 7 +#define ICON_GOSSIP_TABARD 8 +#define ICON_GOSSIP_XSWORDS 9 + +#define COST_GH_BUY 350000000 // 35 000 g. +#define COST_GH_SELL 200000000 // 20 000 g. + +#define GOSSIP_COUNT_MAX 10 + +bool isPlayerGuildLeader(Player *player) +{ + return (player->GetRank() == 0) && (player->GetGuildId() != 0); +} + +bool getGuildHouseCoords(uint32 guildId, float &x, float &y, float &z, uint32 &map) +{ + if (guildId == 0) + { + //if player has no guild + return false; + } + + QueryResult *result; + result = SD2Database.PQuery("SELECT `x`, `y`, `z`, `map` FROM `guildhouses` WHERE `guildId` = %u", guildId); + if(result) + { + Field *fields = result->Fetch(); + x = fields[0].GetFloat(); + y = fields[1].GetFloat(); + z = fields[2].GetFloat(); + map = fields[3].GetUInt32(); + delete result; + return true; + } + return false; +} + +void teleportPlayerToGuildHouse(Player *player, Creature *_creature) +{ + if (player->GetGuildId() == 0) + { + //if player has no guild + _creature->MonsterWhisper(MSG_NOTINGUILD, player->GetGUID()); + return; + } + + if (!player->getAttackers().empty()) + { + //if player in combat + _creature->MonsterSay(MSG_INCOMBAT, LANG_UNIVERSAL, player->GetGUID()); + return; + } + + float x, y, z; + uint32 map; + + if (getGuildHouseCoords(player->GetGuildId(), x, y, z, map)) + { + //teleport player to the specified location + player->TeleportTo(map, x, y, z, 0.0f); + } + else + _creature->MonsterWhisper(MSG_NOGUILDHOUSE, player->GetGUID()); + +} + +bool showBuyList(Player *player, Creature *_creature, uint32 showFromId = 0) +{ + //show not occupied guildhouses + + QueryResult *result; + result = SD2Database.PQuery("SELECT `id`, `comment` FROM `guildhouses` WHERE `guildId` = 0 AND `id` > %u ORDER BY `id` ASC LIMIT %u", + showFromId, GOSSIP_COUNT_MAX); + + if (result) + { + uint32 guildhouseId = 0; + std::string comment = ""; + do + { + + Field *fields = result->Fetch(); + + guildhouseId = fields[0].GetInt32(); + comment = fields[1].GetString(); + + //send comment as a gossip item + //transmit guildhouseId in Action variable + player->ADD_GOSSIP_ITEM(ICON_GOSSIP_TABARD, comment, GOSSIP_SENDER_MAIN, + guildhouseId + OFFSET_GH_ID_TO_ACTION); + + } while (result->NextRow()); + + if (result->GetRowCount() == GOSSIP_COUNT_MAX) + { + //assume that we have additional page + //add link to next GOSSIP_COUNT_MAX items + player->ADD_GOSSIP_ITEM(ICON_GOSSIP_BALOONDOTS, MSG_GOSSIP_NEXTPAGE, GOSSIP_SENDER_MAIN, + guildhouseId + OFFSET_SHOWBUY_FROM); + } + + delete result; + + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID()); + + return true; + } else + { + if (!showFromId) + { + //all guildhouses are occupied + _creature->MonsterWhisper(MSG_NOFREEGH, player->GetGUID()); + player->CLOSE_GOSSIP_MENU(); + } else + { + //this condition occurs when COUNT(guildhouses) % GOSSIP_COUNT_MAX == 0 + //just show GHs from beginning + showBuyList(player, _creature, 0); + } + } + + return false; +} + +bool isPlayerHasGuildhouse(Player *player, Creature *_creature, bool whisper = false) +{ + + QueryResult *result; + + result = SD2Database.PQuery("SELECT `comment` FROM `guildhouses` WHERE `guildId` = %u", + player->GetGuildId()); + + if (result) + { + if (whisper) + { + //whisper to player "already have etc..." + Field *fields = result->Fetch(); + char msg[100]; + sprintf(msg, MSG_ALREADYHAVEGH, fields[0].GetString()); + _creature->MonsterWhisper(msg, player->GetGUID()); + } + + delete result; + return true; + } + return false; + +} + +void buyGuildhouse(Player *player, Creature *_creature, uint32 guildhouseId) +{ + if (player->GetMoney() < COST_GH_BUY) + { + //show how much money player need to buy GH (in gold) + char msg[100]; + sprintf(msg, MSG_NOTENOUGHMONEY, COST_GH_BUY / 10000); + _creature->MonsterWhisper(msg, player->GetGUID()); + return; + } + + if (isPlayerHasGuildhouse(player, _creature, true)) + { + //player already have GH + return; + } + + QueryResult *result; + + //check if somebody already occupied this GH + result = SD2Database.PQuery("SELECT `id` FROM `guildhouses` WHERE `id` = %u AND `guildId` <> 0", + guildhouseId); + + if (result) + { + delete result; + _creature->MonsterWhisper(MSG_GHOCCUPIED, player->GetGUID()); + return; + } + + //update DB + result = SD2Database.PQuery("UPDATE `guildhouses` SET `guildId` = %u WHERE `id` = %u", + player->GetGuildId(), guildhouseId); + + if (result) + delete result; + + player->ModifyMoney(-COST_GH_BUY); + _creature->MonsterSay(MSG_CONGRATULATIONS, LANG_UNIVERSAL, player->GetGUID()); + +} + +void sellGuildhouse(Player *player, Creature *_creature) +{ + if (isPlayerHasGuildhouse(player, _creature)) + { + QueryResult *result; + + result = SD2Database.PQuery("UPDATE `guildhouses` SET `guildId` = 0 WHERE `guildId` = %u", + player->GetGuildId()); + + if (result) + delete result; + + player->ModifyMoney(COST_GH_SELL); + + //display message e.g. "here your money etc." + char msg[100]; + sprintf(msg, MSG_SOLD, COST_GH_SELL / 10000); + _creature->MonsterWhisper(msg, player->GetGUID()); + } +} + +bool GossipHello_guildmaster(Player *player, Creature *_creature) +{ + player->ADD_GOSSIP_ITEM(ICON_GOSSIP_BALOON, MSG_GOSSIP_TELE, + GOSSIP_SENDER_MAIN, ACTION_TELE); + + if (isPlayerGuildLeader(player)) + { + //show additional menu for guild leader + player->ADD_GOSSIP_ITEM(ICON_GOSSIP_GOLD, MSG_GOSSIP_BUY, + GOSSIP_SENDER_MAIN, ACTION_SHOW_BUYLIST); + if (isPlayerHasGuildhouse(player, _creature)) + { + //and additional for guildhouse owner + player->PlayerTalkClass->GetGossipMenu().AddMenuItem(ICON_GOSSIP_GOLD, MSG_GOSSIP_SELL, GOSSIP_SENDER_MAIN, ACTION_SELL_GUILDHOUSE, MSG_CODEBOX_SELL, 0, true); + } + } + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID()); + return true; +} + + +bool GossipSelect_guildmaster(Player *player, Creature *_creature, uint32 sender, uint32 action ) +{ + if (sender != GOSSIP_SENDER_MAIN) + return false; + + switch (action) + { + case ACTION_TELE: + //teleport player to GH + player->CLOSE_GOSSIP_MENU(); + teleportPlayerToGuildHouse(player, _creature); + break; + case ACTION_SHOW_BUYLIST: + //show list of GHs which currently not occupied + showBuyList(player, _creature); + break; + default: + if (action > OFFSET_SHOWBUY_FROM) + { + showBuyList(player, _creature, action - OFFSET_SHOWBUY_FROM); + } else if (action > OFFSET_GH_ID_TO_ACTION) + { + //player clicked on buy list + player->CLOSE_GOSSIP_MENU(); + //get guildhouseId from action + //guildhouseId = action - OFFSET_GH_ID_TO_ACTION + buyGuildhouse(player, _creature, action - OFFSET_GH_ID_TO_ACTION); + } + break; + } + + return true; +} + +bool GossipSelectWithCode_guildmaster( Player *player, Creature *_creature, + uint32 sender, uint32 action, const char* sCode ) +{ + if(sender == GOSSIP_SENDER_MAIN) + { + if(action == ACTION_SELL_GUILDHOUSE) + { + int i = -1; + try + { + //compare code + if (strlen(sCode) + 1 == sizeof CODE_SELL) + i = strcmp(CODE_SELL, sCode); + + } catch(char *str) {error_db_log(str);} + + if (i == 0) + { + //right code + sellGuildhouse(player, _creature); + } + player->CLOSE_GOSSIP_MENU(); + return true; + } + } + return false; +} + + +void AddSC_guildmaster() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "guildmaster"; + newscript->pGossipHello = &GossipHello_guildmaster; + newscript->pGossipSelect = &GossipSelect_guildmaster; + newscript->pGossipSelectWithCode = &GossipSelectWithCode_guildmaster; + newscript->RegisterSelf(); +} Index: scripts/custom/mob_heal.cpp =================================================================== --- scripts/custom/mob_heal.cpp (revision 0) +++ scripts/custom/mob_heal.cpp (revision 0) @@ -0,0 +1,64 @@ +#include "precompiled.h" + +#define SPELL_FLASH1 17137 +#define SPELL_FLASH2 17138 +#define SPELL_FEAR 6215 +#define SPELL_CRUS_STRIKE 65166 + +struct MANGOS_DLL_DECL mob_healAI : public ScriptedAI +{ + mob_healAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + + uint32 Fear_Timer; + uint32 Crus_Timer; + + void Reset() + { + Fear_Timer = 5500 +rand()%5000; + Crus_Timer = 2500 +rand()%2000; + } + + void UpdateAI(const uint32 diff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + //Fear + if (m_creature->GetHealthPercent() < 30.0f) + { + if (Fear_Timer < diff) + { + DoCastSpellIfCan(m_creature->getVictim(),SPELL_FEAR); + Fear_Timer = 6750; + } else Fear_Timer -= diff; + } + //HEALS + if (m_creature->GetHealthPercent() <= 45) + { + DoCastSpellIfCan(m_creature,SPELL_FLASH2); + } else + { + if (m_creature->GetHealthPercent() <= 60) + DoCastSpellIfCan(m_creature,SPELL_FLASH1); + } + //CRUSADERS_STRIKE + if (Crus_Timer < diff) + { + DoCastSpellIfCan(m_creature->getVictim(),SPELL_CRUS_STRIKE); + Crus_Timer = 3000; + } else Crus_Timer -= diff; + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_mob_heal(Creature* pCreature) +{ + return new mob_healAI(pCreature); +} +void AddSC_mob_heal() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "mob_heal"; + newscript->GetAI = &GetAI_mob_heal; + newscript->RegisterSelf(); +} Index: scripts/custom/npc_arena_honor.cpp =================================================================== --- scripts/custom/npc_arena_honor.cpp (revision 0) +++ scripts/custom/npc_arena_honor.cpp (revision 0) @@ -0,0 +1,67 @@ +/* проверка русского */ +#include "precompiled.h" +#include "sc_creature.h" +#include "sc_gossip.h" + +#define GOSSIP_ITEM_ARENA_TO_HONOR "Обменять 100 АренаПойнтов на 900 ХонорПойнтов" +#define GOSSIP_ITEM_ARENA_TO_HONOR1 "Обменять 1000 АренаПойнтов на 9000 ХонорПойнтов" +#define GOSSIP_ITEM_HONOR_TO_ARENA "Обменять 1000 ХонорПойнтов на 90 АренаПойнтов" +#define GOSSIP_ITEM_HONOR_TO_ARENA1 "Обменять 10000 ХонорПойнтов на 900 АренаПойнтов" + +bool GossipHello_npc_arena_honor(Player *player, Creature *_Creature) +{ + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_HONOR_TO_ARENA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_HONOR_TO_ARENA1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_ARENA_TO_HONOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_ARENA_TO_HONOR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4); + player->SEND_GOSSIP_MENU(3961,_Creature->GetGUID()); + return true; +} + +bool GossipSelect_npc_arena_honor(Player *player, Creature *_Creature, uint32 sender, uint32 action) +{ + if (action == GOSSIP_ACTION_INFO_DEF + 1) + { + if (player->GetHonorPoints() >= 1000) + { + player->ModifyHonorPoints(-1000); + player->ModifyArenaPoints(+90); + } + } + if (action == GOSSIP_ACTION_INFO_DEF + 2) + { + if (player->GetHonorPoints() >= 10000) + { + player->ModifyHonorPoints(-10000); + player->ModifyArenaPoints(+900); + } + } + if (action == GOSSIP_ACTION_INFO_DEF + 3) + { + if (player->GetArenaPoints() >= 100) + { + player->ModifyArenaPoints(-100); + player->ModifyHonorPoints(+900); + } + } + if (action == GOSSIP_ACTION_INFO_DEF + 4) + { + if (player->GetArenaPoints() >= 1000) + { + player->ModifyArenaPoints(-1000); + player->ModifyHonorPoints(+9000); + } + } +player->CLOSE_GOSSIP_MENU(); +return true; +} + +void AddSC_npc_arena_honor() +{ + Script *newscript; + newscript = new Script; + newscript->Name="npc_arena_honor"; + newscript->pGossipHello = &GossipHello_npc_arena_honor; + newscript->pGossipSelect = &GossipSelect_npc_arena_honor; + newscript->RegisterSelf(); +} Index: scripts/custom/npc_helper.cpp =================================================================== --- scripts/custom/npc_helper.cpp (revision 0) +++ scripts/custom/npc_helper.cpp (revision 0) @@ -0,0 +1,1475 @@ +//Kiritoss NPC Helper +#include "precompiled.h" +long long int filki; +int lave; + +bool GossipHello_npc_helper(Player *player, Creature *_Creature) + +{ + +player->ADD_GOSSIP_ITEM( 7, "Баффы свитков" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "Классовые баффы" , GOSSIP_SENDER_MAIN, 1001); +player->ADD_GOSSIP_ITEM( 7, "Обменник хонора и арены" , GOSSIP_SENDER_MAIN, 1002); +player->ADD_GOSSIP_ITEM( 7, "Телепорт" , GOSSIP_SENDER_MAIN, 1003); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +return true; + +} + +void SendDefaultMenu_npc_helper(Player *player, Creature *_Creature, uint32 action) +{ + +if(!player->getAttackers().empty()) + + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("Ты в бою!", LANG_UNIVERSAL, NULL); +return; + } + +filki = player-> GetMoney(); +lave = 500; + +if (filki < lave ) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("У тебя нет денег!", LANG_UNIVERSAL, NULL); +return; + } + +switch(action) + +{ + +case 1000: //Scrolls +player->ADD_GOSSIP_ITEM( 7, "Ловкость" , GOSSIP_SENDER_MAIN, 1005); +player->ADD_GOSSIP_ITEM( 7, "Интеллект" , GOSSIP_SENDER_MAIN, 1006); +player->ADD_GOSSIP_ITEM( 7, "Броня" , GOSSIP_SENDER_MAIN, 1007); +player->ADD_GOSSIP_ITEM( 7, "Дух" , GOSSIP_SENDER_MAIN, 1008); +player->ADD_GOSSIP_ITEM( 7, "Выносливость" , GOSSIP_SENDER_MAIN, 1009); +player->ADD_GOSSIP_ITEM( 7, "Сила" , GOSSIP_SENDER_MAIN, 1010); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1001: //Class +player->ADD_GOSSIP_ITEM( 7, "Друид" , GOSSIP_SENDER_MAIN, 1011); +player->ADD_GOSSIP_ITEM( 7, "Маг" , GOSSIP_SENDER_MAIN, 1012); +player->ADD_GOSSIP_ITEM( 7, "Паладин" , GOSSIP_SENDER_MAIN, 1013); +player->ADD_GOSSIP_ITEM( 7, "Жрец" , GOSSIP_SENDER_MAIN, 1014); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1005: //Scrolls of Agility +player->ADD_GOSSIP_ITEM( 5, "Ловкость уровень 6" , GOSSIP_SENDER_MAIN, 2000); +player->ADD_GOSSIP_ITEM( 5, "Ловкость уровень 7" , GOSSIP_SENDER_MAIN, 2001); +player->ADD_GOSSIP_ITEM( 5, "Ловкость уровень 8" , GOSSIP_SENDER_MAIN, 2002); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1006: //Scrolls of Intellect +player->ADD_GOSSIP_ITEM( 5, "Интеллект уровень 6" , GOSSIP_SENDER_MAIN, 2003); +player->ADD_GOSSIP_ITEM( 5, "Интеллект уровень 7" , GOSSIP_SENDER_MAIN, 2004); +player->ADD_GOSSIP_ITEM( 5, "Интеллект уровень 8" , GOSSIP_SENDER_MAIN, 2005); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1007: //Scrolls of Protection +player->ADD_GOSSIP_ITEM( 5, "Броня уровень 6" , GOSSIP_SENDER_MAIN, 2006); +player->ADD_GOSSIP_ITEM( 5, "Броня уровень 7" , GOSSIP_SENDER_MAIN, 2007); +player->ADD_GOSSIP_ITEM( 5, "Броня уровень 8" , GOSSIP_SENDER_MAIN, 2008); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1008: //Scrolls of Spirit +player->ADD_GOSSIP_ITEM( 5, "Дух уровень 6" , GOSSIP_SENDER_MAIN, 2009); +player->ADD_GOSSIP_ITEM( 5, "Дух уровень 7" , GOSSIP_SENDER_MAIN, 2010); +player->ADD_GOSSIP_ITEM( 5, "Дух уровень 8" , GOSSIP_SENDER_MAIN, 2011); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1009: //Scrolls of Stamina +player->ADD_GOSSIP_ITEM( 5, "Выносливость уровень 6" , GOSSIP_SENDER_MAIN, 2012); +player->ADD_GOSSIP_ITEM( 5, "Выносливость уровень 7" , GOSSIP_SENDER_MAIN, 2013); +player->ADD_GOSSIP_ITEM( 5, "Выносливость уровень 8" , GOSSIP_SENDER_MAIN, 2014); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1010: //Scrolls of Strength +player->ADD_GOSSIP_ITEM( 5, "Сила уровень 6" , GOSSIP_SENDER_MAIN, 2015); +player->ADD_GOSSIP_ITEM( 5, "Сила уровень 7" , GOSSIP_SENDER_MAIN, 2016); +player->ADD_GOSSIP_ITEM( 5, "Сила уровень 8" , GOSSIP_SENDER_MAIN, 2017); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1011: //Druid +player->ADD_GOSSIP_ITEM( 7, "Знак дикой природы" , GOSSIP_SENDER_MAIN, 1015); +player->ADD_GOSSIP_ITEM( 7, "Шипы" , GOSSIP_SENDER_MAIN, 1016); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1012: //Mage +player->ADD_GOSSIP_ITEM( 7, "Чародейский интеллект" , GOSSIP_SENDER_MAIN, 1017); +player->ADD_GOSSIP_ITEM( 7, "Ослабление магии" , GOSSIP_SENDER_MAIN, 1018); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1013: //Paladin +player->ADD_GOSSIP_ITEM( 7, "Благословение могущества" , GOSSIP_SENDER_MAIN, 1019); +player->ADD_GOSSIP_ITEM( 5, "Великое благословение королей" , GOSSIP_SENDER_MAIN, 2032); +player->ADD_GOSSIP_ITEM( 7, "Благословение мудрости" , GOSSIP_SENDER_MAIN, 1020); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1014: //Priest +player->ADD_GOSSIP_ITEM( 7, "Слово силы: Стойкость" , GOSSIP_SENDER_MAIN, 1021); +player->ADD_GOSSIP_ITEM( 7, "Божественный дух" , GOSSIP_SENDER_MAIN, 1022); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1001); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1015: //Mark of the Wild +player->ADD_GOSSIP_ITEM( 5, "Знак дикой природы уровень 7" , GOSSIP_SENDER_MAIN, 2018); +player->ADD_GOSSIP_ITEM( 5, "Знак дикой природы уровень 8" , GOSSIP_SENDER_MAIN, 2019); +player->ADD_GOSSIP_ITEM( 5, "Знак дикой природы уровень 9" , GOSSIP_SENDER_MAIN, 2020); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1011); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1016: //Thorns +player->ADD_GOSSIP_ITEM( 5, "Шипы уровень 7" , GOSSIP_SENDER_MAIN, 2021); +player->ADD_GOSSIP_ITEM( 5, "Шипы уровень 8" , GOSSIP_SENDER_MAIN, 2022); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1011); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1017: //Arcane Intellect +player->ADD_GOSSIP_ITEM( 5, "Чародейский интеллект уровень 6" , GOSSIP_SENDER_MAIN, 2023); +player->ADD_GOSSIP_ITEM( 5, "Чародейский интеллект уровень 7" , GOSSIP_SENDER_MAIN, 2024); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1012); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1018: //Dampen Magic +player->ADD_GOSSIP_ITEM( 5, "Ослабление магии уровень 5" , GOSSIP_SENDER_MAIN, 2025); +player->ADD_GOSSIP_ITEM( 5, "Ослабление магии уровень 6" , GOSSIP_SENDER_MAIN, 2026); +player->ADD_GOSSIP_ITEM( 5, "Ослабление магии уровень 7" , GOSSIP_SENDER_MAIN, 2027); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1012); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1019: //Blessing of Might +player->ADD_GOSSIP_ITEM( 5, "Благословение могущества уровень 7" , GOSSIP_SENDER_MAIN, 2028); +player->ADD_GOSSIP_ITEM( 5, "Благословение могущества уровень 8" , GOSSIP_SENDER_MAIN, 2029); +player->ADD_GOSSIP_ITEM( 5, "Благословение могущества уровень 9" , GOSSIP_SENDER_MAIN, 2030); +player->ADD_GOSSIP_ITEM( 5, "Благословение могущества уровень 10" , GOSSIP_SENDER_MAIN, 2031); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1013); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1020: //Blessing of Wisdom +player->ADD_GOSSIP_ITEM( 5, "Благословение мудрости уровень 6" , GOSSIP_SENDER_MAIN, 2033); +player->ADD_GOSSIP_ITEM( 5, "Благословение мудрости уровень 7" , GOSSIP_SENDER_MAIN, 2034); +player->ADD_GOSSIP_ITEM( 5, "Благословение мудрости уровень 8" , GOSSIP_SENDER_MAIN, 2035); +player->ADD_GOSSIP_ITEM( 5, "Благословение мудрости уровень 9" , GOSSIP_SENDER_MAIN, 2036); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1014); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1021: //Power Word: Fortitude +player->ADD_GOSSIP_ITEM( 5, "Слово силы: Стойкость уровень 6" , GOSSIP_SENDER_MAIN, 2037); +player->ADD_GOSSIP_ITEM( 5, "Слово силы: Стойкость уровень 7" , GOSSIP_SENDER_MAIN, 2038); +player->ADD_GOSSIP_ITEM( 5, "Слово силы: Стойкость уровень 8" , GOSSIP_SENDER_MAIN, 2039); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1015); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1022: //Divine Spirit +player->ADD_GOSSIP_ITEM( 5, "Божественный дух уровень 4" , GOSSIP_SENDER_MAIN, 2040); +player->ADD_GOSSIP_ITEM( 5, "Божественный дух уровень 5" , GOSSIP_SENDER_MAIN, 2041); +player->ADD_GOSSIP_ITEM( 5, "Божественный дух уровень 6" , GOSSIP_SENDER_MAIN, 2042); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1015); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1002: //Arena and Honor Exchange +player->ADD_GOSSIP_ITEM( 5, "Поменять 50 арены на 1000 хонора" , GOSSIP_SENDER_MAIN, 2043); +player->ADD_GOSSIP_ITEM( 5, "Поменять 1000 хонора на 50 арены" , GOSSIP_SENDER_MAIN, 2044); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1023: //Instances 60-70 +player->ADD_GOSSIP_ITEM( 5, "Каражан. 1 Gold" , GOSSIP_SENDER_MAIN, 2055); +player->ADD_GOSSIP_ITEM( 5, "Логова Груула. 1 Gold" , GOSSIP_SENDER_MAIN, 2056); +player->ADD_GOSSIP_ITEM( 5, "Цитадель Адского Пламени. 1 Gold" , GOSSIP_SENDER_MAIN, 2057); +player->ADD_GOSSIP_ITEM( 5, "Резервуар Кривого Клыка. 1 Gold" , GOSSIP_SENDER_MAIN, 2058); +player->ADD_GOSSIP_ITEM( 5, "Крепость Бурь. 1 Gold" , GOSSIP_SENDER_MAIN, 2059); +player->ADD_GOSSIP_ITEM( 5, "Пещеры Времени. 1 Gold" , GOSSIP_SENDER_MAIN, 2060); +player->ADD_GOSSIP_ITEM( 5, "Зул'Аман. 1 Gold" , GOSSIP_SENDER_MAIN, 2061); +player->ADD_GOSSIP_ITEM( 5, "Черный храм. 1 Gold" , GOSSIP_SENDER_MAIN, 2062); +player->ADD_GOSSIP_ITEM( 5, "Терраса Магистров. 2 Gold" , GOSSIP_SENDER_MAIN, 2063); +player->ADD_GOSSIP_ITEM( 5, "Плато Солнечного Колодца. 2 Gold" , GOSSIP_SENDER_MAIN, 2064); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1003); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1024: //Instances 75-80 NORTHREND +player->ADD_GOSSIP_ITEM( 5, "Крепость Утгард. 20 Gold" , GOSSIP_SENDER_MAIN, 2065); +player->ADD_GOSSIP_ITEM( 5, "Нексус. 20 Gold" , GOSSIP_SENDER_MAIN, 2066); +player->ADD_GOSSIP_ITEM( 5, "Азжол-Неруб. 20 Gold" , GOSSIP_SENDER_MAIN, 2067); +player->ADD_GOSSIP_ITEM( 5, "Ан'кахет: Старое Королевство. 20 Gold" , GOSSIP_SENDER_MAIN, 2068); +player->ADD_GOSSIP_ITEM( 5, "Крепость Драк'Тарон. 20 Gold" , GOSSIP_SENDER_MAIN, 2069); +player->ADD_GOSSIP_ITEM( 5, "Аметистовая крепость. 20 Gold" , GOSSIP_SENDER_MAIN, 2070); +player->ADD_GOSSIP_ITEM( 5, "Гундрак. 20 Gold" , GOSSIP_SENDER_MAIN, 2071); +player->ADD_GOSSIP_ITEM( 5, "Вершина Утгард. 20 Gold" , GOSSIP_SENDER_MAIN, 2072); +player->ADD_GOSSIP_ITEM( 5, "Ульдуар. 20 Gold" , GOSSIP_SENDER_MAIN, 2073); +player->ADD_GOSSIP_ITEM( 5, "Обсидиановое святилище. 20 Gold" , GOSSIP_SENDER_MAIN, 2074); +player->ADD_GOSSIP_ITEM( 5, "Наксрамас. 20 Gold" , GOSSIP_SENDER_MAIN, 2075); +player->ADD_GOSSIP_ITEM( 7, "<- [Назад]" , GOSSIP_SENDER_MAIN, 1003); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 1004); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1003: //teleport + if ( player->GetTeam() == ALLIANCE ) { +player->ADD_GOSSIP_ITEM( 5, "Дарнас. 5 Silver" , GOSSIP_SENDER_MAIN, 2046); +player->ADD_GOSSIP_ITEM( 5, "Экзодар. 5 Silver" , GOSSIP_SENDER_MAIN, 2051); +player->ADD_GOSSIP_ITEM( 5, "Штормград. 5 Silver" , GOSSIP_SENDER_MAIN, 2047); +player->ADD_GOSSIP_ITEM( 5, "Стальгорн. 5 Silver" , GOSSIP_SENDER_MAIN, 2053); +player->ADD_GOSSIP_ITEM( 5, "Шаттрат. 5 Silver" , GOSSIP_SENDER_MAIN, 2076); +player->ADD_GOSSIP_ITEM( 5, "Даларан. 5 Silver" , GOSSIP_SENDER_MAIN, 2048); +player->ADD_GOSSIP_ITEM( 5, "Остров Кель'Данас. 5 Silver" , GOSSIP_SENDER_MAIN, 2077); +player->ADD_GOSSIP_ITEM( 7, "[Инстанты] ->" , GOSSIP_SENDER_MAIN, 1023); +player->ADD_GOSSIP_ITEM( 7, "[Инстанты WotLK] ->" , GOSSIP_SENDER_MAIN, 1024); + + } else { + + +player->ADD_GOSSIP_ITEM( 5, "Оргриммар. 5 Silver" , GOSSIP_SENDER_MAIN, 2050); +player->ADD_GOSSIP_ITEM( 5, "Луносвет. 5 Silver" , GOSSIP_SENDER_MAIN, 2052); +player->ADD_GOSSIP_ITEM( 5, "Подгород. 5 Silver" , GOSSIP_SENDER_MAIN, 2049); +player->ADD_GOSSIP_ITEM( 5, "Громовой Утес. 5 Silver" , GOSSIP_SENDER_MAIN, 2054); +player->ADD_GOSSIP_ITEM( 5, "Шаттрат. 5 Silver" , GOSSIP_SENDER_MAIN, 2076); +player->ADD_GOSSIP_ITEM( 5, "Даларан. 5 Silver" , GOSSIP_SENDER_MAIN, 2048); +player->ADD_GOSSIP_ITEM( 5, "Остров Кель'Данас. 5 Silver" , GOSSIP_SENDER_MAIN, 2077); +player->ADD_GOSSIP_ITEM( 7, "[Инстанты] ->" , GOSSIP_SENDER_MAIN, 1023); +player->ADD_GOSSIP_ITEM( 7, "[Инстанты WotLK] ->" , GOSSIP_SENDER_MAIN, 1024); + } + + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 1004: //Back To Main Menu +player->ADD_GOSSIP_ITEM( 7, "Баффы свитков" , GOSSIP_SENDER_MAIN, 1000); +player->ADD_GOSSIP_ITEM( 7, "Классовые баффы" , GOSSIP_SENDER_MAIN, 1001); +player->ADD_GOSSIP_ITEM( 7, "Обменник арены и хонора" , GOSSIP_SENDER_MAIN, 1002); +player->ADD_GOSSIP_ITEM( 7, "Телепорт" , GOSSIP_SENDER_MAIN, 1003); + + +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + +break; + +case 2000: // Scroll of Agility VI. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,43194,true); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2001: // Scroll of Agility VII. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,58450,true); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2002: // Scroll of Agility VIII. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,58451,true); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2003: // Scroll of Intellect VI. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,43195,true); + player->ModifyMoney(-11*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2004: // Scroll of Intellect VII. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48099,true); + player->ModifyMoney(-11*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2005: // Scroll of Intellect VIII. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48100,true); + player->ModifyMoney(-11*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2006: // Scroll of Protection VI. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,43196,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + + +case 2007: // Scroll of Protection VII. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,58452,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2008: // Scroll of Protection VIII. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,58453,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2009: // Scroll of Spirit VI. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,43197,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2010: // Scroll of Spirit VII. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48103,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2011: // Scroll of Spirit VIII. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48104,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2012: // Scroll of Stamina VI. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,43198,true); + player->ModifyMoney(-11*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2013: // Scroll of Stamina VII. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48101,true); + player->ModifyMoney(-11*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2014: // Scroll of Stamina VIII. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48102,true); + player->ModifyMoney(-11*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2015: // Scroll of Strength VI. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,43199,true); + player->ModifyMoney(-9*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2016: // Scroll of Strength VII. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,58448,true); + player->ModifyMoney(-9*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2017: // Scroll of Strength VIII. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,58449,true); + player->ModifyMoney(-9*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2018: // Mark of the Wild Rank 7. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,9885,true); + player->ModifyMoney(-7*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2019: // Mark of the Wild Rank 8. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,26990,true); + player->ModifyMoney(-8*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2020: // Mark of the Wild Rank 9. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48469,true); + player->ModifyMoney(-9*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2021: // Thorns Rank 7. + + if( player->getLevel() >= 64) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,26992,true); + player->ModifyMoney(-7*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 64!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2022: // Thorns Rank 8. + + if( player->getLevel() >= 74) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,53307,true); + player->ModifyMoney(-8*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 74!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2023: // Arcane Intellect Rank 6. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,27126,true); + player->ModifyMoney(-6*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2024: // Arcane Intellect Rank 7. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,42995,true); + player->ModifyMoney(-7*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2025: // Dampen Magic Rank 5. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,10174,true); + player->ModifyMoney(-5*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2026: // Dampen Magic Rank 6. + + if( player->getLevel() >= 67) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,33944,true); + player->ModifyMoney(-6*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 67!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2027: // Dampen Magic Rank 7. + + if( player->getLevel() >= 76) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,43015,true); + player->ModifyMoney(-7*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 76!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2028: // Blessing of Might Rank 7. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,25291,true); + player->ModifyMoney(-7*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2029: // Blessing of Might Rank 8. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,27140,true); + player->ModifyMoney(-8*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2030: // Blessing of Might Rank 9. + + if( player->getLevel() >= 73) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48931,true); + player->ModifyMoney(-9*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 73!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2031: // Blessing of Might Rank 10. + + if( player->getLevel() >= 79) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48932,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 79!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2032: // Greater Blessing of Kings. + + if( player->getLevel() >= 62) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,25898,true); + player->ModifyMoney(-10*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 62!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2033: // Blessing of Wisdom Rank 6. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,25290,true); + player->ModifyMoney(-6*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2034: // Blessing of Wisdom Rank 7. + + if( player->getLevel() >= 65) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,27142,true); + player->ModifyMoney(-7*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 65!", LANG_UNIVERSAL, NULL); + } + +break; + + +case 2035: // Blessing of Wisdom Rank 8. + + if( player->getLevel() >= 71) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48935,true); + player->ModifyMoney(-8*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 71!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2036: // Blessing of Wisdom Rank 9. + + if( player->getLevel() >= 77) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48936,true); + player->ModifyMoney(-9*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 77!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2037: // Power Word: Fortitude Rank 6. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,23948,true); + player->ModifyMoney(-6*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2038: // Power Word: Fortitude Rank 7. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,25389,true); + player->ModifyMoney(-7*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2039: // Power Word: Fortitude Rank 8. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48161,true); + player->ModifyMoney(-8*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2040: // Divine Spirit Rank 4. + + if( player->getLevel() >= 60) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,27841,true); + player->ModifyMoney(-4*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 60!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2041: // Divine Spirit Rank 5. + + if( player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,25312,true); + player->ModifyMoney(-5*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2042: // Divine Spirit Rank 6. + + if( player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,48073,true); + player->ModifyMoney(-6*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2043: // Change 50 Arena to 1000 Honor. + + if (player->GetArenaPoints() >= 100) + + { + player->CLOSE_GOSSIP_MENU(); + player->ModifyArenaPoints(-50); + player->ModifyHonorPoints(+1000); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You haven't enough arena points!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2044: // Change 1000 Honor to 50 Arena. + + if (player->GetHonorPoints() >= 1000) + + { + player->CLOSE_GOSSIP_MENU(); + player->ModifyHonorPoints(-1000); + player->ModifyArenaPoints(+50); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You haven't enough honor points!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2046: // Teleport to Darnassus +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 9947.52f, 2482.73f, 1316.21f, 0.0f); +player->ModifyMoney(-1*lave); +break; + +// Teleport to Stormwind +case 2047: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -8960.14f, 516.266f, 96.3568f, 0.0f); +player->ModifyMoney(-1*lave); +break; + +// Teleport to Dalaran +case 2048: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 5804.14f, 624.770f, 647.7670f, 1.64f); +player->ModifyMoney(-1*lave); +break; + +// Teleport to Undercity +case 2049: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, 1819.71f, 238.79f, 60.5321f, 0.0f); +player->ModifyMoney(-1*lave); + +break; + +// Teleport to Orgrimmar +case 2050: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 1552.5f, -4420.66f, 8.94802f, 0.0f); +player->ModifyMoney(-1*lave); +break; + +// Teleport to Exodar +case 2051: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -4073.03f, -12020.4f, -1.47f, 0.0f); +player->ModifyMoney(-1*lave); +break; + +// Teleport to Silvermoon +case 2052: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 9338.74f, -7277.27f, 13.7895f, 0.0f); +player->ModifyMoney(-1*lave); + +break; + +// Teleport to Ironforge +case 2053: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -4924.07f, -951.95f, 501.55f, 5.40f); +player->ModifyMoney(-1*lave); + +break; + +// Teleport to Thunder Bluff +case 2054: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -1280.19f,127.21f,131.35f,5.16f); +player->ModifyMoney(-1*lave); + +break; + +case 2055:// Karazhan + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(0, -11118.8f, -2010.84f, 47.0807f, 0.0f); + player->ModifyMoney(-20*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2056:// Gruul's Lair + + if (player->getLevel() >= 65) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 3539.007568f, 5082.357910f, 1.691071f, 0.0f); + player->ModifyMoney(-20*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 65!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2057:// Hellfire Citadel +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -305.816223f, 3056.401611f, -2.473183f, 2.01f); +player->ModifyMoney(-20*lave); +break; + +case 2058:// Coilfang Reservoir +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 517.288025f, 6976.279785f, 32.007198f, 0.0f); +player->ModifyMoney(-20*lave); +break; + +case 2059:// Tempest Keep + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 3089.579346f, 1399.046509f, 187.653458f, 4.794070f); + player->ModifyMoney(-20*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2060:// Caverns of Time + + if (player->getLevel() >= 66) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(1, -8173.66f, -4746.36f, 33.8423f, 4.93989f); + player->ModifyMoney(-20*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 66!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2061:// Zul'Aman + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 6846.95f, -7954.5f, 170.028f, 4.61501f); + player->ModifyMoney(-20*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2062:// Black Temple + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, -3610.719482f, 324.987579f, 37.400028f, 3.282981f); + player->ModifyMoney(-20*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2063:// magistrate + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 12884.6f, -7317.69f, 65.5023f, 4.799f); + player->ModifyMoney(-40*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2064:// sunwell + + if (player->getLevel() >= 70) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 12574.1f, -6774.81f, 15.0904f, 3.13788f); + player->ModifyMoney(-40*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 70!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2065:// Utgarde Keep + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 1219.720f, -4865.28f, 41.25f, 0.31f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2066:// The Nexus + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3776.950f, 6953.80f, 105.05f, 0.345f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2067:// Azjol-Nerub + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3675.430f, 2169.00f, 35.90f, 2.29f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2068:// Ahn'kahet: The Old Kingdom + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3646.760f, 2045.17f, 1.79f, 4.37f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2069:// Drak'Tharon Keep + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 4450.860f, -2045.25f, 162.83f, 0.00f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2070:// The Violet Hold + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 5679.820f, 486.80f, 652.40f, 4.08f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2071:// Gun' Drak + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 6937.540f, -4455.98f, 450.68f, 1.00f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2072:// Utgarde Pinnacle + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 1245.690f, -4856.59f, 216.86f, 3.45f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2073:// Ulduar + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 8976.240f, -1281.33f, 1059.01f, 0.58f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2074:// The Obsidian Sanctum + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3625.780f, 280.40f, -120.14f, 3.25f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2075:// Naxxramas + + if (player->getLevel() >= 80) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(571, 3668.719f, -1262.460f, 243.63f, 5.03f); + player->ModifyMoney(-400*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 80!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2076:// Shattrath City + +if( player->getLevel() >= 58) + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, -1850.209961f, 5435.821777f, -10.961435f, 3.403913f); + player->ModifyMoney(-1*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 58!", LANG_UNIVERSAL, NULL); + } + +break; + +case 2077://teleport player to Isle Of Quel'Danas + + if (player->getLevel() >= 65) + + { + player->CLOSE_GOSSIP_MENU(); + player->TeleportTo(530, 12947.4f,-6893.31f,5.68398f,3.09154f); + player->ModifyMoney(-1*lave); + } else { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("You must be at least level 65!", LANG_UNIVERSAL, NULL); + } + +break; + + +} + + +} +bool GossipSelect_npc_helper(Player *player, Creature *_Creature, uint32 + +sender, uint32 action) + +{ +// Main menu +if (sender == GOSSIP_SENDER_MAIN) +SendDefaultMenu_npc_helper(player, _Creature, action ); + +return true; + +} +void AddSC_npc_helper() +{ + Script *newscript; + +newscript = new Script; +newscript->Name = "npc_helper"; +newscript->pGossipHello = &GossipHello_npc_helper; +newscript->pGossipSelect = &GossipSelect_npc_helper; +newscript->pItemHello = NULL; +newscript->pGOHello = NULL; +newscript->pAreaTrigger = NULL; +newscript->pItemQuestAccept = NULL; +newscript->pGOQuestAccept = NULL; +newscript->pGOChooseReward = NULL; + +newscript->RegisterSelf(); +} Index: scripts/custom/npc_ulduar_teleporter.cpp =================================================================== --- scripts/custom/npc_ulduar_teleporter.cpp (revision 0) +++ scripts/custom/npc_ulduar_teleporter.cpp (revision 0) @@ -0,0 +1,69 @@ +/* проверка русского */ +#include "precompiled.h" + +#define BASE_CAMP 200 +#define GROUNDS 201 +#define FORGE 202 +#define SCRAPYARD 203 +#define ANTECHAMBER 204 +#define WALKWAY 205 +#define CONSERVATORY 206 + +bool GossipHello_npc_ulduar_teleporter(Player *player, Creature *creature) +{ + { + player->ADD_GOSSIP_ITEM(0, "Перенестись в Главный лагерь экспедиции", GOSSIP_SENDER_MAIN, BASE_CAMP); + player->ADD_GOSSIP_ITEM(0, "Перенестись на Плац", GOSSIP_SENDER_MAIN, GROUNDS); + player->ADD_GOSSIP_ITEM(0, "Перенестись в Гигантскую кузню", GOSSIP_SENDER_MAIN, FORGE); + player->ADD_GOSSIP_ITEM(0, "Перенестись на Мусорную свалку", GOSSIP_SENDER_MAIN, SCRAPYARD); + player->ADD_GOSSIP_ITEM(0, "Перенестись в Вестибюль", GOSSIP_SENDER_MAIN, ANTECHAMBER); + player->ADD_GOSSIP_ITEM(0, "Перенестись на Разрушенную аллею", GOSSIP_SENDER_MAIN, WALKWAY); + player->ADD_GOSSIP_ITEM(0, "Перенестись в Консерваторию", GOSSIP_SENDER_MAIN, CONSERVATORY); + } + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_ulduar_teleporter(Player *player, Creature *creature, uint32 sender, uint32 action) +{ + if(sender != GOSSIP_SENDER_MAIN) return true; + if(!player->getAttackers().empty()) return true; + + switch(action) + { + case BASE_CAMP: + player->TeleportTo(603, -706.122f, -92.6024f, 429.876f, 0); + player->CLOSE_GOSSIP_MENU(); break; + case GROUNDS: + player->TeleportTo(603, 131.248f, -35.3802f, 409.804f, 0); + player->CLOSE_GOSSIP_MENU(); break; + case FORGE: + player->TeleportTo(603, 553.233f, -12.3247f, 409.679f, 0); + player->CLOSE_GOSSIP_MENU(); break; + case SCRAPYARD: + player->TeleportTo(603, 926.292f, -11.4635f, 418.595f, 0); + player->CLOSE_GOSSIP_MENU(); break; + case ANTECHAMBER: + player->TeleportTo(603, 1498.09f, -24.246f, 420.967f, 0); + player->CLOSE_GOSSIP_MENU(); break; + case WALKWAY: + player->TeleportTo(603, 1859.45f, -24.1f, 448.9f, 0); + player->CLOSE_GOSSIP_MENU(); break; + case CONSERVATORY: + player->TeleportTo(603, 2086.27f, -24.3134f, 421.239f, 0); + player->CLOSE_GOSSIP_MENU(); break; + } + + return true; +} + +void AddSC_npc_ulduar_teleporter() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "npc_ulduar_teleporter"; + newscript->pGossipHello = &GossipHello_npc_ulduar_teleporter; + newscript->pGossipSelect = &GossipSelect_npc_ulduar_teleporter; + newscript->RegisterSelf(); +} Index: scripts/custom/paymounts.cpp =================================================================== --- scripts/custom/paymounts.cpp (revision 0) +++ scripts/custom/paymounts.cpp (revision 0) @@ -0,0 +1,439 @@ +/* проверка русского */ +#include "precompiled.h" +int paymn = 5000; + +void addRidingMounts(Player *player, Creature *_Creature) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Ящера Черного копья (2 золотых)", GOSSIP_SENDER_MAIN, 8842); + player->ADD_GOSSIP_ITEM( 5, "Нанять Стальгорнского барана (2 золотых)", GOSSIP_SENDER_MAIN, 8843); + player->ADD_GOSSIP_ITEM( 5, "Нанять Дарнасского ночного саблезуба (2 золотых)", GOSSIP_SENDER_MAIN, 8844); + player->ADD_GOSSIP_ITEM( 5, "Нанять Гномреганского механодолгонога (2 золотых)", GOSSIP_SENDER_MAIN, 8845); + player->ADD_GOSSIP_ITEM( 5, "Нанять Экзодарского элекка (2 золотых)", GOSSIP_SENDER_MAIN, 8846); + player->ADD_GOSSIP_ITEM( 5, "Нанять Оргриммарского волка (2 золотых)", GOSSIP_SENDER_MAIN, 8847); + player->ADD_GOSSIP_ITEM( 5, "Нанять Кодо Громового Утеса (2 золотых)", GOSSIP_SENDER_MAIN, 8848); + player->ADD_GOSSIP_ITEM( 5, "Нанять Крылобега Луносвета (2 золотых)", GOSSIP_SENDER_MAIN, 8849); + player->ADD_GOSSIP_ITEM( 5, "Нанять Боевого коня Отрекшихся (2 золотых)", GOSSIP_SENDER_MAIN, 8850); + player->ADD_GOSSIP_ITEM( 5, "Нанять Механоцикл (2 золотых)", GOSSIP_SENDER_MAIN, 8851); + player->ADD_GOSSIP_ITEM( 5, "Нанять Кель-дорайского скакуна (2 золотых)", GOSSIP_SENDER_MAIN, 8852); + player->ADD_GOSSIP_ITEM( 5, "Нанять Крылобега Похитителей Солнца (2 золотых)", GOSSIP_SENDER_MAIN, 8853); + if( player->getLevel() > 60 && ( _Creature->GetMapId() == 530 || (_Creature->GetMapId() == 571 && player->HasSpell(54197) ) ) ) + { + player->ADD_GOSSIP_ITEM( 6, "[Летающие] (10 золотых) ->", GOSSIP_SENDER_MAIN, 8801); + } + } + +void addFlyingMounts(Player *player) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Ониксового дракона (10 золотых)", GOSSIP_SENDER_MAIN, 8860); + player->ADD_GOSSIP_ITEM( 5, "Нанять ИКС-ключительную ракету Пустоты X-51 (10 золотых)", GOSSIP_SENDER_MAIN, 8861); + player->ADD_GOSSIP_ITEM( 5, "Нанять Лилового верхового ската (10 золотых)", GOSSIP_SENDER_MAIN, 8862); + player->ADD_GOSSIP_ITEM( 5, "Нанять Турбоветролет (10 золотых)", GOSSIP_SENDER_MAIN, 8863); + player->ADD_GOSSIP_ITEM( 5, "Нанять Дракондора Похитителей Солнца (10 золотых)", GOSSIP_SENDER_MAIN, 8864); + player->ADD_GOSSIP_ITEM( 5, "Нанять Гиппогрифа Серебряного Союза (10 золотых)", GOSSIP_SENDER_MAIN, 8865); + player->ADD_GOSSIP_ITEM( 5, "Нанять Феникса (10 золотых)", GOSSIP_SENDER_MAIN, 8866); + player->ADD_GOSSIP_ITEM( 5, "Нанять Черного дракона (10 золотых)", GOSSIP_SENDER_MAIN, 8867); + player->ADD_GOSSIP_ITEM( 5, "Нанять Красного протодракона (10 золотых)", GOSSIP_SENDER_MAIN, 8868); + player->ADD_GOSSIP_ITEM( 5, "Нанять Голову Мимирона (10 золотых)", GOSSIP_SENDER_MAIN, 8869); + player->ADD_GOSSIP_ITEM( 6, "<- [Ездовые] (2 золотых)", GOSSIP_SENDER_MAIN, 8800); + } + +void trade(Player *player, int spellId, int price) + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player, spellId, true); + player->ModifyMoney(price * paymn); + } + +bool GossipHello_paymounts(Player *player, Creature *_Creature) + { + if( player->getLevel() < 40 ) + { + if ( player->getRace() == RACE_HUMAN ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Black Stallion (50 серебряных)", GOSSIP_SENDER_MAIN, 8802); + player->ADD_GOSSIP_ITEM( 5, "Нанять Brown Horse (50 серебряных)", GOSSIP_SENDER_MAIN, 8803); + player->ADD_GOSSIP_ITEM( 5, "Нанять Chestnut Mare (50 серебряных)", GOSSIP_SENDER_MAIN, 8804); + player->ADD_GOSSIP_ITEM( 5, "Нанять Pinto Horse (50 серебряных)", GOSSIP_SENDER_MAIN, 8805); + player->ADD_GOSSIP_ITEM( 5, "Нанять White Horse (50 серебряных)", GOSSIP_SENDER_MAIN, 8806); + player->ADD_GOSSIP_ITEM( 5, "Нанять Palomino Horse (50 серебряных)", GOSSIP_SENDER_MAIN, 8807); + } + if ( player->getRace() == RACE_NIGHTELF ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Пятнистого ледопарда (50 серебряных)", GOSSIP_SENDER_MAIN, 8808); + player->ADD_GOSSIP_ITEM( 5, "Нанять Полосатого ледопарда (50 серебряных)", GOSSIP_SENDER_MAIN, 8809); + player->ADD_GOSSIP_ITEM( 5, "Нанять Striped Nightsaber (50 серебряных)", GOSSIP_SENDER_MAIN, 8810); + player->ADD_GOSSIP_ITEM( 5, "Нанять Леопарда (50 серебряных)", GOSSIP_SENDER_MAIN, 8811); + player->ADD_GOSSIP_ITEM( 5, "Нанять Тигра (50 серебряных)", GOSSIP_SENDER_MAIN, 8812); + player->ADD_GOSSIP_ITEM( 5, "Нанять Tawny Sabercat (50 серебряных)", GOSSIP_SENDER_MAIN, 8813); + player->ADD_GOSSIP_ITEM( 5, "Нанять Golden Sabercat (50 серебряных)", GOSSIP_SENDER_MAIN, 8814); + } + if ( player->getRace() == RACE_DWARF ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Brown Ram (50 серебряных)", GOSSIP_SENDER_MAIN, 8815); + player->ADD_GOSSIP_ITEM( 5, "Нанять Gray Ram (50 серебряных)", GOSSIP_SENDER_MAIN, 8816); + player->ADD_GOSSIP_ITEM( 5, "Нанять White Ram (50 серебряных)", GOSSIP_SENDER_MAIN, 8817); + player->ADD_GOSSIP_ITEM( 5, "Нанять Black Ram (50 серебряных)", GOSSIP_SENDER_MAIN, 8818); + } + if ( player->getRace() == RACE_GNOME ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Green Mechanostrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8819); + player->ADD_GOSSIP_ITEM( 5, "Нанять Red Mechanostrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8820); + player->ADD_GOSSIP_ITEM( 5, "Нанять Unpainted Mechanostrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8821); + player->ADD_GOSSIP_ITEM( 5, "Нанять Blue Mechanostrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8822); + } + if ( player->getRace() == RACE_DRAENEI ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Brown Elekk (50 серебряных)", GOSSIP_SENDER_MAIN, 8823); + player->ADD_GOSSIP_ITEM( 5, "Нанять Purple Elekk (50 серебряных)", GOSSIP_SENDER_MAIN, 8824); + player->ADD_GOSSIP_ITEM( 5, "Нанять Gray Elekk (50 серебряных)", GOSSIP_SENDER_MAIN, 8825); + } + if ( player->getRace() == RACE_ORC ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Timber Wolf (50 серебряных)", GOSSIP_SENDER_MAIN, 8826); + player->ADD_GOSSIP_ITEM( 5, "Нанять Brown Wolf (50 серебряных)", GOSSIP_SENDER_MAIN, 8827); + player->ADD_GOSSIP_ITEM( 5, "Нанять Dire Wolf (50 серебряных)", GOSSIP_SENDER_MAIN, 8828); + player->ADD_GOSSIP_ITEM( 5, "Нанять Red Wolf (50 серебряных)", GOSSIP_SENDER_MAIN, 8829); + } + if ( player->getRace() == RACE_TAUREN ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Brown Kodo (50 серебряных)", GOSSIP_SENDER_MAIN, 8830); + player->ADD_GOSSIP_ITEM( 5, "Нанять Gray Kodo (50 серебряных)", GOSSIP_SENDER_MAIN, 8831); + } + if ( player->getRace() == RACE_TROLL ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Turquoise Raptor (50 серебряных)", GOSSIP_SENDER_MAIN, 8832); + player->ADD_GOSSIP_ITEM( 5, "Нанять Emerald Raptor (50 серебряных)", GOSSIP_SENDER_MAIN, 8833); + player->ADD_GOSSIP_ITEM( 5, "Нанять Violet Raptor (50 серебряных)", GOSSIP_SENDER_MAIN, 8834); + } + if ( player->getRace() == RACE_UNDEAD_PLAYER ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Blue Skeletal Horse (50 серебряных)", GOSSIP_SENDER_MAIN, 8835); + player->ADD_GOSSIP_ITEM( 5, "Нанять Brown Skeletal Horse (50 серебряных)", GOSSIP_SENDER_MAIN, 8836); + player->ADD_GOSSIP_ITEM( 5, "Нанять Red Skeletal Horse (50 серебряных)", GOSSIP_SENDER_MAIN, 8837); + } + if ( player->getRace() == RACE_BLOODELF ) + { + player->ADD_GOSSIP_ITEM( 5, "Нанять Black Hawkstrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8838); + player->ADD_GOSSIP_ITEM( 5, "Нанять Blue Hawkstrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8839); + player->ADD_GOSSIP_ITEM( 5, "Нанять Purple Hawkstrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8840); + player->ADD_GOSSIP_ITEM( 5, "Нанять Red Hawkstrider (50 серебряных)", GOSSIP_SENDER_MAIN, 8841); + } + } + else + { + addRidingMounts(player, _Creature); + } + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + return true; + } + +void SendDefaultMenu_paymounts(Player *player, Creature *_Creature, uint32 action ) + { + if(!player->getAttackers().empty()) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("Вы в бою!", LANG_UNIVERSAL, NULL); + return; + } + if (player->IsMounted()) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("Вы уже верхом!", LANG_UNIVERSAL, NULL); + return; + } + if( player->getLevel() < 10 ) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("Получите хотя бы 10 уровень", LANG_UNIVERSAL, NULL); + return; + } + if (player->GetMoney() < paymn ) + { + player->CLOSE_GOSSIP_MENU(); + _Creature->MonsterSay("Недостаточно денег", LANG_UNIVERSAL, NULL); + return; + } + switch(action) + { +/* общие диалоги */ + case 8800: + addRidingMounts(player, _Creature); + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + break; + + case 8801: + addFlyingMounts(player); + player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); + break; +/* хуманские кони */ + case 8802: + trade(player, 470, -1); + break; + + case 8803: + trade(player,458,-1); + break; + + case 8804: + trade(player,6648,-1); + break; + + case 8805: + trade(player,472,-1); + break; + + case 8806: + trade(player,468,-1); + break; + + case 8807: + trade(player,471,-1); + break; +/* эльфячьи кошки */ + case 8808: + trade(player,10789,-1); + break; + + case 8809: + trade(player,8394,-1); + break; + + case 8810: + trade(player,10793,-1); + break; + + case 8811: + trade(player,10788,-1); + break; + + case 8812: + trade(player,10790,-1); + break; + + case 8813: + trade(player,16059,-1); + break; + + case 8814: + trade(player,16060,-1); + break; +/* дварфские бараны */ + case 8815: + trade(player,6899,-1); + break; + + case 8816: + trade(player,6777,-1); + break; + + case 8817: + trade(player,6898,-1); + break; + + case 8818: + trade(player,6896,-1); + break; +/* гномские страусы */ + case 8819: + trade(player,17453,-1); + break; + + case 8820: + trade(player,10873,-1); + break; + + case 8821: + trade(player,17454,-1); + break; + + case 8822: + trade(player,10969,-1); + break; +/* дренейские элекки */ + case 8823: + trade(player,34406,-1); + break; + + case 8824: + trade(player,35711,-1); + break; + + case 8825: + trade(player,35710,-1); + break; +/* оркские волки */ + case 8826: + trade(player,580,-1); + break; + + case 8827: + trade(player,6654,-1); + break; + + case 8828: + trade(player,6653,-1); + break; + + case 8829: + trade(player,579,-1); + break; +/* тауренские кодо */ + case 8830: + trade(player,18990,-1); + break; + + case 8831: + trade(player,18989,-1); + break; +/* тролльские рапторы */ + case 8832: + trade(player,10796,-1); + break; + + case 8833: + trade(player,8395,-1); + break; + + case 8834: + trade(player,10799,-1); + break; +/* андедские скелеты */ + case 8835: + trade(player,17463,-1); + break; + + case 8836: + trade(player,17464,-1); + break; + + case 8837: + trade(player,17462,-1); + break; +/* бладэльфские попугаи */ + case 8838: + trade(player,35022,-1); + break; + + case 8839: + trade(player,35020,-1); + break; + + case 8840: + trade(player,35018,-1); + break; + + case 8841: + trade(player,34795,-1); + break; +/* общие ездовые */ + case 8842: + trade(player,63635,-4); + break; + + case 8843: + trade(player,63636,-4); + break; + + case 8844: + trade(player,63637,-4); + break; + + case 8845: + trade(player,63638,-4); + break; + + case 8846: + trade(player,63639,-4); + break; + + case 8847: + trade(player,63640,-4); + break; + + case 8848: + trade(player,63641,-4); + break; + + case 8849: + trade(player,63642,-4); + break; + + case 8850: + trade(player,63643,-4); + break; + + case 8851: + trade(player,55531,-4); + break; + + case 8852: + trade(player,66090,-4); + break; + + case 8853: + trade(player,66091,-4); + break; +/* общие летающие */ + case 8860: + trade(player,41513,-20); + break; + + case 8861: + trade(player,46199,-20); + break; + + case 8862: + trade(player,39801,-20); + break; + + case 8863: + trade(player,44151,-20); + break; + + case 8864: + trade(player,66088,-20); + break; + + case 8865: + trade(player,66087,-20); + break; + + case 8866: + trade(player,40192,-20); + break; + + case 8867: + trade(player,59650,-20); + break; + + case 8868: + trade(player,59961,-20); + break; + + case 8869: + trade(player,63796,-20); + break; + } + } + +bool GossipSelect_paymounts(Player *player, Creature *_Creature, uint32 sender, uint32 action ) + { + if (sender == GOSSIP_SENDER_MAIN) + SendDefaultMenu_paymounts(player, _Creature, action ); + return true; + } +void AddSC_paymounts() + { + Script *newscript; + newscript = new Script; + newscript->Name = "paymounts"; + newscript->pGossipHello = &GossipHello_paymounts; + newscript->pGossipSelect = &GossipSelect_paymounts; + newscript->pItemHello = NULL; + newscript->pGOHello = NULL; + newscript->pAreaTrigger = NULL; + newscript->pItemQuestAccept = NULL; + newscript->pGOQuestAccept = NULL; + newscript->pGOChooseReward = NULL; + newscript->RegisterSelf(); + } Index: scripts/custom/teleguy.cpp =================================================================== --- scripts/custom/teleguy.cpp (revision 0) +++ scripts/custom/teleguy.cpp (revision 0) @@ -0,0 +1,741 @@ +/* проверка русского */ +#include "precompiled.h" +long long int money; +int costo; + +bool GossipHello_teleguy(Player *player, Creature *_Creature) +{ +if ( player->GetTeam() == ALLIANCE ) { +player->ADD_GOSSIP_ITEM( 5, "Дарнасс. 5 серебряных", GOSSIP_SENDER_MAIN, 1203); +player->ADD_GOSSIP_ITEM( 5, "Эксодар. 5 серебряных", GOSSIP_SENDER_MAIN, 1216); +player->ADD_GOSSIP_ITEM( 5, "Штормград. 5 серебряных", GOSSIP_SENDER_MAIN, 1206); +player->ADD_GOSSIP_ITEM( 5, "Стальгорн. 5 серебряных", GOSSIP_SENDER_MAIN, 1224); +player->ADD_GOSSIP_ITEM( 5, "Гномреган. 5 серебряных", GOSSIP_SENDER_MAIN, 1222); +player->ADD_GOSSIP_ITEM( 5, "Шаттрат. 5 серебряных", GOSSIP_SENDER_MAIN, 1287); +player->ADD_GOSSIP_ITEM( 5, "Даларан. 5 серебряных", GOSSIP_SENDER_MAIN, 1205); +player->ADD_GOSSIP_ITEM( 5, "Остров Квель-данас. 5 серебряных", GOSSIP_SENDER_MAIN, 1288); +player->ADD_GOSSIP_ITEM( 7, "[Старые подземелья] ->", GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "[Новые подземелья] ->", GOSSIP_SENDER_MAIN, 5554); +} else { +player->ADD_GOSSIP_ITEM( 5, "Оргриммар. 5 серебряных", GOSSIP_SENDER_MAIN, 1215); +player->ADD_GOSSIP_ITEM( 5, "Серебряная Луна. 5 серебряных", GOSSIP_SENDER_MAIN, 1217); +player->ADD_GOSSIP_ITEM( 5, "Подгород. 5 серебряных", GOSSIP_SENDER_MAIN, 1213); +player->ADD_GOSSIP_ITEM( 5, "Громовой Утес. 5 серебряных", GOSSIP_SENDER_MAIN, 1225); +player->ADD_GOSSIP_ITEM( 5, "Гномреган. 5 серебряных", GOSSIP_SENDER_MAIN, 1222); +player->ADD_GOSSIP_ITEM( 5, "Шаттрат. 5 серебряных", GOSSIP_SENDER_MAIN, 1287); +player->ADD_GOSSIP_ITEM( 5, "Даларан. 5 серебряных", GOSSIP_SENDER_MAIN, 1205); +player->ADD_GOSSIP_ITEM( 5, "Остров Квель-данас. 5 серебряных", GOSSIP_SENDER_MAIN, 1288); +player->ADD_GOSSIP_ITEM( 7, "[Старые подземелья] ->", GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "[Новые подземелья] ->", GOSSIP_SENDER_MAIN, 5554); +} +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); +return true; +} + +void SendDefaultMenu_teleguy(Player *player, Creature *_Creature, uint32 action ) +{ + +if(!player->getAttackers().empty()) +{ +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Вы в бою!", LANG_UNIVERSAL, NULL); +return; +} + +if( player->getLevel() < 8 ) +{ +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 8 уровень", LANG_UNIVERSAL, NULL); +return; +} + +money = player-> GetMoney(); +costo = 500; + +if (money < costo ) +{ +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Недостаточно денег", LANG_UNIVERSAL, NULL); +return; +} + +switch(action) + +{ +case 5550: //Старые подземелья +player->ADD_GOSSIP_ITEM( 5, "Огненная пропасть. 10 серебряных" , GOSSIP_SENDER_MAIN, 1248); +player->ADD_GOSSIP_ITEM( 5, "Пещеры Стенаний. 10 серебряных" , GOSSIP_SENDER_MAIN, 1249); +player->ADD_GOSSIP_ITEM( 5, "Тюрьма. 10 серебряных" , GOSSIP_SENDER_MAIN, 1253); +player->ADD_GOSSIP_ITEM( 5, "Мертвые копи. 10 серебряных" , GOSSIP_SENDER_MAIN, 1250); +player->ADD_GOSSIP_ITEM( 5, "Крепость Темного Клыка. 10 серебряных" , GOSSIP_SENDER_MAIN, 1251); +player->ADD_GOSSIP_ITEM( 5, "Непроглядная Пучина. 10 серебряных" , GOSSIP_SENDER_MAIN, 1252); +player->ADD_GOSSIP_ITEM( 5, "Лабиринты Иглошкурых. 20 серебряных" , GOSSIP_SENDER_MAIN, 1254); +player->ADD_GOSSIP_ITEM( 5, "Курганы Иглошкурых. 20 серебряных" , GOSSIP_SENDER_MAIN, 1256); +player->ADD_GOSSIP_ITEM( 5, "Монастырь Алого ордена. 20 серебряных" , GOSSIP_SENDER_MAIN, 1257); +player->ADD_GOSSIP_ITEM( 7, "[Далее] ->" , GOSSIP_SENDER_MAIN, 5551); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 5552); +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); +break; + +case 5551: //More Старые подземелья +player->ADD_GOSSIP_ITEM( 5, "Ульдаман. 30 серебряных" , GOSSIP_SENDER_MAIN, 1258); +player->ADD_GOSSIP_ITEM( 5, "Зул'Фаррак. 30 серебряных", GOSSIP_SENDER_MAIN, 1259); +player->ADD_GOSSIP_ITEM( 5, "Мародон. 40 серебряных" , GOSSIP_SENDER_MAIN, 1260); +player->ADD_GOSSIP_ITEM( 5, "Затонувший храм. 40 серебряных" , GOSSIP_SENDER_MAIN, 1261); +player->ADD_GOSSIP_ITEM( 5, "Глубины Черной горы. 40 серебряных" , GOSSIP_SENDER_MAIN, 1262); +player->ADD_GOSSIP_ITEM( 5, "Забытый Город. 50 серебряных" , GOSSIP_SENDER_MAIN, 1263); +player->ADD_GOSSIP_ITEM( 5, "Пик Черной горы. 50 серебряных" , GOSSIP_SENDER_MAIN, 1264); +player->ADD_GOSSIP_ITEM( 5, "Стратхольм. 50 серебряных", GOSSIP_SENDER_MAIN, 1265); +player->ADD_GOSSIP_ITEM( 5, "Некроситет. 50 серебряных" , GOSSIP_SENDER_MAIN, 1266); +player->ADD_GOSSIP_ITEM( 7, "[Далее] ->" , GOSSIP_SENDER_MAIN, 5553); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 5552); +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); +break; + +case 5553: //Старые подземелья 60-70 +player->ADD_GOSSIP_ITEM( 5, "Каражан. 1 золотой" , GOSSIP_SENDER_MAIN, 4007); +player->ADD_GOSSIP_ITEM( 5, "Логово Груула. 1 золотой" , GOSSIP_SENDER_MAIN, 4008); +player->ADD_GOSSIP_ITEM( 5, "Цитадель Адского Пламени. 1 золотой" , GOSSIP_SENDER_MAIN, 4009); +player->ADD_GOSSIP_ITEM( 5, "Резервуар Кривого Клыка. 1 золотой", GOSSIP_SENDER_MAIN, 4010); +player->ADD_GOSSIP_ITEM( 5, "Крепость Бурь. 1 золотой" , GOSSIP_SENDER_MAIN, 4011); +player->ADD_GOSSIP_ITEM( 5, "Пещеры Времени. 1 золотой" , GOSSIP_SENDER_MAIN, 4012); +player->ADD_GOSSIP_ITEM( 5, "Зул'Аман. 1 золотой" , GOSSIP_SENDER_MAIN, 4016); +player->ADD_GOSSIP_ITEM( 5, "Черный храм. 1 золотой" , GOSSIP_SENDER_MAIN, 4013); +player->ADD_GOSSIP_ITEM( 5, "Терраса Магистров. 2 золотых", GOSSIP_SENDER_MAIN, 4017); +player->ADD_GOSSIP_ITEM( 5, "Плато Солнечного Колодца. 2 золотых" , GOSSIP_SENDER_MAIN, 4018); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 5552); +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); +break; + +case 5554: //Старые подземелья 75-80 NORTHREND +player->ADD_GOSSIP_ITEM( 5, "Крепость Утгард. 20 золотых", GOSSIP_SENDER_MAIN, 4019); +player->ADD_GOSSIP_ITEM( 5, "Нексус. 20 золотых" , GOSSIP_SENDER_MAIN, 4020); +player->ADD_GOSSIP_ITEM( 5, "Азжол-Неруб. 20 золотых" , GOSSIP_SENDER_MAIN, 4021); +player->ADD_GOSSIP_ITEM( 5, "Ан'кахет: Старое Королевство. 20 золотых" , GOSSIP_SENDER_MAIN, 4022); +player->ADD_GOSSIP_ITEM( 5, "Крепость Драк'Тарон. 20 золотых", GOSSIP_SENDER_MAIN, 4023); +player->ADD_GOSSIP_ITEM( 5, "Аметистовая крепость. 20 золотых" , GOSSIP_SENDER_MAIN, 4024); +player->ADD_GOSSIP_ITEM( 5, "Гундрак. 20 золотых" , GOSSIP_SENDER_MAIN, 4025); +player->ADD_GOSSIP_ITEM( 5, "Вершина Утгард. 20 золотых", GOSSIP_SENDER_MAIN, 4026); +player->ADD_GOSSIP_ITEM( 5, "Ульдуар. 20 золотых" , GOSSIP_SENDER_MAIN, 4027); +player->ADD_GOSSIP_ITEM( 5, "Обсидиановое святилище. 20 золотых", GOSSIP_SENDER_MAIN, 4028); +player->ADD_GOSSIP_ITEM( 5, "Наксрамас. 20 золотых" , GOSSIP_SENDER_MAIN, 4029); +player->ADD_GOSSIP_ITEM( 7, "<- [Вернуться]" , GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "<- [Главное меню]" , GOSSIP_SENDER_MAIN, 5552); +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); +break; + +case 5552: //Back To Main Menu +if ( player->GetTeam() == ALLIANCE ) { +player->ADD_GOSSIP_ITEM( 5, "Дарнасс. 5 серебряных", GOSSIP_SENDER_MAIN, 1203); +player->ADD_GOSSIP_ITEM( 5, "Эксодар. 5 серебряных", GOSSIP_SENDER_MAIN, 1216); +player->ADD_GOSSIP_ITEM( 5, "Штормград. 5 серебряных", GOSSIP_SENDER_MAIN, 1206); +player->ADD_GOSSIP_ITEM( 5, "Стальгорн. 5 серебряных", GOSSIP_SENDER_MAIN, 1224); +player->ADD_GOSSIP_ITEM( 5, "Гномреган. 5 серебряных", GOSSIP_SENDER_MAIN, 1222); +player->ADD_GOSSIP_ITEM( 5, "Шаттрат. 5 серебряных", GOSSIP_SENDER_MAIN, 1287); +player->ADD_GOSSIP_ITEM( 5, "Даларан. 5 серебряных", GOSSIP_SENDER_MAIN, 1205); +player->ADD_GOSSIP_ITEM( 5, "Остров Квель-данас. 5 серебряных", GOSSIP_SENDER_MAIN, 1288); +player->ADD_GOSSIP_ITEM( 7, "[Старые подземелья] ->", GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "[Новые подземелья] ->", GOSSIP_SENDER_MAIN, 5554); +} else { +player->ADD_GOSSIP_ITEM( 5, "Оргриммар. 5 серебряных", GOSSIP_SENDER_MAIN, 1215); +player->ADD_GOSSIP_ITEM( 5, "Серебряная Луна. 5 серебряных", GOSSIP_SENDER_MAIN, 1217); +player->ADD_GOSSIP_ITEM( 5, "Подгород. 5 серебряных", GOSSIP_SENDER_MAIN, 1213); +player->ADD_GOSSIP_ITEM( 5, "Громовой Утес. 5 серебряных", GOSSIP_SENDER_MAIN, 1225); +player->ADD_GOSSIP_ITEM( 5, "Гномреган. 5 серебряных", GOSSIP_SENDER_MAIN, 1222); +player->ADD_GOSSIP_ITEM( 5, "Шаттрат. 5 серебряных", GOSSIP_SENDER_MAIN, 1287); +player->ADD_GOSSIP_ITEM( 5, "Даларан. 5 серебряных", GOSSIP_SENDER_MAIN, 1205); +player->ADD_GOSSIP_ITEM( 5, "Остров Квель-данас. 5 серебряных", GOSSIP_SENDER_MAIN, 1288); +player->ADD_GOSSIP_ITEM( 7, "[Старые подземелья] ->", GOSSIP_SENDER_MAIN, 5550); +player->ADD_GOSSIP_ITEM( 7, "[Новые подземелья] ->", GOSSIP_SENDER_MAIN, 5554); +} +player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,_Creature->GetGUID()); +break; + +case 1203: // Teleport to Дарнасс +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 9947.52f, 2482.73f, 1316.21f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Штормград +case 1206: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -8960.14f, 516.266f, 96.3568f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Даларан +case 1205: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 5804.14f, 624.770f, 647.7670f, 1.64f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Подгород +case 1213: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, 1819.71f, 238.79f, 60.5321f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Оргриммар +case 1215: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 1552.5f, -4420.66f, 8.94802f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Эксодар +case 1216: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -4073.03f, -12020.4f, -1.47f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Серебряная Луна +case 1217: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 9338.74f, -7277.27f, 13.7895f, 0.0f); +player->ModifyMoney(-1*costo); +break; + +case 1222://teleport player to Гномреган +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -5163.43f,660.40f,348.28f,4.65f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Стальгорн +case 1224: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -4924.07f, -951.95f, 501.55f, 5.40f); +player->ModifyMoney(-1*costo); +break; + +// Teleport to Громовой Утес +case 1225: +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -1280.19f,127.21f,131.35f,5.16f); +player->ModifyMoney(-1*costo); +break; + +case 1248://teleport player to Ragefire Chasm +if( player->getLevel() >= 8) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 1800.53f,-4394.68f,-17.93f,5.49f); +player->ModifyMoney(-2*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 8 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1249://teleport player to the Wailing Caverns +if (player->getLevel() >= 10) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -722.53f,-2226.30f,16.94f,2.71f); +player->ModifyMoney(-2*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 10 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1250://teleport player to the Deadmines +if (player->getLevel() >= 10) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -11212.04f,1658.58f,25.67f,1.45f); +player->ModifyMoney(-2*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 10 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1251://teleport player to Shadowfang Keep +if (player->getLevel() >= 15) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -254.47f,1524.68f,76.89f,1.56f); +player->ModifyMoney(-2*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 15 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1252://teleport player to Blackfathom Deeps +if (player->getLevel() >= 15) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, 4254.58f,664.74f,-29.04f,1.97f); +player->ModifyMoney(-2*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 15 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1253://teleport player to the Stockade +if (player->getLevel() >= 20) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -8769.76f,813.08f,97.63f,2.26f); +player->ModifyMoney(-2*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 20 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1254://teleport player to Razorfen Kraul +if (player->getLevel() >= 24) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -4484.04f,-1739.40f,86.47f,1.23f); +player->ModifyMoney(-4*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 24 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1255://teleport player to Гномреган +if (player->getLevel() >= 20) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -5162.62f,667.81f,248.05f,1.48f); +player->ModifyMoney(-4*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 20 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1256://teleport player to Razorfen Downs +if (player->getLevel() >= 25) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -4645.08f,-2470.85f,85.53f,4.39f); +player->ModifyMoney(-4*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 25 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1257://teleport player to the Scarlet Monastery +if (player->getLevel() >= 25) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, 2843.89f,-693.74f,139.32f,5.11f); +player->ModifyMoney(-4*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 25 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1258://teleport player to Uldaman +if (player->getLevel() >= 35) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -6119.70f,-2957.30f,204.11f,0.03f); +player->ModifyMoney(-6*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 35 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1259://teleport player to Zul'Farrak +if (player->getLevel() >= 35) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -6839.39f,-2911.03f,8.87f,0.41f); +player->ModifyMoney(-6*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 35 уровень!", LANG_UNIVERSAL, NULL); +} +break; + + +case 1260://teleport player to Maraudon +if (player->getLevel() >= 40) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -1433.33f,2955.34f,96.21f,4.82f); +player->ModifyMoney(-8*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 40 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1261://teleport player to the Sunken Temple +if (player->getLevel() >= 45) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -10346.92f,-3851.90f,-43.41f,6.09f); +player->ModifyMoney(-8*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 45 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1262://teleport player to Blackrock Depths +if (player->getLevel() >= 45) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -7301.03f,-913.19f,165.37f,0.08f); +player->ModifyMoney(-8*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 45 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1263://teleport player to Dire Maul +if (player->getLevel() >= 50) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -3982.47f,1127.79f,161.02f,0.05f); +player->ModifyMoney(-10*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 50 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1264://teleport player to Blackrock Spire +if (player->getLevel() >= 50) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -7535.43f,-1212.04f,285.45f,5.29f); +player->ModifyMoney(-10*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 50 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1265://teleport player to Stratholme +if (player->getLevel() >= 50) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, 3263.54f,-3379.46f,143.59f,0.00f); +player->ModifyMoney(-10*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 50 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1266://teleport player to Scholomance +if (player->getLevel() >= 50) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, 1219.01f,-2604.66f,85.61f,0.50f); +player->ModifyMoney(-10*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 50 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1287:// Шаттрат + +if( player->getLevel() >= 58) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -1850.209961f, 5435.821777f, -10.961435f, 3.403913f); +player->ModifyMoney(-1*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 58 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 1288://teleport player to Остров Квель-данас +if (player->getLevel() >= 65) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 12947.4f,-6893.31f,5.68398f,3.09154f); +player->ModifyMoney(-1*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 65 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4007:// Karazhan +if (player->getLevel() >= 70) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(0, -11118.8f, -2010.84f, 47.0807f, 0.0f); +player->ModifyMoney(-20*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 70 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4008:// Gruul's Lair +if (player->getLevel() >= 65) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 3539.007568f, 5082.357910f, 1.691071f, 0.0f); +player->ModifyMoney(-20*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 65 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4009:// Hellfire Citadel +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -305.816223f, 3056.401611f, -2.473183f, 2.01f); +player->ModifyMoney(-20*costo); +break; + +case 4010:// Coilfang Reservoir +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 517.288025f, 6976.279785f, 32.007198f, 0.0f); +player->ModifyMoney(-20*costo); +break; + +case 4011:// Tempest Keep +if (player->getLevel() >= 70) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 3089.579346f, 1399.046509f, 187.653458f, 4.794070f); +player->ModifyMoney(-20*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 70 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4012:// Caverns of Time +if (player->getLevel() >= 66) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(1, -8173.66f, -4746.36f, 33.8423f, 4.93989f); +player->ModifyMoney(-20*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 66 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4016:// Zul'Aman +if (player->getLevel() >= 70) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 6846.95f, -7954.5f, 170.028f, 4.61501f); +player->ModifyMoney(-20*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 70 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4013:// Black Temple +if (player->getLevel() >= 70) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, -3610.719482f, 324.987579f, 37.400028f, 3.282981f); +player->ModifyMoney(-20*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 70 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4017:// magistrate +if (player->getLevel() >= 70) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 12884.6f, -7317.69f, 65.5023f, 4.799f); +player->ModifyMoney(-40*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 70 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4018:// sunwell +if (player->getLevel() >= 70) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(530, 12574.1f, -6774.81f, 15.0904f, 3.13788f); +player->ModifyMoney(-40*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите хотя бы 70 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4019:// Utgarde Keep +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 1219.720f, -4865.28f, 41.25f, 0.31f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4020:// The Nexus +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 3776.950f, 6953.80f, 105.05f, 0.345f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4021:// Azjol-Nerub +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 3675.430f, 2169.00f, 35.90f, 2.29f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4022:// Ahn'kahet: The Old Kingdom +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 3646.760f, 2045.17f, 1.79f, 4.37f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4023:// Drak'Tharon Keep +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 4450.860f, -2045.25f, 162.83f, 0.00f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4024:// The Violet Hold +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 5679.820f, 486.80f, 652.40f, 4.08f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4025:// Gun' Drak +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 6937.540f, -4455.98f, 450.68f, 1.00f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4026:// Utgarde Pinnacle +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 1245.690f, -4856.59f, 216.86f, 3.45f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4027:// Ulduar +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 8976.240f, -1281.33f, 1059.01f, 0.58f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4028:// The Obsidian Sanctum +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 3625.780f, 280.40f, -120.14f, 3.25f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; + +case 4029:// Naxxramas +if (player->getLevel() >= 80) +{ +player->CLOSE_GOSSIP_MENU(); +player->TeleportTo(571, 3668.719f, -1262.460f, 243.63f, 5.03f); +player->ModifyMoney(-400*costo); +} else { +player->CLOSE_GOSSIP_MENU(); +_Creature->MonsterSay("Получите уже наконец 80 уровень!", LANG_UNIVERSAL, NULL); +} +break; +} +} + +bool GossipSelect_teleguy(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ +// Main menu +if (sender == GOSSIP_SENDER_MAIN) +SendDefaultMenu_teleguy(player, _Creature, action ); +return true; +} +void AddSC_teleguy() +{ +Script *newscript; +newscript = new Script; +newscript->Name = "teleguy"; +newscript->pGossipHello = &GossipHello_teleguy; +newscript->pGossipSelect = &GossipSelect_teleguy; +newscript->pItemHello = NULL; +newscript->pGOHello = NULL; +newscript->pAreaTrigger = NULL; +newscript->pItemQuestAccept = NULL; +newscript->pGOQuestAccept = NULL; +newscript->pGOChooseReward = NULL; +newscript->RegisterSelf(); +} Index: scripts/guards/ancient_of_war.cpp =================================================================== --- scripts/guards/ancient_of_war.cpp (revision 0) +++ scripts/guards/ancient_of_war.cpp (revision 0) @@ -0,0 +1,253 @@ +/* +############################### + Ancient of War, of Lore v 2.0 + (Darnassus protectors) +############################### + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + +struct MANGOS_DLL_DECL ancient_of_warAI : public ScriptedAI +{ + ancient_of_warAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + + if(m_creature->GetEntry() == 3469) + m_creature->SetMaxHealth(167000); + else m_creature->SetMaxHealth(250000); + if(m_creature->GetEntry() == 3469) + m_creature->SetHealth(167000); + else m_creature->SetMaxHealth(250000); + m_creature->SetArmor(19200); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,1620); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,270); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3500,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void wood() +{ + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + Helper = DoSpawnCreature(4423, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealthPercent() < 30.0f && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help && m_creature->GetEntry() == 3469) + { + for(int i = 0; i < 5;i++) + { + wood(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + // Thorns + if(!m_creature->HasAura(25640,EFFECT_INDEX_0)) + { + info = 25640; + Change = 1; + } + else + { + if(enemy) + { + switch(urand(0, 4)) + { + case 0: + // Grasping Vines + info = 22924; + break; + case 1: + // Choking Vines + info = 35244; + break; + case 2: + // Entangling Roots + info = 20699; + break; + case 3: + // Knock Away + info = 40434; + break; + case 4: + // Knockdown + info = 46183; + break; + }//switch + }//if rage + } + if(m_creature->GetEntry() == 3468) + info = 0; + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_ancient_of_war(Creature* pCreature) +{ + return new ancient_of_warAI (pCreature); +} + +void AddSC_ancient_of_war() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "ancient_of_war"; + newscript->GetAI = &GetAI_ancient_of_war; + newscript->RegisterSelf(); +} Index: scripts/guards/archbishop_benedictus.cpp =================================================================== --- scripts/guards/archbishop_benedictus.cpp (revision 0) +++ scripts/guards/archbishop_benedictus.cpp (revision 0) @@ -0,0 +1,387 @@ +/* +############################## + Archbishop Benedictus v 2.0 +############################## + +by Myav +*/ + +#include "precompiled.h" +#include "../../base/simple_ai.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL archbishop_benedictusAI : public ScriptedAI +{ + archbishop_benedictusAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + uint32 InnerTimer; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + + m_creature->SetMaxHealth(255000); + m_creature->SetHealth(255000); + m_creature->SetMaxPower(POWER_MANA,180000); + m_creature->SetPower(POWER_MANA,180000); + m_creature->SetArmor(5720); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } + +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealthPercent() < 30.0f && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if (InnerTimer > diff) + InnerTimer -= diff; + else InnerTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + + if(!m_creature->HasAura(48073,EFFECT_INDEX_0)) + { + // Divine Spirit 6 + DoCastSpellIfCan(m_creature, 48073); + return; + } + if(!m_creature->HasAura(48168,EFFECT_INDEX_0)) + { + // Inner Fire 9 + DoCastSpellIfCan(m_creature, 48168); + return; + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + // Mass Dispel + info = 32375; + break; + case 1: + // Pain Suppression + info = 33206; + Change = 1; + break; + case 2: + // Power Infusion + info = 10060; + Change = 1; + break; + case 3: + // Power Word: Shield + info = 41373; + Change = 1; + break; + case 4: + // Circle of Healing + info = 48089; + Change = 1; + break; + case 5: + // Holy Nova + info = 59701; + break; + case 6: + // Renew + info = 37260; + Change = 1; + break; + case 7: + // Empowered Smite + info = 41471; + break; + case 8: + // Heal + info = 39013; + Change = 1; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_cathedral_of_light(Creature* pCreature) +{ + SimpleAI* ai = new SimpleAI (pCreature); + + uint32 CreatureID = pCreature->GetEntry(); + + ai->m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + ai->m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + + switch (CreatureID) + { + //Duthorian Rall + case 6171: + ai->Spell[0].Enabled = true; + ai->Spell[0].Spell_Id = 48952; //Holy Shield 6 + ai->Spell[0].Cooldown = 30000; + ai->Spell[0].First_Cast = 500; + ai->Spell[0].Cast_Target_Type = CAST_SELF; + + ai->Spell[1].Enabled = true; + ai->Spell[1].Spell_Id = 10308; //Hammer of Justice 4 + ai->Spell[1].Cooldown = 45000; + ai->Spell[1].First_Cast = 10000; + ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[2].Enabled = true; + ai->Spell[2].Spell_Id = 48934; //Greater Blessing of Might 5 + ai->Spell[2].Cooldown = 120000; + ai->Spell[2].First_Cast = 5000; + ai->Spell[2].Cast_Target_Type = CAST_SELF; + + ai->Spell[3].Enabled = true; + ai->Spell[3].Spell_Id = 48825; //Holy Shock 7 + ai->Spell[3].Cooldown = 20000; + ai->Spell[3].First_Cast = 15000; + ai->Spell[3].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[4].Enabled = true; + ai->Spell[4].Spell_Id = 48782; //Holy Light 13 + ai->Spell[4].Cooldown = 15000; + ai->Spell[4].First_Cast = 20000; + ai->Spell[4].Cast_Target_Type = CAST_SELF; + + ai->Spell[5].Enabled = true; + ai->Spell[5].Spell_Id = 48801; //Exorcism 9 + ai->Spell[5].Cooldown = 15000; + ai->Spell[5].First_Cast = 30000; + ai->Spell[5].Cast_Target_Type = CAST_HOSTILE_TARGET; + break; + + //High Priestess Laurena + case 376: + ai->Spell[0].Enabled = true; + ai->Spell[0].Spell_Id = 48168; //Inner Fire 9 + ai->Spell[0].Cooldown = 120000; + ai->Spell[0].First_Cast = 500; + ai->Spell[0].Cast_Target_Type = CAST_SELF; + + ai->Spell[1].Enabled = true; + ai->Spell[1].Spell_Id = 48078; //Holy Nova 9 + ai->Spell[1].Cooldown = 30000; + ai->Spell[1].First_Cast = 10000; + ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[2].Enabled = true; + ai->Spell[2].Spell_Id = 48066; //Power Word: Shield 14 + ai->Spell[2].Cooldown = 15000; + ai->Spell[2].First_Cast = 5000; + ai->Spell[2].Cast_Target_Type = CAST_SELF; + + ai->Spell[3].Enabled = true; + ai->Spell[3].Spell_Id = 48123; //Smite 12 + ai->Spell[3].Cooldown = 20000; + ai->Spell[3].First_Cast = 15000; + ai->Spell[3].Cast_Target_Type = CAST_HOSTILE_TARGET; + + ai->Spell[4].Enabled = true; + ai->Spell[4].Spell_Id = 48089; //Circle of Healing 7 + ai->Spell[4].Cooldown = 15000; + ai->Spell[4].First_Cast = 20000; + ai->Spell[4].Cast_Target_Type = CAST_SELF; + + ai->Spell[5].Enabled = true; + ai->Spell[5].Spell_Id = 48068; //Renew 14 + ai->Spell[5].Cooldown = 25000; + ai->Spell[5].First_Cast = 25000; + ai->Spell[5].Cast_Target_Type = CAST_SELF; + + ai->Spell[6].Enabled = true; + ai->Spell[6].Spell_Id = 48063; //Greater Heal 9 + ai->Spell[6].Cooldown = 15000; + ai->Spell[6].First_Cast = 30000; + ai->Spell[6].Cast_Target_Type = CAST_SELF; + + ai->Spell[7].Enabled = true; + ai->Spell[7].Spell_Id = 48072; //Prayer of Healing 7 + ai->Spell[7].Cooldown = 25000; + ai->Spell[7].First_Cast = 35000; + ai->Spell[7].Cast_Target_Type = CAST_SELF; + break; + } + + ai->Reset(); + + return ai; +} +CreatureAI* GetAI_archbishop_benedictus(Creature* pCreature) +{ + return new archbishop_benedictusAI (pCreature); +} + +void AddSC_archbishop_benedictus() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "archbishop_benedictus"; + newscript->GetAI = &GetAI_archbishop_benedictus; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "cathedral_of_light"; + newscript->GetAI = &GetAI_cathedral_of_light; + newscript->RegisterSelf(); +} Index: scripts/guards/g_marcus_jonathan.cpp =================================================================== --- scripts/guards/g_marcus_jonathan.cpp (revision 0) +++ scripts/guards/g_marcus_jonathan.cpp (revision 0) @@ -0,0 +1,200 @@ +/* +############################### + General Marcus Jonathan v 1.0 + (Stormwind protector) +############################### + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +struct MANGOS_DLL_DECL g_marcus_jonathanAI : public ScriptedAI +{ + g_marcus_jonathanAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + + m_creature->SetMaxHealth(98000); + m_creature->SetHealth(98000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void grunts() +{ + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + Helper = DoSpawnCreature(68, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void UpdateAI(const uint32 diff) +{ + //Always decrease our global cooldown first + if (GlobalCooldown > diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!m_creature->isAlive()) + return; + + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help) + { + + for(int i = 0; i < 4;i++) + { + grunts(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_g_marcus_jonathan(Creature* pCreature) +{ + return new g_marcus_jonathanAI (pCreature); +} + +void AddSC_g_marcus_jonathan() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "g_marcus_jonathan"; + newscript->GetAI = &GetAI_g_marcus_jonathan; + newscript->RegisterSelf(); +} Index: scripts/guards/high_fire_mage.cpp =================================================================== --- scripts/guards/high_fire_mage.cpp (revision 0) +++ scripts/guards/high_fire_mage.cpp (revision 0) @@ -0,0 +1,254 @@ +/* +############################## + Lady Catrana Prestor v 1.0 +############################## + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL high_fire_mageAI : public ScriptedAI +{ + high_fire_mageAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + +// m_creature->SetMaxHealth(120000); +// m_creature->SetHealth(120000); + m_creature->SetMaxPower(POWER_MANA,90000); + m_creature->SetPower(POWER_MANA,90000); + m_creature->SetArmor(5720); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+1000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealthPercent() < 30.0f && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + // Molten Armor 3 + if(!m_creature->HasAura(43046,EFFECT_INDEX_0)) + { + DoCastSpellIfCan(m_creature, 43046); + return; + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + // Mana Shield + info = 38151; + Change = 1; + break; + case 1: + // Blast Wave + info = 38536; + break; + case 2: + // Dragon's Breath + info = 42950; + break; + case 3: + // Fire Blast + info = 42873; + break; + case 4: + // Firebal + info = 41383; + break; + case 5: + // Pyroblast + info = 38535; + break; + case 6: + // Improved Counterspell + info = 12598; + break; + case 7: + // Arcane Power + info = 12042; + Change = 1; + break; + case 8: + // Scorch + info = 38636; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_high_fire_mage(Creature* pCreature) +{ + return new high_fire_mageAI (pCreature); +} + +void AddSC_high_fire_mage() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "high_fire_mage"; + newscript->GetAI = &GetAI_high_fire_mage; + newscript->RegisterSelf(); +} Index: scripts/guards/high_sorcerer_andromath.cpp =================================================================== --- scripts/guards/high_sorcerer_andromath.cpp (revision 0) +++ scripts/guards/high_sorcerer_andromath.cpp (revision 0) @@ -0,0 +1,252 @@ +/* +############################## + High Sorcerer Andromath v 1.0 +############################## + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL high_sorcerer_andromathAI : public ScriptedAI +{ + high_sorcerer_andromathAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + +// m_creature->SetMaxHealth(120000); +// m_creature->SetHealth(120000); + m_creature->SetMaxPower(POWER_MANA,90000); + m_creature->SetPower(POWER_MANA,90000); + m_creature->SetArmor(5720); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+1000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealthPercent() < 30.0f && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + // Ice Armor 6 + if(!m_creature->HasAura(43008,EFFECT_INDEX_0)) + { + DoCastSpellIfCan(m_creature, 43008); + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + // Ice Barrier 8 + info = 43039; + Change = 1; + break; + case 1: + // Blizzard + info = 41382; + break; + case 2: + // Knockdown + info = 5164; + break; + case 3: + // Charged Arcane Explosion + info = 37106; + break; + case 4: + // Cone of Cold + info = 29717; + break; + case 5: + // Frost Nova + info = 31250; + break; + case 6: + // Arcane Blast + info = 24857; + break; + case 7: + // Frostbolt + info = 41486; + break; + case 8: + // Arcane Missiles + info = 39414; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_high_sorcerer_andromath(Creature* pCreature) +{ + return new high_sorcerer_andromathAI (pCreature); +} + +void AddSC_high_sorcerer_andromath() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "high_sorcerer_andromath"; + newscript->GetAI = &GetAI_high_sorcerer_andromath; + newscript->RegisterSelf(); +} Index: scripts/guards/highlord_bolvar_fordragon.cpp =================================================================== --- scripts/guards/highlord_bolvar_fordragon.cpp (revision 0) +++ scripts/guards/highlord_bolvar_fordragon.cpp (revision 0) @@ -0,0 +1,256 @@ +/* +################################# + highlord Bolvar Fordragon v 1.0 +################################# + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + + +#define MANAPOTION 43186 +#define HEALINGPOTION 54572 +#define POTIONCD 60000 +#define EVOCATION 12051 +#define EVOCATION_CD 480000 + +struct MANGOS_DLL_DECL highlord_bolvar_fordragonAI : public ScriptedAI +{ + highlord_bolvar_fordragonAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + uint32 Evocation_cd; + uint32 GCD; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + Evocation_cd = 0; + GCD = 0; + +// m_creature->SetMaxHealth(380000); +// m_creature->SetHealth(380000); + m_creature->SetMaxPower(POWER_MANA,150000); + m_creature->SetPower(POWER_MANA,150000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealthPercent() < 30.0f && PotioncdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Evocation_cdGetPower(POWER_MANA)GetMaxPower(POWER_MANA)*0.3 && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + if(!(Evocation_cd < diff)) + Evocation_cd -= diff; + if(!(GCD < diff)) + GCD -= diff; + + if(!m_creature->isAlive()) + return; + + if(!m_creature->HasAura(54043,EFFECT_INDEX_0)) // Retribution Aura + { + DoCastSpellIfCan(m_creature, 54043); + return; + } + + if(!m_creature->HasAura(20165,EFFECT_INDEX_0)) // Seal of Light + { + DoCastSpellIfCan(m_creature, 20165); + return; + } + + if(!m_creature->HasAura(25898,EFFECT_INDEX_0)) // Greater Blessing of Kings + { + DoCastSpellIfCan(m_creature, 25898); + return; + } + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(enemy) + { + switch(urand(0, 8)) + { + case 0: + info = 36946; // Consecration + break; + case 1: + info = 38921; // Holy Shock + break; + case 2: + info = 48827; // Avenger's Shield + break; + case 3: + info = 41367; // Divine Shield + Change = 1; + break; + case 4: + info = 10308; // Hammer of Justice + break; + case 5: + info = 31904; // Holy Shield + Change = 1; + break; + case 6: + info = 41450; // Blessing of Protection + Change = 1; + break; + case 7: + info = 31884; // Avenging Wrath + Change = 1; + break; + case 8: + info = 48932; // Blessing of Might + Change = 1; + break; + }//switch + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance + +} +}; +CreatureAI* GetAI_highlord_bolvar_fordragon(Creature* pCreature) +{ + return new highlord_bolvar_fordragonAI (pCreature); +} + +void AddSC_highlord_bolvar_fordragon() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "highlord_bolvar_fordragon"; + newscript->GetAI = &GetAI_highlord_bolvar_fordragon; + newscript->RegisterSelf(); +} Index: scripts/guards/officers.cpp =================================================================== --- scripts/guards/officers.cpp (revision 0) +++ scripts/guards/officers.cpp (revision 0) @@ -0,0 +1,402 @@ +/* +##################### + City Officers v 4 +##################### + +by Myav +*/ + +#include "precompiled.h" +#include "../../base/guard_ai.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + +struct MANGOS_DLL_DECL city_officerAI : public ScriptedAI +{ + city_officerAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0; _Aggro = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 OffHand; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + bool yell; + int _Aggro; + float temp1; + float temp2; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = 5000; + OffHand = 0; + Potioncd = 0; + yell = false; + + m_creature->setPowerType(POWER_RAGE); + m_creature->SetMaxPower(POWER_RAGE,500); + m_creature->SetPower(POWER_RAGE,0); + if(m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + m_creature->SetMaxHealth(33600); + else + { + if(m_creature->GetEntry() == 18103) + m_creature->SetMaxHealth(47400); + else m_creature->SetMaxHealth(67000); + } + if(m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + m_creature->SetHealth(33600); + else + { + if(m_creature->GetEntry() == 18103) + m_creature->SetHealth(47400); + else m_creature->SetHealth(67000); + } + if(m_creature->GetEntry() == 21970 || m_creature->GetEntry() == 21971) + m_creature->SetMaxHealth(45725); + if(m_creature->GetEntry() == 21970 || m_creature->GetEntry() == 21971) + m_creature->SetHealth(45725); + m_creature->SetArmor(9600); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,540); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,540); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,540); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,540); + m_creature->SetResistance(SPELL_SCHOOL_FROST,540); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,540); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,540); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+1000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } + +} + +void DamageDeal(Unit *done_to, uint32 &damage) +{ + if(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 18103) + return; + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0: temp1 = temp2 + 40;break; + case 1: temp1 = temp2 + 50;break; + case 2: temp1 = temp2 + 60;break; + case 3: temp1 = temp2 + 70;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + +void DamageTaken(Unit *done_by, uint32 &damage) +{ + if(damage > m_creature->GetHealth()) + return; + + if(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 18103) + return; + + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 3)) + { + case 0:temp1 = temp2 + 20;break; + case 1:temp1 = temp2 + 30;break; + case 2:temp1 = temp2 + 40;break; + case 3:temp1 = temp2 + 50;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + + +void guards() +{ + int entry = 0; + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + if(m_creature->getFaction() == 85) + entry = 3296; + if(m_creature->getFaction() == 79) + entry = 4262; + if(m_creature->getFaction() == 11) + entry = 68; + if(m_creature->getFaction() == 71) + entry = 5624; + if(m_creature->getFaction() == 57) + entry = 5595; + if(m_creature->getFaction() == 105) + entry = 3084; + if(m_creature->getFaction() == 1638) + entry = 16733; + if(m_creature->getFaction() == 1604) + entry = 16222; + Helper = DoSpawnCreature(entry, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + /* Helper = DoSpawnCreature(entry, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); */ + if(Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void UpdateAI(const uint32 diff) +{ + + if (m_creature->GetHealthPercent() < 30.0f && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease our OffHand cooldown first + if (OffHand > diff) + OffHand -= diff; + else OffHand = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Buff timer (only buff when we are alive and not in combat + if (!m_creature->isInCombat()) + { + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = temp1; + temp1 = temp2 - 3; + if(temp1 > 0) + m_creature->SetPower(POWER_RAGE,temp1); + else + m_creature->SetPower(POWER_RAGE,0); + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + { + if(m_creature->getFaction() == 85) + m_creature->MonsterSay("Orgrimmar is under Invasion! Guards!! Help me!",LANG_ORCISH,0); + if(m_creature->getFaction() == 79) + m_creature->MonsterSay("Darnassus is under Invasion! Guards!! Help me!",LANG_DARNASSIAN,0); + if(m_creature->getFaction() == 11) + m_creature->MonsterSay("Stormwind is under Invasion! Guards!! Help me!",LANG_COMMON,0); + if(m_creature->getFaction() == 71) + m_creature->MonsterSay("Undercity is under Invasion! Guards!! Help me!",LANG_GUTTERSPEAK,0); + if(m_creature->getFaction() == 57) + m_creature->MonsterSay("Ironforge is under Invasion! Guards!! Help me!",LANG_DWARVISH,0); + if(m_creature->getFaction() == 105) + m_creature->MonsterSay("Thunder Bluff is under Invasion! Guards!! Help me!",LANG_TAURAHE,0); + if(m_creature->getFaction() == 1638) + m_creature->MonsterSay("The Exodar is under Invasion! Guards!! Help me!",LANG_DRAENEI,0); + if(m_creature->getFaction() == 1604) + m_creature->MonsterSay("Silvermoon is under Invasion! Guards!! Help me!",LANG_THALASSIAN,0); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_BATTLEROAR); + for(int i = 0; i < 3;i++) + { + guards(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + if(m_creature->getVictim() && m_creature->SelectHostileTarget() && OffHand > 0 && OffHand < 500) + { + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_ATTACKOFF); + m_creature->AttackerStateUpdate(m_creature->getVictim()); + m_creature->resetAttackTimer(); + OffHand = 0; + } + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + + if(_Aggro != 2 && m_creature->GetEntry() != 2041 && m_creature->GetEntry() != 18103) + { + _Aggro = 2; + DoCastSpellIfCan(m_creature,2457); + return; + } + + int Change = 0; + int info = 0; + + /* if(!m_creature->HasAura(47440,0) && m_creature->GetPower(POWER_RAGE) > 50) + { + info = 47440; + Change = 1; + } + else + { */ + if(!m_creature->HasAura(47436,EFFECT_INDEX_0) && m_creature->GetPower(POWER_RAGE) > 50) + { + info = 47436; + Change = 1; + } + else + if(enemy && m_creature->GetPower(POWER_RAGE) > 100) + { + switch(urand(0, 8)) + { + case 0: + // Heroic Strike + info = 47450; + break; + case 1: + // Bloodthirst + info = 30335; + break; + case 2: + // Piercing Howl + info = 12323; + break; + case 3: + // Intimidating Shout + info = 5246; + break; + case 4: + // Concussion Blow + info = 12809; + break; + case 5: + // Cleave + info = 40504; + break; + case 6: + // Disarm + info = 31955; + break; + case 7: + // Hamstring + info = 30989; + break; + case 8: + // Whirlwind + info = 13736; + break; + }//switch + }//if rage + /* } */ + + if(m_creature->GetEntry() == 2041 || m_creature->GetEntry() == 18103) + info = 0; + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + OffHand = 1000; + }//end attack ready + }// end attack distance +} +}; +CreatureAI* GetAI_city_officer(Creature* pCreature) +{ + return new city_officerAI (pCreature); +} +CreatureAI* GetAI_city_guard(Creature* pCreature) +{ + return new guardAI (pCreature); +} +void AddSC_city_officer() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "city_officer"; + newscript->GetAI = &GetAI_city_officer; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "city_guard"; + newscript->GetAI = &GetAI_city_guard; + newscript->RegisterSelf(); +} Index: scripts/guards/overlord_saurfang.cpp =================================================================== --- scripts/guards/overlord_saurfang.cpp (revision 0) +++ scripts/guards/overlord_saurfang.cpp (revision 0) @@ -0,0 +1,253 @@ +/* +############################## + High Overlord Saurfang v 1.0 + (Orgrimmar protector) +############################## + +by Myav +*/ + +#include "precompiled.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + +struct MANGOS_DLL_DECL overlord_saurfangAI : public ScriptedAI +{ + overlord_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + Potioncd = 0; + m_creature->SetMaxHealth(98000); + m_creature->SetHealth(98000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_KNOCKOUT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+2000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void grunts() +{ + float x; + float y; + float z; + float X; + float Y; + float Z; + m_creature->GetPosition(x,y,z); + m_creature->getVictim()->GetPosition(X,Y,Z); + if(x > X) + X = x + urand(20, 30); + else + X = x - urand(20, 30); + if(y > Y) + Y = y + urand(20, 30); + else + Y = y - urand(20, 30); + m_creature->GetRespawnCoord(x,y,z); + m_creature->MonsterSay("Protection, to the aid!",LANG_UNIVERSAL,0); + if (m_creature->GetEntry() == 466) // Proverka al marcus + Helper = DoSpawnCreature(68, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + else + Helper = DoSpawnCreature(3296, (float) (X - x), (float) (Y - y), (float) (Z -z), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); + if (Helper && enemy) + ((CreatureAI*)Helper->AI())->AttackStart(enemy); +} + +void JustDied(Unit*) +{ + GlobalCooldown = 0; + Help = urand(45000, 75000); + m_creature->RemoveAllAttackers(); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+2000,false); +} +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealthPercent() < 30.0f && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!Help) + { + + for(int i = 0; i < 4;i++) + { + grunts(); + } + Help = urand(60000, 105000); + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + if(!m_creature->HasAura(8269,EFFECT_INDEX_0)) + { + info = 8269; // Frenzy + Change = 1; + } + else + { + if(enemy) + { + switch(urand(0, 4)) + { + case 0: + info = 11430; // Slam + break; + case 1: + info = 31955; // Disarm + break; + case 2: + info = 20276; // Knockdown + break; + case 3: + info = 41400; // Whirlwind + break; + case 4: + info = 41197; // Shield Bash + break; + }//switch + }//if rage + } + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance +/* else + { + if(!m_creature->IsNonMeleeSpellCasted(false)) + { + if ((*m_creature).GetMotionMaster()->top()->GetMovementGeneratorType()!=TARGETED_MOTION_TYPE) + { + (*m_creature).GetMotionMaster()->Clear(false); + (*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim()); + } + } + }//end else */ +} +}; +CreatureAI* GetAI_overlord_saurfang(Creature* pCreature) +{ + return new overlord_saurfangAI (pCreature); +} + +void AddSC_overlord_saurfang() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "overlord_saurfang"; + newscript->GetAI = &GetAI_overlord_saurfang; + newscript->RegisterSelf(); +} Index: scripts/guards/thrall.cpp =================================================================== --- scripts/guards/thrall.cpp (revision 0) +++ scripts/guards/thrall.cpp (revision 0) @@ -0,0 +1,276 @@ +/* +############ + Thrall v 1 +############ + +by Myav +*/ + +#include "precompiled.h" +#include "../../base/guard_ai.h" + +#define GENERIC_CREATURE_COOLDOWN 5000 + +#define HEALINGPOTION 54572 +#define POTIONCD 60000 + + +struct MANGOS_DLL_DECL thrallAI : public ScriptedAI +{ + thrallAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset(); ZoneAttackMsgTimer = 0;} + + uint32 GlobalCooldown; //This variable acts like the global cooldown that players have (1.5 seconds) + uint32 Help; + uint32 ZoneAttackMsgTimer; + uint32 Potioncd; + float temp1; + float temp2; + Unit* enemy; + Creature* Helper; + +void Reset() +{ + GlobalCooldown = 0; + Help = 5000; + Potioncd = 0; + + m_creature->setPowerType(POWER_RAGE); + m_creature->SetMaxPower(POWER_RAGE,500); + m_creature->SetPower(POWER_RAGE,0); +// m_creature->SetMaxHealth(360000); +// m_creature->SetHealth(360000); + m_creature->SetArmor(11520); + m_creature->SetResistance(SPELL_SCHOOL_NORMAL,810); + m_creature->SetResistance(SPELL_SCHOOL_NATURE,810); + m_creature->SetResistance(SPELL_SCHOOL_HOLY,810); + m_creature->SetResistance(SPELL_SCHOOL_FIRE,810); + m_creature->SetResistance(SPELL_SCHOOL_FROST,810); + m_creature->SetResistance(SPELL_SCHOOL_SHADOW,810); + m_creature->SetResistance(SPELL_SCHOOL_ARCANE,810); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISARM, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_POLYMORPH, true); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_INTERRUPT_CAST, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DISORIENTED, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_CHARM , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FEAR , true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_ROOT, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SILENCE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_STUN, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_FREEZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_HORROR, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_DAZE, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SLEEP, true); + m_creature->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_BANISH, true); + m_creature->HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND,BASE_VALUE,+3000,true); +} + +void Aggro(Unit *who) +{ + //Send Zone Under Attack message to the LocalDefense and WorldDefense Channels + if (who->GetTypeId() == TYPEID_PLAYER && !ZoneAttackMsgTimer) + { + m_creature->SendZoneUnderAttackMessage((Player*)who); + ZoneAttackMsgTimer = 30000; + } +} + +void DamageDeal(Unit *done_to, uint32 &damage) +{ + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 4)) + { + case 0:temp1 = temp2 + 40;break; + case 1:temp1 = temp2 + 50;break; + case 2:temp1 = temp2 + 60;break; + case 3:temp1 = temp2 + 70;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + +void DamageTaken(Unit *done_by, uint32 &damage) +{ + if(damage > m_creature->GetHealth()) + return; + + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = 0; + temp2 = temp1; + switch(urand(0, 4)) + { + case 0:temp1 = temp2 + 20;break; + case 1:temp1 = temp2 + 30;break; + case 2:temp1 = temp2 + 40;break; + case 3:temp1 = temp2 + 50;break; + } + if(temp1 > 500) + m_creature->SetPower(POWER_RAGE,500); + else + m_creature->SetPower(POWER_RAGE,temp1); +} + + +void UpdateAI(const uint32 diff) +{ + if (m_creature->GetHealthPercent() < 30.0f && Potioncd diff) + GlobalCooldown -= diff; + else GlobalCooldown = 0; + + //Always decrease ZoneAttackMsgTimer + if (ZoneAttackMsgTimer > diff) + ZoneAttackMsgTimer -= diff; + else ZoneAttackMsgTimer = 0; + + if(!(Potioncd < diff)) + Potioncd -= diff; + + if(!m_creature->isAlive()) + return; + + //Buff timer (only buff when we are alive and not in combat + if (!m_creature->isInCombat()) + { + int temp1 = m_creature->GetPower(POWER_RAGE); + int temp2 = temp1; + temp1 = temp2 - 3; + if(temp1 > 0) + m_creature->SetPower(POWER_RAGE,temp1); + else + m_creature->SetPower(POWER_RAGE,0); + } + + //Return since we have no target + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + Unit *target = m_creature->getVictim(); + + if(target == SelectUnit(SELECT_TARGET_TOPAGGRO,0) && !target->isAlive() && !m_creature->IsNonMeleeSpellCasted(false)) + { + Unit* target2 = NULL; + target2 = SelectUnit(SELECT_TARGET_TOPAGGRO,1); + m_creature->getThreatManager().modifyThreatPercent(target,-100); + if(target2 && target2->isAlive()) + { + m_creature->AddThreat(target2,1); + m_creature->Attack(target2,true); + AttackStart(target2); + return; + } + else + { + Reset(); + return; + } + } + + if(m_creature->IsHostileTo(target)) + enemy = target; + + if(enemy) + if(!enemy->isAlive()) + enemy = NULL; + + + //Always decrease Help when in combat + if (Help > diff) + Help -= diff; + else Help = 0; + + if(!m_creature->HasAura(41447,EFFECT_INDEX_0)) // Enrage + { + DoCastSpellIfCan(m_creature,41447); + return; + } + + //If we are within range melee the target + if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) + { + //Make sure our attack is ready and we arn't currently casting + if( m_creature->isAttackReady() && !m_creature->IsNonMeleeSpellCasted(false)) + { + int Change = 0; + int info = 0; + + + + if(!m_creature->getVictim()->HasAura(29584,EFFECT_INDEX_0) && m_creature->GetPower(POWER_RAGE) > 50) + { + info = 29584; // Demoralizing Shout + } + else + + if(enemy && m_creature->GetPower(POWER_RAGE) > 60) + { + switch(urand(0, 7)) + { + case 0: + info = 37476; // Cleave + break; + case 1: + info = 36706; // Thunderclap + break; + case 2: + info = 38618; // Whirlwind + break; + case 3: + info = 12975; // Last Stand + Change = 1; + break; + case 4: + info = 12809; // Concussion Blow + break; + case 5: + info = 36138; // Hammer Stun + break; + case 6: + info = 47486; // Mortal Strike + break; + case 7: + info = 34620; // Slam + break; + } //switch + } //if rage + + //65% chance to replace our white hit with a spell + if (info && urand(0, 1) == 0 && !GlobalCooldown) + { + //Cast the spell + if (Change == 1)DoCastSpellIfCan(m_creature, info); + else DoCastSpellIfCan(enemy, info); + + //Set our global cooldown + GlobalCooldown = GENERIC_CREATURE_COOLDOWN; + }//end 50% change + else m_creature->AttackerStateUpdate(m_creature->getVictim()); + + m_creature->resetAttackTimer(); + }//end attack ready + }// end attack distance + +} +}; +CreatureAI* GetAI_thrall(Creature* pCreature) +{ + return new thrallAI (pCreature); +} +void AddSC_thrall() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "thrall"; + newscript->GetAI = &GetAI_thrall; + newscript->RegisterSelf(); +} Index: system/ScriptLoader.cpp =================================================================== --- system/ScriptLoader.cpp (revision 1633) +++ system/ScriptLoader.cpp (working copy) @@ -8,7 +8,27 @@ extern void AddSC_battleground(); //custom +extern void AddSC_buffer(); +extern void AddSC_guildmaster(); +extern void AddSC_npc_arena_honor(); +extern void AddSC_npc_helper(); +extern void AddSC_npc_ulduar_teleporter(); +extern void AddSC_paymounts(); +extern void AddSC_teleguy(); +extern void AddSC_go_drink(); +extern void AddSC_mob_heal(); +//guards +extern void AddSC_ancient_of_war(); +extern void AddSC_archbishop_benedictus(); +extern void AddSC_g_marcus_jonathan(); +extern void AddSC_high_fire_mage(); +extern void AddSC_high_sorcerer_andromath(); +extern void AddSC_highlord_bolvar_fordragon(); +extern void AddSC_city_officer(); +extern void AddSC_overlord_saurfang(); +extern void AddSC_thrall(); + //examples extern void AddSC_example_creature(); extern void AddSC_example_escort(); @@ -408,7 +428,27 @@ AddSC_battleground(); //custom + AddSC_buffer(); + AddSC_guildmaster(); + AddSC_npc_arena_honor(); + AddSC_npc_helper(); + AddSC_npc_ulduar_teleporter(); + AddSC_paymounts(); + AddSC_teleguy(); + AddSC_go_drink(); + AddSC_mob_heal(); + //guards + AddSC_ancient_of_war(); + AddSC_archbishop_benedictus(); + AddSC_g_marcus_jonathan(); + AddSC_high_fire_mage(); + AddSC_high_sorcerer_andromath(); + AddSC_highlord_bolvar_fordragon(); + AddSC_city_officer(); + AddSC_overlord_saurfang(); + AddSC_thrall(); + //examples AddSC_example_creature(); AddSC_example_escort(); Index: VC80/80ScriptDev2.vcproj =================================================================== --- VC80/80ScriptDev2.vcproj (revision 1633) +++ VC80/80ScriptDev2.vcproj (working copy) @@ -404,7 +404,27 @@ + + + + + + + + + + + + + + + + + + + + Index: VC90/90ScriptDev2.vcproj =================================================================== --- VC90/90ScriptDev2.vcproj (revision 1633) +++ VC90/90ScriptDev2.vcproj (working copy) @@ -403,7 +403,27 @@ + + + + + + + + + + + + + + + + + + + +