[Release]Skill NPC & PayNPC! menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    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)

    [Release]Skill NPC & PayNPC!

    Here it is:

    Code:
    /*Skill NPC.cpp
    
    This script was written and is protected
    by the GPL v2. This script was released
    by Azolex of the Blua Scripting
    Project. Please give proper accredidations
    when re-releasing or sharing this script
    with others in the emulation community.
    
    ~~End of License Agreement
    -- Azolex, October 6, 2008. */
    // basic Skill NPC by Azolex
    // Copyrights (C) Azolex
    #include "StdAfx.h"
    #include "Setup.h"
    
    class SCRIPT_DECL SkillNPC : 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 SkillNPC::GossipEnd(Object * pObject, Player* Plr){ GossipScript::GossipEnd(pObject, Plr); }
    void SkillNPC::GossipHello(Object *pObject, Player *Plr, bool AutoSend){
    	GossipMenu *Menu;
        objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    				if (Plr->getClass() == 1) 
     { 
    Menu->AddItem(0, "What spells can warriors learn?", 1);
     } 
    				if (Plr->getClass() == 2)
     { 
    Menu->AddItem(0, "What spells can paladins learn?", 2);
     }
    				if (Plr->getClass() == 3)
     { 
    Menu->AddItem(0, "What spells can hunters learn?", 3);
     }
    				if (Plr->getClass() == 9)
     { 
    Menu->AddItem(0, "What spells can warlocks learn?", 4);
     }
    				if (Plr->getClass() == 11)
     { 
    Menu->AddItem(0, "What spells can druids learn?", 5);
     }
    				if (Plr->getClass() == 4) 
     { 
    Menu->AddItem(0, "What spells can rogues learn?", 6);
     } 
    				if (Plr->getClass() == 5) 
     { 
    Menu->AddItem(0, "What spells can priests learn?", 7);
     } 
    				if (Plr->getClass() == 7) 
     { 
    Menu->AddItem(0, "What spells can shamans learn?", 8);
     } 
    				if (Plr->getClass() == 8) 
     { 
    Menu->AddItem(0, "What spells can mages learn?", 9);
     } 
    
    
    Menu->AddItem(0, "Reset Talent Points", 98);
    
        Menu->SendTo(Plr);
    }
    
    
    void SkillNPC::GossipSelectOption(Object *pObject, Player *Plr, uint32 Id, uint32 IntId, const char *Code){
    	Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT) ? ((Creature*)pObject) : NULL;
    	GossipMenu * Menu;
    	switch(IntId){
    	case 0:     // Return to start
    				GossipHello(pObject, Plr, true);
                break;
    
    case 1:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Taunt", 10);
    Menu->AddItem(5, "Intercept", 13);
    Menu->AddItem(5, "Defensive Stance", 11);
    Menu->AddItem(5, "Beserker Stance", 12);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 2:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Redemption", 22);
    Menu->AddItem(5, "Summon Warhorse", 20);
    Menu->AddItem(5, "Summon Charger", 21);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 3:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Pet spells", 30);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 4:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Pet Spells", 40);
    Menu->AddItem(5, "Summon Felstead", 41);
    Menu->AddItem(5, "Summon Dreadstead", 42);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 5:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Bear Form", 54);
    Menu->AddItem(5, "Dire Bear Form", 51);
    Menu->AddItem(5, "Aquatic Form", 56);
    Menu->AddItem(5, "Normal Flight Form", 52);
    Menu->AddItem(5, "Epic Flight Form", 53); 
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 6:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 7:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
    case 8:
    objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    Menu->AddItem(0, "[Back]", 99);
    Menu->SendTo(Plr);
    break;
    
            case 10:     // Warrior-Taunt
    			if(Plr->getLevel() >= 10)
    			{
    				Plr->addSpell(355);
    				Plr->BroadcastMessage("You have learned Taunt.");
    			}else{
    				Plr->BroadcastMessage("You must be level 10 to learn Taunt.");
    				}
    			break;
    
    	case 11:     // Warrior-Defensive Stance
    			if(Plr->getLevel() >= 10)
    			{
    				Plr->addSpell(71);
    				Plr->BroadcastMessage("You have learned Defensive Stance.");
    			}else{
    				Plr->BroadcastMessage("You must be level 10 to learn Defensive Stance.");
    				}
    			break;
    
    	case 12:     // Warrior-Beserker Stance
    			if(Plr->getLevel() >= 30)
    			{
    				Plr->addSpell(2458);
    				Plr->BroadcastMessage("You have learned Berseker Stance.");
    			}else{
    				Plr->BroadcastMessage("You must be level 30 to learn Berseker Stance.");
    				}
    			break;
    
    	case 13:     // Warrior-Intercept
    			if(Plr->getLevel() >= 10)
    			{
    				Plr->addSpell(25275);
    				Plr->BroadcastMessage("You have learned Intercept.");
    			}else{
    				Plr->BroadcastMessage("You must be level 10 to learn Intercept.");
    				}
    			break;
    
            case 20:     // Paladin-Warhorse
    			if(Plr->getLevel() >= 40)
    			{
                    		Plr->addSpell(13819);
                			Plr->BroadcastMessage("You have learned Summon Warhorse.");
    			}else{ 
    				Plr->BroadcastMessage("You must be level 40 to learn Summon Warhorse."); 
    				}
    			break;
    
    	case 21:     // Paladin-Charger
    			if(Plr->getLevel() >= 60)
    			{
                    		Plr->addSpell(34767);
                			Plr->BroadcastMessage("You have learned Summon Charger.");
    			}else{ 
    				Plr->BroadcastMessage("You must be level 60 to learn Summon Charger."); 
    				}			
    			break;
    
    	case 22:     // Paladin-Redemption
    			if(Plr->getLevel() >= 10)
    			{
                    		Plr->addSpell(20773);
                			Plr->BroadcastMessage("You have learned Redemption.");
    			}else{ 
    				Plr->BroadcastMessage("You must be level 10 to learn Redemption."); 
    				}			
    			break;
            
            case 30:     // Hunter-Pet Spells
    	        	if(Plr->getLevel() >= 10)
    	        	{
    				Plr->addSpell(1515);
    				Plr->addSpell(883);
    				Plr->addSpell(5149);
    				Plr->addSpell(982);
    				Plr->addSpell(6991);
    				Plr->BroadcastMessage("You have learned your Hunter Pet Spells.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You are below level 10.");
    				Plr->Gossip_Complete();
    				}
                		break;
    
    	case 40:     // Warlock-Pet Spells
    	        	if(Plr->getLevel() >= 10)
    	        	{
    				Plr->addSpell(688);
    				Plr->addSpell(697);
    				Plr->addSpell(712);
    				Plr->addSpell(691);
    				Plr->BroadcastMessage("You have learned your Warlock Pet Spells.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You are below level 10.");
    				Plr->Gossip_Complete();
    			}
    			break;
    
    	case 41:     // Warlock-Felsteed
    	        	if(Plr->getLevel() >= 40)
    	        	{
    				Plr->addSpell(5784);
    				Plr->BroadcastMessage("You have learned Summon Felsteed.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You must be level 40 to learn Summon Felsteed.");
    				Plr->Gossip_Complete();
    			}
    			break;
    
    	case 42:     // Warlock-Dreadsteed
    	        	if(Plr->getLevel() >= 60)
    	        	{
    				Plr->addSpell(23161);
    				Plr->BroadcastMessage("You have learned Summon Dreadsteed.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You must be level 60 to learn Summon Dreadsteed.");
    				Plr->Gossip_Complete();
    			}
                		break;
    
    	case 51:     // Druid-Dire Bear Form
    	        	if(Plr->getLevel() >= 30)
    	        	{
    				Plr->addSpell(9634);
    				Plr->BroadcastMessage("You have learned Dire Bear Form.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You must be level 30 to learn Dire Bear Form.");
    				Plr->Gossip_Complete();
    			}
                		break;
    
    	case 52:     // Druid-Normal Flight Form
    	        	if(Plr->getLevel() >= 68)
    	        	{
    				Plr->addSpell(33943);
    				Plr->BroadcastMessage("You have learned Summon Normal Flight Form.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You must be level 68 to learn Normal Flight Form.");
    				Plr->Gossip_Complete();
    			}
                		break;
    
    	case 53:     // Druid-Epic Flight Form
    	        	if(Plr->getLevel() >= 70)
    	        	{
    				Plr->addSpell(40120);
    				Plr->BroadcastMessage("You have learned Summon Epic Flight Form.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You must be level 60 to learn Epic Flight Form.");
    				Plr->Gossip_Complete();
    			}
    					break;
    	case 54:     // Druid-Bear form
    	        	if(Plr->getLevel() >= 10)
    	        	{
    				Plr->addSpell(6795);
    				Plr->BroadcastMessage("You have learned Bear Form.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You must be level 10 to learn Bear Form.");
    				Plr->Gossip_Complete();
    			}
                		break;
    	case 56:     // Druid-Aquatic Form
    	        	if(Plr->getLevel() >= 20)
    	        	{
    				Plr->addSpell(6795);
    				Plr->BroadcastMessage("You have learned Aquatic Form.");
    				Plr->Gossip_Complete();
    			}else{
    				Plr->BroadcastMessage("You must be level 20 to learn Aquatic Form.");
    				Plr->Gossip_Complete();
    			}
                		break;
    
    	case 98:     // Reset Talents  
    			{
                                    Plr->Reset_Talents();
    				Plr->BroadcastMessage("You have reset your talent points.");
    				Plr->Gossip_Complete();
    			}
                		break;
    	case 99:    //Main Menu
    			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    				if (Plr->getClass() == 1) 
     { 
    Menu->AddItem(0, "What spells can warriors learn?", 1);
     } 
    				if (Plr->getClass() == 2)
     { 
    Menu->AddItem(0, "What spells can paladins learn?", 2);
     }
    				if (Plr->getClass() == 3)
     { 
    Menu->AddItem(0, "What spells can hunters learn?", 3);
     }
    				if (Plr->getClass() == 9)
     { 
    Menu->AddItem(0, "What spells can warlocks learn?", 4);
     }
    				if (Plr->getClass() == 11)
     { 
    Menu->AddItem(0, "What spells can druids learn?", 5);
     }
    				if (Plr->getClass() == 4) 
     { 
    Menu->AddItem(0, "What spells can rogues learn?", 6);
     } 
    				if (Plr->getClass() == 5) 
     { 
    Menu->AddItem(0, "What spells can priests learn?", 7);
     } 
    				if (Plr->getClass() == 7) 
     { 
    Menu->AddItem(0, "What spells can shamans learn?", 8);
     } 
    Menu->AddItem(0, "Reset Talent Points", 98);
    Menu->SendTo(Plr);
    break;
    
    			
    		}
    	}
    
    void SetupSkillNPC(ScriptMgr * mgr)
    {
    	mgr->register_gossip_script(50001, (GossipScript*) new SkillNPC());
    }
    PayNPC
    Code:
    /*Skill NPC.cpp
    
    This script was written and is protected
    by the GPL v2. This script was released
    by Azolex of the Blua Scripting
    Project. Please give proper accredidations
    when re-releasing or sharing this script
    with others in the emulation community.
    
    ~~End of License Agreement
    -- Azolex, October 21, 2008. */
    // Crap PayNPC by Azolex
    // Copyrights (C) Azolex
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    class SCRIPT_DECL Paymaster : public GossipScript
    {
    public:
    	void GossipHello(Object* pObject, Player * plr, bool AutoSend)
    	{
    
    		GossipMenu *Menu;
    
    		objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 9998, plr);
    		Menu->AddItem( 0, "1.000 Gold", 0);
    
    		if(AutoSend)
    			Menu->SendTo(plr);
    	}
    
    	void 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;
    
    		switch(IntId)
    		{
    			case 0:
    				plr->SetUInt32Value(PLAYER_FIELD_COINAGE, 10000000);
    				break;
    		}
    	}
    
    	void GossipEnd(Object * pObject, Player* Plr)
    	{
    		GossipScript::GossipEnd(pObject, Plr);
    	}
    
    	void Destroy()
    	{
    		delete this;
    	}
    };
    
    void SetupPayNPC(ScriptMgr * mgr)
    {
    	GossipScript * payNpc = (GossipScript*) new Paymaster;
    	mgr->register_gossip_script(50003, payNpc);
    }
    SQL:
    Code:
    /* Clean up */
    DELETE FROM creature_names WHERE (`entry`='50001');
    
    DELETE FROM creature_proto WHERE (`entry`='50001');
    
    /* And now Creature */
    INSERT INTO `creature_names` (`entry`, `name`, `subname`, `info_str`, `type`, `family`, `rank`, `male_displayid`, `female_displayid`, `male_displayid2`, `female_displayid2`, `civilian`, `leader`) VALUES ('50001', 'SkillNPC', 'Blua Scripting', '', '0', '0', '0', '23758', '0', '0', '0', '0', NULL);
    
    INSERT INTO `creature_proto` (`entry`, `minlevel`, `maxlevel`, `faction`, `minhealth`, `maxhealth`, `mana`, `scale`, `npcflags`, `attacktime`, `mindamage`, `maxdamage`, `rangedattacktime`, `rangedmindamage`, `rangedmaxdamage`, `mountdisplayid`, `equipmodel1`, `equipmodel2`, `equipmodel3`, `respawntime`, `armor`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `combat_reach`, `bounding_radius`, `auras`, `boss`, `money`, `invisibility_type`, `death_state`, `walk_speed`, `run_speed`, `fly_speed`) VALUES ('50001', '70', '70', '1635', '100', '100', '0', '1', '1', '1500', '0', '0', '0', '0', '0', '0', '0', '0', '0', '36000', '1', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '2.5', '8', '14');
    Credits:
    Blua Scripting : Blua - Revision 404: /
    Last edited by AzolexX; 10-22-2008 at 06:49 AM.

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

    [Release]Skill NPC & PayNPC!
  2. #2
    Succy's Avatar Banned
    Reputation
    40
    Join Date
    Jun 2007
    Posts
    804
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The function of the SkillNPC is pretty obvious, but the PayNPC?

  3. #3
    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)
    Talk to him and request a money.
    Last edited by AzolexX; 10-23-2008 at 04:06 PM.

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

  4. #4
    Etna's Avatar Banned
    Reputation
    20
    Join Date
    Sep 2007
    Posts
    349
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehe this is Cool +rep x2

  5. #5
    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)
    Thanks, 9 more rep to go.
    Last edited by AzolexX; 10-23-2008 at 04:06 PM.

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

  6. #6
    Succy's Avatar Banned
    Reputation
    40
    Join Date
    Jun 2007
    Posts
    804
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's really cool dude, beggers kneel you :P +Rep x3 Good Job :P

  7. #7
    Etna's Avatar Banned
    Reputation
    20
    Join Date
    Sep 2007
    Posts
    349
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    btw is this for 3.0.2 ?

  8. #8
    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)
    It works with any Ascent based emulator so it will work with 3.0.2 and if this doesn't i will update it on SVN so it will work and maybe this thread also.
    Thanks
    Succy.
    Last edited by AzolexX; 10-23-2008 at 04:07 PM.

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

  9. #9
    Etna's Avatar Banned
    Reputation
    20
    Join Date
    Sep 2007
    Posts
    349
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aha Cool well GL whit you'r 9 more Reps

  10. #10
    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)
    It is 6 actually.
    Last edited by AzolexX; 10-23-2008 at 04:08 PM.

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

  11. #11
    c1nco's Avatar Member
    Reputation
    1
    Join Date
    Jul 2008
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx works great

  12. #12
    stoneharry's Avatar Moderator Harry


    Reputation
    1618
    Join Date
    Sep 2007
    Posts
    4,564
    Thanks G/R
    151/150
    Trade Feedback
    0 (0%)
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Ohhh this is nice
    +Rep x2

    Edit: Need to spread

  13. #13
    Ground Zero's Avatar ★ Elder ★
    Reputation
    1132
    Join Date
    Aug 2008
    Posts
    3,504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ill help you with your rep!

    +Rep

    Oh and btw.....

    Brilliant release. I Love it! Good Job.

  14. #14
    amynnet93's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2008
    Posts
    118
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tahnks for that

  15. #15
    xlibris's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice man ... +rep... ill use it =)

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 40
    Last Post: 11-04-2008, 04:03 PM
  2. [Release] Skill Npc 2.0
    By Sylex in forum World of Warcraft Emulator Servers
    Replies: 30
    Last Post: 06-02-2008, 05:02 PM
  3. [Release] Skill Npc 3.0
    By Sylex in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 04-10-2008, 09:51 AM
  4. [Release] Skill Npc - Revived
    By Sylex in forum World of Warcraft Emulator Servers
    Replies: 38
    Last Post: 02-29-2008, 02:31 PM
  5. [Release] Chirspee's Teleporting NPC, Buff NPC's, Skill NPC and Heal NPC
    By Illidan1 in forum World of Warcraft Emulator Servers
    Replies: 13
    Last Post: 11-22-2007, 04:05 PM
All times are GMT -5. The time now is 08:56 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