[Release]Advanced WarpNPC menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Hermess's Avatar Member
    Reputation
    12
    Join Date
    Sep 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Release]Advanced WarpNPC

    Trying to see if I can evade the leecher rank
    I think this is as simple as it could possibly get.

    Code:
    WarpNPC.cpp
    ////Advanced WarpNPC designed by HeRMeS////
    #include "StdAfx.h"
    #include "Setup.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)
    #endif
    
    class SCRIPT_DECL WarpNPC : 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 WarpNPC::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
    {
    	GossipMenu *Menu; 
    	objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    	if (Plr->GetTeam() == 1)
    	{
    		Menu->AddItem(5, "Main Horde Zones", 1); //horde
    	}
    	else 
    	{
    		Menu->AddItem(5, "Main Alliance Zones", 2); //alliance
    	}
    	Menu->AddItem(5, "Remove Ressurrection Sickness", 8);
    	Menu->SendTo(Plr);
    }
    
    void WarpNPC::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:
    		GossipHello(pObject, Plr, true);
    		break;
    
    	
    	case 100: //main menu return
    		  {
    			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    			if (Plr->GetTeam() == 1)
    			{
    				Menu->AddItem(5, "Main Horde Zones", 1); 
    			}
    			else 
    			{
    				Menu->AddItem(5, "Main Alliance Zones", 2); 
    			}
    				Menu->AddItem(5, "Remove Ressurrection Sickness", 8);
    				Menu->SendTo(Plr);
    			}
    		  break;
    	
    	case 1: // Horde City's d'oh
    		{
    			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr); 
    			Menu->AddItem(5, "Orgrimmar", 9);
    			if(Plr->getLevel()>=58){Menu->AddItem(0, "Shattrath", 10);}
    			Menu->AddItem(5, "Undercity", 11);
    			Menu->AddItem(5, "Thunder Bluff", 12);
    			Menu->AddItem(5, "Silvermoon", 13);
    			Menu->AddItem(5, "Gadgetzan", 14);
    			Menu->AddItem(5, "Booty Bay", 15);
    			if(Plr->getLevel()>=68){Menu->AddItem(0, "Dalaran", 16);}
    			Menu->AddItem(0, "[Main Menu]", 100);
    			Menu->SendTo(Plr);
    		}
    		break;
    
    	case 2: // Alliance City's d'oh
    		{
    			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr); 
    			Menu->AddItem(5, "Stormwind", 18);
    			if(Plr->getLevel()>=58){Menu->AddItem(0, "Shattrath", 19);}
    			Menu->AddItem(5, "Ironforge", 20);
    			Menu->AddItem(5, "Darnassus", 21);
    			Menu->AddItem(5, "The Exodar", 22);
    			Menu->AddItem(5, "Gadgetzan", 23);
    			Menu->AddItem(5, "Booty Bay", 24);
    			if(Plr->getLevel()>=68){Menu->AddItem(0, "Dalaran", 25);}
    			Menu->AddItem(0, "[Main Menu]", 100);
    			Menu->SendTo(Plr);
    		}
    		break;
    	
    	case 8:
    		{
    			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
                Plr->addSpell(15007);			
    			Plr->removeSpell(15007,0,0,0);		
    			pCreature->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Sickness Removed,enjoy Corpse Camping!" );
    			Menu->AddItem(0, "[Main Menu]", 100);
                Menu->SendTo(Plr);
    		}
    		break;
    
    	case 13: //SMC
    		{
    			Plr->EventTeleport(530, 9414.18, -7278.97, 15.2031);
            }
    		break;
    
    		case 10: //Shatt Horde
    		{
    			Plr->EventTeleport(530, 1722.58, 5382.7, 2.47504);
            }
    		break;
    
    		case 19: //Shatt Ally
    		{
    			Plr->EventTeleport(530, 1722.58, 5382.7, 2.47504);
            }
    		break;
    
    	case 9: //Orgrimmar
            {
                Plr->EventTeleport(1, 1502.71, -4415.42, 22.5512);
            }
    		break;
    
    	case 12: //Beef Jerky
    		{
    			Plr->EventTeleport(1, -1285.42, 176.523, 130.994);
            }
    		break;
    
        case 11: //Undercity
            {
                Plr->EventTeleport(0, 1831.26, 238.53, 61.52);
            }
    		break;
    
        case 22: //Exodar
            {
                Plr->EventTeleport(530, -4014.08, -11895.8, -0.99324);
            }
    		break;
    
        case 18: //Stormwind
            {
                Plr->EventTeleport(0, -8913.23, 554.633, 94.7944);
            }
    		break;
    
        case 20: //Midgetland
            {
                Plr->EventTeleport(0, -4981.25, -881.542, 502.66);
            }
    		break;
    
        case 21: //Darnassus
            {
                Plr->EventTeleport(1, 8795.8, 969.427, 31.1955);
            }
    		break;
    		
    	    case 14: //Gadgetzan HORDE
            {
                Plr->EventTeleport(1, -7154.86, -3817.94, 9.39779);
            }
    		break;
    		
    	    case 23: //Gadgetzan ALLIANCE
            {
                Plr->EventTeleport(1, -7154.86, -3817.94, 9.39779);
            }
    		break;
    		
    		case 15: //Booty Bay HORDE
            {
                Plr->EventTeleport(0, -14406.6, 419.353, 23.3907);
            }
    		break;
    		
    		case 24: //Booty Bay ALLIANCE
            {
                Plr->EventTeleport(0, -14406.6, 419.353, 23.3907);
            }
    		break;
    
    		case 16: //Dalaran H
    		{
                Plr->EventTeleport(571, 5784.95, 667.995, 755.711);
    		}
    		break;
    		
    	case 25: //Dalaran A
    		{
                Plr->EventTeleport(571, 5784.95, 667.995, 755.711);
    		}
    		break;
    
    	}
    	}
    
    void WarpNPC::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupWarpNPC(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new WarpNPC();
        mgr->register_gossip_script(<ID HERE>, gs);
    }
    Code:
    Setup.cpp
    #include "StdAfx.h"
    #include "Setup.h"
    #include <ScriptSetup.h>
    
    extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
    {
    	return SCRIPT_TYPE_MISC;
    }
    
    extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
    {
    SetupWarpNPC(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
    	return TRUE;
    }
    
    #endif
    Code:
    Setup.h
    #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    void SetupWarpNPC(ScriptMgr * mgr);
    
    #endif
    Enjoy.
    For any assistance or help or bug report PM me or write here.:wave:

    [Release]Advanced WarpNPC
  2. #2
    enjayce's Avatar Member
    Reputation
    63
    Join Date
    Oct 2008
    Posts
    74
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it seems like a good enough idea but with all the wotlk server releases you might want to try adding north rend ports as well

  3. #3
    Hermess's Avatar Member
    Reputation
    12
    Join Date
    Sep 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It has Dalaran atm..
    It'll get updated later on today with some other ones..

  4. #4
    shellx's Avatar Member
    Reputation
    12
    Join Date
    Oct 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    holy god thats good

  5. #5
    Hermess's Avatar Member
    Reputation
    12
    Join Date
    Sep 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bumpzor!!!

  6. #6
    benzkool's Avatar Member
    Reputation
    23
    Join Date
    Nov 2008
    Posts
    119
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Hermess View Post
    bumpzor!!!
    This is nice i cant give rep atm but ill come back later and ill rep

  7. #7
    chaoticd35's Avatar Site Donator
    Reputation
    44
    Join Date
    Jun 2007
    Posts
    337
    Thanks G/R
    5/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work and contribution! 2+Rep

  8. #8
    Zaeoir's Avatar Member
    Reputation
    66
    Join Date
    May 2008
    Posts
    188
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nizzle +rep
    Need help? Add my MSN or PM me here.

  9. #9
    volitle's Avatar Contributor
    Reputation
    181
    Join Date
    Nov 2007
    Posts
    1,127
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    looks good +2rep of me fella


  10. #10
    Hermess's Avatar Member
    Reputation
    12
    Join Date
    Sep 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys.<3

  11. #11
    Zudrik's Avatar Member
    Reputation
    52
    Join Date
    Dec 2008
    Posts
    169
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So this is C# or C++?

    And how would I go about putting this into my DB?

  12. #12
    bsod-staff14's Avatar Member
    Reputation
    35
    Join Date
    Nov 2008
    Posts
    443
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    C++

    Would advice editing your core.
    Immortal GamerZ Under Development!

  13. #13
    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)
    Looking good +rep

    I live in a shoe

  14. #14
    Hermess's Avatar Member
    Reputation
    12
    Join Date
    Sep 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Zudrik it's C++
    @Remember to modify the ID of the NPC in the script...in case someone didn't knew>.>

  15. #15
    Edude's Avatar Member
    Reputation
    98
    Join Date
    Jul 2008
    Posts
    406
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    EPIC, +Rep ofc
    Nice effort =)

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] Advanced CodeBoxNPC (Add Codes Ingame!)
    By Claiver in forum WoW EMU General Releases
    Replies: 53
    Last Post: 06-07-2009, 11:35 PM
  2. [Release] Advanced Welcome NPC VERSION 1.0
    By Scubast3ve in forum WoW EMU General Releases
    Replies: 27
    Last Post: 05-23-2009, 10:41 PM
  3. [Release] Advance Weapon Skill NPC - C++
    By LaAevie in forum WoW EMU General Releases
    Replies: 21
    Last Post: 04-13-2009, 11:02 AM
  4. [Release] New - WarpNPC connected with Database!
    By ~SaiLyn~ in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 06-07-2008, 08:08 AM
  5. [Release] Wareagle920's WarpNPC
    By SectorSeven in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 02-07-2008, 11:17 PM
All times are GMT -5. The time now is 06:25 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