How to compile an ascent WarpNpc :) menu

User Tag List

Results 1 to 10 of 10
  1. #1
    MegaNerd's Avatar Member
    Reputation
    9
    Join Date
    Dec 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to compile an ascent WarpNpc :)

    Let's get started.

    1) Download ascent source code
    2) Go to Ascent\trunk\src\scripts\src and create a new folder, f.e name it Warper
    3) Go to the new folder and create a new text document
    4) Copy/paste following code
    Code:


    Code:
     //warning C4305: 'argument' : truncation from 'double' to 'float'
    #pragma warning(disable:4305)
    #include "StdAfx.h"
    #include "Setup.h"
    
    
    class SCRIPT_DECL Warper : 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 Warper::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
        {
            GossipMenu *Menu;
            objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    			Menu->AddItem(5, "The Bank", 1);
            Menu->AddItem(5, "The Wind Rider Master", 2);
    	    Menu->AddItem(5, "The Guild Master", 3);
    		Menu->AddItem(5, "The Inn", 4);
    		Menu->AddItem(5, "The Mail Box", 5);
    		Menu->AddItem(5, "The Auction House", 6);
    		Menu->AddItem(5, "The Zeppelin Master", 7);
    		Menu->AddItem(5, "The Weapon Master", 8);
    		Menu->AddItem(5, "The Stable Master", 9);
    		Menu->AddItem(5, "The Officers Lounge", 10);
    		Menu->AddItem(5, "The Battle Master", 11);
    		Menu->AddItem(0, "A Class Trainer", 12);
    		Menu->AddItem(0, "A Profession Trainer", 21);
    
    
            if(AutoSend)
                Menu->SendTo(Plr);
        }
    
    void Warper::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(pCreature, Plr, true);
                break;
    
    
            case 1:     // The Bank
    			{
                    Plr->EventTeleport(1, 1624.005493, -4376.836914, 11.832124);
    
    			}break;
    
            case 2:     // The Wind Rider Master
    			{
                    Plr->EventTeleport(1, 1675.274414, -4316.876465, 61.492710);
    
    			}break;
    
            case 3:     // The Guild Master
    			{
                    Plr->EventTeleport(1, 1573.594116, -4296.287109, 26.105478);
    
    			}break;
    
            case 4:		// The Inn
                {
                    Plr->EventTeleport(1, 1631.591309, -4439.370117, 15.545703);
    
                }break;
    
            case 5:		// The Mail Box
                {
                    Plr->EventTeleport(1, 1613.145142, -4393.043945, 10.298344);
                }break;
    
            case 6:		// The Auction House
                {
                    Plr->EventTeleport(1, 1677.856201, -4452.716309, 19.007420);
                }break;
    
            case 7:		// The Zeppelin Master
                {
                    Plr->EventTeleport(1, 1343.855347, -4638.791016, 53.543720);
                }break;
    
            case 8:		// The Weapon Master
                {
                    Plr->EventTeleport(1, 2092.201172, -4820.813965, 24.193218);
                }break;
    
            case 9:		// The Stable Master
                {
                    Plr->EventTeleport(1, 2134.017334, -4661.900391, 47.147541);
                }break;
    
            case 10:	// The Officers Lounge
                {
                    Plr->EventTeleport(1, 1629.840576, -4252.753418, 52.108551);
                }break;
    
            case 11:	// The Battle Master
                {
                    Plr->EventTeleport(1, 1987.204956, -4799.816895, 55.820541);
                }break;
    
    		case 12:	// Class Trainers
                	objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    				Menu->AddItem(5, "Hunter", 13);
                    Menu->AddItem(5, "Mage", 14); 
    				Menu->AddItem(5, "Priest", 15);
    				Menu->AddItem(5, "Shaman", 16);
                    Menu->AddItem(5, "Rogue", 17);
    				Menu->AddItem(5, "Warlock", 18);
    				Menu->AddItem(5, "Warrior", 19);
    				Menu->AddItem(5, "Paladin", 20);
                    Menu->AddItem(0, "[Back]", 99);
                    Menu->SendTo(Plr);
    				break;
    
            case 13:	// Hunter
                {
                    Plr->EventTeleport(1, 2098.876709, -4624.548340, 58.508503);
                }break;
    
            case 14:	// Mage
                {
                    Plr->EventTeleport(1, 1474.749634, -4223.067871, 42.959259);
                }break;
    
            case 15:	// Priest
                {
                    Plr->EventTeleport(1, 1458.646362, -4180.693848, 44.085209);
                }break;
    
            case 16:	// Shaman
                {
                    Plr->EventTeleport(1, 1926.768311, -4219.193359, 40.945278);
                }break;
    
            case 17:	// Rogue
                {
                    Plr->EventTeleport(1, 1779.050171, -4288.550781, 6.760933);
                }break;
    
            case 18:	// Warlock
                {
                    Plr->EventTeleport(1, 1835.543945, -4357.160156, -14.835423);
                }break;
    
    		case 19:	// Warrior
    			 {
                    Plr->EventTeleport(1, 1990.227539, -4807.867676, 56.764660);
    			 }break;
    
    		case 20:	// Paladin
    			 {
                    Plr->EventTeleport(1, 1920.645996, -4137.566406, 40.325436);
    			 }break;
               
    		case 21: // Profession Trainers 
                	objmgr.CreateGossipMenuForPlayer(&Menu, pCreature->GetGUID(), 1, Plr);
    				Menu->AddItem(5, "Alchemy", 22);
                    Menu->AddItem(5, "Blachsmithing", 23); 
    				Menu->AddItem(5, "Cooking", 24);
    				Menu->AddItem(5, "Enchanting", 25);
                    Menu->AddItem(5, "Engineering", 26);
    				Menu->AddItem(5, "First Aid", 27);
    				Menu->AddItem(5, "Fishing", 28);
    				Menu->AddItem(5, "Herbalism", 29);
    				Menu->AddItem(5, "Leatherworking / Skinning", 30);
    				Menu->AddItem(5, "Mining", 31);
    				Menu->AddItem(5, "Tailoring", 32);
                    Menu->AddItem(0, "[Back]", 99);
                    Menu->SendTo(Plr);
    				break;
    
            case 22:	// Alchemy
                {
                    Plr->EventTeleport(1, 1949.396973, -4472.826660, 25.869463);
                }break;
    
            case 23:	// Blacksmithing
                {
                    Plr->EventTeleport(1, 2061.875977, -4808.765625, 22.561069);
                }break;
    
            case 24:	// Cooking
                {
                    Plr->EventTeleport(1, 1774.318848, -4488.827637, 45.420769);
                }break;
    
            case 25:	// Enchanting
                {
                    Plr->EventTeleport(1, 1922.008667, -4431.770508, 24.660080);
                }break;
    
            case 26:	// Engineering
                {
                    Plr->EventTeleport(1, 2041.634766, -4738.637207, 29.158888);
                }break;
    
            case 27:	// First Aid
                {
                    Plr->EventTeleport(1, 1484.575073, -4152.647949, 40.911854);
                }break;
    
    		case 28:	// Fishing
    			 {
                    Plr->EventTeleport(1, 2003.995850, -4649.808105, 25.967529);
    			 }break;
    
    		case 29:	// Herbalism
    			 {
                    Plr->EventTeleport(1, 1898.203979, -4452.222168, 53.224289);
    			 }break;
    
    	    case 30:	// Leatherworking / Skinning
                {
                    Plr->EventTeleport(1, 1850.564819, -4556.475098, 24.760695);
                }break;
    
    		case 31:	// Mining
    			 {
                    Plr->EventTeleport(1, 2023.082520, -4705.049316, 26.803726);
    			 }break;
    
    		case 32:	// Tailoring
    			 {
                    Plr->EventTeleport(1, 1803.104614, -4554.586914, 22.779684);
    			 }break;
    
                    
                    
    		case 99: //main menu
    			{
    			objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    			Menu->AddItem(5, "The Bank", 1);
            Menu->AddItem(5, "The Wind Rider Master", 2);
    	    Menu->AddItem(5, "The Guild Master", 3);
    		Menu->AddItem(5, "The Inn", 4);
    		Menu->AddItem(5, "The Mail Box", 5);
    		Menu->AddItem(5, "The Auction House", 6);
    		Menu->AddItem(5, "The Zeppelin Master", 7);
    		Menu->AddItem(5, "The Weapon Master", 8);
    		Menu->AddItem(5, "The Stable Master", 9);
    		Menu->AddItem(5, "The Officers Lounge", 10);
    		Menu->AddItem(5, "The Battle Master", 11);
    		Menu->AddItem(0, "A Class Trainer", 12);
    		Menu->AddItem(0, "A Profession Trainer", 21);
    
    			Menu->SendTo(Plr);
    			}
    			break;
    			
    			
     }
        }
    
    void Warper::GossipEnd(Object * pObject, Player* Plr)
    {
        GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupWarper(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new Warper();
        /* Teleporter List */
        mgr->register_gossip_script(100000, gs);          // Nega
    }
    5) Save the file as Warper.cpp
    6) Create 3 new text documents in the new folder
    7) On the 1st one, cop/paste following code:
    Code:

    ----------------------------------------------------------------------------------------------
    Code:
     INCLUDES += -I$(srcdir) -I$(srcdir)/../../../../dep/include -I$(srcdir)/../../../shared
    INCLUDES += -I$(srcdir)/../../../script -I$(srcdir)/../../../../src -I$(srcdir)/../../../game
    INCLUDES += -I$(srcdir)/../../../logonserver -I$(srcdir)/../../../../dep/src
    
    AM_CXXFLAGS = -DSCRIPTLIB
    
    lib_LTLIBRARIES = libMiscScripts.la
    
    libMiscScripts_la_SOURCES = Warper.cpp Setup.cpp
    Add Warper.cpp to the makefile. Edit the line in red to fit your new folder name. F.e, if your folder name is Warper, type libWarper.la
    Save this file as makefile.am
    9) Open the 2nd text document in the new folder and copy/paste following code:
    Code:
    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)
    {
         // warper
         SetupWarper(mgr);
    
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif
    10) Save this file as Setup.cpp
    11) Open 3rd text document and once again you have to copy/paste =P
    Code:
    Code:
     #ifndef INSTANCE_SCRIPTS_SETUP_H
    #define INSTANCE_SCRIPTS_SETUP_H
    
    //warper
    void SetupWarper(ScriptMgr * mgr);
    
    #endif
    ----------------------------------------------------------------------------------------------

    12) Save this file as Setup.h
    13) Now, go to projects folder and create a copy of one of the VC++ Projects. Let's copy InstanceScripts2003.
    14) Rename the copy as you like, I call it Warper2003
    15) Open it up with a notepad and find every 'InstanceScripts' name. Rename them to Warper.

    Go to the bottom of the file and find
    Code:
    ----------------------------------------------------------------------------------------------
    Code:
     <Files>
    		<Filter
    			Name="Main Resources"
    			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
    			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
    			<File
    				RelativePath="..srcWarperSetup.cpp">
    			</File>
    			<File
    				RelativePath="..srcWarperSetup.h">
    			</File>
    		</Filter>
    		<Filter
    			Name="Scripts"
    			Filter="h;hpp;hxx;hm;inl;inc;xsd"
    			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
    			<File
    				RelativePath="..srcWarperWarper.cpp">
    			</File>
    		</Filter>
    	</Files>
    	<Globals>
    	</Globals>
    </VisualStudioProject>
    ----------------------------------------------------------------------------------------------

    The code doesn't look the same as I have, but change it to what I have. =P

    16) Find Microsoft Visual Studio Solution File (2003/2005) and open it with a notepad
    17) Copy one of the projects, f.e
    Code:
    Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ServerStatusPlugin", "projects\ServerStatusPlugin2003.vcproj", "{EE39B48B-C598-4AAF-9EF0-199402933EE5}"
    ProjectSection(ProjectDependencies) = postProject
    EndProjectSection
    EndProject
    and rename it to fit the copied project file (in this case rename ServerStatusPlugin2003 to Warper2003)

    Open the solution normally and compile!
    Last edited by MegaNerd; 01-22-2008 at 03:06 PM.

    How to compile an ascent WarpNpc :)
  2. #2
    freeride474's Avatar Contributor
    Reputation
    127
    Join Date
    Aug 2006
    Posts
    278
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks this is very helpful thanks for the contribution =) +rep x2
    Last edited by freeride474; 01-20-2008 at 07:22 PM.
    Join My Guild (Gilneas, Horde US) - <Blue Thunder>
    Website Traffic Appreciated - Help*Me*Get*Benefits

    yEE~

  3. #3
    EatUrBrains's Avatar Active Member
    Reputation
    55
    Join Date
    Jan 2007
    Posts
    504
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you should have put that in a code
    NoT A ZomBie~BuT iLL~EaTuRBrainS

  4. #4
    punk969's Avatar Member
    Reputation
    1
    Join Date
    Jan 2008
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx +rep when i get the power lol

  5. #5
    MegaNerd's Avatar Member
    Reputation
    9
    Join Date
    Dec 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you should have put that in a code
    yes i know :P but i don't know how :P

  6. #6
    kate1's Avatar Member
    Reputation
    147
    Join Date
    Aug 2007
    Posts
    501
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice^^ might use this in my new DB!


    Graphic designer for crossfire-entertainment! And thx to Brightchild for my great sig

  7. #7
    Zokmag's Avatar Active Member
    Reputation
    32
    Join Date
    Apr 2007
    Posts
    928
    Thanks G/R
    2/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MegaNerd View Post
    yes i know :P but i don't know how :P
    It's just the same as you quote!
    Just type [ code ]Text[ /code ]
    For example [ code ]AcsentScript26325<625fzt>[ /code ]
    Remove the space inside the [ ]
    And this seems really nice!

  8. #8
    Sonic Waffle's Avatar Contributor
    Reputation
    170
    Join Date
    Dec 2007
    Posts
    990
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What does this actually do? +Rep for effort


  9. #9
    kreven's Avatar Member
    Reputation
    55
    Join Date
    Nov 2007
    Posts
    84
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thx...usefull stuff

  10. #10
    MegaNerd's Avatar Member
    Reputation
    9
    Join Date
    Dec 2007
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pigpoo this is a guide for Warp Npcs :P

Similar Threads

  1. How to compile ascent
    By Viter in forum World of Warcraft Emulator Servers
    Replies: 42
    Last Post: 04-19-2008, 09:59 AM
  2. How to Compile Ascent 2.3.2 with NCDB!!
    By MooseBoi in forum WoW EMU Guides & Tutorials
    Replies: 26
    Last Post: 03-23-2008, 07:32 PM
  3. How to compile ascent!
    By Froddy in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 02-27-2008, 04:48 PM
  4. How To Compile Ascent [Video]
    By Xiro187 in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 01-18-2008, 03:29 PM
  5. Guide: How to Compile Ascent yourself! [With photos]
    By Skaren in forum WoW EMU Guides & Tutorials
    Replies: 33
    Last Post: 01-08-2008, 08:18 PM
All times are GMT -5. The time now is 04:51 AM. 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