Fixed PVPTitleNPC for Arcemu Latest Rev. menu

User Tag List

Results 1 to 7 of 7
  1. #1
    fokui's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fixed PVPTitleNPC for Arcemu Latest Rev.

    Like the title says this is a pvptitlenpc c++ script that I changed mildly to work correctly for the latest revs. I noticed when i tryed to use Devilsadvocate's script it would compile but the npc didnt actually give me a pvptitle so I looked at the code and noticed it wasnt setting an actual title but was setting a pvprank and that was not giving me the title. So heres my fix, I personally use Rev.1036 of Arcemu so anyone else who has had issues with his, try this out and see if this is better for you.

    PvPTitlesNPC.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)
    #endif
    
    
    class SCRIPT_DECL PvPTitlesNPC : 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 PvPTitlesNPC::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
        {
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
                    {
    		if(Plr->getRace()== 10||Plr->getRace()== 2||Plr->getRace()== 6||Plr->getRace()== 8||Plr->getRace()== 5)
    		{Menu->AddItem(0, "Horde PvP Titles", 1);}else{Menu->AddItem(1, "Alliance PvP Titles", 2);}
    				}
    
    		if(AutoSend)
                Menu->SendTo(Plr);
        }
    
    void PvPTitlesNPC::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:
    		GossipHello(pObject, Plr, true);
            break;
    
    
            case 1:    ////Horde Titles////
                    {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    		        Menu->AddItem(5, "Scout 50g Req. 100HKs", 4);
                    Menu->AddItem(5, "Grunt 100g Req. 300HKs", 5);
                    Menu->AddItem(5, "Sergeant 150g Req 600HKs", 6);
                    Menu->AddItem(5, "Senior Sergeant 200g Req. 900HKs ", 7);
                    Menu->AddItem(5, "First Sergeant 250g Req. 1,200HKs", 8);
     	            Menu->AddItem(5, "Stone Guard 300g Req. 1,500HKs", 9);
                    Menu->AddItem(5, "Blood Guard 350g Req. 1,800HKs", 10);
                    Menu->AddItem(5, "Legionnaire 400g Req. 2,100HKs", 11);
                    Menu->AddItem(5, "Centurion 500g Req. 2,500HKs", 12);
                    Menu->AddItem(5, "Champion 650g Req. 3k HKs", 13);
                    Menu->AddItem(5, "Lieutenant General 800g Req. 6k HKs", 14);
                    Menu->AddItem(5, "General 1000g Req. 10k HKs", 15);
                    Menu->AddItem(5, "Warlord 1500g Req. 15k Hks", 16);
                    Menu->AddItem(5, "High Warlord 2000g Req. 20k HKs", 17);
    
                    Menu->SendTo(Plr);
    				}
    		        break;
    
    
            case 2:     ////Alliance Titles////
    		        {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
                    Menu->AddItem(5, "Private 50g Req. 100HKs", 18);
                    Menu->AddItem(5, "Corporal 100g Req. 300HKs", 19);
                    Menu->AddItem(5, "Sergeant 150g Req. 600HKs", 20);
                    Menu->AddItem(5, "Master Sergeant 200g Req. 900HKs", 21);
                    Menu->AddItem(5, "Sergeant Major 250g Req. 1,200HKs", 22);
                    Menu->AddItem(5, "Knight 300g Req. 1,500HKs", 23);
                    Menu->AddItem(5, "Knight-Lieutenant 350g Req. 1,800HKs", 24);
                    Menu->AddItem(5, "Knight-Captain 400g Req. 2,100HKs", 25);
                    Menu->AddItem(5, "Knight-Champion 500g Req. 2,500HKs", 26);
                    Menu->AddItem(5, "Lieutenant Commander 650g Req. 3k HKs", 27);
                    Menu->AddItem(5, "Commander 800g Req. 6k HKs", 28);
                    Menu->AddItem(5, "Marshal 1000g Req. 10k HKs", 29);
                    Menu->AddItem(5, "Field Marshal 1500g Req. 15k HKs", 30);
                    Menu->AddItem(5, "Grand Marshal 2000g Req. 20k HKs", 31);
    
                    Menu->SendTo(Plr);
    				}
                    break;
    
    		case 4: ////Horde////Scout////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>100){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>500000){
    						int32 newgold = currentgold - 500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_SCOUT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Scout of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 5: ////Horde////Grunt////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>300){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>1000000){
    						int32 newgold = currentgold - 1000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_GRUNT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Grunt of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 6: ////Horde////Sergeant////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>600){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>1500000){
    						int32 newgold = currentgold - 1500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_HSERGEANT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Sergeant of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 7: ////Horde////Senior Sergeant////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>900){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>2000000){
    						int32 newgold = currentgold - 2000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_SENIOR_SERGEANT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Senior Sergeant of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 8: ////Horde////First Sergeant////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>1200){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>2500000){
    						int32 newgold = currentgold - 2500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_FIRST_SERGEANT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, First Sergeant of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 9: ////Horde////Stone Guard////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>1500){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>3000000){
    						int32 newgold = currentgold - 3000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_STONE_GUARD,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Stone Guard of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 10: ////Horde////Blood Guard////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>1800){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>3500000){
    						int32 newgold = currentgold - 3500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_BLOOD_GUARD,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Blood Guard of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 11: ////Horde////Legionaire////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>2100){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>4000000){
    						int32 newgold = currentgold - 4000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_LEGIONNAIRE,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Legionaire of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 12: ////Horde////Centurion////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>2500){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>5000000){
    						int32 newgold = currentgold - 5000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_CENTURION,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Centurion of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 13: ////Horde////Champion////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>3000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>6500000){
    						int32 newgold = currentgold - 6500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_CHAMPION,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Champion of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 14: ////Horde////Lieutenant General////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>6000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>8000000){
    						int32 newgold = currentgold - 8000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_LIEUTENANT_GENERAL,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Lieutenant General of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 15: ////Horde////General////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>10000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>10000000){
    						int32 newgold = currentgold - 10000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_GENERAL,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, General of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 16: ////Horde////Warlord////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>15000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>15000000){
    						int32 newgold = currentgold - 15000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_WARLORD,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, Warlord of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    
    
    
    
    			}
    
    		case 17: ////Horde////High Warlord////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>20000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>20000000){
    						int32 newgold = currentgold - 20000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_HIGH_WARLORD,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Horde, I hereby pronounce you as, High Warlord of the Horde Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 18: ////Alliance////Private////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>100){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>500000){
    						int32 newgold = currentgold - 500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_PRIVATE,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Private of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 19: ////Alliance////Corporal////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>300){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>1000000){
    						int32 newgold = currentgold - 1000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_CORPORAL,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Corporal of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 20: ////Alliance////Sergeant////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>600){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>1500000){
    						int32 newgold = currentgold - 1500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_SERGEANT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Sergeant of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 21: ////Alliance////Master Sergeant////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>900){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>2000000){
    						int32 newgold = currentgold - 2000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_MASTER_SERGEANT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Master Sergeant of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 22: ////Alliance////Sergeant Major////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>1200){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>2500000){
    						int32 newgold = currentgold - 2500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_SERGEANT_MAJOR,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Sergeant Major of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 23: ////Alliance////Knight////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>1500){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>3000000){
    						int32 newgold = currentgold - 3000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_KNIGHT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Knight of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 24: ////Alliance////Knight-Lieutenant////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>1800){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>3500000){
    						int32 newgold = currentgold - 3500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_KNIGHT_LIEUTENANT,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Knight-Lieutenant of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 25: ////Alliance////Knight-Captain////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>2100){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>4000000){
    						int32 newgold = currentgold - 4000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_KNIGHT_CAPTAIN,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Knight-Captain of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 26: ////Alliance////Knight-Champion////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>2500){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>5000000){
    						int32 newgold = currentgold - 5000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_KNIGHT_CHAMPION,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Knight-Champion of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 27: ////Alliance////Lieutenant Commander////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>3000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>6500000){
    						int32 newgold = currentgold - 6500000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_LIEUTENANT_COMMANDER,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Lieutenant Commander of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 28: ////Alliance////Commander////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>6000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>8000000){
    						int32 newgold = currentgold - 8000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_COMMANDER,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Commander of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 29: ////Alliance////Marshal////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>10000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>10000000){
    						int32 newgold = currentgold - 10000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_MARSHAL,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Marshal of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 30: ////Alliance////Field Marshal////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>15000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>15000000){
    						int32 newgold = currentgold - 15000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_FIELD_MARSHAL,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Field Marshal of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		case 31: ////Alliance////Grand Marshal////
    			{
    			uint32 m_killsLifeTime = Plr->GetUInt32Value(PLAYER_FIELD_LIFETIME_HONORBALE_KILLS);
    			if (m_killsLifeTime>20000){
    					uint32 currentgold = Plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    					if(currentgold>20000000){
    						int32 newgold = currentgold - 20000000;
    						Plr->SetUInt32Value(PLAYER_FIELD_COINAGE,newgold);
    						Plr->SetKnownTitle(PVPTITLE_GRAND_MARSHAL,true);
    						pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,"For your services to the Alliance, I hereby pronounce you as, Grand Marshal of the Alliance Forces.");
    						Plr->BroadcastMessage("!!!!Please relog for title to become active!!!!");
    					}else{
    						Plr->BroadcastMessage("You do not have enough gold for that title.");
    						Plr->Gossip_Complete();
    					}break;
    			}else{
    				Plr->BroadcastMessage("You do not meet the Honorable Kill requirements for that title.");
    				Plr->Gossip_Complete();
    			}break;
    			}
    
    		}
    }
    						
    
    void PvPTitlesNPC::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupPvPTitlesNPC(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new PvPTitlesNPC();
        mgr->register_gossip_script(55562, gs);
    }

    Setup.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    #define SKIP_ALLOCATOR_SHARING 1
    #include <ScriptSetup.h>
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
        SetupPvPTitlesNPC(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif
    Setup.h
    Code:
    #ifndef GOSSIP_SCRIPTS_SETUP_H
    #define GOSSIP_SCRIPTS_SETUP_H
    
    void SetupPvPTitlesNPC(ScriptMgr * mgr);
    
    #endif
    Credits for Original Script go to Devilsadvocate/Nemesis.
    Credits for Fixed Version, fokui (Me)
    Last edited by fokui; 10-03-2008 at 01:20 AM.

    Fixed PVPTitleNPC for Arcemu Latest Rev.
  2. #2
    [Shon3m]'s Avatar Banned
    Reputation
    128
    Join Date
    Apr 2007
    Posts
    669
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow man nice find +2 Rep also do u think u could add glad titles?
    Last edited by [Shon3m]; 10-03-2008 at 01:20 AM.

  3. #3
    shedi's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great +rep

  4. #4
    Devilsadvocate's Avatar Member
    Reputation
    70
    Join Date
    May 2008
    Posts
    254
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    +Rep for helping out on my script buddy
    I'm not going to be releasing anything for a while. I'm back on retail for new content.

  5. #5
    fokui's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the rep, appreciate it.

  6. #6
    Murlock.'s Avatar Knight-Lieutenant
    Reputation
    86
    Join Date
    Oct 2007
    Posts
    271
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sweet. +rep
    gratz on getting out of leacher :P

  7. #7
    fokui's Avatar Member
    Reputation
    5
    Join Date
    May 2008
    Posts
    25
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, yeah i figured i should contribute something considering i've been here for a while now =p

    Edit: When I get a chance ill add the arena titles
    Last edited by fokui; 10-05-2008 at 12:22 AM.

Similar Threads

  1. [Epic Release] Ultimate Quest Maker [Arcemu/Latest Rev]
    By marco1234 in forum WoW EMU Programs
    Replies: 53
    Last Post: 08-22-2009, 09:21 AM
  2. Fixed Elixirs for ArcEmu
    By Boiko7530bg in forum WoW EMU General Releases
    Replies: 0
    Last Post: 05-09-2009, 02:56 PM
  3. Looking for ArcEmu latest complie w/ Database and Getting ArcEmu Public?
    By masterm92 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 09-30-2008, 07:50 PM
  4. [Release]JulianX Black Temple Mall [Made for Latest Revs]
    By Hellgawd in forum World of Warcraft Emulator Servers
    Replies: 14
    Last Post: 03-02-2008, 01:58 PM
  5. {REQUEST} JulianX mall for latest rev
    By brock106 in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 01-20-2008, 01:35 AM
All times are GMT -5. The time now is 08:26 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search