From 261425b0cc1dedc46c627f0821953301caec27a6 Mon Sep 17 00:00:00 2001 From: Muhaha Date: Thu, 5 Feb 2009 10:46:43 +0100 Subject: * Borean Tundra from ScriptDev2 * Updated copyright notice for new year (2009) --HG-- branch : trunk --- src/bindings/scripts/CMakeLists.txt | 1 + src/bindings/scripts/Makefile.am | 1 + src/bindings/scripts/ScriptMgr.cpp | 6 ++ .../scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp | 2 +- .../scripts/zone/borean_tundra/borean_tundra.cpp | 105 +++++++++++++++++++++ 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp (limited to 'src/bindings/scripts') diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 5193297610d..1d600dbceea 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -106,6 +106,7 @@ SET(trinityscript_LIB_SRCS scripts/zone/blasted_lands/blasted_lands.cpp scripts/zone/blasted_lands/boss_kruul.cpp scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp + scripts/zone/borean_tundra/borean_tundra.cpp scripts/zone/burning_steppes/burning_steppes.cpp scripts/zone/caverns_of_time/dark_portal/def_dark_portal.h scripts/zone/caverns_of_time/dark_portal/instance_dark_portal.cpp diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am index c56e2138270..3aaa1e3bc7a 100644 --- a/src/bindings/scripts/Makefile.am +++ b/src/bindings/scripts/Makefile.am @@ -140,6 +140,7 @@ scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp \ scripts/zone/blasted_lands/blasted_lands.cpp \ scripts/zone/blasted_lands/boss_kruul.cpp \ scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp \ +scripts/zone/borean_tundra/borean_tundra.cpp \ scripts/zone/burning_steppes/burning_steppes.cpp \ scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp \ scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp \ diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 7f2c2eba313..2819405f733 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -209,6 +209,9 @@ extern void AddSC_blasted_lands(); //Bloodmyst Isle extern void AddSC_bloodmyst_isle(); +//Borean Tundra +extern void AddSC_borean_tundra(); + //Burning steppes extern void AddSC_burning_steppes(); @@ -1415,6 +1418,9 @@ void ScriptsInit() //Bloodmyst Isle AddSC_bloodmyst_isle(); + + //Borean Tundra + AddSC_borean_tundra(); //Burning steppes AddSC_burning_steppes(); diff --git a/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp b/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp index f298f3fa22a..3c3a622b49d 100644 --- a/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2008 ScriptDev2 +/* Copyright (C) 2006 - 2009 ScriptDev2 * 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 diff --git a/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp new file mode 100644 index 00000000000..c06fdf77d1d --- /dev/null +++ b/src/bindings/scripts/scripts/zone/borean_tundra/borean_tundra.cpp @@ -0,0 +1,105 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * 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: Borean_Tundra +SD%Complete: 100 +SDComment: +SDCategory: Borean Tundra +EndScriptData */ + +/* ContentData +npc_tiare +npc_surristrasz +EndContentData */ + +#include "precompiled.h" + +/*###### +## npc_tiare +######*/ + +#define GOSSIP_ITEM_TELEPORT "Teleport me to Amber Ledge, please." + +bool GossipHello_npc_tiare(Player *player, Creature *_Creature) +{ + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); + player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + return true; +} + +bool GossipSelect_npc_tiare(Player *player, Creature *_Creature, uint32 sender, uint32 action) +{ + if (action == GOSSIP_OPTION_GOSSIP) + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,50135,true); + } + return true; +} + +/*###### +## npc_surristrasz +######*/ + +#define GOSSIP_ITEM_FREE_FLIGHT "I'd like passage to the Transitus Shield." +#define GOSSIP_ITEM_FLIGHT "May I use a drake to fly elsewhere?" + +bool GossipHello_npc_surristrasz(Player *player, Creature *_Creature) +{ + if (_Creature->isQuestGiver()) + player->PrepareQuestMenu(_Creature->GetGUID()); + + if (_Creature->isTaxi()) + { + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_FREE_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_GOSSIP); + player->ADD_GOSSIP_ITEM(2, GOSSIP_ITEM_FLIGHT, GOSSIP_SENDER_MAIN, GOSSIP_OPTION_TAXIVENDOR); + } + + player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + return true; +} + +bool GossipSelect_npc_surristrasz(Player *player, Creature *_Creature, uint32 sender, uint32 action) +{ + if (action == GOSSIP_OPTION_GOSSIP) + { + player->CLOSE_GOSSIP_MENU(); + player->CastSpell(player,46064,true); //TaxiPath 795 (amber to coldarra) + } + if (action == GOSSIP_OPTION_TAXIVENDOR) + { + player->GetSession()->SendTaxiMenu(_Creature); + } + return true; +} + +void AddSC_borean_tundra() +{ + Script *newscript; + + newscript = new Script; + newscript->Name = "npc_tiare"; + newscript->pGossipHello = &GossipHello_npc_tiare; + newscript->pGossipSelect = &GossipSelect_npc_tiare; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_surristrasz"; + newscript->pGossipHello = &GossipHello_npc_surristrasz; + newscript->pGossipSelect = &GossipSelect_npc_surristrasz; + newscript->RegisterSelf(); +} -- cgit v1.2.3