[Release] Class Changer NPC - C++ menu

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    LaAevie's Avatar Member
    Reputation
    85
    Join Date
    Mar 2008
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Class Changer NPC - C++

    NOTE: THIS IS CAN BE ABUSED BY PLAYERS BECAUSE IT DOESN'T REMOVE EQUIPMENT! EXAMPLE: WARRIOR USES NPC, BECOMES A ROGUE, WELL NOW YOU GOT A ROGUE IN PLATE!

    TO KEEP THIS PROBLEM UNDER CONTROL JUST MAKE THE PLAYER TAKE OFF ALL ARMOR BEFORE USING!

    This is only recommend for people with lots of experience!

    Okay, this is based off of the Class Changer Item by AzolexX
    Release - Class Changer Item
    The difference is this checks by race what classes you can choose so you can not bug your character, and crash the server. It also resets your skills and spells.

    NOTE: Designed for a level 80 server, it modifies your skill level to 1/400! You can change that easy to w/e you want just modify
    {Plr->_ModifySkillMaximum(WEAPONSKILL ID, MAXSKILL LEVEL YOU WANT FOR IT);}
    Please enjoy!

    Code:
    // CREATED BY LAAEVIE OF MMOWNED!
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    #define CHANGE_CLASS_NPC 85004
    
    #ifdef WIN32
    #pragma warning(disable:4305)// warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    
    class SCRIPT_DECL ClassChangerNPC : 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 ClassChangerNPC::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
    	{
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    	{
    	if(Plr->getRace()== 1||Plr->getRace()== 2||Plr->getRace()== 3||Plr->getRace()== 4||Plr->getRace()== 5||Plr->getRace()== 6||Plr->getRace()== 7||Plr->getRace()== 8||Plr->getRace()== 11)
    		{Menu->AddItem(0, "I want to be a Warrior!", 1);}
    
    	if(Plr->getRace()== 1||Plr->getRace()== 3||Plr->getRace()== 10||Plr->getRace()== 11)
    		{Menu->AddItem(0, "I want to be a Paladin!", 2);}
    
    	if(Plr->getRace()== 2||Plr->getRace()== 3||Plr->getRace()== 4||Plr->getRace()== 6||Plr->getRace()== 8||Plr->getRace()== 11)
    		{Menu->AddItem(0, "I want to be a Hunter!", 3);}
    
    	if(Plr->getRace()== 1||Plr->getRace()== 2||Plr->getRace()== 3||Plr->getRace()== 4||Plr->getRace()== 5||Plr->getRace()== 7||Plr->getRace()== 8||Plr->getRace()== 10)
    		{Menu->AddItem(0, "I want to be a Rogue!", 4);}
    
    	if(Plr->getRace()== 1||Plr->getRace()== 3||Plr->getRace()== 4||Plr->getRace()== 5||Plr->getRace()== 8||Plr->getRace()== 10||Plr->getRace()== 11)
    		{Menu->AddItem(0, "I want to be a Priest!", 5);}
    
    	if(Plr->getRace()== 1||Plr->getRace()== 2||Plr->getRace()== 3||Plr->getRace()== 4||Plr->getRace()== 5||Plr->getRace()== 6||Plr->getRace()== 7||Plr->getRace()== 8||Plr->getRace()== 10||Plr->getRace()== 11)
    		{Menu->AddItem(0, "I want to be a Death Knight!", 6);}
    
    	if(Plr->getRace()== 2||Plr->getRace()== 6||Plr->getRace()== 8||Plr->getRace()== 11)
    		{Menu->AddItem(0, "I want to be a Shaman!", 7);}
    
    	if(Plr->getRace()== 1||Plr->getRace()== 5||Plr->getRace()== 6||Plr->getRace()== 8||Plr->getRace()== 10||Plr->getRace()== 11)
    		{Menu->AddItem(0, "I want to be a Mage!", 8);}
    
    	if(Plr->getRace()== 1||Plr->getRace()== 2||Plr->getRace()== 5||Plr->getRace()== 7||Plr->getRace()== 10)
    		{Menu->AddItem(0, "I want to be a Warlock!", 9);}
    
    	if(Plr->getRace()== 4||Plr->getRace()== 6)
    		{Menu->AddItem(0, "I want to be a Druid!", 11);}
    
    		Menu->AddItem(0, "I Don't want to chage class!", 50);
    	}
    
    	if(AutoSend)
    		Menu->SendTo(Plr);
    };
    
    void ClassChangerNPC::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
    	switch(IntId)
    	{
    		case 0:
    		{
    			GossipHello(pObject, Plr, true);
    		}break;
    		case 50:
    		{
    			Plr->Gossip_Complete();
    		}break;
    
    		default:
    		{
    			if (Plr->getClass() != IntId)
    			{
    				Plr->setClass((uint8)IntId);
    				Plr->Reset_Spells();
    				Plr->_RemoveAllSkills();
    				Plr->BroadcastMessage("Class change complete. Relog to see the effect.");
    				
    
    		if (Plr->_HasSkillLine(43))
    			{Plr->_ModifySkillMaximum(43, 400);}//Swords
    
    		if (Plr->_HasSkillLine(44))
    			{Plr->_ModifySkillMaximum(44, 400);}//Axes
    
    		if (Plr->_HasSkillLine(45))
    			{Plr->_ModifySkillMaximum(45, 400);}//Bows
    
    		if (Plr->_HasSkillLine(46))
    			{Plr->_ModifySkillMaximum(46, 400);}//Guns
    
    		if (Plr->_HasSkillLine(54))
    			{Plr->_ModifySkillMaximum(54, 400);}//Maces
    
    		if (Plr->_HasSkillLine(95))
    			{Plr->_ModifySkillMaximum(95, 400);}//Defense
    
    		if (Plr->_HasSkillLine(136))
    			{Plr->_ModifySkillMaximum(136, 400);}//Staves
    
    		if (Plr->_HasSkillLine(160))
    			{Plr->_ModifySkillMaximum(160, 400);}//Two-Handed Swords
    
    		if (Plr->_HasSkillLine(162))
    			{Plr->_ModifySkillMaximum(162, 400);}//Unarmed
    
    		if (Plr->_HasSkillLine(172))
    			{Plr->_ModifySkillMaximum(172, 400);}//Two-Handed Axes
    
    		if (Plr->_HasSkillLine(173))
    			{Plr->_ModifySkillMaximum(173, 400);}//Daggers
    
    		if (Plr->_HasSkillLine(176))
    			{Plr->_ModifySkillMaximum(176, 400);}//Thrown
    
    		if (Plr->_HasSkillLine(226))
    			{Plr->_ModifySkillMaximum(226, 400);}//Crossbows
    
    		if (Plr->_HasSkillLine(228))
    			{Plr->_ModifySkillMaximum(228, 400);}//Wands
    
    		if (Plr->_HasSkillLine(229))
    			{Plr->_ModifySkillMaximum(229, 400);}//Polearms
    
    		if (Plr->_HasSkillLine(473))
    			{Plr->_ModifySkillMaximum(473, 400);}//Fist Weapons
    			
    		if (Plr->_HasSkillLine(633))
    			{Plr->_ModifySkillMaximum(633, 400);}//Lockpicking
    						Plr->Gossip_Complete();
    }
    
    			else if (Plr->getClass() == IntId)
    			{				
    				Plr->BroadcastMessage("ERROR: You are already that class, please choose other class!");
    				Plr->Gossip_Complete();
    			}
    		}break;
    
    	}
    };
    
    void ClassChangerNPC::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupClassChangerNPC(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new ClassChangerNPC();
        mgr->register_gossip_script(CHANGE_CLASS_NPC, gs);
    }
    Last edited by LaAevie; 05-12-2009 at 03:50 PM.
    <3

    [Release] Class Changer NPC - C++
  2. #2
    xX EPIC Xx's Avatar Active Member
    Reputation
    37
    Join Date
    Apr 2008
    Posts
    238
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Epic +Rep x2
    https://Fileusher.com

  3. #3
    nbhfam's Avatar Member
    Reputation
    5
    Join Date
    Feb 2008
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    love N2Dark

  4. #4
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But if you change class. You lose all your spells you had before, that means that you lose alot of gold.

    +Rep for the effort.
    Why do I need a signature?

  5. #5
    y2kss66's Avatar Member
    Reputation
    104
    Join Date
    Jan 2008
    Posts
    778
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the epixz nice release.

    +2Rep after cooldown and spread

    ha I said epixz and that is bad grammar.

    lulz!

  6. #6
    AzolexX's Avatar Contributor
    Reputation
    179
    Join Date
    May 2007
    Posts
    587
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Link_S View Post
    But if you change class. You lose all your spells you had before, that means that you lose alot of gold.

    +Rep for the effort.
    Not gold(Maybe mean gold to relearn all spells? N2Dark told me he will introduce it :P). I wish you good luck :P.
    I think you should remove race check, as my first idea of script was Tauren Rouge....

    Find about scripting, programming and music! My blog: https://worldofsmth.wordpress.com!

  7. #7
    LaAevie's Avatar Member
    Reputation
    85
    Join Date
    Mar 2008
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by AzolexX View Post
    Not gold(Maybe mean gold to relearn all spells? N2Dark told me he will introduce it :P). I wish you good luck :P.
    I think you should remove race check, as my first idea of script was Tauren Rouge....

    But I told you why I can't do that! D: It causes the server to crash, and it bugs your character making you never be able to loggin again on it! D:

    Thanks all. I am looking into making it remove armor, and teaches all your class spells so you don't waste 500gold about on learning spells again. >.<
    <3

  8. #8
    Crazy_Dizblo's Avatar Member
    Reputation
    1
    Join Date
    May 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Dude this is a very nice rls but i have an error
    wen i build it
    d:\ArcEmu-CrazyBG\src\arcemu-shared\svn_revision.h(7) : error C2144: syntax error : 'int' should be preceded by ';'

    but +Rep for you epic rls

  9. #9
    sharkerz's Avatar Member
    Reputation
    1
    Join Date
    Dec 2008
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what's the NPC Id? I can't fiind it:confused:

    EDIT: Fiind it ... Tx, +Rep
    Last edited by sharkerz; 04-29-2009 at 09:52 AM.

  10. #10
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool shit ne.. Aevie.

    I live in a shoe

  11. #11
    LaAevie's Avatar Member
    Reputation
    85
    Join Date
    Mar 2008
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for bumming tish xD
    <3

  12. #12
    Cardell's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Niceee bro ;D

  13. #13
    coldmrn's Avatar Member
    Reputation
    44
    Join Date
    Mar 2007
    Posts
    348
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SQL entry is "#define CHANGE_CLASS_NPC 85004" if I'm right?

    Edit:

    Get this error;

    Last edited by coldmrn; 05-07-2009 at 11:57 PM.


  14. #14
    CoolManBob's Avatar Active Member
    Reputation
    92
    Join Date
    Jul 2006
    Posts
    208
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by coldmrn View Post
    SQL entry is "#define CHANGE_CLASS_NPC 85004" if I'm right?

    Edit:

    Get this error;

    that is because it isnt a Lua script, its written in C++ you have to compile it

  15. #15
    LaAevie's Avatar Member
    Reputation
    85
    Join Date
    Mar 2008
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was surprised that people didn't read the "C++" part of the title........................
    <3

Page 1 of 3 123 LastLast

Similar Threads

  1. [Release]Class Changer Item!
    By AzolexX in forum WoW EMU General Releases
    Replies: 37
    Last Post: 04-10-2009, 04:25 PM
  2. [Release] Bounty Hunter Npc
    By Cursed in forum World of Warcraft Emulator Servers
    Replies: 48
    Last Post: 12-24-2007, 07:06 PM
  3. [Release]City Teleport NPC for Antrix
    By latruwski in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 12-18-2007, 08:38 AM
  4. [RELEASE] Free Money NPC
    By pepsi1x1 in forum World of Warcraft Emulator Servers
    Replies: 20
    Last Post: 12-13-2007, 12:04 PM
  5. [Release] Realmlist Changer
    By SiPex in forum WoW EMU Programs
    Replies: 16
    Last Post: 10-28-2007, 03:11 AM
All times are GMT -5. The time now is 07:42 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search