[Release] House System menu

User Tag List

Page 10 of 10 FirstFirst ... 678910
Results 136 to 150 of 150
  1. #136
    ZeratuelX's Avatar Member
    Reputation
    4
    Join Date
    Feb 2008
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, so I compiled it all and created the NPC. Unfortunately, when I talk to the NPC the server gets a Fatal Error. This is the crash log:

    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Server has crashed. Reason was:
    an Access Violation at 0x70A818A8
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    Anyone have a solution?
    Last edited by ZeratuelX; 05-22-2009 at 10:40 PM.

    [Release] House System
  2. #137
    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)
    I have totally no idea.. When I can compile ArcEmu on my machine < Linux/Ubuntu >, I'll see if I receive the same error. I can't do much about it at this time. I'm sorry. .

    I can guess though, test it on another machine and see if you're received the same error.
    Why do I need a signature?

  3. #138
    Four-Worlds's Avatar Member
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    41
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice work! This reminds me of the room system on phantasy star universe :P +Rep

  4. #139
    ZeratuelX's Avatar Member
    Reputation
    4
    Join Date
    Feb 2008
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Test compiling on another computer? Or try running the script from another computer?

  5. #140
    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)
    Running the script, when I receive this error on anything, a program or a script. I usually restart the instance of the process/restart the server, and it works again.
    Why do I need a signature?

  6. #141
    ZeratuelX's Avatar Member
    Reputation
    4
    Join Date
    Feb 2008
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, I've restarted it several times, it gets the same error. It's currently only set up on one server. What would be the best way to move and run it on another computer?

    Can someone please give me the steps on how they did theirs or point me to where I can find some? I fear I may have made a mistake or compiled it wrong.
    Last edited by ZeratuelX; 05-26-2009 at 04:36 PM.

  7. #142
    Iletsu's Avatar Member
    Reputation
    1
    Join Date
    Jan 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any pics? Sounds cool, tough.

  8. #143
    Bareno's Avatar Contributor
    Reputation
    195
    Join Date
    Sep 2006
    Posts
    477
    Thanks G/R
    5/11
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Iletsu View Post
    any pics? Sounds cool, tough.
    Truth ^^

    *filler*

  9. #144
    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)
    Sorry, I can't upload. But I can struggle some to get the pictures?
    Why do I need a signature?

  10. #145
    lyonar96's Avatar Sergeant
    Reputation
    5
    Join Date
    Aug 2010
    Posts
    36
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looks epic

  11. #146
    TehUberkitten's Avatar Corporal
    Reputation
    2
    Join Date
    Feb 2010
    Posts
    33
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What're we supposed to do with all this code? :S Put it into a .txt and convert it ourselves? Or is there supposed to be a download link?

    I know
    Code:
    <HouseSystem
                              HousePrize="1064"       #In gold.
                              HouseTeleportationPrize="20">  #In gold.
    goes in Optional,
    Code:
    --
    -- Table structure for table `houses`
    --
     
    DROP TABLE IF EXISTS `houses`;
    CREATE TABLE IF NOT EXISTS `houses` (
      `ownerguid` int(6) unsigned NOT NULL DEFAULT '0',
      `posX` float NOT NULL DEFAULT '0',
      `posY` float NOT NULL DEFAULT '0',
      `posZ` float NOT NULL DEFAULT '0',
      `mapId` int(10) unsigned NOT NULL DEFAULT '0',
      PRIMARY KEY (`ownerguid`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='House System structure' AUTO_INCREMENT=944 ;
    Code:
    --HOUSE PART
     
    INSERT INTO creature_spawns
    VALUES
       (6152980, 7733, 598, 263.153, 0.0362612, 1.23726, 3.10861, 0, 7346, 474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
     
    INSERT INTO creature_spawns
    VALUES
       (6152981, 2456, 598, 274.185, -2.88463, 1.91083, 2.83921, 0, 1436, 814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
     
    INSERT INTO recall
    VALUES
       (836, 'house', 598, 242.284, 0.74529, 1.75938);
     
    INSERT INTO creature_names
    VALUES
       (160000, 'Guild House NPC', 'Handles guild houses', '', 0, 0, 0, 4, 0, 0, 24905, 24905, 0, 0, 1, 1, 1, 0);
     
    INSERT INTO creature_proto
    VALUES
       (160000, 80, 80, 35, 1000, 1000, 1000, 1, 1, 150, 0, 5000, 6000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360000, 1500, 0, 0, 0, 0, 0, 0, 1, 1, '0', 0, 0, 0, 0, 2.5, 8, 14, 0, 0, 0, 0, 0, 0, 0);
    go into SQL and
    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);
    };
    should be a LUA file? Need more info. please!

  12. #147
    thebigman's Avatar Contributor Reliable Trader
    CoreCoins Purchaser
    Reputation
    89
    Join Date
    Dec 2008
    Posts
    605
    Thanks G/R
    2/0
    Trade Feedback
    26 (96%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this was made january 2009, now quit necroposting you dumbass.

    also thats C++, not lua

  13. #148
    TehUberkitten's Avatar Corporal
    Reputation
    2
    Join Date
    Feb 2010
    Posts
    33
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okie, ty!

    No need for the mean words btw...
    Also, your no 'bigman'...
    ...Unless you mean big as in large
    ...

  14. #149
    weezyC's Avatar Sergeant Major
    Reputation
    33
    Join Date
    Mar 2010
    Posts
    154
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very nice, I think i might add this to my repack! :]

  15. #150
    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)
    Does this thing even work anymore? It's over a year old..

    Please quit necro posting. Thank you..
    Why do I need a signature?

Page 10 of 10 FirstFirst ... 678910

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 11:27 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