NewbiePresent Fully Coded

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Account Upgraded | Title Enabled! wichard is offline
    MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    649Posts

    NewbiePresent Fully Coded

    Wha Do you need?
    - Items table of Matty's Edit (IMPORTANT) (i dont use but i edited to it)
    - ItemIdGenerator Of Matty's Edit (i dont use but i edited to it)
    - A bit know about C#
    - A bit know about MySql

    Do u have these requestments?
    Continue else return

    SQL Newbie Present

    1.
    Code:
    Add interationtype: 'box'
    2.
    Code:
    INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `type`, `width`, `length`, `stack_height`, `can_stack`, `can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`, `allow_inventory_stack`, `interaction_type`, `interaction_modes_count`, `vending_ids`, `foot_figure`) VALUES
    ([ITEMID], 'newbie_present', 'newbie_present', 's', 1, 1, 1, '1', '0', '0', 3885, '1', '1', '1', '1', '1', 'box', 1, '0', 0);
    3.
    Code:
    INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `cost_pixels`, `amount`) VALUES
    ([CHOOSE CATAID], [PAGEID], '[ITEMID]', 'newbie_present', 25, 0, 1);
    C# Code =)

    1.
    Code:
    Open UberEmu -> Messages -> Requests -> Rooms.cs
    2.
    Search for:
    Code:
    public void RegisterRooms()
    Bevore this void Add:
    Code:
            public void NewbiePresent()
            {
                uint ItemId = Request.PopWiredUInt();
                string PetName = Request.PopFixedString();
    
                Room Room = Session.GetHabbo().CurrentRoom;
    
                if (Room == null) return;
    
                RoomItem Box = Room.GetItem(ItemId);
    
                int X = Box.X;
                int Y = Box.Y;
    
                uint NewItemId = UberEnvironment.GetGame().GetCatalog().GenerateItemId();
                uint BaseItem = 317;
    
                Pet Pet = UberEnvironment.GetGame().GetCatalog().CreatePet(Session.GetHabbo().Id, PetName, 0, "0", "FFFFFF");
    
                using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                {
                    dbClient.AddParamWithValue("boxid", ItemId);
                    dbClient.ExecuteQuery("DELETE FROM items WHERE id = @boxid");
    
                    dbClient.AddParamWithValue("id", Pet.PetId);
                    dbClient.AddParamWithValue("roomid", Room.RoomId);
                    dbClient.ExecuteQuery("UPDATE user_pets SET room_id = @roomid WHERE id = @id");
                }
    
                Room.RemoveFurniture(Session, ItemId);
    
                RoomItem RoomItem = new RoomItem(NewItemId, Room.RoomId, BaseItem, "0", X, Y, 0, 0, ""); //lame
    
                Room.SetFloorItem(Session, RoomItem, RoomItem.X, RoomItem.Y, RoomItem.Rot, true);
    
                RoomUser PetBot = Room.DeployBot(new RoomBot(Pet.PetId, Room.RoomId, "pet", "stand", Pet.Name, "", Pet.Look, X, Y, (int)Pet.Z, 0, 0, 0, 0, 0), Pet);
                PetBot.Chat(Session, "*Thanks!*", true);
    
                GetResponse().Init(826); //
                SendResponse();
            }
    3.
    Search for:
    Code:
                RequestHandlers[391] = new RequestHandler(OpenFlat);
    Bevore this Add:
    Code:
                RequestHandlers[3006] = new RequestHandler(NewbiePresent);
    4.
    Code:
    Open UberEmu -> HabboHotel -> Items -> FurniInteractor.cs
    5.
    Search for:
    Code:
        class InteractorStatic : FurniInteractor
    After that class add this class:

    Code:
        class InteractorNewbiePresent : FurniInteractor
        {
            public override void OnPlace(GameClient Session, RoomItem Item)
            {
                Item.ExtraData = "1";          
            }
    
            public override void OnRemove(GameClient Session, RoomItem Item)
            {
                // <3
            }
    
            public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
            {
                if (Session == null)
                    return;
    
                // Get User Room
                Room Room = Session.GetHabbo().CurrentRoom;
                RoomUser User = Room.GetRoomUserByHabbo(Session.GetHabbo().Id);
    
                // Checks the state of the room & item, else you can get bugs
                if (Room == null || Item == null || User == null)
                {
                    return;
                }
    
                ServerMessage Message = new ServerMessage(825);
                Message.AppendUInt(Item.Id);
                Message.AppendInt32(0); // pettype
                Message.AppendStringWithBreak(""); // name (empty)
                Session.SendMessage(Message);
            }
        }
    6.
    Code:
    Open UberEmu -> HabboHotel -> Items -> RoomItem.cs
    7.
    Search for:
    Code:
                        case "teleport":
    
                            return new InteractorTeleport();
    Bevore it add:

    Code:
                        case "box":
    
                            return new InteractorNewbiePresent();
    Thats it =)

    Dont forget to push the Thanks Button!
    Last edited by wichard; 08-04-11 at 03:06 PM.


  2. #2
    Banned PEjump2 is offline
    BannedRank
    Jan 2010 Join Date
    The NetherlandsLocation
    2,838Posts

    Re: NewbiePresent Fully Coded

    Nice release, but it needs a check if the user was already given a newbie present, cuz else scripters could send that Packet and it would spam the hotel database etc..
    Last edited by PEjump2; 08-04-11 at 01:06 PM.

  3. #3
    Account Upgraded | Title Enabled! wichard is offline
    MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    649Posts

    Re: NewbiePresent Fully Coded

    Yea pejump, and we have to give the NewbieBox while user is logging in =)

    But, this is a pre-code =)

    Im still busy with it.

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

    Re: NewbiePresent Fully Coded

    Nice, thanks !

  5. #5
    Enthusiast Rocksmurf is offline
    MemberRank
    Jan 2011 Join Date
    28Posts

    Re: NewbiePresent Fully Coded

    The type or namespace name roombot could not be fount
    Uber.HabboHotel.Rooms.Room.Id is inaccesible due its protection level ( 2 Times)

    I saw these errors?
    http://www.plaatjesupload.nl/bekijk/...251727-440.png
    Last edited by Rocksmurf; 08-04-11 at 03:04 PM.

  6. #6
    Account Upgraded | Title Enabled! wichard is offline
    MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    649Posts

    Re: NewbiePresent Fully Coded

    Fixed =)

  7. #7
    Enthusiast Rocksmurf is offline
    MemberRank
    Jan 2011 Join Date
    28Posts

    Re: NewbiePresent Fully Coded

    i saw 1 error
    The Type or namespace RoomBot could not be found...

  8. #8
    HTML,CSS and a bit C# Richardjuhh is offline
    MemberRank
    Dec 2010 Join Date
    NetherlandsLocation
    351Posts

    Re: NewbiePresent Fully Coded

    Nice!

  9. #9
    Member scription is offline
    MemberRank
    Jun 2010 Join Date
    66Posts

    Re: NewbiePresent Fully Coded

    Search:
    using Uber.HabboHotel.Pets;

    Under it add:

    using Uber.HabboHotel.RoomBots;

  10. #10
    Proficient Member klaudio007 is offline
    MemberRank
    Dec 2007 Join Date
    ChileLocation
    190Posts

    Re: NewbiePresent Fully Coded

    Quote Originally Posted by Rocksmurf View Post
    i saw 1 error
    The Type or namespace RoomBot could not be found...
    Change:
    Code:
    new RoomBot
    For:
    Code:
    new HabboHotel.RoomBots.RoomBot

  11. #11
    Member Elienay is offline
    MemberRank
    Dec 2008 Join Date
    78Posts

    Re: NewbiePresent Fully Coded

    it doesn't work here

  12. #12
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: NewbiePresent Fully Coded

    Keep spamming ragezone with great release's ^^..

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

    Re: NewbiePresent Fully Coded

    lol Zak, nice man..

  14. #14
    Alpha Member Zak© is offline
    MemberRank
    Oct 2007 Join Date
    2,693Posts

    Re: NewbiePresent Fully Coded

    Datarow dRow;
    string prezzie;
    if(prezzie = "1") // String the so the Prezzie is there no Spamming
    {
    dRow to Check if its 1
    }
    drow its 0 /
    SendNotif whatever it is Sorry Wait till they Open there Prezzie
    Append
    Append.Clear

    just showing yeh an example

    what ever lol.

    Posted Via Quick C# Reply

  15. #15
    Account Upgraded | Title Enabled! wichard is offline
    MemberRank
    Jul 2009 Join Date
    The NetherlandsLocation
    649Posts

    Re: NewbiePresent Fully Coded

    Just give them the item at login
    no tradable

    and give the users an new row =)



Page 1 of 2 12 LastLast

Advertisement