diff options
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 6 | ||||
-rw-r--r-- | sql/updates/6131_world_scripts.sql | 4 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/eastern_kingdoms/western_plaguelands.cpp | 2 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/borean_tundra.cpp | 87 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/howling_fjord.cpp | 40 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/storm_peaks.cpp | 159 |
6 files changed, 295 insertions, 3 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 7c2b8979618..f1f21d2ad2a 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -356,8 +356,12 @@ UPDATE `creature_template` SET `ScriptName`='npc_keristrasza' WHERE `entry`=2620 UPDATE `creature_template` SET `ScriptName`='npc_iruk' WHERE `entry`=26219; UPDATE `creature_template` SET `ScriptName`='npc_corastrasza' WHERE `entry`=32548; UPDATE `creature_template` SET `ScriptName`='mob_nerubar_victim' WHERE `entry`=25284; -UPDATE `creature_template` SET `ScriptName`='npc_gefangener_der_geißel' WHERE `entry`=25610; +UPDATE `creature_template` SET `ScriptName`='npc_scourge_prisoner' WHERE `entry`=25610; UPDATE `gameobject_template` SET `ScriptName`='go_scourge_cage' WHERE `entry`=187867; +UPDATE `creature_template` SET `ScriptName`='npc_loklira_crone' WHERE `entry`=29975; +UPDATE `creature_template` SET `ScriptName`='npc_victorious_challenger' WHERE `entry`=30012; +UPDATE `creature_template` SET `ScriptName`='npc_mcgoyver' WHERE `entry`=24040; +UPDATE `creature_template` SET `ScriptName`='npc_jenny' WHERE `entry`=25969; /* BURNING STEPPES */ UPDATE `creature_template` SET `ScriptName`='npc_ragged_john' WHERE `entry`=9563; diff --git a/sql/updates/6131_world_scripts.sql b/sql/updates/6131_world_scripts.sql new file mode 100644 index 00000000000..1387501b30b --- /dev/null +++ b/sql/updates/6131_world_scripts.sql @@ -0,0 +1,4 @@ +UPDATE `creature_template` SET `ScriptName`='npc_loklira_crone' WHERE `entry`=29975; +UPDATE `creature_template` SET `ScriptName`='npc_victorious_challenger' WHERE `entry`=30012; +UPDATE `creature_template` SET `ScriptName`='npc_mcgoyver' WHERE `entry`=24040; +UPDATE `creature_template` SET `ScriptName`='npc_jenny' WHERE `entry`=25969; diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/western_plaguelands.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/western_plaguelands.cpp index 4181bc89867..f2d53ae39b6 100644 --- a/src/bindings/scripts/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/src/bindings/scripts/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -127,7 +127,7 @@ bool GossipSelect_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature, uint if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) { pPlayer->CLOSE_GOSSIP_MENU(); - pCreature->CastSpell(pPlayer, SPELL_SCARLET_ILLUSION, false); + pPlayer->CastSpell(pPlayer, SPELL_SCARLET_ILLUSION, false); } return true; } diff --git a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp index 36c71be6a94..3fd135035da 100644 --- a/src/bindings/scripts/scripts/northrend/borean_tundra.cpp +++ b/src/bindings/scripts/scripts/northrend/borean_tundra.cpp @@ -508,6 +508,86 @@ CreatureAI* GetAI_npc_scourge_prisoner(Creature* pCreature) { return new npc_scourge_prisonerAI(pCreature); } + +/*###### +## npc_jenny +######*/ +enum eJenny +{ + QUEST_LOADER_UP = 11881, + + NPC_FEZZIX_GEARTWIST = 25849, + NPC_JENNY = 25969, + + SPELL_GIVE_JENNY_CREDIT = 46358, + SPELL_CRATES_CARRIED = 46340, + SPELL_DROP_CRATE = 46342, + + FACTION_ESCORT_A_NEUTRAL_ACTIVE = 231, + FACTION_ESCORT_H_NEUTRAL_ACTIVE = 232 +}; + +struct TRINITY_DLL_DECL npc_jennyAI : public ScriptedAI +{ + npc_jennyAI(Creature *c) : ScriptedAI(c) {} + + bool setCrateNumber; + + void Reset() + { + if(!setCrateNumber == false) + setCrateNumber = true; + + m_creature->SetReactState(REACT_PASSIVE); + + if(((Player*)m_creature->GetOwner())->GetTeamId() == TEAM_ALLIANCE) + { + m_creature->setFaction(FACTION_ESCORT_A_NEUTRAL_ACTIVE); + }else{ + m_creature->setFaction(FACTION_ESCORT_H_NEUTRAL_ACTIVE); + } + } + + void DamageTaken(Unit* pDone_by, uint32& uiDamage) + { + m_creature->CastSpell(m_creature,SPELL_DROP_CRATE,true); + } + + void MoveInLineOfSight(Unit* pWho) + { + if(pWho->GetEntry() == NPC_FEZZIX_GEARTWIST) + { + if(((Player*)m_creature->GetOwner())->GetQuestStatus(QUEST_LOADER_UP) == QUEST_STATUS_INCOMPLETE && m_creature->GetAura(SPELL_CRATES_CARRIED)) + { + m_creature->CastSpell(((Player*)m_creature->GetOwner()),SPELL_GIVE_JENNY_CREDIT,true); // Maybe is not working. + ((Player*)m_creature->GetOwner())->CompleteQuest(QUEST_LOADER_UP); + m_creature->DisappearAndDie(); + } + } + } + + void UpdateAI(const uint32 diff) + { + if(setCrateNumber) + { + m_creature->AddAura(SPELL_CRATES_CARRIED,m_creature); + setCrateNumber = false; + } + + if(setCrateNumber == false && !m_creature->HasAura(SPELL_CRATES_CARRIED)) + { + m_creature->DisappearAndDie(); + } + + } +}; + +CreatureAI* GetAI_npc_jenny(Creature *pCreature) +{ + return new npc_jennyAI (pCreature); +} + + void AddSC_borean_tundra() { Script *newscript; @@ -564,7 +644,12 @@ void AddSC_borean_tundra() newscript->RegisterSelf(); newscript = new Script; - newscript->Name = "scourge_prisoner"; + newscript->Name = "npc_scourge_prisoner"; newscript->GetAI = &GetAI_npc_scourge_prisoner; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_jenny"; + newscript->GetAI = &GetAI_npc_jenny; + newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/northrend/howling_fjord.cpp b/src/bindings/scripts/scripts/northrend/howling_fjord.cpp index 417f53d3356..48b0fe97228 100644 --- a/src/bindings/scripts/scripts/northrend/howling_fjord.cpp +++ b/src/bindings/scripts/scripts/northrend/howling_fjord.cpp @@ -263,6 +263,40 @@ bool GossipSelect_npc_razael_and_lyana(Player* pPlayer, Creature* pCreature, uin return true; } +/*###### +## npc_mcgoyver +######*/ + +#define GOSSIP_ITEM_MG_I "Create Dark Iron Ingots" + +enum eMcGoyver +{ + QUEST_WE_CAN_REBUILD_IT = 11483, + + SPELL_CREATURE_DARK_IRON_INGOTS = 44512, +}; + +bool GossipHello_npc_mcgoyver(Player* pPlayer, Creature* pCreature) +{ + if(pPlayer->GetQuestStatus(QUEST_WE_CAN_REBUILD_IT) == QUEST_STATUS_INCOMPLETE) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MG_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_mcgoyver(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch(uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CastSpell(pPlayer, SPELL_CREATURE_DARK_IRON_INGOTS, true); + pPlayer->CLOSE_GOSSIP_MENU(); + break; + } + return true; +} + void AddSC_howling_fjord() { Script *newscript; @@ -283,4 +317,10 @@ void AddSC_howling_fjord() newscript->pGossipHello = &GossipHello_npc_razael_and_lyana; newscript->pGossipSelect = &GossipSelect_npc_razael_and_lyana; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_mcgoyver"; + newscript->pGossipHello = &GossipHello_npc_mcgoyver; + newscript->pGossipSelect = &GossipSelect_npc_mcgoyver; + newscript->RegisterSelf(); } diff --git a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp index 9cffb2904b9..8c8df53124a 100644 --- a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp +++ b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp @@ -200,6 +200,152 @@ CreatureAI* GetAI_npc_goblin_prisoner(Creature* pCreature) return new npc_goblin_prisonerAI(pCreature); } +/*###### +## npc_victorious_challenger +######*/ + +#define GOSSIP_CHALLENGER "Let's do this, sister." + +enum eVictoriousChallenger +{ + QUEST_TAKING_ALL_CHALLENGERS = 12971, + QUEST_DEFENDING_YOUR_TITLE = 13423, + + SPELL_SUNDER_ARMOR = 11971, + SPELL_REND_VC = 11977 +}; + +struct TRINITY_DLL_DECL npc_victorious_challengerAI : public ScriptedAI +{ + npc_victorious_challengerAI(Creature* pCreature) : ScriptedAI(pCreature) {} + + uint32 SunderArmorTimer; + uint32 RendTimer; + + void Reset() + { + m_creature->RestoreFaction(); + + SunderArmorTimer = 10000; + RendTimer = 15000; + } + + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + if(RendTimer < diff) + { + m_creature->CastSpell(m_creature->getVictim(),SPELL_REND_VC,true); + RendTimer = 15000; + }else RendTimer -= diff; + + if(SunderArmorTimer < diff) + { + m_creature->CastSpell(m_creature->getVictim(), SPELL_SUNDER_ARMOR, true); + SunderArmorTimer = 10000; + }else SunderArmorTimer -= diff; + + DoMeleeAttackIfReady(); + } + + void KilledUnit(Unit* victim) + { + m_creature->RestoreFaction(); + } + +}; + +bool GossipHello_npc_victorious_challenger(Player* pPlayer, Creature* pCreature) +{ + if(pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_TAKING_ALL_CHALLENGERS) == QUEST_STATUS_INCOMPLETE || pPlayer->GetQuestStatus(QUEST_DEFENDING_YOUR_TITLE) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CHALLENGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; + } + + return false; +} + +bool GossipSelect_npc_victorious_challenger(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction ) +{ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); + pCreature->setFaction(14); + pCreature->AI()->AttackStart(pPlayer); + } + + return true; +} + +CreatureAI* GetAI_npc_victorious_challenger(Creature* pCreature) +{ + return new npc_victorious_challengerAI(pCreature); +} + +/*###### +## npc_loklira_crone +######*/ + +#define GOSSIP_LOKLIRACRONE "Tell me about this proposal" +#define GOSSIP_LOKLIRACRONE1 "What happened then?" +#define GOSSIP_LOKLIRACRONE2 "You want me to take part in the Hyldsmeet to end the war?" +#define GOSSIP_LOKLIRACRONE3 "Very well. I'll take part in this competition." + +enum eLokliraCrone +{ + QUEST_HYLDSMEET = 12970, + + GOSSIP_TEXTID_LOK1 = 13778, + GOSSIP_TEXTID_LOK2 = 13779, + GOSSIP_TEXTID_LOK3 = 13780 +}; + +bool GossipHello_npc_loklira_crone(Player* pPlayer, Creature* pCreature) +{ + if (pCreature->isQuestGiver()) + pPlayer->PrepareQuestMenu(pCreature->GetGUID()); + + if (pPlayer->GetQuestStatus(QUEST_HYLDSMEET) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOKLIRACRONE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; + } + return false; +} + +bool GossipSelect_npc_loklira_crone(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOKLIRACRONE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOK1, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOKLIRACRONE2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOK2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOKLIRACRONE3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_LOK3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CompleteQuest(QUEST_HYLDSMEET); + break; + } + return true; +} + void AddSC_storm_peaks() { Script* newscript; @@ -227,4 +373,17 @@ void AddSC_storm_peaks() newscript->Name = "npc_goblin_prisoner"; newscript->GetAI = &GetAI_npc_goblin_prisoner; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_victorious_challenger"; + newscript->GetAI = &GetAI_npc_victorious_challenger; + newscript->pGossipHello = &GossipHello_npc_victorious_challenger; + newscript->pGossipSelect = &GossipSelect_npc_victorious_challenger; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_loklira_crone"; + newscript->pGossipHello = &GossipHello_npc_loklira_crone; + newscript->pGossipSelect = &GossipSelect_npc_loklira_crone; + newscript->RegisterSelf(); } |