Changeset 65

Show
Ignore:
Timestamp:
11/19/08 13:30:58 (17 years ago)
Author:
yumileroy
Message:

[svn] Escortai for 10211 quest provided by Blaymoira.
Grandmaster Vorpil script provided by BroodWyrm?.

Original author: megamage
Date: 2008-10-19 12:17:34-05:00

Location:
trunk/src/bindings/scripts
Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp

    r48 r65  
    149149            case TYPE_OVERSEER: 
    150150                return Encounter[1]; 
     151            case DATA_GRANDMASTERVORPILEVENT: 
     152                return Encounter[3]; 
    151153        } 
    152154        return false; 
     155    } 
     156 
     157    uint64 GetData64(uint32 identifier) 
     158    { 
     159        if(identifier  == DATA_GRANDMASTERVORPIL) 
     160            return GrandmasterVorpil; 
     161 
     162        return 0; 
    153163    } 
    154164}; 
  • trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp

    r48 r65  
    1818SDName: Shattrath_City 
    1919SD%Complete: 100 
    20 SDComment: Quest support: 10004, 10009. Flask vendors, Teleport to Caverns of Time 
     20SDComment: Quest support: 10004, 10009, 10211. Flask vendors, Teleport to Caverns of Time 
    2121SDCategory: Shattrath City 
    2222EndScriptData */ 
     
    2727npc_shattrathflaskvendors 
    2828npc_zephyr 
     29npc_kservant 
    2930EndContentData */ 
    3031 
    3132#include "precompiled.h" 
     33#include "../../npc/npc_escortAI.h" 
    3234 
    3335/*###### 
     
    239241} 
    240242 
     243/*###### 
     244# npc_kservant 
     245######*/ 
     246 
     247#define SAY1       "Follow me, stranger. This won't take long." 
     248#define WHISP1     "Shattrath was once the draenei capital of this world. Its name means \"dwelling of light.\"" 
     249#define WHISP2     "When the Burning Legion turned the orcs against the draenei, the fiercest battle was fought here. The draenei fought tooth and nail, but in the end the city fell." 
     250#define WHISP3     "The city was left in ruins and darkness... until the Sha'tar arrived." 
     251#define WHISP4     "Let us go into the Lower City. I will warn you that as one of the only safe havens in Outland, Shattrath has attracted droves of refugees from all wars, current and past. " 
     252#define WHISP5     "The Sha'tar, or \"born from light\" are the naaru that came to Outland to fight the demons of the Burning Legion." 
     253#define WHISP6     "They were drawn to the ruins of Shattrath City where a small remnant of the draenei priesthood conducted its rites inside a ruined temple on this very spot." 
     254#define WHISP7     "The priesthood, known as the Aldor, quickly regained its strength as word spread that the naaru had returned and reconstruction soon began. The ruined temple is now used as an infirmary for injured refugees." 
     255#define WHISP8     "It wouldn't be long, however, before the city came under attack once again. This time, the attack came from Illidan's armies. A large regiment of blood elves had been sent by Illidan's ally, Kael'thas Sunstrider, to lay waste to the city." 
     256#define WHISP9     "As the regiment of blood elves crossed this very bridge, the Aldor's exarchs and vindicators lined up to defend the Terrace of Light. But then the unexpected happened. " 
     257#define WHISP10    "The blood elves laid down their weapons in front of the city's defenders; their leader, a blood elf elder known as Voren'thal, stormed into the Terrace of Light and demanded to speak to A'dal." 
     258#define WHISP11    "As the naaru approached him, Voren'thal kneeled before him and uttered the following words: \"I've seen you in a vision, naaru. My race's only hope for survival lies with you. My followers and I are here to serve you.\"" 
     259#define WHISP12    "The defection of Voren'thal and his followers was the largest loss ever incurred by Kael's forces. And these weren't just any blood elves. Many of the best and brightest amongst Kael's scholars and magisters had been swayed by Voren'thal's influence." 
     260#define WHISP13    "The naaru accepted the defectors, who would become known as the Scryers; their dwelling lies in the platform above. Only those initiated with the Scryers are allowed there." 
     261#define WHISP14    "The Aldor are followers of the Light and forgiveness and redemption are values they understand. However, they found hard to forget the deeds of the blood elves while under Kaell's command." 
     262#define WHISP15    "Many of the priesthood had been slain by the same magisters who now vowed to serve the naaru. They were not happy to share the city with their former enemies." 
     263#define WHISP16    "The Aldor's most holy temple and its surrounding dwellings lie on the terrace above. As a holy site, only the initiated are welcome inside." 
     264#define WHISP17    "The attacks against Shattrath continued, but the city did not fall, as you can see. On the contrary, the naaru known as Xi'ri led a successful incursion into Shadowmoon Valley - Illidan's doorstep." 
     265#define WHISP18    "There he continues to wage war on Illidan with the assistance of the Aldor and the Scryers. The two factions have not given up on their old feuds, though." 
     266#define WHISP19    "Such is their animosity that they vie for the honor of being sent to assist the naaru there. Each day, that decision is made here by A'dal. The armies gather here to receive A'dal's blessing before heading to Shadowmoon." 
     267#define WHISP20    "Khadgar should be ready to see you again. Just remember that to serve the Sha'tar you will most likely have to ally with the Aldor or the Scryers. And seeking the favor of one group will cause the others' dislike." 
     268#define WHISP21    "Good luck stranger, and welcome to Shattrath City." 
     269 
     270struct TRINITY_DLL_DECL npc_kservantAI : public npc_escortAI 
     271{ 
     272public: 
     273        npc_kservantAI(Creature *c) : npc_escortAI(c) {    Reset();} 
     274 
     275 
     276    void WaypointReached(uint32 i) 
     277    { 
     278        Unit *pTemp = Unit::GetUnit(*m_creature,PlayerGUID); 
     279        if( !pTemp ) 
     280            return; 
     281 
     282        switch(i) 
     283        { 
     284            case 0: DoSay(SAY1, LANG_UNIVERSAL, pTemp); break; 
     285            case 4: DoWhisper(WHISP1, pTemp); break; 
     286            case 6: DoWhisper(WHISP2, pTemp); break; 
     287            case 7: DoWhisper(WHISP3, pTemp); break; 
     288            case 8: DoWhisper(WHISP4, pTemp); break; 
     289            case 17: DoWhisper(WHISP5, pTemp); break; 
     290            case 18: DoWhisper(WHISP6, pTemp); break; 
     291            case 19: DoWhisper(WHISP7, pTemp); break; 
     292            case 33: DoWhisper(WHISP8, pTemp); break; 
     293            case 34: DoWhisper(WHISP9, pTemp); break; 
     294            case 35: DoWhisper(WHISP10, pTemp); break; 
     295            case 36: DoWhisper(WHISP11, pTemp); break; 
     296            case 43: DoWhisper(WHISP12, pTemp); break; 
     297            case 44: DoWhisper(WHISP13, pTemp); break; 
     298            case 49: DoWhisper(WHISP14, pTemp); break; 
     299            case 50: DoWhisper(WHISP15, pTemp); break; 
     300            case 51: DoWhisper(WHISP16, pTemp); break; 
     301            case 52: DoWhisper(WHISP17, pTemp); break; 
     302            case 53: DoWhisper(WHISP18, pTemp); break; 
     303            case 54: DoWhisper(WHISP19, pTemp); break; 
     304            case 55: DoWhisper(WHISP20, pTemp); break; 
     305            case 56: DoWhisper(WHISP21, pTemp); 
     306               if( PlayerGUID ) 
     307                { 
     308                    Unit* player = ((Creature*)Unit::GetUnit((*m_creature), PlayerGUID)); 
     309                    if( player && player->GetTypeId() == TYPEID_PLAYER ) 
     310                        ((Player*)player)->GroupEventHappens(10211,m_creature); 
     311                } 
     312                break; 
     313        } 
     314    } 
     315 
     316    void Aggro(Unit* who) {} 
     317 
     318    void MoveInLineOfSight(Unit *who) 
     319    { 
     320        if( IsBeingEscorted ) 
     321            return; 
     322 
     323        if( who->GetTypeId() == TYPEID_PLAYER ) 
     324        { 
     325            if( ((Player*)who)->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE ) 
     326            { 
     327                float Radius = 10.0; 
     328                if( m_creature->IsWithinDistInMap(who, Radius) ) 
     329                { 
     330                    ((npc_escortAI*)(m_creature->AI()))->Start(false, false, false, who->GetGUID()); 
     331                } 
     332            } 
     333        } 
     334    } 
     335 
     336    void Reset() {} 
     337 
     338    void UpdateAI(const uint32 diff) 
     339    { 
     340        npc_escortAI::UpdateAI(diff); 
     341    } 
     342}; 
     343CreatureAI* GetAI_npc_kservantAI(Creature *_Creature) 
     344{ 
     345    npc_kservantAI* kservantAI = new npc_kservantAI(_Creature); 
     346 
     347    kservantAI->AddWaypoint(0, -1863.369019, 5419.517090, -10.463668, 4000); 
     348    kservantAI->AddWaypoint(1, -1861.749023, 5416.465332, -10.508068); 
     349    kservantAI->AddWaypoint(2, -1857.036133, 5410.966309, -12.428039); 
     350    kservantAI->AddWaypoint(3, -1831.539185, 5365.472168, -12.428039); 
     351    kservantAI->AddWaypoint(4, -1813.416504, 5333.776855, -12.428039); 
     352    kservantAI->AddWaypoint(5, -1800.354370, 5313.290039, -12.428039); 
     353    kservantAI->AddWaypoint(6, -1775.624878, 5268.786133, -38.809181); 
     354    kservantAI->AddWaypoint(7, -1770.147339, 5259.268066, -38.829231); 
     355    kservantAI->AddWaypoint(8, -1762.814209, 5261.098145, -38.848995); 
     356    kservantAI->AddWaypoint(9, -1740.110474, 5268.858398, -40.208965); 
     357    kservantAI->AddWaypoint(10, -1725.837402, 5270.936035, -40.208965); 
     358    kservantAI->AddWaypoint(11, -1701.580322, 5290.323242, -40.209187); 
     359    kservantAI->AddWaypoint(12, -1682.877808, 5291.406738, -34.429646); 
     360    kservantAI->AddWaypoint(13, -1670.101685, 5291.201172, -32.786007); 
     361    kservantAI->AddWaypoint(14, -1656.666870, 5294.333496, -37.862648); 
     362    kservantAI->AddWaypoint(15, -1652.035767, 5295.413086, -40.245499); 
     363    kservantAI->AddWaypoint(16, -1620.860596, 5300.133301, -40.208992); 
     364    kservantAI->AddWaypoint(17, -1607.630981, 5293.983398, -38.577045, 5000); 
     365    kservantAI->AddWaypoint(18, -1607.630981, 5293.983398, -38.577045, 5000); 
     366    kservantAI->AddWaypoint(19, -1607.630981, 5293.983398, -38.577045, 5000); 
     367    kservantAI->AddWaypoint(20, -1622.140869, 5301.955566, -40.208897); 
     368    kservantAI->AddWaypoint(21, -1621.131836, 5333.112793, -40.208897); 
     369    kservantAI->AddWaypoint(22, -1637.598999, 5342.134277, -40.208790); 
     370    kservantAI->AddWaypoint(23, -1648.521606, 5352.309570, -47.496170); 
     371    kservantAI->AddWaypoint(24, -1654.606934, 5357.419434, -45.870892); 
     372    kservantAI->AddWaypoint(25, -1633.670044, 5422.067871, -42.835541); 
     373    kservantAI->AddWaypoint(25, -1656.567505, 5426.236328, -40.405815); 
     374    kservantAI->AddWaypoint(26, -1664.932373, 5425.686523, -38.846405); 
     375    kservantAI->AddWaypoint(27, -1681.406006, 5425.871094, -38.810928); 
     376    kservantAI->AddWaypoint(28, -1730.875977, 5427.413574, -12.427910); 
     377    kservantAI->AddWaypoint(29, -1743.509521, 5369.599121, -12.427910); 
     378    kservantAI->AddWaypoint(30, -1877.217041, 5303.710449, -12.427989); 
     379    kservantAI->AddWaypoint(31, -1890.371216, 5289.273438, -12.428268); 
     380    kservantAI->AddWaypoint(32, -1905.505737, 5266.534668, 2.630672); 
     381    kservantAI->AddWaypoint(33, -1909.381348, 5273.008301, 1.663714, 10000); 
     382    kservantAI->AddWaypoint(34, -1909.381348, 5273.008301, 1.663714, 12000); 
     383    kservantAI->AddWaypoint(35, -1909.381348, 5273.008301, 1.663714, 8000); 
     384    kservantAI->AddWaypoint(36, -1909.381348, 5273.008301, 1.663714, 15000); 
     385    kservantAI->AddWaypoint(37, -1927.561401, 5275.324707, 1.984987); 
     386    kservantAI->AddWaypoint(38, -1927.385498, 5300.879883, -12.427236); 
     387    kservantAI->AddWaypoint(39, -1921.063965, 5314.318359, -12.427236); 
     388    kservantAI->AddWaypoint(40, -1965.425415, 5379.298828, -12.427236); 
     389    kservantAI->AddWaypoint(41, -1981.233154, 5450.743652, -12.427236); 
     390    kservantAI->AddWaypoint(42, -1958.022461, 5455.904297, 0.487659); 
     391    kservantAI->AddWaypoint(43, -1951.991455, 5463.580566, 0.874490, 10000); 
     392    kservantAI->AddWaypoint(44, -1951.991455, 5463.580566, 0.874490, 12000); 
     393    kservantAI->AddWaypoint(45, -1968.730225, 5481.752930, -12.427846); 
     394    kservantAI->AddWaypoint(46, -1881.839844, 5554.040039, -12.427846); 
     395    kservantAI->AddWaypoint(47, -1841.566650, 5545.965332, -12.427846); 
     396    kservantAI->AddWaypoint(48, -1837.658325, 5523.780273, 0.558756); 
     397    kservantAI->AddWaypoint(49, -1831.321777, 5534.821777, 1.221819, 6000); 
     398    kservantAI->AddWaypoint(50, -1831.321777, 5534.821777, 1.221819, 8000); 
     399    kservantAI->AddWaypoint(51, -1831.321777, 5534.821777, 1.221819, 5000); 
     400    kservantAI->AddWaypoint(52, -1850.060669, 5472.610840, 0.857320, 6000); 
     401    kservantAI->AddWaypoint(53, -1850.060669, 5472.610840, 0.857320, 8000); 
     402    kservantAI->AddWaypoint(54, -1850.060669, 5472.610840, 0.857320, 9000); 
     403    kservantAI->AddWaypoint(55, -1850.060669, 5472.610840, 0.857320, 9000); 
     404    kservantAI->AddWaypoint(56, -1850.060669, 5472.610840, 0.857320, 4000); 
     405     
     406    return (CreatureAI*)kservantAI; 
     407} 
     408 
    241409void AddSC_shattrath_city() 
    242410{ 
     
    266434    newscript->pGossipSelect = &GossipSelect_npc_zephyr; 
    267435    m_scripts[nrscripts++] = newscript; 
    268 } 
     436 
     437       newscript = new Script; 
     438    newscript->Name="npc_kservant"; 
     439    newscript->GetAI = GetAI_npc_kservantAI; 
     440    m_scripts[nrscripts++] = newscript; 
     441}