[Release] House System menu

Shout-Out

User Tag List

Page 9 of 10 FirstFirst ... 5678910 LastLast
Results 121 to 135 of 150
  1. #121
    costel_gabitu's Avatar Member
    Reputation
    44
    Join Date
    Jan 2008
    Posts
    359
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehhe. nice. +rep definetly

    P.S. Lawl at Cardell. U gotta love these leechers.

    [Release] House System
  2. #122
    Padawan5's Avatar Member
    Reputation
    1
    Join Date
    May 2009
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wish they had this on Retail, Or a Guild House...

  3. #123
    DeathRobert's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    12
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    all the people here mr link is using your script, because is very good, but with this error is a little problematic using it.

    plz repair it

  4. #124
    Cardell's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tbh.. i didnt even use mmowned till today.., thats a fact.

  5. #125
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well very nice btw u should really make an option where u can choose between some houses if u dont already haf it. still very good ^^ dont haf any private server so cant test ;/ well +rep anyway

    EDIT: Dunno why but cant giv ya rep... says i cant to that post.
    Last edited by Mitron; 05-05-2009 at 02:46 PM.

    ----------------------------------------------------------------

  6. #126
    Nadromar's Avatar Contributor
    CoreCoins Purchaser
    Reputation
    369
    Join Date
    Oct 2006
    Posts
    510
    Thanks G/R
    15/28
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isnt there a way to make people pay gold or something in order for them to get it, Also wouldnt this be doable an simpeler if it was scripted in lua?

  7. #127
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Released version 2 (v.2).

    Code:
    	Changelog:
    		Removed the annoying MySQL outgoing connection,
    		so now you don't have to edit the code to get this working.
    		Added a prize you can edit via Optional Config.
    		No warnings now.
    Why do I need a signature?

  8. #128
    bgmaniaka's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i can't understand where to put this:
    /*
    House System v.2

    Made by Link_S of MMOwned, him and only.

    Changelog:
    Removed the annoying MySQL outgoing connection,
    so now you don't have to edit the code to get this working.
    Added a prize you can edit via Optional Config.
    No warnings now.
    */

    #include "StdAfx.h"

    uint32 HOUSEPRIZE = 1064, HOUSETELEPORTPRIZE = 20; //Variables to store the prizes, Changeable via Optional Config

    class HouseNPC : public GossipScript
    {
    public:
    void GossipHello(Object * pObject, Player* plr, bool AutoSend)
    {
    GossipMenu *menu;
    objmgr.CreateGossipMenuForPlayer(&menu, pObject->GetGUID(), 1, plr);

    if(!plr->CombatStatus.IsInCombat())
    {
    //Merge the House prize with the menu options.
    char m_1[512], m_2[512];
    snprintf(m_1, 512, "Buy a house. %s g", HOUSEPRIZE);
    snprintf(m_2, 512, "Take me to my house %s g", HOUSETELEPORTPRIZE);
    //Add the options..
    menu->AddItem(1, m_1, 1);
    menu->AddItem(2, m_2, 2);
    }
    else
    plr->BroadcastMessage("I don't want to talk to you when you're in combat.");

    if(AutoSend)
    menu->SendTo(plr);
    };

    void GossipSelectOption(Object * pObject, Player* plr, uint32 id, uint32 intId, const char * code)
    {
    switch(intId)
    {
    case 1: //The player wants a house
    {
    QueryResult * res = CharacterDatabase.Query("SELECT * FROM houses WHERE ownerguid = %u", plr->GetGUID());
    if(res != NULL) //Appearantly the player alredy have a house.
    {
    plr->BroadcastMessage("You do alredy have a house.");
    plr->Gossip_Complete();
    return;
    }
    //Hmm, a House do also have a prize.
    uint32 player_money = plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    if(player_money < (HOUSEPRIZE * 10000))
    {
    plr->BroadcastMessage("You don't afford a house.");
    plr->Gossip_Complete();
    return;
    }
    //Remove the money.
    plr->SetUInt32Value(PLAYER_FIELD_COINAGE, (player_money - (HOUSEPRIZE * 10000)));
    //Give the house.
    CharacterDatabase.Execute("INSERT INTO houses VALUES(%u, 242.284, 0.74529, 1.75938, 59", plr->GetGUID());
    plr->BroadcastMessage("Congratulations, you just bought a house.");
    plr->Gossip_Complete();
    }break;

    case 2: //Teleport to your house
    {
    QueryResult * res = CharacterDatabase.Query("SELECT * FROM houses WHERE ownerguid = %u", plr->GetGUID());
    if(res == NULL)
    {
    plr->BroadcastMessage("Sorry, you don't have a house.");
    plr->Gossip_Complete();
    return;
    }
    if(res->GetRowCount() > 1)
    {
    Log.Error("HouseSystem", "Report this error to Link_S of MMOwned : received to many rows out of query.");
    plr->BroadcastMessage("Error occured. Operation aborted.");
    return;
    }
    //Now draw the money, so the player don't get pissed off when he loses money and don't get teleported.
    uint32 player_money = plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
    if(player_money < (HOUSEPRIZE * 10000))
    {
    plr->BroadcastMessage("You don't afford to teleport to your house.");
    plr->Gossip_Complete();
    return;
    }
    //Just some variables for teleportation, makes better structure.
    float x, y, z;
    uint32 mapid;
    Field * f = res->Fetch();
    x = f[1].GetFloat();
    y = f[2].GetFloat();
    z = f[3].GetFloat();
    mapid = f[4].GetUInt32();
    //Now teleport the player to their house.
    plr->EventTeleport(mapid, x, y, z);
    plr->Gossip_Complete();
    }break;
    }
    };

    void Destroy()
    {
    delete this;
    };
    };

    void SetupHouseNPC(ScriptMgr * mgr)
    {
    HOUSEPRIZE = (uint32)Config.OptionalConfig.GetIntDefault("HouseSystem", "HousePrize", 1064);
    HOUSETELEPORTPRIZE = (uint32)Config.OptionalConfig.GetIntDefault("HouseSystem", "HouseTeleportationPrize", 20);
    if((HOUSEPRIZE < 0) || (HOUSETELEPORTPRIZE < 0))
    {
    Log.Error("HouseSystem", "HousePrize and HouseTeleportationPrize in Optional Config can't be under 0.");
    return;
    }
    GossipScript * gs = (GossipScript*) new HouseNPC();
    mgr->register_gossip_script(160000, gs);
    };

  9. #129
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @bgmaniaka - Follow any compilation guide of C++ projects at these forums.

    @Nightfoxx - The tutorial is for the old script. It's changed so you can compile it normal way now. I'll go delete the old tutorial as fast as possible now.

    I've been pushing the update further for a long time now. But I've updated. Didn't took me more than some minutes to be honoust.
    Why do I need a signature?

  10. #130
    punxphobia's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    /*
        House System v.2
    
        Made by Link_S of MMOwned, him and only.
    
        Changelog:
            Removed the annoying MySQL outgoing connection,
            so now you don't have to edit the code to get this working.
            Added a prize you can edit via Optional Config.
            No warnings now.
    */
    
    #include "StdAfx.h"
    
    uint32 HOUSEPRIZE = 1064, HOUSETELEPORTPRIZE = 20; //Variables to store the prizes, Changeable via Optional Config
     
    class HouseNPC : public GossipScript
    {
    public:
        void GossipHello(Object * pObject, Player* plr, bool AutoSend)
        {
            GossipMenu *menu;
            objmgr.CreateGossipMenuForPlayer(&menu, pObject->GetGUID(), 1, plr);
    
            if(!plr->CombatStatus.IsInCombat())
            {
                //Merge the House prize with the menu options.
                char m_1[512], m_2[512];
                snprintf(m_1, 512, "Buy a house.        %s g", HOUSEPRIZE);
                snprintf(m_2, 512, "Take me to my house %s g", HOUSETELEPORTPRIZE);
                //Add the options..
                menu->AddItem(1, m_1, 1);
                menu->AddItem(2, m_2, 2);
            }
            else
                plr->BroadcastMessage("I don't want to talk to you when you're in combat.");
     
            if(AutoSend)
               menu->SendTo(plr);
        };
    
        void GossipSelectOption(Object * pObject, Player* plr, uint32 id, uint32 intId, const char * code)
        {
           switch(intId)
           {
           case 1: //The player wants a house
                {
                    QueryResult * res = CharacterDatabase.Query("SELECT * FROM houses WHERE ownerguid = %u", plr->GetGUID());
                    if(res != NULL) //Appearantly the player alredy have a house.
                    {
                        plr->BroadcastMessage("You do alredy have a house.");
                        plr->Gossip_Complete();
                        return;
                    }
                    //Hmm, a House do also have a prize.
                    uint32 player_money = plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
                    if(player_money < (HOUSEPRIZE * 10000))
                    {
                        plr->BroadcastMessage("You don't afford a house.");
                        plr->Gossip_Complete();
                        return;
                    }
                    //Remove the money.
                    plr->SetUInt32Value(PLAYER_FIELD_COINAGE, (player_money - (HOUSEPRIZE * 10000)));
                    //Give the house.
                    CharacterDatabase.Execute("INSERT INTO houses VALUES(%u, 242.284, 0.74529, 1.75938, 598)", plr->GetGUID());
                    plr->BroadcastMessage("Congratulations, you just bought a house.");
                    plr->Gossip_Complete();
                }break;
     
           case 2: //Teleport to your house
               {
                   QueryResult * res = CharacterDatabase.Query("SELECT * FROM houses WHERE ownerguid = %u", plr->GetGUID());
                   if(res == NULL)
                   {
                       plr->BroadcastMessage("Sorry, you don't have a house.");
                       plr->Gossip_Complete();
                       return;
                   }
                   if(res->GetRowCount() > 1)
                   {
                       Log.Error("HouseSystem", "Report this error to Link_S of MMOwned : received to many rows out of query.");
                       plr->BroadcastMessage("Error occured. Operation aborted.");
                       return;
                   }
                   //Now draw the money, so the player don't get pissed off when he loses money and don't get teleported.
                   uint32 player_money = plr->GetUInt32Value(PLAYER_FIELD_COINAGE);
                   if(player_money < (HOUSEPRIZE * 10000))
                   {
                       plr->BroadcastMessage("You don't afford to teleport to your house.");
                       plr->Gossip_Complete();
                       return;
                   }
                   //Just some variables for teleportation, makes better structure.
                   float x, y, z;
                   uint32 mapid;
                   Field * f = res->Fetch();
                   x = f[1].GetFloat();
                   y = f[2].GetFloat();
                   z = f[3].GetFloat();
                   mapid = f[4].GetUInt32();
                   //Now teleport the player to their house.
                   plr->EventTeleport(mapid, x, y, z);
                   plr->Gossip_Complete();
               }break;
           }
        };
     
        void Destroy()
        {
            delete this;
        };
    };
     
    void SetupHouseNPC(ScriptMgr * mgr)
    {
        HOUSEPRIZE = (uint32)Config.OptionalConfig.GetIntDefault("HouseSystem", "HousePrize", 1064);
        HOUSETELEPORTPRIZE = (uint32)Config.OptionalConfig.GetIntDefault("HouseSystem", "HouseTeleportationPrize", 20);
        if((HOUSEPRIZE < 0) || (HOUSETELEPORTPRIZE < 0))
        {
            Log.Error("HouseSystem", "HousePrize and HouseTeleportationPrize in Optional Config can't be under 0.");
            return;
        }
        GossipScript * gs = (GossipScript*) new HouseNPC();
        mgr->register_gossip_script(160000, gs);
    };
    Can someone tell me what should i do with this ?
    or can someone show me an Guide of how should i put this into server ?
    Last edited by punxphobia; 05-17-2009 at 10:14 AM.

  11. #131
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For everyone who seems to be confused with this. This is a C++ scripted document. You need to compile this into a Dll and place it in the script_bin folder. It is many compilation guides around here at MMOwned, just use the search button.
    Why do I need a signature?

  12. #132
    Enuf's Avatar Member
    Reputation
    4
    Join Date
    Mar 2007
    Posts
    39
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any pics or vids of this yet?

    Im thinking 'bout making a server... just for me and my mates to mess around on (like 30 of us) and i'd love to add this.. but want to see it in action first <3

  13. #133
    Exiled1120's Avatar Member
    Reputation
    12
    Join Date
    Jun 2008
    Posts
    175
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You say its instanced? So a group of 5 could have a 'house party' or possibly make it a raid and have 40 people for a guild meeting?
    My life is simple

    So Is Yours

    But together, They arn't

    Dont look too deeply into this or you will be lost forever.

  14. #134
    punxphobia's Avatar Member
    Reputation
    1
    Join Date
    Mar 2009
    Posts
    51
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Link_S View Post
    For everyone who seems to be confused with this. This is a C++ scripted document. You need to compile this into a Dll and place it in the script_bin folder. It is many compilation guides around here at MMOwned, just use the search button.
    Mate, i know how to do compile , but i don't know how to compile Scripts ...it's a difference... so can you please redirect me to a tutorial or smth like that ? You sayd you made an Guide ... Didn't find nothing similary to that...

  15. #135
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Enuf - Sorry but I have no picture, you could simply test this out at your server before considering adding it.

    @Exiled1120 - Yes that's possible. If everyone owns a house. It's able to convert this to Aspire and abuse their phasing and make it individual for each player, and make them able to invite other players to their house. But this was made for ArcEmu. If you'd like it I could make a special for Aspire also.

    @punxphobia - Please use the search button for once, you've just have to search for the keyword 'Compile script', or something like that. Then you'd be having a bounch of 'script' compilation guides in your face by this time.
    Why do I need a signature?

Page 9 of 10 FirstFirst ... 5678910 LastLast

Similar Threads

  1. Epic Core Mod - Trinity Core 2 Player / Guild - Housing System
    By tekkeryole in forum WoW EMU General Releases
    Replies: 1
    Last Post: 09-05-2009, 09:30 PM
  2. Lua Housing System help
    By Confucius in forum WoW EMU Questions & Requests
    Replies: 18
    Last Post: 07-24-2009, 07:47 AM
  3. Compile House System (With pics)
    By Link_S in forum WoW EMU Guides & Tutorials
    Replies: 26
    Last Post: 04-22-2009, 09:13 AM
  4. Arcemu House System
    By xnerdx in forum Programming
    Replies: 0
    Last Post: 03-21-2009, 12:33 PM
All times are GMT -5. The time now is 04:44 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