Created
April 29, 2013 18:02
-
-
Save krofna/5483448 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "precompiled.h" | |
/* | |
http://www.wowwiki.com/Wind_stone | |
smanjiti drop rate seta | |
despawn i respawn time ovisi gledaj wowwiki | |
5 sec delay (banish), auto taped, attack summoner, just summoned func u njihov AI? | |
*/ | |
enum | |
{ | |
//Spells | |
SPELL_ABYSSAL_PUNISHMENT = 24803, | |
//Auras | |
AURA_TWILIGHT_SET = 24746, | |
AURA_NECKLACE = 24748, | |
AURA_RING = 24782, | |
//Wind Stones | |
GO_LESSER_WIND_STONE = 180456, | |
GO_WIND_STONE = 180461, | |
GO_GREATER_WIND_STONE = 180466, | |
//Summon Random | |
SUMMON_TEMPLAR_RANDOM = 24745, | |
SUMMON_DUKE_RANDOM = 24762, | |
SUMMON_ROYAL_RANDOM = 24785, | |
//Summon Templar | |
SUMMON_TEMPLAR_EARTH = 24759, //earthern | |
SUMMON_TEMPLAR_FIRE = 24747, //crimson | |
SUMMON_TEMPLAR_THUNDER = 24757, //hoary | |
SUMMON_TEMPLAR_WATER = 24761, //azure | |
//Summon Duke | |
SUMMON_DUKE_FIRE = 24766, //cynders | |
SUMMON_DUKE_STONE = 24771, //shards | |
SUMMON_DUKE_THUNDER = 24769, //zephyrs | |
SUMMON_DUKE_WATER = 24773, //fathoms | |
//Summon Royal | |
SUMMON_ROYAL_WATER = 24793, //skwol | |
SUMMON_ROYAL_FIRE = 24787, //skald | |
SUMMON_ROYAL_STONE = 24792, //kazum | |
SUMMON_ROYAL_THUNDER = 24791, //marshal | |
//Templars | |
NPC_EARTHERN_TEMPLAR = 15307, //earth | |
NPC_CRIMSON_TEMPLAR = 15209, //fire | |
NPC_HOARY_TEMPLAR = 15212, //thunder/air | |
NPC_AZURE_TEMPLAR = 15211, //water | |
//Dukes | |
NPC_DUKE_CYNDERS = 15206, //fire | |
NPC_DUKE_SHARDS = 15208, //earth | |
NPC_DUKE_ZEPHYRS = 15220, //thunder/air | |
NPC_DUKE_FATHOMS = 15207, //water | |
//Royals | |
NPC_LORD_SKWOL = 15305, //water | |
NPC_PRINCE_SKALDRENOX = 15203, //fire | |
NPC_BARON_KAZUM = 15205, //earth | |
NPC_MARSHAL_WHIRLAXIS = 15204, //thunder | |
//Crests of Beckoning - templars | |
CREST_EARTH = 20419, //earthern | |
CREST_FIRE = 20416, //crimson | |
CREST_THUNDER = 20418, //hoary | |
CREST_WATER = 20420, //azure | |
//Signets of Beckoning - dukes | |
SIGNET_FIRE = 20432, //cynders | |
SIGNET_EARTH = 20435, //shards | |
SIGNET_THUNDER = 20433, //zephyrs | |
SIGNET_WATER = 20436, //fathoms | |
//Scepters of Beckoning - royals | |
SCEPTER_WATER = 20450, //skwol | |
SCEPTER_FIRE = 20447, //skald | |
SCEPTER_EARTH = 20449, //kazum | |
SCEPTER_THUNDER = 20448, //marshal | |
//Types of summoned creatures | |
TYPE_TEMPLAR = 10, | |
TYPE_DUKE = 11, | |
TYPE_ROYAL = 12, | |
//Reputation | |
CENARION_CIRCLE = 609, | |
//Messages | |
MESSAGE_LESSER_WIND_STONE = 35000, | |
MESSAGE_WIND_STONE = 35001, | |
MESSAGE_GREATER_WIND_STONE = 35002, | |
}; | |
//Used for random summon | |
uint32 uiTemplars[4] = { 15307, 15209, 15212, 15211 }; | |
uint32 uiDukes[4] = { 15206, 15207, 15208, 15220 }; | |
uint32 uiRoyals[4] = { 15305, 15203, 15205, 15204 }; | |
//Random gossip | |
#define GOSSIP_RANDOM_TEMPLAR "I am no cultist, you monster! Come to me and face your destruction!" | |
#define GOSSIP_RANDOM_DUKE "You will listen to this, vile duke! I am not your Twilight's Hammer lapdog! I am here to challenge you! Come! Come, and meet your death..." | |
#define GOSSIP_RANDOM_ROYAL "The day of judgement has come, fiend! I challenge you to battle!" | |
//Templar gossip | |
//GET RIGHT TEXTS!! | |
#define GOSSIP_TEMPLAR_EARTH "[PH] Summon Earth Templar" | |
#define GOSSIP_TEMPLAR_FIRE "[PH] Summon Fire Templar" | |
#define GOSSIP_TEMPLAR_THUNDER "[PH] Summon Thunder Templar" | |
#define GOSSIP_TEMPLAR_WATER "[PH] Summon Earth Templar" | |
//Templar gossip | |
//GET RIGHT TEXTS!! | |
#define GOSSIP_DUKE_EARTH "[PH] Summon Earth Duke" | |
#define GOSSIP_DUKE_FIRE "[PH] Summon Fire Duke" | |
#define GOSSIP_DUKE_THUNDER "[PH] Summon Thunder Duke" | |
#define GOSSIP_DUKE_WATER "[PH] Summon Earth Duke" | |
//Templar gossip | |
//GET RIGHT TEXTS!! | |
#define GOSSIP_ROYAL_EARTH "[PH] Summon Earth Royal" | |
#define GOSSIP_ROYAL_FIRE "[PH] Summon Fire Royal" | |
#define GOSSIP_ROYAL_THUNDER "[PH] Summon Thunder Royal" | |
#define GOSSIP_ROYAL_WATER "[PH] Summon Earth Royal" | |
//This function will choose summoning spell which consumes correct items | |
void DoSummon(uint32 uiType, bool bIsRandom, Player* pPlayer, GameObject* pGo, uint32 uiWho = 0) | |
{ | |
switch (uiType) | |
{ | |
case TYPE_TEMPLAR: | |
if (bIsRandom) | |
{ | |
pPlayer->CastSpell(pPlayer, SUMMON_TEMPLAR_RANDOM, true); | |
pPlayer->SummonCreature(uiTemplars[urand(0, 3)], pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
return; | |
} | |
switch (uiWho) | |
{ | |
case NPC_EARTHERN_TEMPLAR: | |
pPlayer->CastSpell(pPlayer, SUMMON_TEMPLAR_EARTH, true); | |
pPlayer->SummonCreature(NPC_EARTHERN_TEMPLAR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_CRIMSON_TEMPLAR: | |
pPlayer->CastSpell(pPlayer, SUMMON_TEMPLAR_FIRE, true); | |
pPlayer->SummonCreature(NPC_CRIMSON_TEMPLAR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_HOARY_TEMPLAR: | |
pPlayer->CastSpell(pPlayer, SUMMON_TEMPLAR_THUNDER, true); | |
pPlayer->SummonCreature(NPC_HOARY_TEMPLAR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_AZURE_TEMPLAR: | |
pPlayer->CastSpell(pPlayer, SUMMON_TEMPLAR_WATER, true); | |
pPlayer->SummonCreature(NPC_AZURE_TEMPLAR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
} | |
break; | |
case TYPE_DUKE: | |
if (bIsRandom) | |
{ | |
pPlayer->CastSpell(pPlayer, SUMMON_DUKE_RANDOM, true); | |
pPlayer->SummonCreature(uiDukes[urand(0, 3)], pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
return; | |
} | |
switch (uiWho) | |
{ | |
case NPC_DUKE_CYNDERS: | |
pPlayer->CastSpell(pPlayer, SUMMON_DUKE_FIRE, true); | |
pPlayer->SummonCreature(NPC_DUKE_CYNDERS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_DUKE_SHARDS: | |
pPlayer->CastSpell(pPlayer, SUMMON_DUKE_STONE, true); | |
pPlayer->SummonCreature(NPC_DUKE_SHARDS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_DUKE_ZEPHYRS: | |
pPlayer->CastSpell(pPlayer, SUMMON_DUKE_THUNDER, true); | |
pPlayer->SummonCreature(NPC_DUKE_ZEPHYRS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_DUKE_FATHOMS: | |
pPlayer->CastSpell(pPlayer, SUMMON_DUKE_WATER, true); | |
pPlayer->SummonCreature(NPC_DUKE_FATHOMS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
} | |
break; | |
case TYPE_ROYAL: | |
if (bIsRandom) | |
{ | |
pPlayer->CastSpell(pPlayer, SUMMON_ROYAL_RANDOM, true); | |
pPlayer->SummonCreature(uiRoyals[urand(0, 3)], pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
return; | |
} | |
switch (uiWho) | |
{ | |
case NPC_LORD_SKWOL: | |
pPlayer->CastSpell(pPlayer, SUMMON_ROYAL_WATER, true); | |
pPlayer->SummonCreature(NPC_LORD_SKWOL, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_PRINCE_SKALDRENOX: | |
pPlayer->CastSpell(pPlayer, SUMMON_ROYAL_FIRE, true); | |
pPlayer->SummonCreature(NPC_PRINCE_SKALDRENOX, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_BARON_KAZUM: | |
pPlayer->CastSpell(pPlayer, SUMMON_ROYAL_STONE, true); | |
pPlayer->SummonCreature(NPC_BARON_KAZUM, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
case NPC_MARSHAL_WHIRLAXIS: | |
pPlayer->CastSpell(pPlayer, SUMMON_ROYAL_THUNDER, true); | |
pPlayer->SummonCreature(NPC_MARSHAL_WHIRLAXIS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, -1); | |
break; | |
} | |
break; | |
} | |
} | |
/*### | |
## go_lesser_wind_stone | |
###*/ | |
bool GOGossipHello_go_lesser_wind_stone(Player* pPlayer, GameObject* pGo) | |
{ | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RANDOM_TEMPLAR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); | |
if (!pPlayer->HasAura(AURA_TWILIGHT_SET)) | |
{ | |
pPlayer->CastSpell(pPlayer, SPELL_ABYSSAL_PUNISHMENT, true, NULL, NULL, pGo->GetObjectGuid()); | |
return true; | |
} | |
if (pPlayer->HasItemCount(CREST_EARTH, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_EARTH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); | |
if (pPlayer->HasItemCount(CREST_FIRE, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_FIRE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); | |
if (pPlayer->HasItemCount(CREST_THUNDER, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_THUNDER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); | |
if (pPlayer->HasItemCount(CREST_WATER, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TEMPLAR_WATER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); | |
pPlayer->SEND_GOSSIP_MENU(MESSAGE_LESSER_WIND_STONE, pGo->GetObjectGuid()); | |
return true; | |
} | |
bool GOGossipSelect_go_lesser_wind_stone(Player* pPlayer, GameObject* pGo, uint32 uiSender, uint32 uiAction) | |
{ | |
pPlayer->CLOSE_GOSSIP_MENU(); | |
switch (uiAction) | |
{ | |
case GOSSIP_ACTION_INFO_DEF+1: DoSummon(TYPE_TEMPLAR, true, pPlayer, pGo); break; | |
case GOSSIP_ACTION_INFO_DEF+2: DoSummon(TYPE_TEMPLAR, false, pPlayer, pGo, NPC_EARTHERN_TEMPLAR); break; | |
case GOSSIP_ACTION_INFO_DEF+3: DoSummon(TYPE_TEMPLAR, false, pPlayer, pGo, NPC_CRIMSON_TEMPLAR); break; | |
case GOSSIP_ACTION_INFO_DEF+4: DoSummon(TYPE_TEMPLAR, false, pPlayer, pGo, NPC_HOARY_TEMPLAR); break; | |
case GOSSIP_ACTION_INFO_DEF+5: DoSummon(TYPE_TEMPLAR, false, pPlayer, pGo, NPC_AZURE_TEMPLAR); break; | |
} | |
return true; | |
} | |
/*### | |
## go_wind_stone | |
###*/ | |
bool GOGossipHello_go_wind_stone(Player* pPlayer, GameObject* pGo) | |
{ | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RANDOM_DUKE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); | |
if (!pPlayer->HasAura(AURA_TWILIGHT_SET) || !pPlayer->HasAura(AURA_NECKLACE)) | |
{ | |
pPlayer->CastSpell(pPlayer, SPELL_ABYSSAL_PUNISHMENT, true, NULL, NULL, pGo->GetObjectGuid()); | |
return true; | |
} | |
if (pPlayer->GetReputationRank(CENARION_CIRCLE) < REP_FRIENDLY) | |
{ | |
pPlayer->CLOSE_GOSSIP_MENU(); | |
return true; | |
} | |
if (pPlayer->HasItemCount(SIGNET_EARTH, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_EARTH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); | |
if (pPlayer->HasItemCount(SIGNET_FIRE, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_FIRE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); | |
if (pPlayer->HasItemCount(SIGNET_THUNDER, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_THUNDER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); | |
if (pPlayer->HasItemCount(SIGNET_WATER, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUKE_WATER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); | |
pPlayer->SEND_GOSSIP_MENU(MESSAGE_WIND_STONE, pGo->GetObjectGuid()); | |
return true; | |
} | |
bool GOGossipSelect_go_wind_stone(Player* pPlayer, GameObject* pGo, uint32 uiSender, uint32 uiAction) | |
{ | |
pPlayer->CLOSE_GOSSIP_MENU(); | |
switch (uiAction) | |
{ | |
case GOSSIP_ACTION_INFO_DEF+1: DoSummon(TYPE_DUKE, true, pPlayer, pGo); break; | |
case GOSSIP_ACTION_INFO_DEF+2: DoSummon(TYPE_DUKE, false, pPlayer, pGo, NPC_DUKE_SHARDS); break; | |
case GOSSIP_ACTION_INFO_DEF+3: DoSummon(TYPE_DUKE, false, pPlayer, pGo, NPC_DUKE_CYNDERS); break; | |
case GOSSIP_ACTION_INFO_DEF+4: DoSummon(TYPE_DUKE, false, pPlayer, pGo, NPC_DUKE_ZEPHYRS); break; | |
case GOSSIP_ACTION_INFO_DEF+5: DoSummon(TYPE_DUKE, false, pPlayer, pGo, NPC_DUKE_FATHOMS); break; | |
} | |
return true; | |
} | |
/*### | |
## go_greater_wind_stone | |
###*/ | |
bool GOGossipHello_go_greater_wind_stone(Player* pPlayer, GameObject* pGo) | |
{ | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_RANDOM_ROYAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); | |
if (!pPlayer->HasAura(AURA_TWILIGHT_SET) || !pPlayer->HasAura(AURA_NECKLACE) || !pPlayer->HasAura(AURA_RING)) | |
{ | |
pPlayer->CastSpell(pPlayer, SPELL_ABYSSAL_PUNISHMENT, true, NULL, NULL, pGo->GetObjectGuid()); | |
return true; | |
} | |
if (pPlayer->GetReputationRank(CENARION_CIRCLE) < REP_REVERED) | |
{ | |
pPlayer->CLOSE_GOSSIP_MENU(); | |
return true; | |
} | |
if (pPlayer->HasItemCount(SCEPTER_EARTH, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_EARTH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); | |
if (pPlayer->HasItemCount(SCEPTER_FIRE, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_FIRE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); | |
if (pPlayer->HasItemCount(SCEPTER_THUNDER, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_THUNDER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); | |
if (pPlayer->HasItemCount(SCEPTER_WATER, 1)) | |
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ROYAL_WATER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); | |
pPlayer->SEND_GOSSIP_MENU(MESSAGE_GREATER_WIND_STONE, pGo->GetObjectGuid()); | |
return true; | |
} | |
bool GOGossipSelect_go_greater_wind_stone(Player* pPlayer, GameObject* pGo, uint32 uiSender, uint32 uiAction) | |
{ | |
pPlayer->CLOSE_GOSSIP_MENU(); | |
switch (uiAction) | |
{ | |
case GOSSIP_ACTION_INFO_DEF+1: DoSummon(TYPE_ROYAL, true, pPlayer, pGo); break; | |
case GOSSIP_ACTION_INFO_DEF+2: DoSummon(TYPE_ROYAL, false, pPlayer, pGo, NPC_BARON_KAZUM); break; | |
case GOSSIP_ACTION_INFO_DEF+3: DoSummon(TYPE_ROYAL, false, pPlayer, pGo, NPC_PRINCE_SKALDRENOX); break; | |
case GOSSIP_ACTION_INFO_DEF+4: DoSummon(TYPE_ROYAL, false, pPlayer, pGo, NPC_MARSHAL_WHIRLAXIS); break; | |
case GOSSIP_ACTION_INFO_DEF+5: DoSummon(TYPE_ROYAL, false, pPlayer, pGo, NPC_LORD_SKWOL); break; | |
} | |
return true; | |
} | |
void AddSC_wind_stones() | |
{ | |
Script* pNewScript; | |
pNewScript = new Script; | |
pNewScript->Name = "go_lesser_wind_stone"; | |
pNewScript->pGossipHelloGO = &GOGossipHello_go_lesser_wind_stone; | |
pNewScript->pGossipSelectGO = &GOGossipSelect_go_lesser_wind_stone; | |
pNewScript->RegisterSelf(); | |
pNewScript = new Script; | |
pNewScript->Name = "go_wind_stone"; | |
pNewScript->pGossipHelloGO = &GOGossipHello_go_wind_stone; | |
pNewScript->pGossipSelectGO = &GOGossipSelect_go_wind_stone; | |
pNewScript->RegisterSelf(); | |
pNewScript = new Script; | |
pNewScript->Name = "go_greater_wind_stone"; | |
pNewScript->pGossipHelloGO = &GOGossipHello_go_greater_wind_stone; | |
pNewScript->pGossipSelectGO = &GOGossipSelect_go_greater_wind_stone; | |
pNewScript->RegisterSelf(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment