[Release] Advance Weapon Skill NPC - C++ menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  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] Advance Weapon Skill NPC - C++

    This script does pretty much what the title says. It advances your weapon skills by 400, so they are max. It is useful for instant 80 realms where your weapon skills are 1/400. I also put in for rogues lock picking advancement by 400 just because it's always a bitch to level it. Hope you like it!

    -Compiles without error or warning!-

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #define ADV_SKILL_NPC 85000
    
    #ifdef WIN32
    #pragma warning(disable:4305)// warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    
    class SCRIPT_DECL AdvSkillNPC : 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 AdvSkillNPC::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
    	{
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    		       
    				if(!Plr->CombatStatus.IsInCombat())
    					{
    						Menu->AddItem(9, "Advance my weapon skills!", 1);
    						Menu->AddItem(5, "Goodbye!", 5);
    					}
    					else
    						Plr->BroadcastMessage("You are in combat!");
    					
    					    if(AutoSend)
    							Menu->SendTo(Plr);
    					};
    
    
    void AdvSkillNPC::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:
    		GossipHello(pObject, Plr, true);
            break;
    
    		case 5:
    		{
    		Plr->Gossip_Complete();//Ends Conversation
    		}
    		break;
    
    		case 1:
    		{
    		if (Plr->_HasSkillLine(43))
    			{Plr->_AdvanceSkillLine(43, 400);}//Swords
    
    		if (Plr->_HasSkillLine(44))
    			{Plr->_AdvanceSkillLine(44, 400);}//Axes
    
    		if (Plr->_HasSkillLine(45))
    			{Plr->_AdvanceSkillLine(45, 400);}//Bows
    
    		if (Plr->_HasSkillLine(46))
    			{Plr->_AdvanceSkillLine(46, 400);}//Guns
    
    		if (Plr->_HasSkillLine(54))
    			{Plr->_AdvanceSkillLine(54, 400);}//Maces
    
    		if (Plr->_HasSkillLine(95))
    			{Plr->_AdvanceSkillLine(95, 400);}//Defense
    
    		if (Plr->_HasSkillLine(136))
    			{Plr->_AdvanceSkillLine(136, 400);}//Staves
    
    		if (Plr->_HasSkillLine(160))
    			{Plr->_AdvanceSkillLine(160, 400);}//Two-Handed Swords
    
    		if (Plr->_HasSkillLine(162))
    			{Plr->_AdvanceSkillLine(162, 400);}//Unarmed
    
    		if (Plr->_HasSkillLine(172))
    			{Plr->_AdvanceSkillLine(172, 400);}//Two-Handed Axes
    
    		if (Plr->_HasSkillLine(173))
    			{Plr->_AdvanceSkillLine(173, 400);}//Daggers
    
    		if (Plr->_HasSkillLine(176))
    			{Plr->_AdvanceSkillLine(176, 400);}//Thrown
    
    		if (Plr->_HasSkillLine(226))
    			{Plr->_AdvanceSkillLine(226, 400);}//Crossbows
    
    		if (Plr->_HasSkillLine(228))
    			{Plr->_AdvanceSkillLine(228, 400);}//Wands
    
    		if (Plr->_HasSkillLine(229))
    			{Plr->_AdvanceSkillLine(229, 400);}//Polearms
    
    		if (Plr->_HasSkillLine(473))
    			{Plr->_AdvanceSkillLine(473, 400);}//Fist Weapons - I am not sure if this is a skill that is like the others, I thought fist weapons contributed towards unarmed.
    			
    		if (Plr->_HasSkillLine(633))
    			{Plr->_AdvanceSkillLine(633, 400);}//Lockpicking - I know its not a weapon skill, but it's always a bitch to level.
    
    			Plr->BroadcastMessage("You weapon skills have been advanced!");
    			Plr->Gossip_Complete();
    			}
     }
     }
    
    void AdvSkillNPC::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupAdvSkillNPC(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new AdvSkillNPC();
        mgr->register_gossip_script(ADV_SKILL_NPC, gs);
    }
    Screenshot:

    [Release] Advance Weapon Skill NPC - C++
  2. #2
    Mircast's Avatar Member
    Reputation
    14
    Join Date
    Sep 2008
    Posts
    139
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good effort. +REP

  3. #3
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice script +Rep Keep up the good work.

  4. #4
    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 am working on a few C++ projects at the moment, releasing them as I finish them up. Look for them around, I posted a Classic PvP Title NPC just in queue to get approved.
    <3

  5. #5
    Tripzor's Avatar Member
    Reputation
    6
    Join Date
    Mar 2009
    Posts
    23
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work, Maybe I can use it in my next server project

  6. #6
    Sumething 2 r3member's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wtf... I put this in my scripts folder and it doesn't work... could you help me?

  7. #7
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This doesn't go in the scripts folder. It is a C++ script which has to be compiled.

  8. #8
    Sumething 2 r3member's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do you compile your script? Do you import into your DB? I know I'm a noob. I'm not good with this C++ stuff though.

  9. #9
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you compile your own core?

  10. #10
    Sumething 2 r3member's Avatar Member
    Reputation
    1
    Join Date
    Apr 2009
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope, I just downloaded a repack.

  11. #11
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to compile your own core to get C++ scripts to work.

  12. #12
    punxphobia's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how can i use that code?

  13. #13
    Dr. Livingstone's Avatar Member
    Reputation
    113
    Join Date
    Mar 2008
    Posts
    290
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have to compile it with your core. Which means you have to have compiled your own core.

  14. #14
    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)
    D: Oh my, people don't know the difference between LUA, SQL, and C++ >.>
    <3

  15. #15
    dBloc's Avatar Member
    Reputation
    10
    Join Date
    May 2007
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by N2Dark View Post
    D: Oh my, people don't know the difference between LUA, SQL, and C++ >.>

    No they don't. Anyways, thanks for this. You get a cookie from me

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] Weapon Skill NPC!!!!
    By Jackie Moon in forum WoW EMU General Releases
    Replies: 12
    Last Post: 01-24-2009, 10:21 AM
  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 - Revived
    By Sylex in forum World of Warcraft Emulator Servers
    Replies: 38
    Last Post: 02-29-2008, 02:31 PM
  4. [Release] Illidan's Starting Gear, Weapons, Skills + Quest
    By Illidan1 in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 11-25-2007, 02:56 AM
  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 10:12 PM. 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