Icarus (Production) - Java Server [MySQL, Netty]

Page 19 of 20 FirstFirst ... 911121314151617181920 LastLast
Results 271 to 285 of 296
  1. #271
    Hardcore Member cabeludo007 is offline
    MemberRank
    Nov 2013 Join Date
    My HouseLocation
    138Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]


    RaGEZONE Recommends

    RaGEZONE Recommends

    Quote Originally Posted by The General View Post
    You should look into the Habbo scripts and then you'll realize you've got over abstraction. There are only 7 types of extradata.

    And that DimmerRoomItem constructor.

    EDIT: I see you've split the inventory items and the room items. Seems like a really solid plan to strain your database and keeping everything synchronized properly will be a bitch.
    I always look the habbo script, i know that, i wasn't talking about the server-client communication, but the server-db and db-server communication lmao... i don't know why but, thanks for the tip <3

    about the dimmer constructor...
    Every special furni, with special functions, have their own class to handle the extradata and the item itself into the room
    Screenshot by Lightshot

    about the edit, i don't know if that was a insult or a compliment but, thanks, i think...

    OnTopic:
    Nice progress with rollers! how did u make their cycle?
    Don't Wanna Short Dick Men


  2. #272
    https://zaphotel.net/ Jonteh is offline
    GammaRank
    Apr 2007 Join Date
    New ZealandLocation
    3,371Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Quote Originally Posted by The General View Post
    Err butterfly had it iirc but people ended up fucking over the source and hardcoding a strings.
    You're correct, Butterfly did have locale. It made sense for it to because more than 1 hotel with different languages used it.

    For one hotel to build their own copy of Butterfly like I have done with Fresh, it didn't make a lot of sense for us to use the locale anymore as the strings would never, ever need to be changed.
    Jonteh
    Habbo Retro Developer

    HabboFiles | Zap Hotel

  3. #273
    Member Amariconao is offline
    MemberRank
    Nov 2011 Join Date
    62Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Hi quackster! How you goes with this? Your source can help me with my GopheR Server! (A server written in go). Hope you finish this project bro! Gl!

  4. #274
    Member lai0n is offline
    MemberRank
    Jul 2015 Join Date
    ~/LibraryLocation
    68Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    One observation: BoneCP is "deprecated"

    "As author of BoneCP (the connection pool that I think is in use in Stash) I'd like to point out that the project is considered deprecated at this point.
    May I suggest you migrate to HikariCP instead, which is faster and more stable: https://github.com/brettwooldridge/HikariCP"
    https://jira.atlassian.com/browse/BSERV-5402

  5. #275
    Hackerman Quackster is online now
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,086Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Well I'm back to start working on this project again. I started work on Habbo club subscription, it's purchasable, expirable, calculates correct days and all that jazz, just gotta do the monthly (?) gifts.

    I also started work on teleporters, right now they only work with teleporters in the same room, not across rooms, but that will be fixed...
    Latest cracked SWF releases: swfhub.com
    Also includes header dumps for easy header updating, and various other game files.

  6. #276
    Hackerman Quackster is online now
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,086Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Teleporters are now working. I still have many features to go, but the core fundamental parts of what makes it a hotel is done.

    Latest cracked SWF releases: swfhub.com
    Also includes header dumps for easy header updating, and various other game files.

  7. #277
    Member Amariconao is offline
    MemberRank
    Nov 2011 Join Date
    62Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Nice to see you again alex! Have you update your github?

  8. #278
    Veteran Glaceon is online now
    SubscriberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,201Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Looking great. Cannot wait to see more updates.
    https://aurora-dev.com/ - https://worldofmrjosh.com

    No matter how much you fall down, you can always reach your destination by standing up again.

  9. #279
    Hackerman Quackster is online now
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,086Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    I'm sure there is an easy explanation, but can someone help me fix the issue where if I click promote room it takes me to the front page of the catalogue? I'm not really sure how to make it show the intended panel/page.

    Latest cracked SWF releases: swfhub.com
    Also includes header dumps for easy header updating, and various other game files.

  10. #280
    Veteran Glaceon is online now
    SubscriberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,201Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Quote Originally Posted by Quackster View Post
    I'm sure there is an easy explanation, but can someone help me fix the issue where if I click promote room it takes me to the front page of the catalogue? I'm not really sure how to make it show the intended panel/page.

    Your page needs to have a specific 'external' link/index name, like, the string above/below the page display title in the packet. It tries to open a page with a specific index name. There is where you buy the room promotion.

    I don't know the index name but I think you can easily find it searching on anything with promotion stuff. Gluck.
    https://aurora-dev.com/ - https://worldofmrjosh.com

    No matter how much you fall down, you can always reach your destination by standing up again.

  11. #281
    Hackerman Quackster is online now
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,086Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Quote Originally Posted by Glaceon View Post
    Your page needs to have a specific 'external' link/index name, like, the string above/below the page display title in the packet. It tries to open a page with a specific index name. There is where you buy the room promotion.

    I don't know the index name but I think you can easily find it searching on anything with promotion stuff. Gluck.
    Thank you Leon saw my post helped me last night by saying the same thing, but I shortly went to bed without saying I fixed it -- was tired. I appreciate your help nonetheless.

    I don't know if you can tell, but I'm working on room promotions.
    Latest cracked SWF releases: swfhub.com
    Also includes header dumps for easy header updating, and various other game files.

  12. #282
    Veteran Glaceon is online now
    SubscriberRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,201Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Quote Originally Posted by Quackster View Post
    Thank you Leon saw my post helped me last night by saying the same thing, but I shortly went to bed without saying I fixed it -- was tired. I appreciate your help nonetheless.

    I don't know if you can tell, but I'm working on room promotions.
    No worries, glad it's fixed :)
    https://aurora-dev.com/ - https://worldofmrjosh.com

    No matter how much you fall down, you can always reach your destination by standing up again.

  13. #283
    Hackerman Quackster is online now
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,086Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    Changelog

    Fixes
    • Fixed bug where user could walk about of teleporter while it was teleporting.
    • Fixed bug where it wasn't possible to teleport into a locked, or password protected room if the owner of that room was offline (weird bug I know).
    • Fixed bug where if multiple purchases of HC was performed, they wouldn't stack.
    • Fixed room deletion where the user who deletes their own room now has all their items saved back into their inventory.
    • Fixed bug where if an item was picked up or removed underneath the player which raises the players height, the player would be considered floating. Now the player's height adjusts to the next item down when the item has been removed/picked up.


    Additions
    • Added permission system, along with the ability for permissions to be inherited.
    • Added feature to save custom room floor plans.
    • Added Lua integration which is now a plugin management system with event handling


    Lua Plugin System

    So with the Lua plugin system it's possible to change the functionality of the server without requiring any extensive Java knowledge, or without the need to download a Java IDE for the ability to create the plugin .jar files.

    What is required is a Notepad program, which is what is used to write these plugins, and the methods/class names within Icarus too.

    I've written an example called "BotPlugin" which will load 200 bots into a single room. Here is how it's handled, first with bot_plugin.lua

    These method names have been inspired by Bukkit plugins for Minecraft I used to write. When the server first starts up, the "onEnable" is called if the plugin wishes to perform anything while the server loads.

    And then it loads all the .lua files that have their paths stored in an array.

    Code:
    plugin_details = {
    	name = "BotPlugin",
    	author = "Quackster",
    	path = "plugins/BotPlugin"
    }
    
    event_register = {
    	"ROOM_ENTER_EVENT"
    }
    
    event_files = {
    	"room_events.lua"
    }
    
    --[[
    	Called when the plugin first starts up, so the plugin can load data if needed
    	so when the event is called the plugin is ready
    	
    	param: plugin instance
    	return: none
    --]]
    function onEnable(plugin)
    	
    	-- If you want, use log.println() to show everyone this method being called
    	log:println(string.format('[Lua] Initialising plugin %s by %s', plugin:getName(), plugin:getAuthor()))
    	
    end
    
    -- Load all event .lua files
    -- If you delete this code, ABSOLUTELY NO events will work
    
    for i, file in ipairs(event_files) do
    	dofile (string.format('%s/events/%s', plugin_details.path, file))
    end
    Here is the room event handler (room_events.lua):

    Code:
    --[[
    	Room enter event called when the user has entered a room
    	Called when a user has truly entered the room
    	
    	param: 
    			Player 	- person who entered room
    			Room 	- the room they entered
    			
    	return: Boolean - event cancelled state
    --]]
    function onRoomEnterEvent(player, room)
    	log:println("Room enter event called")
    
    	for i = 0, 200 - 1 do
    		local bot = createBot(room)
    		randomWalkEntity(bot)
    	end
    	
    	return false
    end
    
    function createBot(room) 
    
    	local bot = luajava.newInstance("org.alexdev.icarus.game.bot.Bot");
    	bot:getDetails():setName("RandomAlexBot")
    	bot:getDetails():setMotto("")
    	
    	room:addEntity(bot)
    
    	return bot
    end
    
    function randomWalkEntity(entity)
    	
    	local randomX = math.random(0, 25)
    	local randomY = math.random(0, 25)
    	
    	entity:getRoomUser():walkTo(randomX, randomY)
    	plugin:runTaskLater(1, randomWalkEntity, { entity })
    	
    end
    This will send a repeat call to randomWalkEntity(entity) every 1 second using the command I wrote called plugin:runTaskLater which will call a Lua function in a specified amount of seconds, along with using the function name and the array of parameters supplied.

    I will be writing documentation on the plugin system in the future, for now I have created these events. Documentation is required for these events to know what parameters all of them require.

    Player events
    • PLAYER_LOGIN_EVENT("onPlayerLoginEvent")
    • PLAYER_DISCONNECT_EVENT("onPlayerDisconnectEvent")


    Console messenger events
    • MESSENGER_TALK_EVENT("onMessengerTalkEvent")


    Room events
    • ROOM_REQUEST_ENTER_EVENT("onRoomRequestEvent")
    • ROOM_ENTER_EVENT("onRoomEnterEvent")
    • ROOM_LEAVE_EVENT("onRoomLeaveEvent")
    • ROOM_PLAYER_CHAT_EVENT("onPlayerChatEvent")
    • ROOM_PLAYER_SHOUT_EVENT("onPlayerShoutEvent")
    • ROOM_WALK_REQUEST_EVENT("onPlayerWalkRequestEvent")
    • ROOM_STOP_WALKING_EVENT("onPlayerStopWalkingEvent")


    Item events
    • PLACE_FLOOR_ITEM_EVENT("onPlaceFloorItemEvent")
    • PLACE_WALL_ITEM_EVENT("onPlaceFloorItemEvent")
    • FLOOR_ITEM_INTERACT_EVENT("onInteractFloorItemEvent")
    • WALL_ITEM_INTERACT_EVENT("onInteractWallItemEvent")
    Latest cracked SWF releases: swfhub.com
    Also includes header dumps for easy header updating, and various other game files.

  14. #284
    Hackerman Quackster is online now
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,086Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    As a proof of concept, I wrote the entire RCON/MUS server in Lua. It will probably need to be rewritten to handle things such as listening on a certain IP address/whitelist IP addresses but apart from that, it works



    https://github.com/TheAmazingAussie/...on_handler.lua

    Code:
    --[[
        The server socket handler for incoming RCON/MUS connections
        
        @author: Quackster
    --]]
    function listenServer() 
    
        local server_socket = nil
    
        log:println(string.format("[Rcon] Attempting to create RCON server on port %s", rcon_port))
        server_socket = luajava.newInstance("java.net.ServerSocket", rcon_port);
        
        log:println(string.format("[Rcon] RCON server listening on port %s", rcon_port))
        log:println()
        
        plugin:runTaskAsynchronously(waitForConnections, { server_socket })
    end
    
    --[[
        The function where the socket waits for incoming socket connections
        and listens for data.
        
        @author: Quackster
    --]]
    function waitForConnections(server_socket)
    
        while (plugin:isClosed() == false) do
            
            local socket = server_socket:accept()
            log:println(string.format("Accepted connection from %s", socket:toString()))
    
            local incoming_data = util:readToEnd(socket)
            handleRconCommands(incoming_data)
            
            socket:close()
        end
    end
    
    --[[
        RCON command handler where it's possible to remote control
        the server.
        
        @author: Quackster
    --]]
    function handleRconCommands(incoming_data) 
    
        local rcon_data = util:split(incoming_data, ";")
        
        local password = rcon_data:get(0)
        local command = rcon_data:get(1)
        
        -- Do not continue if the password is incorrect.
        if password ~= rcon_password then
            do return end
        end
        
        -- Find function in global namespace and call it.
        _G[command_handlers[command]](rcon_data)
    end
    Code:
    command_handlers = {
        ["ha"] = "cmdHotelAlert"
    }
    
    --[[
        This is to send hotel alerts remotely.
        
           @parameters: 
            rcon_data - split by ';' delimeter
    
        Handler for RCON command    : ha
        Syntax                      : password;command;message
        Example                     : password;ha;Hotel alert test!
    --]]
    function cmdHotelAlert(rcon_data) 
    
        local message = rcon_data:get(2)
        local players = playerManager:getPlayers()
    
        for i = 0, players:size() - 1 do
            local player = players:get(i)
            player:sendMessage(message)
        end
    end

    Last edited by Quackster; 2 Weeks Ago at 08:31 AM.
    Latest cracked SWF releases: swfhub.com
    Also includes header dumps for easy header updating, and various other game files.

  15. #285
    Hackerman Quackster is online now
    ModeratorRank
    Dec 2010 Join Date
    AustraliaLocation
    3,086Posts

    Re: Icarus (Production) - Java Server [MySQL, Netty]

    I've done a lot since I last posted which was only 5 days ago! I've updated to PRODUCTION-201709052204-426856518 build, which is the most recent Habbo build.

    Now here's the changelog...

    Targeted Offers

    I've added targeted offers, which are special deals that run for a set amount of time before they expire, and they can only be bought once. Basically they look like this:

    Spoiler:


    They will be able to be edited/deleted/added in the housekeeping, you can change the image, the text, how much credits (and/or other activity points such as duckets) cost, the items that can be purchased etc. In the housekeeping shown:

    (if MUS/RCON is enabled, upon clicking submit, the targeted offers will be reloaded without restarting server)
    Spoiler:


    Promotions

    I've added room promotions, which is the typical feature of having a special entry in the events part of the navigator. It's sorted by the remaining time that is left, so lets say there's a room with 10 minutes and another with 20, the room with the fewer minutes left will be ordered first as that's how it works on Habbo.

    Spoiler:


    Pets

    The second feature I started has been pets, you can purchase them, place them - they walk around, and pick them up, they also support the feature where you can let others places their own pets in your room too, and when they're kicked they are placed into their owners inventory. Right now they're incomplete.

    Spoiler:


    Groups

    The third feature I've started on has been groups, you can purchase a group for a home room, view its group information, and delete the group, not much apart from that, the group feature is still complete.

    Spoiler:


    Backend

    Fun fact! Just today I stripped down Room.java from 629 lines to 202 lines.

    Before: https://github.com/TheAmazingAussie/...room/Room.java
    After: https://github.com/TheAmazingAussie/...room/Room.java
    Last edited by Quackster; 1 Week Ago at 06:16 PM.
    Latest cracked SWF releases: swfhub.com
    Also includes header dumps for easy header updating, and various other game files.




Advertisement