[Release] Guard Npc menu

User Tag List

Results 1 to 12 of 12
  1. #1
    Sylex's Avatar Active Member
    Reputation
    101
    Join Date
    May 2007
    Posts
    141
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release] Guard Npc

    NO ONE SHALL POST THIS ON ANY OTHER SITE WITHOUT MY PERMISSION!

    I am still adding to this! Please give me ideas!

    All credits go to me, because I actually made this script with some help.

    Tutorial:

    1). First off, change the

    #define NPCID 334567

    To your desired npc id for your guard.

    2). Change the menus

    Menu->AddItem(0, "Auction House", 1);

    Change Auction House to whatever you want the place to be called on the script.

    Change 1 to the desired case id, we will talk about this later down.

    3). If you want to add another option..insert this into the bottom of the list

    Menu->AddItem(0, "Auction House", 1);

    Change Auction House to whatever you want the place to be called on the script.

    Change 1 to the desired case id, we will talk about this later down.

    4). Modifing the cases.

    Plr->Gossip_SendPOI(7346.06, -1584.47, 6, 6, 0, "Mall Auction House");

    7346.06 = x coordinites
    -1584.47 = y coordinites
    Mall Auction House = name of the area that you supplied in the "2). Change the menus."

    To get the x and y coordinites do the command .gps while ontop of the area that you want a flag to appear to.

    GuardNPC.cpp
    Code:
    //Script made by Nebels
    //Ultra Spidey helped me form the base
    //Haskin did too
    
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)
    #endif
    
    #define NPCID 334567  //ID of the Guard
    
    
    
    class SCRIPT_DECL CustomGuardNPC : 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 CustomGuardNPC::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
    GossipMenu *Menu;
    
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
    
    
    Menu->AddItem(0, "Auction House", 1);  //Edit this line only
    Menu->AddItem(0, "Mall Bank", 2);  //Edit this line only
    Menu->AddItem(0, "The Inn", 4);  //Edit this line only
    Menu->AddItem(0, "Guild Master", 6);  //Edit this line only
    Menu->AddItem(0, "Mailbox", 7);  //Edit this line only
    Menu->AddItem(0, "Riding Trainer", 8);  //Edit this line only           //If needed another line, add Menu->AddItem(0, "<INSERT NAME HERE>", <CASEID>);
    Menu->AddItem(0, "Weapons Trainer", 9);  //Edit this line only
    Menu->AddItem(0, "Gear Center", 10);  //Edit this line only
    Menu->AddItem(0, "Teleporter", 11);  //Edit this line only
    Menu->AddItem(0, "Morpher", 14);  //Edit this line only
    Menu->AddItem(0, "Class Trainer", 12);  //Edit this line only
    Menu->AddItem(0, "Profession Trainer", 13);  //Edit this line only
    
    if(AutoSend)
    Menu->SendTo(Plr);
    }
    
    void CustomGuardNPC::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: // Return to start
    {
    GossipHello(pObject, Plr, true);
    }
    break;
    
    //////////////////////
    // Main menu handlers
    /////
    
    case 1: // Auction House
    {
    //SendQuickMenu(3834);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 3834, Plr);
    Plr->Gossip_SendPOI(7346.06, -1584.47, 6, 6, 0, "Mall Auction House"); //Edit this line only
    }
    break;
    
    
    case 2: // Mall Bank
    {
    //SendQuickMenu(764);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 764, Plr);
    Plr->Gossip_SendPOI(7310.10, -1548.84, 6, 6, 0, "Mall Bank"); //Edit this line only
    }
    break;
    
    
    case 4: // The Inn
    {
    //SendQuickMenu(3860);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 3860, Plr);
    Plr->Gossip_SendPOI(7561.70, -1518.20, 6, 6, 0, "The Mall Inn"); //Edit this line only
    }
    break;
    
    
    case 6: // Guild Master
    {
    //SendQuickMenu(882);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 882, Plr);
    Plr->Gossip_SendPOI(7332.65, -1593.36, 6, 6, 0, "Guild Masters"); //Edit this line only
    }
    break;
    
    
    case 7: // Mailbox
    {
    //SendQuickMenu(3518);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 3518, Plr);
    Plr->Gossip_SendPOI(7511.19, -1534.08, 6, 6, 0, "Mall Mailbox"); //Edit this line only
    }
    break;
    
    
    case 8: // Riding Trainer
    {
    //SendQuickMenu (5984);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 5984, Plr);
    Plr->Gossip_SendPOI(7552.77, -1531.15, 6, 6, 0, "Riding Trainer"); //Edit this line only
    }
    break;
    
    
    case 9: // Weapons Master
    {
    //SendQuickMenu(4516);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4516, Plr);
    Plr->Gossip_SendPOI(7513.50, -1563.02, 6, 6, 0, "Weapon Trainers"); //Edit this line only
    }
    break;
    
    
    case 10: // Gear Center
    {
    //SendQuickMenu(7047);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7047, Plr);
    Plr->Gossip_SendPOI(7325.28, -1531.90, 6, 6, 0, "Gear Center"); //Edit this line only
    }
    break;
    
    
    case 11: // Teleporter
    {
    //SendQuickMenu(7499);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7499, Plr);
    Plr->Gossip_SendPOI(7318.90, -1570.83, 6, 6, 0, "Teleporter"); //Edit this line only
    }
    break;
    
    case 12: // Class Trainers
    {
    //SendQuickMenu(7499);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7499, Plr);
    Plr->Gossip_SendPOI(7546.08, -1524.89, 6, 6, 0, "Class Trainers"); //Edit this line only
    }
    break;
    
    case 13: // Profession Trainers
    {
    //SendQuickMenu(7499);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7499, Plr);
    Plr->Gossip_SendPOI(7474.17, -1579.87, 6, 6, 0, "Profession Trainers"); //Edit this line only
    }
    break;
    
    case 14: // Morpher
    {
    //SendQuickMenu(7499);
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 7499, Plr);
    Plr->Gossip_SendPOI(7500.07, -1540.36, 6, 6, 0, "Morpher"); //Edit this line only
    }
    break;
    }
    }
    void CustomGuardNPC::GossipEnd(Object * pObject, Player * Plr)
    {
    GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupCustomGuardNPC(ScriptMgr * mgr)
    {
    GossipScript * sw = (GossipScript*) new CustomGuardNPC();
    mgr->register_gossip_script(NPCID, sw);
    }
    Setup.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    extern "C" SCRIPT_DECL uint32 _exp_get_version()
    {
        return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
        SetupCustomGuardNPC(mgr);
    }
    
    #ifdef WIN32 
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    return SCRIPT_TYPE_MISC;
    }
    
    #endif
    Setup.h
    Code:
    #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    void SetupCustomGuardNPC(ScriptMgr * mgr);
    
    #endif
    Custom Guard:
    Code:
    INSERT INTO `creature_names` VALUES ('334567', 'Mall Guard', '', ' ', '0', '7', '0', '0', '0', '0', '18254', '0', '0', '0', '1', '1', '0', null);
    INSERT INTO `creature_proto` VALUES ('334567', '85', '85', '1741', '8573', '8573', '0', '1', '1', '1430', '0', '347', '434', '0', '0', '0', '0', '7483', '218171138', '3', '2080', '33490436', '1038', '0', '0', '0', '360000', '0', '0', '0', '0', '0', '0', '0', '1', '1', '0', '0', '251', '0', '0', '2.5', '8', '14', '0');
    If you need help please post here and I will try my best to answer your question(s).
    If you need it compiled, please pm me.

    Nebels
    Last edited by Sylex; 02-20-2008 at 09:06 PM.

    [Release] Guard Npc
  2. #2
    2dgreengiant's Avatar ★ Elder ★


    Reputation
    1192
    Join Date
    Feb 2007
    Posts
    7,129
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    looks legit, ill compile it when ascent works again :P
    If you need me you have my skype, if you don't have my skype then you don't need me.

  3. #3
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It has options of a guard but isn't one... umm lets see...
    +Rep x2 b/c its WarpNPC format

  4. #4
    Sylex's Avatar Active Member
    Reputation
    101
    Join Date
    May 2007
    Posts
    141
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, its much like the Stormwind/Orgrimmar guards.

  5. #5
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But i mean its not Anti-PvP

  6. #6
    *Alexz*'s Avatar Member
    Reputation
    105
    Join Date
    May 2007
    Posts
    521
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ya an anti pvp mob would of been better imo

  7. #7
    Sylex's Avatar Active Member
    Reputation
    101
    Join Date
    May 2007
    Posts
    141
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats what I am adding in version 2.0, the guard will also attack players who pvp too.

  8. #8
    SectorSeven's Avatar Banned
    Reputation
    444
    Join Date
    Oct 2007
    Posts
    1,948
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just make sure it doesn't computer hogg like all the other guard npcs out there... it hoggs so much they can only spawn 1! on the whole server to not make it lag on LOCALHOST

  9. #9
    Sylex's Avatar Active Member
    Reputation
    101
    Join Date
    May 2007
    Posts
    141
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I am working on that now, release for 2.0 should be tommorow.

  10. #10
    Pragma's Avatar Contributor
    Reputation
    261
    Join Date
    Feb 2007
    Posts
    630
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Optical made an anti-pvp guard on ascentemu.com but its easts up your computer's speed


  11. #11
    EmuGod's Avatar Contributor
    Reputation
    143
    Join Date
    Sep 2007
    Posts
    203
    Thanks G/R
    0/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WOW...completely, and utterly WOW...Thanks mate, this will be truly :jawdrop: omgepic if this works, for the pvp guard, and no proc hogging. Looking forward to seeing more work from you, and...If you're not currently affiliated, and would like to join a very fastpaced, and upcoming server, you can find me at Evolution+Rep

  12. #12
    King Shaun's Avatar Member
    Reputation
    419
    Join Date
    Dec 2007
    Posts
    1,305
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looks very nice, thanks for contributing this!

    Rep added (x


    Threads of the Week: [Errage] [Blizzard] [Rapidshare]

Similar Threads

  1. [Release] Guard Teleporter 1.0
    By thijsd in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 03-29-2008, 07:09 AM
  2. [Release] ALL Npc Display IDs!
    By Hellgawd in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 02-01-2008, 12:47 PM
  3. [Release] Wareagles NPCS and Chest Query
    By Hellgawd in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 01-21-2008, 05:46 PM
  4. [Release] Helper Npcs
    By wowcomputer in forum World of Warcraft Emulator Servers
    Replies: 12
    Last Post: 12-25-2007, 05:42 AM
  5. [RELEASE] Morph NPC
    By pepsi1x1 in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 12-04-2007, 08:42 PM
All times are GMT -5. The time now is 06:09 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