Code:
#include "StdAfx.h"
#include "Setup.h"
class SCRIPT_DECL BuffNPC1 : public GossipScript
{
public:
void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
void GossipEnd(Object * pObject, Player* Plr);
void Destroy()
{
delete this;
}
};
void BuffNPC1::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
if(Plr->getLevel() >= 80)
{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You are too powerful for me to buff you." );
}
else{
Menu->AddItem(0, "Level 10 Buffs - 1 Gold Each", 1);
Menu->AddItem(0, "Level 20 Buffs - 2 Gold Each", 2);
Menu->AddItem(0, "Level 30 Buffs - 3 Gold Each", 3);
Menu->AddItem(0, "Level 40 Buffs - 4 Gold Each", 4);
Menu->AddItem(0, "Level 50 Buffs - 5 Gold Each", 5);
Menu->AddItem(0, "Level 60 Buffs - 5 Gold Each", 6);
if(AutoSend)
Menu->SendTo(Plr);
}
}
void BuffNPC1::GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
{
Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
if(pCreature==NULL)
return;
GossipMenu * Menu;
switch(IntId)
{
case 0: // Return to start
GossipHello(pObject, Plr, true);
break;
case 1:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 10)
{
Menu->AddItem(5, "Strength", 8);
Menu->AddItem(5, "Intelligence", 9);
Menu->AddItem(5, "Stamina", 10);
Menu->AddItem(5, "Spirit", 11);
Menu->AddItem(5, "Agility", 12);
Menu->AddItem(5, "Protection", 43);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You must be at least level 10 to use these buffs." );
Plr->Gossip_Complete();
}
}
break;
case 2:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 20)
{
Menu->AddItem(5, "Strength", 13);
Menu->AddItem(5, "Intelligence", 14);
Menu->AddItem(5, "Stamina", 15);
Menu->AddItem(5, "Spirit", 16);
Menu->AddItem(5, "Agility", 17);
Menu->AddItem(5, "Protection", 44);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You must be at least level 20 to use these buffs." );
Plr->Gossip_Complete();
}
}
break;
case 3:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 30)
{
Menu->AddItem(5, "Strength", 18);
Menu->AddItem(5, "Intelligence", 19);
Menu->AddItem(5, "Stamina", 20);
Menu->AddItem(5, "Spirit", 21);
Menu->AddItem(5, "Agility", 22);
Menu->AddItem(5, "Protection", 45);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You must be at least level 30 to use these buffs." );
Plr->Gossip_Complete();
}
}
break;
case 4:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 40)
{
Menu->AddItem(5, "Strength", 23);
Menu->AddItem(5, "Intelligence", 24);
Menu->AddItem(5, "Stamina", 25);
Menu->AddItem(5, "Spirit", 26);
Menu->AddItem(5, "Agility", 27);
Menu->AddItem(5, "Protection", 46);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You must be at least level 40 to use these buffs." );
Plr->Gossip_Complete();
}
}
break;
case 5:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 50)
{
Menu->AddItem(5, "Strength", 28);
Menu->AddItem(5, "Intelligence", 29);
Menu->AddItem(5, "Stamina", 30);
Menu->AddItem(5, "Spirit", 31);
Menu->AddItem(5, "Agility", 32);
Menu->AddItem(5, "Protection", 47);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You must be at least level 50 to use these buffs." );
Plr->Gossip_Complete();
}
}
break;
case 6:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if(Plr->getLevel() >= 60)
{
Menu->AddItem(5, "Strength", 48);
Menu->AddItem(5, "Intelligence", 49);
Menu->AddItem(5, "Stamina", 50);
Menu->AddItem(5, "Spirit", 51);
Menu->AddItem(5, "Agility", 52);
Menu->AddItem(5, "Protection", 57);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You must be at least level 60 to use these buffs." );
Plr->Gossip_Complete();
}
}
break;
case 7:
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
if((Plr->getLevel() >= 70)&&(Plr->getLevel() <= 79))
{
Menu->AddItem(5, "Strength", 58);
Menu->AddItem(5, "Intelligence", 59);
Menu->AddItem(5, "Stamina", 60);
Menu->AddItem(5, "Spirit", 61);
Menu->AddItem(5, "Agility", 62);
Menu->AddItem(5, "Protection", 67);
Menu->AddItem(0, "[Back]", 99);
Menu->SendTo(Plr);
}
else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You must be at least level 70 to use these buffs." );
Plr->Gossip_Complete();
}
}
break;
// Level 10
case 8: // Strength
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8118, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 9: // Intelligence
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8096, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 10: // Stamina
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8099, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 11: // Spirit
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8112, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 12: // Agility
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8115, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
// Level 20
case 13: // Strength
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8119, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 14: // Intelligence
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8097, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 15: // Stamina
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8100, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 16: // Spirit
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8113, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 17: // Agility
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8116, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
// Level 30
case 18: // Strength
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8120, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 19: // Intelligence
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8098, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 20: // Stamina
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8101, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 21: // Spirit
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8114, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 22: // Agility
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8117, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
// Level 40
case 23: // Strength
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12179, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 24: // Intelligence
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12176, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 25: // Stamina
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12178, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 26: // Spirit
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12177, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 27: // Agility
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12174, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
// Level 50
case 28: // Strength
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33082, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 29: // Intelligence
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33078, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 30: // Stamina
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33081, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 31: // Spirit
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33080, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 32: // Agility
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33077, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 43: // Protection
{
uint32 price=10000;// 1G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8091, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 44: // Protection
{
uint32 price=20000;// 2G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8094, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 45: // Protection
{
uint32 price=30000;// 3G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 8095, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 46: // Protection
{
uint32 price=40000;// 4G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 12175, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 47: // Protection
{
uint32 price=50000;// 5G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33079, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
// Level 60
case 48: // Strength
{
uint32 price=60000;// 6G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33082, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 49: // Intelligence
{
uint32 price=60000;// 6G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33078, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 50: // Stamina
{
uint32 price=60000;// 6G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33081, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 51: // Spirit
{
uint32 price=60000;// 6G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33080, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 52: // Agility
{
uint32 price=60000;// 6G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33077, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 57: // Protection
{
uint32 price=60000;// 6G
uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
if (currentgold>=price){
int32 newgold = currentgold - price;
Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
pCreature->CastSpell(Plr, 33079, 0);
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You have been blessed!" );
Plr->Gossip_Complete();
}else{
pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You don't have enough money." );
Plr->Gossip_Complete();
}
}
break;
case 99: //main menu
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
Menu->AddItem(0, "Level 10 Buffs - 1 Gold Each", 1);
Menu->AddItem(0, "Level 20 Buffs - 2 Gold Each", 2);
Menu->AddItem(0, "Level 30 Buffs - 3 Gold Each", 3);
Menu->AddItem(0, "Level 40 Buffs - 4 Gold Each", 4);
Menu->AddItem(0, "Level 50 Buffs - 5 Gold Each", 5);
Menu->AddItem(0, "Level 60 Buffs - 5 Gold Each", 6);
Menu->SendTo(Plr);
}
}
}
void BuffNPC1::GossipEnd(Object * pObject, Player* Plr)
{
GossipScript::GossipEnd(pObject, Plr);
}
void SetupBuffNPC1(ScriptMgr * mgr)
{
GossipScript * gs = (GossipScript*) new BuffNPC1();
/* Teleporter List */
mgr->register_gossip_script(30005, gs); // Osciron
}