Event Checkpoints guide [C++] menu

User Tag List

Results 1 to 5 of 5
  1. #1
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Event Checkpoints guide [C++]

    welcome to magers checkpoint tutorial
    for events

    i will teach you to make an npc that
    will teleport you to your checkpoint
    location all you need to do is create
    a quest for each checkpoint you wish
    to have

    ok for our first bit of it lets put this

    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    class SCRIPT_DECL Event : 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;
    }
    };
    k now we did that which is kinda just the
    starting of the scripts its really absolutly
    nothing to the actual NPC

    lets make some menu selections for it

    Code:
    void Prison::GossipHello(Object * pObject, Player* Plr, bool AutoSend)
    {
    GossipMenu *Menu;
    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, Plr);
    Menu->AddItem(5, "Take me to my checkpoint!", 1);
    if you wish you can aswell add a line like this after that

    Code:
    Menu->AddItem(5, "What is my objective", 2);
    now they have something that will exist when they
    speak to your check point porter

    after that line add this

    Code:
    Menu->SendTo(Plr);
    }
    
    void Prison::GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
    Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
    if(pObject==NULL)
    return;
    
    switch(IntId)
    {
    excellent and now we make the check points
    first off make sure you have a quest for
    each check point if not make them now

    then we do this

    Code:
    case 0: // Return to start
    GossipHello(pCreature, Plr, true);
    break;
    case 1: // Teleport Down
    {
    	if (Plr->HasFinishedQuest(QuestID) == false){
    Plr->EventTeleport(0, X , Y, Z);
    Plr->Gossip_Complete();
    	}	
    	else	if (Plr->HasFinishedQuest(QuestID) == false && Plr->HasFinishedQuest(400001) == true) {
    Plr->EventTeleport(0, X, Y, Z);
    Plr->Gossip_Complete();
    just re add this line for a new quest to be added


    [CODE]
    }
    else if (Plr->HasFinishedQuest(QuestID) == false && Plr->HasFinishedQuest(400001) == true) {
    Plr->EventTeleport(0, X, Y, Z);
    Plr->Gossip_Complete();
    [/CODE

    and you can make as many check points as you wish : )

    if you added teh otehr menu item then this is what you do

    Code:
          case 2: // Information
    {
    	Plr->BroadcastMessage("Fill in Event info here");
    Plr->Gossip_Complete();
    there now finish this script off with

    Code:
    } 
    
    }
    };
    
    void Event::GossipEnd(Object * pObject, Player* Plr)
    {
    GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupEvent(ScriptMgr * mgr)
    {
    GossipScript * gs = (GossipScript*) new Event();
    mgr->register_gossip_script([MOBENTRYID], gs);
    }
    and thats my guide well
    thanks for listening please leave feedback : )
    Lunar Gaming - Reaching For The Stars

    Event Checkpoints guide [C++]
  2. #2
    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)
    Actually a decent guide. +Rep x4

    *Geifs cookie*

  3. #3
    mager1794's Avatar Member
    Reputation
    356
    Join Date
    Feb 2008
    Posts
    703
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the cookie *Giefs a cupcake *
    epics

    ...why dont people use this this guide took me a while to make up and its realy helpful for people making object events
    (sorry for double post)
    Last edited by 2dgreengiant; 07-08-2008 at 06:41 PM. Reason: double post, merged
    Lunar Gaming - Reaching For The Stars

  4. #4
    jokerofsouls's Avatar Member
    Reputation
    20
    Join Date
    Jun 2008
    Posts
    43
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i would say this has to be one of the best C++ guides i have seen so far keep it up +Rep

  5. #5
    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)
    Part from the god forbid double post this is really good.
    If you need me you have my skype, if you don't have my skype then you don't need me.

Similar Threads

  1. [GUIDE] How to make items cost 'tokens' or 'event coins'
    By Bohater in forum WoW EMU Guides & Tutorials
    Replies: 81
    Last Post: 12-27-2010, 07:35 AM
  2. [GM GUID] Events - Custom towns - etc
    By Ghosthopper in forum WoW EMU Guides & Tutorials
    Replies: 29
    Last Post: 05-06-2008, 11:57 AM
  3. [GUIDE] Easter Event - Where to get Eggs (ally)
    By -=Demon=- in forum World of Warcraft Guides
    Replies: 11
    Last Post: 03-26-2008, 02:04 PM
  4. [Guide] How to make a "table event"!
    By Johse in forum WoW EMU Guides & Tutorials
    Replies: 6
    Last Post: 01-05-2008, 08:25 PM
  5. Shartuul's Transporter event guide
    By Yodi in forum World of Warcraft Guides
    Replies: 4
    Last Post: 09-02-2007, 12:54 PM
All times are GMT -5. The time now is 05:26 AM. 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