Market Ticket 99%

Results 1 to 23 of 23
  1. #1
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Market Ticket 99%

    Hello,

    Today I propose a new feature to your emulator, this is the ticket market place ..

    A small screenshot:
    397714moreannonce.png - HostingPics.net - H�bergement d'images gratuit

    A Video :

    http://www.youtube.com/watch?v=E-LBdjMu-jU

    Well enough talking up the coding yeah aaaaaaaaa

    Code:
    In PHPMYADMIN add :
    
    ALTER TABLE `users` ADD `ticket_market` INT( 2 ) NOT NULL DEFAULT '0'
    Code:
    In /Requests/Catalog.cs
    
    Search  :
    
    
    Code:
    private void CheckPetName()
            {
                Session.GetMessageHandler().GetResponse().Init(36);
                Session.GetMessageHandler().GetResponse().AppendInt32(UberEnvironment.GetGame().GetCatalog().CheckPetName(Request.PopFixedString()) ? 0 : 2);
                Session.GetMessageHandler().SendResponse();
            }
    Add After :
    Code:
    public void PurchaseTicketMarket()
            {
                Boolean CreditsError = false;
    
                if (Session.GetHabbo().Credits < 1)
                {
                    CreditsError = true;
                }
    
                if (CreditsError)
                {
                    Session.GetMessageHandler().GetResponse().Init(68);
                    Session.GetMessageHandler().GetResponse().AppendBoolean(CreditsError);
                    Session.GetMessageHandler().SendResponse();
    
                    return;
                }
                else
                {
                    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                    {
                        dbClient.ExecuteQuery("UPDATE users set ticket_market = '5' WHERE id = '" + Session.GetHabbo().Id + "'");
                        dbClient.ExecuteQuery("UPDATE users set credits = credits -1 WHERE id = '" + Session.GetHabbo().Id + "'");
                    }
                    Session.GetHabbo().Credits -= 1;
                    Session.GetHabbo().UpdateCreditsBalance(true);
                    GetResponse().Init(611);
                    GetResponse().AppendBoolean(true);
                    GetResponse().AppendInt32(99999);
                    SendResponse();
                }
            }
    Search :
    Code:
    RequestHandlers[42] = new RequestHandler(CheckPetName);
    Add After :
    Code:
    RequestHandlers[3013] = new RequestHandler(PurchaseTicketMarket);
    Search :
    Code:
    private void MarketplaceCanSell()
            {
    add just after :
    Code:
    #region TicketCheck // in development
                DataTable GetTicket = null;
                using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                {
                    GetTicket = dbClient.ReadDataTable("SELECT ticket_market FROM users WHERE id = '" + Session.GetHabbo().Id +"'");                
                }
                foreach (DataRow Row in GetTicket.Rows)
                {
                    if ((int)Row["ticket_market"] < 1)
                    {
                        Session.GetMessageHandler().GetResponse().Init(611);                    
                        Session.GetMessageHandler().GetResponse().AppendString("PAH");
                        Session.GetMessageHandler().SendResponse();
    
                        return;
                    }
                }
                #endregion
    And finally, In MarketPlace.cs Search :
    Code:
    public void SellItem(GameClient Session, uint ItemId, int SellingPrice) //Todo : Add fonction pay to sellitem
            {
    After :
    Code:
    using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                {
                    dbClient.AddParamWithValue("public_name", Item.GetBaseItem().PublicName);
                    dbClient.AddParamWithValue("extra_data", Item.ExtraData);
                    dbClient.ExecuteQuery("INSERT INTO catalog_marketplace_offers (item_id,user_id,asking_price,total_price,public_name,sprite_id,item_type,timestamp,extra_data) VALUES ('" + Item.BaseItem + "','" + Session.GetHabbo().Id + "','" + SellingPrice + "','" + TotalPrice + "',@public_name,'" + Item.GetBaseItem().SpriteId + "','" + ItemType + "','" + UberEnvironment.GetUnixTimestamp() + "',@extra_data)");
    Add :
    Code:
    dbClient.ExecuteQuery("UPDATE users set ticket_market = ticket_market -1 WHERE id = '" + Session.GetHabbo().Id + "'");
    Last edited by anthony93260; 28-02-11 at 07:34 AM.


  2. #2
    Account Upgraded | Title Enabled! FlyCoder is offline
    MemberRank
    Jan 2011 Join Date
    United KingdomLocation
    469Posts

    Re: Market Ticket 99%

    Explain more about what it so more people know what feesback to give, apart from that nice job! ;)
    Posted via Mobile Device

  3. #3
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Re: Market Ticket 99%

    Yeah, I'm doing a video;)

  4. #4
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Market Ticket 99%

    What this code is:

    You know on habbo when you pay like 1c to add shit to the marketplace and you get like 5 items to add. well this is what it is? I think xD

    Good job!

    (PS: Anthony, can you tell us how you add the credits and pixels at the top of the client xD)

  5. #5
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Re: Market Ticket 99%

    Quote Originally Posted by iPixelHotel View Post
    What this code is:

    You know on habbo when you pay like 1c to add shit to the marketplace and you get like 5 items to add. well this is what it is? I think xD

    Good job!
    yes it is exactly that!

    Quote Originally Posted by iPixelHotel View Post
    (PS: Anthony, can you tell us how you add the credits and pixels at the top of the client xD)
    Hum add : purse.widget.enabled=1 in your external_variables

  6. #6
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Market Ticket 99%

    It does not work? Nothing happened when I add : purse.widget.enabled=1 to my vars ;o




    Do I need the latest SWF ;o?



    Ohhhh, also, Anthony, you are a good coder. You should release your emulator xD

  7. #7
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Re: Market Ticket 99%

    Quote Originally Posted by iPixelHotel View Post
    It does not work? Nothing happened when I add : purse.widget.enabled=1 to my vars ;o




    Do I need the latest SWF ;o?


    Yes, they are available here: http://dcr-project.bifi2000.net/p/cswf

    Note: also think about clearing your cache.

    Quote Originally Posted by iPixelHotel View Post
    Quote Originally Posted by iPixelHotel View Post
    Ohhhh, also, Anthony, you are a good coder. You should release your emulator xD
    "My" emulator is not very stable it may very well go up to 350 connected as freezer at 100 Connected ...
    Last edited by anthony93260; 28-02-11 at 10:58 AM.

  8. #8
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Market Ticket 99%

    Ohk, Thanks anyway :)

    And is RELEASE63-31759-31745-201102232307 the latest?

    ---------- Post added at 09:18 PM ---------- Previous post was at 09:17 PM ----------

    I already got the latest SWF, and the credit n pixel thing still don't show. Any help on that O.o?

  9. #9
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Re: Market Ticket 99%

    you have clear your cache ?

  10. #10
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Market Ticket 99%

    yes, I have. I have done that several times, and I have rebooted my PC 2 times.. :O

    ---------- Post added at 09:42 PM ---------- Previous post was at 09:39 PM ----------

    Also, my emulator is good, i coded pets 90% (not including the eating etc...)

  11. #11
    Member Im Legend is offline
    MemberRank
    Mar 2009 Join Date
    93Posts

    Re: Market Ticket 99%

    Epic sir! But why 99%? Whats not completed?

  12. #12
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Market Ticket 99%

    ^. you can never be too sure if a code is working 100%

  13. #13
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Re: Market Ticket 99%

    Quote Originally Posted by iPixelHotel View Post
    yes, I have. I have done that several times, and I have rebooted my PC 2 times.. :O

    ---------- Post added at 09:42 PM ---------- Previous post was at 09:39 PM ----------

    Also, my emulator is good, i coded pets 90% (not including the eating etc...)
    surprising ... I'll think of where this might come and I'll let you know

    Quote Originally Posted by Im Legend View Post
    Epic sir! But why 99%? Whats not completed?
    the perfect does not exist;)

  14. #14
    Enthusiast Kouille is offline
    MemberRank
    Jun 2010 Join Date
    37Posts

    Re: Market Ticket 99%

    thanks, you're french ?

  15. #15
    C# | C++ Emerica is offline
    MemberRank
    Oct 2010 Join Date
    GermanyLocation
    437Posts

    Re: Market Ticket 99%

    Nice release

  16. #16
    Apprentice Kamiil is offline
    MemberRank
    Sep 2009 Join Date
    21Posts

    Re: Market Ticket 99%

    Quote Originally Posted by Kouille View Post
    thanks, you're french ?
    Yes, but I'm not sure.

  17. #17
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Re: Market Ticket 99%

    Quote Originally Posted by Kouille View Post
    thanks, you're french ?
    Yes ^^

  18. #18
    Account Upgraded | Title Enabled! simoneihg is offline
    MemberRank
    Dec 2010 Join Date
    PalermoLocation
    243Posts

    Re: Market Ticket 99%

    You can't put the fix of marketplace?

  19. #19
    sexiess is a sin. Subway is offline
    MemberRank
    Jun 2010 Join Date
    2,491Posts

    Re: Market Ticket 99%

    this is nice Anthony keep em' comin' :')

  20. #20
    ◝(⁰▿⁰)◜Smile◝ (⁰▿⁰)◜ Taiga is offline
    DeveloperRank
    May 2007 Join Date
    InternetLocation
    2,464Posts

    Re: Market Ticket 99%

    Looks Sweet ;)

  21. #21
    Account Upgraded | Title Enabled! MikeDavies is offline
    MemberRank
    Aug 2010 Join Date
    WalesLocation
    629Posts

    Re: Market Ticket 99%

    Umm can u release the packets or code for the new "Text Above Username" instead of the Blue Arrow?

  22. #22
    Valued Member anthony93260 is offline
    MemberRank
    Dec 2009 Join Date
    ParisLocation
    133Posts

    Re: Market Ticket 99%

    avatar.widget.enabled=1

  23. #23
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Market Ticket 99%

    Thanks anthony! :D You are such a great help, can you send your MSN VIA PM? :)



Advertisement