Script for quest 12570. Author: manuel
--HG-- branch : trunk
This commit is contained in:
@@ -1536,6 +1536,12 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
|
||||
(-1568022, 'Da Amani gonna rule again!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12076, 1, 0, 0, 'nalorakk SAY_SLAY2'),
|
||||
(-1568023, 'I... be waitin'' on da udda side....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12077, 1, 0, 0, 'nalorakk SAY_DEATH');
|
||||
|
||||
-- -1 571 000 SHOLAZAR BASIN
|
||||
INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`)
|
||||
(-1571000, 'You save me! We thank you. We going to go back to village now. You come too... you can stay with us! Puppy-men kind of mean anyway. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_END_IRO'),
|
||||
(-1571001, 'Let me know when you ready to go, okay?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_QUEST_ACCEPT_IRO '),
|
||||
(-1571002, 'Home time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_START_IRO');
|
||||
|
||||
-- -1 574 000 UTGARDE KEEP
|
||||
INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
|
||||
(-1574000, 'Your blood is mine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 13221, 1, 0, 0, 'keleseth SAY_AGGRO'),
|
||||
|
||||
@@ -719,4 +719,36 @@ INSERT INTO `script_waypoint` VALUES
|
||||
(2917, 41, 4671.924316, 599.752197, 16.01242, 5000, 'SAY_REM_REMEMBER'),
|
||||
(2917, 42, 4676.976074, 600.649780, 17.82566, 5000, 'EMOTE_REM_END');
|
||||
|
||||
DELETE FROM `script_waypoint` WHERE `entry` = 28217;
|
||||
INSERT INTO `script_waypoint` VALUES
|
||||
(28217, 0, 5399.96,4509.07,-131.053, 0, ''),
|
||||
(28217, 1, 5396.95,4514.84,-131.791, 0, ''),
|
||||
(28217, 2, 5395.16,4524.06,-132.335, 0, ''),
|
||||
(28217, 3, 5400.15,4526.84,-136.058, 0, ''),
|
||||
(28217, 4, 5403.53,4527.2,-138.907, 0, ''),
|
||||
(28217, 5, 5406.51,4527.47,-141.983, 0, ''),
|
||||
(28217, 6, 5409.16,4526.37,-143.902, 0, ''),
|
||||
(28217, 7, 5412.04,4523.05,-143.998, 0, ''),
|
||||
(28217, 8, 5415.23,4521.19,-143.961, 0, ''),
|
||||
(28217, 9, 5417.74,4519.74,-144.292, 0, ''),
|
||||
(28217, 10, 5421.77,4519.79,-145.36, 0, ''),
|
||||
(28217, 11, 5426.75,4520.53,-147.931, 0, ''),
|
||||
(28217, 12, 5429.06,4521.82,-148.919, 0, ''),
|
||||
(28217, 13, 5436.52,4534.63,-149.618, 0, ''),
|
||||
(28217, 14, 5441.52,4542.23,-149.367, 0, ''),
|
||||
(28217, 15, 5449.06,4553.47,-149.187, 0, ''),
|
||||
(28217, 16, 5453.5,4565.61,-147.526, 0, ''),
|
||||
(28217, 17, 5455.04,4578.6,-147.147, 0, ''),
|
||||
(28217, 18, 5462.32,4591.69,-147.738,0, ''),
|
||||
(28217, 19, 5470.04,4603.04,-146.044,0, ''),
|
||||
(28217, 20, 5475.93,4608.86,-143.152, 0, ''),
|
||||
(28217, 21, 5484.48,4613.78,-139.19, 0, ''),
|
||||
(28217, 22, 5489.03,4616.56,-137.796, 0, ''),
|
||||
(28217, 23, 5497.92,4629.89,-135.556, 0, ''),
|
||||
(28217, 24, 5514.48,4638.82,-136.19, 0, ''),
|
||||
(28217, 25, 5570,4654.5,-134.947, 0, ''),
|
||||
(28217, 26, 5578.32,4653.29,-136.896, 0, ''),
|
||||
(28217, 27, 5596.56,4642.26,-136.593, 0, ''),
|
||||
(28217, 28, 5634.02,4600.35,-137.291,2000,'');
|
||||
|
||||
/* EOF */
|
||||
|
||||
@@ -814,6 +814,9 @@ UPDATE `creature_template` SET `ScriptName`='npc_dirty_larry' WHERE `entry`=1972
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_ishanah' WHERE `entry`=18538;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_khadgar' WHERE `entry`=18166;
|
||||
|
||||
/* Sholazar Basin */
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_injured_rainspeaker_oracle' WHERE `entry`=28217;
|
||||
|
||||
/* SILITHUS */
|
||||
UPDATE `creature_template` SET `ScriptName`='npcs_rutgar_and_frankal' WHERE `entry` IN (15170,15171);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_highlord_demitrian' WHERE `entry`=14347;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_injured_rainspeaker_oracle' WHERE `entry`=28217;
|
||||
|
||||
DELETE FROM `script_waypoint` WHERE `entry` = 28217;
|
||||
INSERT INTO `script_waypoint` VALUES
|
||||
(28217, 0, 5399.96,4509.07,-131.053, 0, ''),
|
||||
(28217, 1, 5396.95,4514.84,-131.791, 0, ''),
|
||||
(28217, 2, 5395.16,4524.06,-132.335, 0, ''),
|
||||
(28217, 3, 5400.15,4526.84,-136.058, 0, ''),
|
||||
(28217, 4, 5403.53,4527.2,-138.907, 0, ''),
|
||||
(28217, 5, 5406.51,4527.47,-141.983, 0, ''),
|
||||
(28217, 6, 5409.16,4526.37,-143.902, 0, ''),
|
||||
(28217, 7, 5412.04,4523.05,-143.998, 0, ''),
|
||||
(28217, 8, 5415.23,4521.19,-143.961, 0, ''),
|
||||
(28217, 9, 5417.74,4519.74,-144.292, 0, ''),
|
||||
(28217, 10, 5421.77,4519.79,-145.36, 0, ''),
|
||||
(28217, 11, 5426.75,4520.53,-147.931, 0, ''),
|
||||
(28217, 12, 5429.06,4521.82,-148.919, 0, ''),
|
||||
(28217, 13, 5436.52,4534.63,-149.618, 0, ''),
|
||||
(28217, 14, 5441.52,4542.23,-149.367, 0, ''),
|
||||
(28217, 15, 5449.06,4553.47,-149.187, 0, ''),
|
||||
(28217, 16, 5453.5,4565.61,-147.526, 0, ''),
|
||||
(28217, 17, 5455.04,4578.6,-147.147, 0, ''),
|
||||
(28217, 18, 5462.32,4591.69,-147.738,0, ''),
|
||||
(28217, 19, 5470.04,4603.04,-146.044,0, ''),
|
||||
(28217, 20, 5475.93,4608.86,-143.152, 0, ''),
|
||||
(28217, 21, 5484.48,4613.78,-139.19, 0, ''),
|
||||
(28217, 22, 5489.03,4616.56,-137.796, 0, ''),
|
||||
(28217, 23, 5497.92,4629.89,-135.556, 0, ''),
|
||||
(28217, 24, 5514.48,4638.82,-136.19, 0, ''),
|
||||
(28217, 25, 5570,4654.5,-134.947, 0, ''),
|
||||
(28217, 26, 5578.32,4653.29,-136.896, 0, ''),
|
||||
(28217, 27, 5596.56,4642.26,-136.593, 0, ''),
|
||||
(28217, 28, 5634.02,4600.35,-137.291,2000,'');
|
||||
|
||||
INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`)
|
||||
(-1571000, 'You save me! We thank you. We going to go back to village now. You come too... you can stay with us! Puppy-men kind of mean anyway. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_END_IRO'),
|
||||
(-1571001, 'Let me know when you ready to go, okay?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_QUEST_ACCEPT_IRO '),
|
||||
(-1571002, 'Home time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'npc_injured_rainspeaker_oracle SAY_START_IRO');
|
||||
@@ -294,6 +294,7 @@ SET(trinityscript_LIB_SRCS
|
||||
scripts/zone/shadowmoon_valley/boss_doomwalker.cpp
|
||||
scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
|
||||
scripts/zone/shattrath/shattrath_city.cpp
|
||||
scripts/zone/sholazar_basin/sholazar_basin.cpp
|
||||
scripts/zone/silithus/silithus.cpp
|
||||
scripts/zone/silvermoon/silvermoon_city.cpp
|
||||
scripts/zone/silverpine_forest/silverpine_forest.cpp
|
||||
|
||||
@@ -476,6 +476,9 @@ extern void AddSC_shadowmoon_valley();
|
||||
//Shattrath
|
||||
extern void AddSC_shattrath_city();
|
||||
|
||||
//Sholazar Basin
|
||||
extern void AddSC_sholazar_basin();
|
||||
|
||||
//Silithus
|
||||
extern void AddSC_silithus();
|
||||
|
||||
@@ -1381,6 +1384,9 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf")
|
||||
//Shattrath
|
||||
AddSC_shattrath_city();
|
||||
|
||||
//Sholazar Basin
|
||||
AddSC_sholazar_basin();
|
||||
|
||||
//Silithus
|
||||
AddSC_silithus();
|
||||
|
||||
|
||||
@@ -2457,6 +2457,10 @@
|
||||
<Filter
|
||||
Name="Sholazar Basin"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\sholazar_basin\sholazar_basin.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Dalaran"
|
||||
|
||||
@@ -2458,6 +2458,10 @@
|
||||
<Filter
|
||||
Name="Sholazar Basin"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\scripts\zone\sholazar_basin\sholazar_basin.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Dalaran"
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Sholazar_Basin
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 12570
|
||||
SDCategory: Sholazar_Basin
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_injured_rainspeaker_oracle
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "../../npc/npc_escortAI.h"
|
||||
|
||||
/*######
|
||||
## npc_injured_rainspeaker_oracle
|
||||
######*/
|
||||
|
||||
#define GOSSIP_ITEM1 "I am ready to travel to your village now."
|
||||
|
||||
enum
|
||||
{
|
||||
SAY_START_IRO = -1571000,
|
||||
SAY_QUEST_ACCEPT_IRO = -1571001,
|
||||
SAY_END_IRO = -1571002,
|
||||
|
||||
QUEST_FORTUNATE_MISUNDERSTANDINGS = 12570,
|
||||
FACTION_ESCORTEE_A = 774,
|
||||
FACTION_ESCORTEE_H = 775
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_injured_rainspeaker_oracleAI : public npc_escortAI
|
||||
{
|
||||
npc_injured_rainspeaker_oracleAI(Creature* c) : npc_escortAI(c) { c_guid = c->GetGUID(); }
|
||||
|
||||
uint64 c_guid;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->RestoreFaction();
|
||||
// if we will have other way to assign this to only one npc remove this part
|
||||
if(GUID_LOPART(me->GetGUID()) != 101030)
|
||||
{
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if(!player)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 1: SetRun(); break;
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_JUMPING);
|
||||
m_creature->SetSpeed(MOVE_SWIM, 0.85f, true);
|
||||
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING + MOVEMENTFLAG_LEVITATING);
|
||||
break;
|
||||
case 19:
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING);
|
||||
break;
|
||||
case 28:
|
||||
if(Player* pPlayer = Unit::GetPlayer( PlayerGUID))
|
||||
player->GroupEventHappens(QUEST_FORTUNATE_MISUNDERSTANDINGS, m_creature);
|
||||
// me->RestoreFaction();
|
||||
DoScriptText(SAY_END_IRO,m_creature);
|
||||
SetRun(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
return;
|
||||
|
||||
if(Player* pPlayer = Unit::GetPlayer(PlayerGUID))
|
||||
{
|
||||
if(pPlayer->GetQuestStatus(QUEST_FORTUNATE_MISUNDERSTANDINGS) != QUEST_STATUS_COMPLETE)
|
||||
pPlayer->FailQuest(QUEST_FORTUNATE_MISUNDERSTANDINGS);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(Player *player, Creature *_Creature,const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
bool GossipHello_npc_injured_rainspeaker_oracle(Player *player, Creature *_Creature )
|
||||
{
|
||||
if( _Creature->isQuestGiver() )
|
||||
player->PrepareQuestMenu( _Creature->GetGUID() );
|
||||
|
||||
if( player->GetQuestStatus(QUEST_FORTUNATE_MISUNDERSTANDINGS) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_injured_rainspeaker_oracle(Player *player, Creature *_Creature, uint32 sender, uint32 action )
|
||||
{
|
||||
if( action == GOSSIP_ACTION_INFO_DEF+1 )
|
||||
{
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
CAST_AI(npc_escortAI, (_Creature->AI()))->SetMaxPlayerDistance(35.0f);
|
||||
_Creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING);
|
||||
DoScriptText(SAY_START_IRO,_Creature);
|
||||
|
||||
switch (player->GetTeam()){
|
||||
case ALLIANCE:
|
||||
_Creature->setFaction(FACTION_ESCORTEE_A);
|
||||
break;
|
||||
case HORDE:
|
||||
_Creature->setFaction(FACTION_ESCORTEE_H);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_injured_rainspeaker_oracle(Player *player, Creature *_Creature, Quest const *_Quest)
|
||||
{
|
||||
DoScriptText(SAY_QUEST_ACCEPT_IRO,_Creature);
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_npc_injured_rainspeaker_oracle(Creature *_Creature)
|
||||
{
|
||||
npc_injured_rainspeaker_oracleAI* thisAI = new npc_injured_rainspeaker_oracleAI(_Creature);
|
||||
|
||||
thisAI->FillPointMovementListForCreature();
|
||||
|
||||
return thisAI;
|
||||
}
|
||||
|
||||
void AddSC_sholazar_basin()
|
||||
{
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_injured_rainspeaker_oracle";
|
||||
newscript->GetAI = &GetAI_npc_injured_rainspeaker_oracle;
|
||||
newscript->pGossipHello = &GossipHello_npc_injured_rainspeaker_oracle;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_injured_rainspeaker_oracle;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_injured_rainspeaker_oracle;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
Reference in New Issue
Block a user