Support for Quests 11881,11483,12971,13423,12970. Patch by Manuel

--HG--
branch : trunk
This commit is contained in:
tartalo
2009-10-31 19:47:00 +01:00
parent 334a6c4162
commit 7f00bab916
6 changed files with 295 additions and 3 deletions
+5 -1
View File
@@ -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;
+4
View File
@@ -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;
@@ -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;
}
@@ -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();
}
@@ -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();
}
@@ -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();
}