[LATEST] Icarus Emulator [Java, Netty, MySQL, Plugins, Camera]
Icarus
Icarus is a server which is emulating the most recent version of Habbo. It's programmed in Java 1.8. The server aims at minimising memory leaks, easy to maintain and expand upon and to maximise the server uptime/stability.
All files which access and query the database are called data access objects (DAO) and they have been completely separated from the rest of the server, and the only calls to the database are forced through the data access objects.
This server is created by me and built from the ground up, it is not based on any previous servers
Example of the database access separated from the main project.
Open-source
Yes, this project is open source, the stable source can code can be located at:
https://github.com/Quackster/Icarus
(All pull requests will be rejected while this project is in alpha and beta stage).
Features
The current client version it's using is called PRODUCTION-201710172204-432325793 this includes the new loader and the new navigator which gives more customisation on how you want your navigator displayed.
- User
- Login with SSO (single sign on) ticket
- Show targeted offers (special deals)
- Show Habbo Club susbcription (can expire)
- Navigator
- View public spaces
- View most popular rooms
- View own rooms
- View promoted events
- Messenger
- Search for users
- Send a friend request
- Accept friend request
- Reject friend request
- Send friend a message
- Delete friend
- Invite friend
- Follow friend
- Rooms
- Create own room
- Edit room details
- Room entry
- Delete room
- Walking/pathfinding around items and users (if walking through people is ticked)
- Give rights
- Take away rights
- Remove all rights
- Edit floor plan
- Save floor plan
- Items
- Take photo
- Purchase photo
- Place items
- Rotate and move items
- Pickup items
- Sit on items
- Interact with items
- Camera
- Take photo
- Purchase photo
- Take photo for room thumbail
- Inventory
- Load floor items
- Load wall items
- Load pets
- Update inventory when a new item is purchased/picked up
- Show new item in inventory once item is purchased/picked up
- Update inventory when a pet is purchased/picked up
- Show new item when a pet is purchased/picked up
- Catalogue
- Catalogue tabs
- Catalogue pages, visible depending on rank
- Catalogue item discount
- Purchase items
- Buy Habbo Club subscription
- Promotions
- Buy promotion
- Edit promotion
- Show promotion in the special promotions part of the navigator
- Pets
- Purchase pet
- Load pet races
- Verify pet name
- Place pet
- Pick up pet
- Groups
- Purchase grpup
- Set group homeroom
- Delete group
- Group furni
- Edit group settings
- Manage group users
- Group decorative rights
Completed Interaction Types
- Default
- Vending
- Gate
- Rollers
- Teleporters
- Moodlights
- Bed
- Chair
- One way gates
- Mannequins
- ads_background
- Background Toner
Libraries
- Netty 4.1.16
- HikariCP 2.7.1
- Gson 2.8.0
- ini4j 0.5.4
- Luaj 3.0-beta2
- MySQL Connector Java 6.0.6
- slf4j 1.7.25
- log4j 1.2.17
The source code is built using the Gradle (which is like Maven, except doesn't require XML configuration). So once imported, all libraries will be downloaded automatically without the need to maintain third-party Jar files.
Plugin System
Icarus has a plugin system, completely in Lua. Using Luaj it's possible to extend the functionality of the server without writing any Java or recompiling the server.
The following events coded right now are listed below, and the name next to them indicates the event function name will be called.
Player Events
- PLAYER_LOGIN_EVENT
- PLAYER_DISCONNECT_EVENT
Messenger Events
Room Events
- ROOM_REQUEST_ENTER_EVENT
- ROOM_FIRST_ENTRY_EVENT
- ROOM_ENTER_EVENT
- ROOM_LEAVE_EVENT
- ROOM_PLAYER_CHAT_EVENT
- ROOM_PLAYER_SHOUT_EVENT
- ROOM_PLAYER_WHISPER_EVENT
- ROOM_WALK_REQUEST_EVENT
- ROOM_STOP_WALKING_EVENT
Item Events
- PLACE_FLOOR_ITEM_EVENT
- PLACE_WALL_ITEM_EVENT
- FLOOR_ITEM_INTERACT_EVENT
- WALL_ITEM_INTERACT_EVENT
More will be added as more development time passes, and each event will be documentated on what event does what, and what parameters each event takes.
For example, this will create 200 bots that will walk around when a user enters a room.
Code:
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
Screenshots
Server
https://i.imgur.com/dIXdHnQ.png
https://i.imgur.com/jD0xrCv.png
https://i.imgur.com/H5aXltg.png
https://i.imgur.com/OfhSkGu.png
Credits
- @Leon, giving me some help for fixing structures, etc.
- @Glaceon, guidance on fixing client crash when item quantity is enabled on the catalogue.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Approved. Good luck with your development.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Good luck my friend - this will be your magnum opus :D:
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Good luck bro! Welcome back! :3
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Good Luck man! Good to see you back :D
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Interesting.
But didn't you receive a C&D?
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
First line says minimizing memory leaks, first example given already has 3 memory leaks.
I don't have much hope for this.
PS: John broke his neck.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
First line says minimizing memory leaks, first example given already has 3 memory leaks.
I don't have much hope for this.
PS: John broke his neck.
Teach us master! Where is these memory leaks?
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Dominic
Teach us master! Where is these memory leaks?
Not spoonfeeding. I've done (most) things all by myself with little suggestions. He'll figure it out if he ever gets to the point where he runs out of memory which, if he continues to work like this, is pretty soon.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Not spoonfeeding. I've done (most) things all by myself with little suggestions. He'll figure it out if he ever gets to the point where he runs out of memory which, if he continues to work like this, is pretty soon.
Not even close to spoonfeeding, but suit yourself :):
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Not spoonfeeding. I've done (most) things all by myself with little suggestions. He'll figure it out if he ever gets to the point where he runs out of memory which, if he continues to work like this, is pretty soon.
You can not argue with no arguments.
Says itself.
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
First line says minimizing memory leaks, first example given already has 3 memory leaks.
I don't have much hope for this.
PS: John broke his neck.
Is it due to the fact that he isn't disposing the memory after use?
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
Jax
Is it due to the fact that he isn't disposing the memory after use?
Thats what memory leaks are...
re: Icarus Server (Production) - [Python, Multi-DB/MySQL]
Quote:
Originally Posted by
The General
Thats what memory leaks are...
He's releasing objects after use, the GC handles disposal afterwards. This code is fine.
Sent from my iPhone using Tapatalk