professional skill NPC menu

User Tag List

Results 1 to 2 of 2
  1. #1
    TristinD's Avatar Active Member
    Reputation
    20
    Join Date
    Oct 2007
    Posts
    124
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    professional skill NPC

    Hey can somebody help with this script

    #include
    "StdAfx.h"
    #include"Setup.h"
    #ifdef WIN32
    #pragmawarning(disable:4305)
    #endif

    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, constchar * Code);
    void GossipEnd(Object * pObject, Player* Plr);
    void Destroy()
    {
    deletethis;
    }
    };
    void skillnpc::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
    {
    GossipMenu *Menu;
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(7,
    "welcum to the professions npc, click on each to learn that profession.", 5);
    Menu->AddItem(8,
    "enchanting", 96);
    Menu->AddItem(8,
    "tailoring", 95);
    Menu->AddItem(8,
    "engineering", 94);
    Menu->AddItem(8,
    "jewelcrafting", 93);
    Menu->AddItem(8,
    "alchemy", 92);
    Menu->AddItem(8,
    "black smith", 91);
    Menu->AddItem(8,
    "herbalism", 90);
    Menu->AddItem(8,
    "leather working", 89);
    Menu->AddItem(8,
    "mining", 8;
    Menu->AddItem(8,
    "skinning", 87);
    Menu->AddItem(8,
    "cooking", 86);
    Menu->AddItem(8,
    "first aid", 85);
    Menu->AddItem(8,
    "fishing", 84);
    Menu->AddItem(5,
    "set my profession skills to 375", 50);
    if(AutoSend)
    Menu->SendTo(Plr);
    }
    void skillnpc::GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, constchar * 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 96: // enchanting
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 28030, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "enchanting learned" );

    Menu->SendTo(Plr);
    }
    break;

    case 95: // tailoring
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 3912, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "tailoring learned" );

    Menu->SendTo(Plr);
    }
    break;
    case 94: // engineering
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 30351, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "engineering learned" );

    Menu->SendTo(Plr);
    }
    break;
    case 93: // jewelcrafting
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 28901, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "jewelcrafting learned" );

    Menu->SendTo(Plr);
    }
    break;

    case 92: // alchemy
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 28597, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "alchemy learned" );

    Menu->SendTo(Plr);
    }
    break;
    case 91: // black smith
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 29845, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "blacksmith learned" );

    Menu->SendTo(Plr);
    }
    break;
    case 90: //herbalism
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 28696, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "hrbalism learned" );

    Menu->SendTo(Plr);
    }
    break;

    case 89: // leatherworking
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 32550, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "leatherworking learned" );

    Menu->SendTo(Plr);
    }
    break;

    case 88: // mining
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 29355, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "mining learned" );

    Menu->SendTo(Plr);
    }
    break;
    case 87: // skinning
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 32679, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "skinning learned" );

    Menu->SendTo(Plr);
    }
    break;
    case 86: //cooking
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 33360, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "cooking learned" );

    Menu->SendTo(Plr);
    }
    break;

    case 85: //first aid
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 33894, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "first aid learned" );

    Menu->SendTo(Plr);
    }
    break;

    case 84: //fishing
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    pCreature->CastSpell(Plr, 33098, 0);
    pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL,
    "fishing learned" );

    Menu->SendTo(Plr);
    }
    break;






    case 50: //Advance all skills
    {
    {Plr->_AdvanceSkillLine(333, 375);}
    {Plr->_AdvanceSkillLine(197, 375);}
    {Plr->_AdvanceSkillLine(202, 375);}
    {Plr->_AdvanceSkillLine(755, 375);}
    {Plr->_AdvanceSkillLine(171, 375);}
    {Plr->_AdvanceSkillLine(164, 375);}
    {Plr->_AdvanceSkillLine(182, 375);}
    {Plr->_AdvanceSkillLine(165, 375);}
    {Plr->_AdvanceSkillLine(186, 375);}
    {Plr->_AdvanceSkillLine(393, 375);}
    {Plr->_AdvanceSkillLine(185, 375);}
    {Plr->_AdvanceSkillLine(129, 375);}
    {Plr->_AdvanceSkillLine(356, 375);}
    Plr->Gossip_Complete();
    }
    break;









    case 99: //main menu
    {
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(7,
    "welcum to the professions npc, click on each to learn that profession.", 5);
    Menu->AddItem(8,
    "enchanting", 96);
    Menu->AddItem(8,
    "tailoring", 95);
    Menu->AddItem(8,
    "engineering", 94);
    Menu->AddItem(8,
    "jewelcrafting", 93);
    Menu->AddItem(8,
    "alchemy", 92);
    Menu->AddItem(8,
    "black smith", 91);
    Menu->AddItem(8,
    "herbalism", 90);
    Menu->AddItem(8,
    "leather working", 89);
    Menu->AddItem(8,
    "mining", 8;
    Menu->AddItem(8,
    "skinning", 87);
    Menu->AddItem(8,
    "cooking", 86);
    Menu->AddItem(8,
    "first aid", 85);
    Menu->AddItem(8,
    "fishing", 84);
    Menu->AddItem(5,
    "set my profession skills to 375", 50);
    Plr->Gossip_Complete();
    }
    break;





    }
    }
    void skillnpc::GossipEnd(Object * pObject, Player* Plr)
    {
    GossipScript::GossipEnd(pObject, Plr);
    }
    void Setupskillnpc(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*)
    new skillnpc();
    mgr->register_gossip_script(111700, gs);
    }
    when i compile it it give me this error

    Creating library ..\..\..\bin\debug\script_bin/skillnpc.lib and object ..\..\..\bin\debug\script_bin/skillnpc.exp
    Setup.obj : error LNK2001: unresolved external symbol "void __cdecl SetupSkillNPC(class ScriptMgr *)" (?SetupSkillNPC@@YAXPAVScriptMgr@@@Z)
    ../../../bin/release/script_bin/skillnpc.dll : fatal error LNK1120: 1 unresolved externals
    can some one help me fix this plz?

    professional skill NPC
  2. #2
    kreegoth's Avatar Contributor
    Reputation
    122
    Join Date
    Jun 2008
    Posts
    810
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is alot easier to do through LUA imo.. and then you dont have to update everytime you update your Core.. if you take a look there is a base template for a LUA profession and skill trainer in the releases section.

Similar Threads

  1. [Release] Skill Npc 2.0
    By Sylex in forum World of Warcraft Emulator Servers
    Replies: 30
    Last Post: 06-02-2008, 05:02 PM
  2. LF skill npc (2.4)
    By dongel in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 04-19-2008, 02:02 AM
  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 05:06 PM. 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