[C++ Release] Guild House Portal SCript menu

User Tag List

Results 1 to 10 of 10
  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)

    [C++ Release] Guild House Portal SCript

    i wrote this guild house portal script for my server and i liked it cause it was nothing but a simple portal they click if they dont have a guild house then it will send a message to them

    Code:
    class PortalGuild : public GameObjectAIScript
    {
    public:
    PortalGuild(GameObject* goinstance) : GameObjectAIScript(goinstance) {}
    void OnActivate(Player * pPlayer)
    {
    if(pPlayer->GetGuildId() == 1)
    {
    pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
    }
    elseif (pPlayer->GetGuildId() == 2)
    {
    pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
    }
    else
    {
    pPlayer->BroadcastMessage("You or a guild member must donate for this function. Speak to a Admin if you wish to purchase");
    }
    }
    static GameObjectAIScript *Create(GameObject * GO) { returnnew PortalGuild(GO); }
    };
    GameObjectAIScript * create_go100005(GameObject * GO) { returnnew PortalGuild(GO); }
    void SetupPortalHandlers(ScriptMgr * mgr)
    {
    mgr->register_gameobject_script(100005, &PortalGuild::Create);
    }
    
    all you have to do is this to add another to it

    Code:
    elseif (pPlayer->GetGuildId() == 3)
    {
    pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
    }
    
    
    put it before the plain else and after
    Code:
    elseif (pPlayer->GetGuildId() == 2)
    {
    pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
    }
    
    
    you get the point ok well have fun with this guys

    Last edited by mager1794; 07-28-2008 at 03:20 AM.
    Lunar Gaming - Reaching For The Stars

    [C++ Release] Guild House Portal SCript
  2. #2
    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)
    nice contribution +rep


  3. #3
    Fan Boi's Avatar Member
    Reputation
    5
    Join Date
    Jul 2008
    Posts
    65
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice script =]

    Fan Boi

  4. #4
    Ballwinkle's Avatar Contributor Authenticator enabled
    Reputation
    124
    Join Date
    Mar 2007
    Posts
    662
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    dude seriously, stop using the ':' command its really annoiny reading code like that.
    NOTE TO YOU: this is not a 10 line contest.

  5. #5
    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)
    what are you talking about ballwinkle?
    Lunar Gaming - Reaching For The Stars

  6. #6
    Power of Illuminati's Avatar Contributor
    Reputation
    179
    Join Date
    May 2008
    Posts
    1,410
    Thanks G/R
    6/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everything is on one single line, this makes it very hard to read with your eye. He watns you to use some structure on your scripts (more lines) and maybe tabs where they should be.

    Something like this

    Code:
    class PortalGuild : public GameObjectAIScript { public: PortalGuild(GameObject* goinstance) : GameObjectAIScript(goinstance) {} 
    void OnActivate(Player * pPlayer) 
    { 
        if(pPlayer->GetGuildId() == 1) 
        { 
            pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584); } 
        elseif (pPlayer->GetGuildId() == 2) 
        { 
            pPlayer->SafeTeleport(0, 40, -11066.057617, 1536.178345, 43.228718, 2.098584);
        } 
        else 
        { 
            pPlayer->BroadcastMessage("You or a guild member must donate for this function. Speak to a Admin if you wish to purchase"); 
        } 
    } 
    
    static GameObjectAIScript *Create(GameObject * GO)
    { 
        returnnew PortalGuild(GO); 
    } 
    };
    
    GameObjectAIScript * create_go100005(GameObject * GO) 
    { 
        returnnew PortalGuild(GO); 
    }
     
    void SetupPortalHandlers(ScriptMgr * mgr) 
    { 
        mgr->register_gameobject_script(100005, &PortalGuild::Create); 
    }
    Last edited by Power of Illuminati; 07-28-2008 at 04:55 PM.

  7. #7
    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)
    its not my fault the scripts do that i copy them straight from VC++
    Last edited by mager1794; 07-28-2008 at 05:02 PM.
    Lunar Gaming - Reaching For The Stars

  8. #8
    BrantX's Avatar Contributor
    Reputation
    205
    Join Date
    Jul 2007
    Posts
    899
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    /flame
    /nag

    lol, Alright good release i like You should start working release these alot more :P +Rep



  9. #9
    TheSpidey's Avatar Elite User
    Reputation
    365
    Join Date
    Jan 2008
    Posts
    2,200
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should use switch for this, not if

  10. #10
    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)
    i dont know switch lol hey spidey can i get your MSN
    Lunar Gaming - Reaching For The Stars

Similar Threads

  1. [EPIC C++] GUILD HOUSING Script + SQL Query
    By tekkeryole in forum WoW EMU General Releases
    Replies: 14
    Last Post: 08-30-2009, 06:17 AM
  2. [Release] Guild Housing Item + SQL
    By scott07 in forum World of Warcraft Emulator Servers
    Replies: 38
    Last Post: 06-08-2008, 01:23 PM
  3. [Release] Guard Tower to Guild House B
    By Madara Uchiha in forum World of Warcraft Model Editing
    Replies: 7
    Last Post: 04-19-2008, 02:30 PM
  4. [Release] Guild House's Some What!
    By Gamkie in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 03-30-2008, 01:14 PM
  5. [Release] Complete Azeroth Portals (gm scripts)
    By knaur in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 11-22-2007, 08:10 AM
All times are GMT -5. The time now is 10:30 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