This commit is contained in:
SrGooglo 2024-08-09 16:43:43 +00:00
commit 7fb7495a0b
71651 changed files with 848648 additions and 0 deletions

7
.auth.env Normal file
View File

@ -0,0 +1,7 @@
DB_HOST="fr02.ragestudio.net"
DB_PORT="3312"
DB_USER="arcturus_user"
DB_PASS="arcturus_pw"
DB_NAME="arcturus"
COMTY_API_BASE="https://api.comty.app"

6
.gitignore vendored Executable file
View File

@ -0,0 +1,6 @@
.idea
**/*.pid
emulator/logging
nitro/nitro-assets/*
data/**
/**/**/node_modules

15
.gitmodules vendored Executable file
View File

@ -0,0 +1,15 @@
[submodule "emulator/arcturus"]
path = packages/emulator/
url = https://git.krews.org/morningstar/Arcturus-Community.git
[submodule "nitro/nitro-react"]
path = packages/nitro/
url = https://github.com/billsonnn/nitro-react.git
[submodule "nitro/nitro-converter"]
path = packages/nitro-converter/
url = https://github.com/billsonnn/nitro-converter.git
[submodule "nitro/nitro-swf"]
path = public/swf
url = https://git.krews.org/morningstar/arcturus-morningstar-default-swf-pack.git
[submodule "nitro/nitro-assets"]
path = public/assets
url = https://git.krews.org/nitro/default-assets.git

4
.sql.env Normal file
View File

@ -0,0 +1,4 @@
MYSQL_ROOT_PASSWORD="arcturus_root_pw"
MYSQL_USER="arcturus_user"
MYSQL_PASSWORD="arcturus_pw"
MYSQL_DATABASE="arcturus"

44
README.md Executable file
View File

@ -0,0 +1,44 @@
# Nitro Docker
Nitro docker is a quick-to-setup docker dev environment. It can be run on Windows, Linux or OSX just with a few commands
# Installation
- Install ``just`` from here: https://github.com/casey/just#installation
- Install docker desktop (and for windows, enable WSL support) from here: https://www.docker.com/get-started/
- Clone this repository
- Execute the following commands inside cloned repository
- `just install`
- `just start-all`
- Wait 5/10 minutes (it's important)
- Once nitro accessible on [http://127.0.0.1:1080?sso=123](http://127.0.0.1:1080?sso=123)
- you can extract all assets easily with the command `just extract-nitro-assets`
## More commands
- `just restart-arcturus`: restart arcturus emulator
- `just restart-nitro`: restart nitro dev server (Craco in nitro-react)
- `just watch-arcturus`: watch the emulator output
- `just watch-nitro`: watch the nitro dev server output
- `just --list`: display all usefull commands <3
## More informations
### Mysql
Mysql server use these credentials:
```
- MYSQL_ROOT_PASSWORD=arcturus_root_pw
- MYSQL_USER=arcturus_user
- MYSQL_PASSWORD=arcturus_pw
- MYSQL_DATABASE=arcturus
```
The first database come from mysql/dumps, it's the base Arcturus database for 3.0.X with just a default SSO ticket (123).
### Arcturus
- Arcturus is stored in emulator/arcturus, it's just a submodule from krews.git. Each time you run the nitro-arcturus image, each time the emulator is recompiled. You can recompile manualy with the command `just recompile-arcturus`.
- The NitroWebSocket plugin is already added
- All the configuration can be found in `emulator/config.ini`
### Nitro
- Nitro is the folder for nitro dev server, assets, swf, converters...
- The nitro-image contains 3 server: assets server (for all *.nitro files), swf server from morningstar (who contain all current useful SWF) and nitro-dev server on nitro-react.
- All extracted assets come from nitro-swf and will be extracted in nitro-assets (the nitro converter use the swf server)
- All the configurations for nitro-react are in `nitro/configuration`. If you make some change, just make `just restart-nitro`
### Have fun <3

27
config/emulator/config.ini Executable file
View File

@ -0,0 +1,27 @@
#Database Configuration.
db.hostname=mysql
db.port=3306
db.database=arcturus
db.username=arcturus_user
db.password=arcturus_pw
db.params=
db.pool.minsize=25
db.pool.maxsize=100
#Game Configuration.
#Host IP. Most likely just 0.0.0.0 Use 127.0.0.1 if you want to play on LAN.
game.host=0.0.0.0
game.port=3000
#RCON Configuration.
#RCON Host IP. Leave this at 127.0.0.1 if you're running your website on the same server as the emulator.
rcon.host=127.0.0.1
rcon.port=3001
rcon.allowed=127.0.0.1;127.0.0.2
enc.enabled=false
enc.e=3
enc.n=86851dd364d5c5cece3c883171cc6ddc5760779b992482bd1e20dd296888df91b33b936a7b93f06d29e8870f703a216257dec7c81de0058fea4cc5116f75e6efc4e9113513e45357dc3fd43d4efab5963ef178b78bd61e81a14c603b24c8bcce0a12230b320045498edc29282ff0603bc7b7dae8fc1b05b52b2f301a9dc783b7
enc.d=59ae13e243392e89ded305764bdd9e92e4eafa67bb6dac7e1415e8c645b0950bccd26246fd0d4af37145af5fa026c0ec3a94853013eaae5ff1888360f4f9449ee023762ec195dff3f30ca0b08b8c947e3859877b5d7dced5c8715c58b53740b84e11fbc71349a27c31745fcefeeea57cff291099205e230e0c7c27e8e1c0512b

Binary file not shown.

10
config/mysql/conf.d/my.cnf Executable file
View File

@ -0,0 +1,10 @@
[mysqld]
bind-address=0.0.0.0
general_log = 0
general_log_file = /var/log/mysql/query.log
slow_query_log = 0
long_query_time = 1 # seconds
slow_query_log_file = /var/log/mysql/slow.log
log_queries_not_using_indexes = 0
skip-name-resolve=1

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,96 @@
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('wired.place.under', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('wired.custom.enabled', '0');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_stalk.forgot_username', 'Specify the username of the Habbo you want to follow!');
-- Enable or Disable TTY in console (Default is enabled)
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('console.mode', '1');
-- Youtube Api v3 key to YoutubeManager
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('youtube.apikey', '');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.gifts.length.max', '300');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.trophies.length.max', '300');
-- Add friendship categories table
CREATE TABLE `messenger_categories` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`user_id` int NOT NULL,
UNIQUE KEY `identifier` (`id`)
);
-- Set an ID (int) from category list items
ALTER TABLE messenger_friendships ADD category int NOT NULL DEFAULT '0' AFTER friends_since;
-- ----------------------------
-- Table structure for calendar_campaigns
-- ----------------------------
DROP TABLE IF EXISTS `calendar_campaigns`;
CREATE TABLE `calendar_campaigns` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`image` varchar(255) NOT NULL DEFAULT '',
`start_timestamp` int NOT NULL DEFAULT '0',
`total_days` int NOT NULL DEFAULT '30',
`lock_expired` enum('1','0') NOT NULL DEFAULT '1',
`enabled` enum('1','0') NOT NULL DEFAULT '1',
UNIQUE KEY `id` (`id`)
);
-- ----------------------------
-- Table structure for calendar_rewards
-- ----------------------------
DROP TABLE IF EXISTS `calendar_rewards`;
CREATE TABLE `calendar_rewards` (
`id` int NOT NULL AUTO_INCREMENT,
`campaign_id` int NOT NULL DEFAULT '0',
`product_name` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`custom_image` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`credits` int NOT NULL DEFAULT '0',
`pixels` int NOT NULL DEFAULT '0',
`points` int NOT NULL DEFAULT '0',
`points_type` int NOT NULL DEFAULT '0',
`badge` varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`item_id` int NOT NULL DEFAULT '0',
`subscription_type` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '',
`subscription_days` int NOT NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE
);
-- ----------------------------
-- Table structure for calendar_rewards_claimed
-- ----------------------------
DROP TABLE IF EXISTS `calendar_rewards_claimed`;
CREATE TABLE `calendar_rewards_claimed` (
`user_id` int NOT NULL,
`campaign_id` int NOT NULL DEFAULT '0',
`day` int NOT NULL,
`reward_id` int NOT NULL,
`timestamp` int NOT NULL
);
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.calendar.default', 'test');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.calendar.pixels.hc_modifier', '2.0');
-- Calendar force open
ALTER TABLE `permissions` ADD COLUMN `acc_calendar_force` enum('0','1') NULL DEFAULT '0';
-- UpdateCalendar command.
ALTER TABLE `permissions` ADD `cmd_update_calendar` ENUM('0', '1') NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_update_calendar', ':update_calendar'), ('commands.keys.cmd_update_calendar', 'update_calendar');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.success.cmd_update_calendar', 'Calendar updated successfully!');
-- add moodlight configuration
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('moodlight.color_check.enabled', '1');
-- Mannequin name
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('hotel.mannequin.name.default', 'My look');
-- RCON: Change Username
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('rcon.alert.user.change_username', 'You can change your username. Click on yourself to change it.');
-- Custom Stacking Setting
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('custom.stacking.enabled', '0');

56
docker-compose.yaml Executable file
View File

@ -0,0 +1,56 @@
version: '3.7'
services:
assets_server:
container_name: habbo-assets-server
build:
context: packages/assets-server
volumes:
- ./public:/app/public
- ./packages/assets-server/src:/app/src
ports:
- 3015:3000
networks:
backend_network:
auth_server:
container_name: habbo-auth-server
build:
context: packages/auth-server
env_file:
- .auth.env
ports:
- 3016:3000
game_server:
container_name: habbo-game-server
build:
context: packages/game-server
ports:
# - 3010:3000 # GAME PORT
# - 3011:3001 # RCON PORT
- 3012:2096 # WEBSOCKET PORT
volumes:
- ./config/emulator/config.ini:/app/config.ini
- ./config/emulator/plugins:/app/plugins
depends_on:
- mysql
networks:
backend_network:
mysql:
container_name: habbo-db
image: mariadb:10.6
command: --default-authentication-plugin=mysql_native_password
ports:
- 3312:3306
env_file:
- .sql.env
volumes:
- ./data/mysql:/var/lib/mysql
- ./config/mysql/conf.d:/etc/mysql/conf.d
- ./config/mysql/dumps:/docker-entrypoint-initdb.d
networks:
backend_network:
networks:
backend_network:

View File

@ -0,0 +1,10 @@
FROM node:20-bookworm-slim
WORKDIR /app
COPY ./src /app/src
COPY ./package.json /app/package.json
RUN yarn install
CMD [ "yarn", "start" ]

View File

@ -0,0 +1,16 @@
{
"name": "data-server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "linebridge-boot ./src/index.js",
"build": "hermes build"
},
"dependencies": {
"@ragestudio/hermes": "^0.1.1",
"linebridge": "^0.20.0",
"live-directory": "^3.0.3",
"mime-types": "^2.1.35"
}
}

View File

@ -0,0 +1 @@
this is a test

View File

@ -0,0 +1,21 @@
import { Server } from "linebridge/dist/server"
import LiveDirectory from "live-directory"
import path from "node:path"
const publicPath = process.argv[2] ?? path.resolve(process.cwd(), "public")
console.log(`Public path: ${publicPath}`)
global.LiveData = new LiveDirectory(publicPath, {
static: true,
})
class DataServer extends Server {
static listen_port = process.env.PORT ?? 3000
static useEngine = "hyper-express"
static routesPath = path.resolve(__dirname, "routes")
static disableWebSockets = true
}
Boot(DataServer)

View File

@ -0,0 +1,39 @@
import fs from "fs"
import mimetypes from "mime-types"
export default async (request, response) => {
try {
const query = request.query
const stream_mode = query.stream === "true" ? true : false
const path = request.path.replace("/public", "")
const file = await LiveData.get(path)
// Return a 404 if no asset/file exists on the derived path
if (file === undefined) {
return response.status(404).send()
}
if (stream_mode) {
console.log(`Streaming file: ${file.path}`)
response.setHeader("Content-Type", "application/octet-stream")
const stream = fs.createReadStream(file.path)
stream.pipe(response)
} else {
console.log(`Reading file: ${file.path}`)
response.setHeader("Content-Type", mimetypes.lookup(file.path) || "application/octet-stream")
const data = await fs.promises.readFile(file.path)
response.send(data)
}
} catch (error) {
console.error(error)
}
}

1850
packages/assets-server/yarn.lock Executable file

File diff suppressed because it is too large Load Diff

10
packages/auth-server/Dockerfile Executable file
View File

@ -0,0 +1,10 @@
FROM node:20-bookworm-slim
WORKDIR /app
COPY ./src /app/src
COPY ./package.json /app/package.json
RUN yarn install
CMD [ "yarn", "start" ]

View File

@ -0,0 +1,19 @@
{
"name": "auth-server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "linebridge-boot ./src/index.js",
"build": "hermes build"
},
"dependencies": {
"jsonwebtoken": "^9.0.2",
"linebridge": "^0.20.2",
"mysql2": "^3.11.0",
"sequelize": "^6.37.3"
},
"devDependencies": {
"@ragestudio/hermes": "^0.1.1"
}
}

View File

@ -0,0 +1,32 @@
import path from "node:path"
import { Server } from "linebridge/dist/server"
import Sequelize from "sequelize"
class AuthServer extends Server {
static refName = "hb-auth"
static useEngine = "hyper-express"
static listen_port = process.env.PORT ?? 3000
static routesPath = path.resolve(__dirname, "routes")
static disableWebSockets = true
db = global.db = new Sequelize({
dialect: "mysql",
host: process.env.DB_HOST,
port: process.env.DB_PORT,
username: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DB_NAME,
})
async onInitialize() {
try {
await this.db.authenticate()
console.log("Connection has been established successfully.")
} catch (error) {
console.error("Unable to connect to the database:", error)
process.exit(1)
}
}
}
Boot(AuthServer)

View File

@ -0,0 +1,54 @@
import axios from "axios"
import https from "https"
const httpsAgent = new https.Agent({
rejectUnauthorized: false
})
export default async (req, res) => {
req.body = await req.json()
const { token } = req.body
const { data: userData } = await axios({
method: "GET",
url: `${process.env.COMTY_API_BASE}/users/self`,
headers: {
"Authorization": `Bearer ${token}`
},
httpsAgent: httpsAgent
})
const { username, public_name, _id } = userData
const newSSOTicket = global.nanoid()
let dbUser = await global.db.query("SELECT * FROM users WHERE external_id = ? LIMIT 1", {
replacements: [_id],
type: global.db.QueryTypes.SELECT
})
dbUser = dbUser[0]
if (dbUser) {
await global.db.query("UPDATE users SET auth_ticket = ? WHERE external_id = ?", {
replacements: [newSSOTicket, _id],
type: global.db.QueryTypes.UPDATE
})
} else {
await global.db.query("INSERT INTO users (username, real_name, mail_verified, external_id, auth_ticket) VALUES (?,?,?,?,?)", {
replacements: [
username,
(public_name ?? username),
1,
_id,
newSSOTicket,
],
type: global.db.QueryTypes.INSERT
})
}
return {
sso_ticket: newSSOTicket,
}
}

File diff suppressed because it is too large Load Diff

17
packages/emulator/.gitignore vendored Executable file
View File

@ -0,0 +1,17 @@
logging/
compiled-builds/
*.iml
.idea/
target/**
TODO.txt
packet.pkt
plugins/**
src/test/
target/
config.ini
*.txt
*.jar
*.log
*.zip
.DS_Store

3
packages/emulator/.gitmodules vendored Executable file
View File

@ -0,0 +1,3 @@
[submodule "morningstar-default-database"]
path = morningstar-default-database
url = https://git.krews.org/morningstar/morningstar-default-database

22
packages/emulator/Dockerfile Executable file
View File

@ -0,0 +1,22 @@
FROM maven:latest AS builder
# Copy the Emulator sources to the container
COPY . .
# Package it
RUN mvn package && mv /target/Habbo*-with-dependencies.jar /target/Habbo.jar
# Use Java 8 for running
FROM adoptopenjdk/openjdk8:debian-slim AS runner
RUN mkdir /app
# Copy the generated source
COPY --from=builder /target/Habbo.jar /app/server.jar
WORKDIR /app
# Save the script to wait for the database, among running the Arcturus Emulator
RUN echo "#!/bin/bash \n java -Dfile.encoding=UTF-8 -jar /app/server.jar" > /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
# Run the Emulator with Java
ENTRYPOINT ["/app/entrypoint.sh"]

674
packages/emulator/LICENSE Executable file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Arcturus Community
Copyright (C) 2019 Morningstar
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Arcturus Community Copyright (C) 2019 Morningstar
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

113
packages/emulator/README.md Executable file
View File

@ -0,0 +1,113 @@
# Arcturus Morningstar #
Arcturus Morningstar is as a fork of Arcturus Emulator by TheGeneral. Arcturus Morningstar is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt) and is developed for free by talented developers at Krews.org and is compatible with the following client revision/community projects:
| Flash | Community Clients |
| ------------- | ------------- |
| [PRODUCTION-201611291003-338511768](https://git.krews.org/morningstar/apollyon/uploads/dc669a26613bf2356e48eb653734ab29/patched-habbo.swf) | [Nitro (Recommended)*](https://git.krews.org/nitro) |
###### *Note to use Nitro you will need to use the following [plugin](https://git.krews.org/nitro/ms-websockets/-/releases) with Arcturus Morningstar #######
[![image](https://img.shields.io/discord/557240155040251905?style=for-the-badge&logo=discord&color=7289DA&label=KREWS&logoColor=fff)](https://discord.gg/BzfFsTp)
## Download ##
[![image](https://img.shields.io/badge/STABLE%20RELEASES-3.0.0-success.svg?style=for-the-badge&logo=appveyor)](https://git.krews.org/morningstar/Arcturus-Community/-/releases)
[![image](https://img.shields.io/badge/DEVELOPER%20BUILDS-3.1.0-red.svg?style=for-the-badge&logo=appveyor)](https://git.krews.org/morningstar/Arcturus-Community/-/jobs) *
[![image](https://img.shields.io/badge/RECOMMENDED%20PLUGINS-blue.svg?style=for-the-badge&logo=)](https://git.krews.org/official-plugins)
###### * Note to use these builds you will need to run any database updates from [here](https://git.krews.org/morningstar/Arcturus-Community/-/tree/dev/sqlupdates) #######
### Branches ###
There are two main branches in use on the Arcturus Morningstar git. Below the pros an
| master | Tested on a production hotel and is stable for every day use with no known serious exploits. |
| ------------- | ------------- |
| dev | The most up-to-date, but features may not work as intended. |
| ------------- | ------------- |
There is no set timeframe on when new versions will be released or when the stable branch will be updated
## Can I Help!? ##
#### Reporting Bugs: ####
You can report problems via the [Issue Tracker](https://git.krews.org/morningstar/Arcturus-Community/issues)*
###### * When making an bug report or a feature request use the template we provide so that it can be categorized correctly and we have more information to replicate a bug or implement a feature correctly. ######
#### Can I contribute code to this project? ####
Of Course! if you have fixed a bug from the git please feel free to do a [merge request](https://git.krews.org/morningstar/Arcturus-Community/issues)*
###### * Anyone is allowed to fork the project and make pull requests, we make no guarantee that pull requests will be approved into the project. Please Do NOT push code which does not replicate behaviour on habbo.com, instead make the behaviour configurable or as a plugin. ######
## Plugin System ##
The robust Plugin System included in the original Arcturus release is also included in Arcturus Morningstar, if you're interested in making your own plugins, feel free to ask around on our discord and we'll point you in the right direction!
A lot of the community aren't used to modifying things in this way, so we've written a few pros:
1. Other people will see that plugins are the normal way of adding custom features
2. Plugins can be added and removed at the hotel owner's choice, it makes customizing the hotel easier
3. Developers will be able to read plugin source code to learn how to make their own plugins, without the need to look in complicated source code
## Making money ##
We have no problem with developers making money through the sale of custom features, plugins or maintenance work.
Sale of a special edition of a *source code* will not be permitted. You may use your own private edition of a source code, but we will not help you if you have any problems with it.
If we ever are to make paid features or plugins, we will not prevent or discourage developers from creating alternative options for users.
### Credits ###
- TheGeneral (Arcturus Emulator)
- Beny
- Alejandro
- Capheus
- Skeletor
- Harmonic
- Mike
- Remco
- zGrav
- Quadral
- Harmony
- Swirny
- ArpyAge
- Mikkel
- Rodolfo
- Rasmus
- Kitt Mustang
- Snaiker
- nttzx
- necmi
- Dome
- Jose Flores
- Cam
- Oliver
- Narzo
- Tenshie
- MartenM
- Ridge
- SenpaiDipper
- Thijmen
- Brenoepic
- Stankman
- Laynester

208
packages/emulator/featurelist.md Executable file
View File

@ -0,0 +1,208 @@
The following file contains the current feature list for Arcturus Morningstar as of the 4.x Beta Branch.
We hope this file will provide an easy place to find functions in Arcturus Morningstar for new developers, as well as give people the chance to see exactly what Arcturus Morningstar can do!
If you wish to contribute to this list, features are laid out in the following format:
## ✍️ Example Header:
##### Example Feature Header- ✔️ (completed) ⭕ (incomplete/ not implemented)
> [`ExampleLinkToRelatedClasses`](https://google.com)
>
> ###### Example Sub Feature Header - ✔️
>
> > [`ExampleLinkToRelatedSubClasses`](https://google.com)
## 🖥️ Connection / User:
##### Login via SSO Ticket ✔️
> [`SecureLoginEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java)
> [`HabboManager.loadHabbo()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java#L104)
##### Support RSA Encryption ✔️
> [`HabboRSACrypto`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/crypto/HabboRSACrypto.java)
> [`HabboRC4`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/crypto/HabboRC4.java)
> [`HabboDiffieHellman`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/crypto/HabboDiffieHellman.java)
> [`CompleteDiffieHandshakeEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/handshake/CompleteDiffieHandshakeEvent.java)
> [`InitDiffieHandshakeEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/handshake/InitDiffieHandshakeEvent.java)
## 🧸 RCON:
##### RCON ✔️
> [`RCONMessage`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/RCONMessage.java)
>
> ###### RCON Messages - ✔️
>
> > [`AlertUser`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/AlertUser.java))
> > [`ChangeRoomOwner`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/ChangeRoomOwner.java)
> > [`CreateModToolTicket`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/CreateModToolTicket.java)
> > [`DisconnectUser`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/DisconnectUser.java)
> > [`ExecuteCommand`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/ExecuteCommand.java)
> > [`ForwardUser`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/ForwardUser.java)
> > // todo finish this
#####
## 💠 Subscriptions:
###### Subscriptions Manager ✔️
> > [`Subscription`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/Subscription.java)
> > [`SubscriptionManager`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionManager.java)
> > [`SubscriptionScheduler`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionScheduler.java)
> > [`UserSubscriptionCreatedEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/plugin/events/users/subscriptions/UserSubscriptionCreatedEvent.java)
> > [`UserSubscriptionExpiredEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/plugin/events/users/subscriptions/UserSubscriptionExpiredEvent.java)
> > [`UserSubscriptionExtendedEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/master/src/main/java/com/eu/habbo/messages/rcon/RCONMessage.java)
> >
> > ##### Habbo Club - ✔️
> >
> > > [`SubscriptionHabboClub`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionHabboClub.java)
> > > [`RequestUserClubEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserClubEvent.java)
> > > [`RequestClubDataEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/catalog/RequestClubDataEvent.java)
> > > [`ClubDataComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/catalog/ClubDataComposer.java)
> > > [`HabboStats.hasActiveClub()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboStats.java#L555)
> > >
> > > ###### HC Catalogue - ✔️
> > >
> > > > [`ClubBuyLayout`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/ClubBuyLayout.java)
> > > > [`ClubOffer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/catalog/ClubOffer.java)
> > > > [`ClubGiftsLayout`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/ClubGiftsLayout.java)
> > > > [`ClubGiftsComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/catalog/ClubGiftsComposer.java)
> > > > [`ClubCenterDataComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/catalog/ClubCenterDataComposer.java)
> > > > [`ClubGiftReceivedComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/users/ClubGiftReceivedComposer.java)
> > >
> > > ###### HC Payday - ✔️
> > >
> > > > [`SecureLoginEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java#L202)
> > > > [`SubscriptionScheduler`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionScheduler.java)
> > > > [`SubscriptionHabboClub.calculatePayDay()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionHabboClub.java#L184)
> > > > [`SubscriptionHabboClub.executePayDay()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionHabboClub.java#L257)
> > > > [`SubscriptionHabboClub.processUnclaimed()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionHabboClub.java#L316)
> > > > [`SubscriptionHabboClub.claimPayDay()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionHabboClub.java#L368)
> > > > [`SubscriptionHabboClub.progressAchievement()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionHabboClub.java#L419)
> > >
> > > ###### HC Checks on clothing - ✔️
> > >
> > > > [`ClothingValidationManager`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/clothingvalidation/ClothingValidationManager.java)
> > > > [`ClothingValidationManager.validateLook()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/clothingvalidation/ClothingValidationManager.java#L61)
> > >
> > > ###### HC dances - ✔️
> > >
> > > > [`RoomUserDanceEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/rooms/users/RoomUserDanceEvent.java)
> > > > [`RoomUserDanceComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/rooms/users/RoomUserDanceComposer.java)
> > > > [`RoomUnit.getDanceType()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java#L456)
> > > > [`RoomUnit.setDanceType()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/rooms/RoomUnit.java#L460)
> >
> > Builders Club - ⭕
> >
> > > [`SubscriptionScheduler`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/subscriptions/SubscriptionScheduler.java)
> > > [`BuildersClubExpiredComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/unknown/BuildersClubExpiredComposer.java)
> > >
> > > ###### Builders Club Catalogue - ⭕
> > >
> > > > [`BuildersClubAddonsLayout`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubAddonsLayout.java)
> > > > [`BuildersClubLoyaltyLayout`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubLoyaltyLayout.java))
> > > > [`BuildersClubFrontPageLayout`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/catalog/layouts/BuildersClubFrontPageLayout.java)
> >
> >
## 🤹 Entities:
##### Habbo ✔️
> [`Habbo`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java)
> [`Habbo.getClient()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java#L110)
> [`Habbo.isOnline()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java#L64)
> [`Habbo.getHabboInfo()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java#L90)
> [`Habbo.getHabboStats()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java#L94)
> [`Habbo.getRoomUnit()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java#L102)
> [`HabboManager`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java)
> [`HabboManager.getOfflineHabboInfo()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java#L47)
> [`HabboManager.getCloneAccounts()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java#L203)
> [`HabboManager.setRank()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java#L243)
> [`HabboInfo`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboManager.java)
> ###### Clothing - ✔️
>
>
> > [`UserClothesComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/users/UserClothesComposer.java)
> > [`HabboInventory.getWardrobeComponent()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboInventory.java#L67)
> > [`HabboInventory.setWardrobeComponent()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboInventory.java#L71)
>
> ###### Inventory - ✔️
>
>
> > [`HabboInventory`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboInventory.java)
> > [`Habbo.getInventory()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java#L98)
> > [`ItemsComponent.addItem()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/ItemsComponent.java#L67)
> > [`ItemsComponent.addItems()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/ItemsComponent.java#L82)
> > [`ItemsComponent.getHabboItem()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/ItemsComponent.java#L99)
> > [`ItemsComponent.getAndRemoveHabboItem()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/ItemsComponent.java#L103)
> > [`ItemsComponent.removeHabboItem()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/ItemsComponent.java#L126)
> > [`ItemsComponent.getItemsAsValueCollection()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/ItemsComponent.java#L141)
> > [`InventoryItemsComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboInfo.java#L265)
> > [`InventoryBotsComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/inventory/InventoryBotsComposer.java)
> > [`InventoryPetsComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/inventory/InventoryPetsComposer.java)
> > [`InventoryAchievementsComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/inventory/InventoryAchievementsComposer.java)
> > [`InventoryRefreshComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/inventory/InventoryRefreshComposer.java)
> > [`InventoryItemsAddedEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/plugin/events/inventory/InventoryItemsAddedEvent.java)
> > [`InventoryItemEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/plugin/events/inventory/InventoryItemEvent.java)
>
> ###### Motto - ✔️
>
>
> > [`HabboInfo.setMotto()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboInfo.java#L269)
> > [`HabboInfo.getMotto()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/HabboInfo.java#L265)
>
> ###### Badges - ✔️
>
>
> > [`BadgesComponent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java)
> > [`BadgesComponent.loadBadges()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L28)
> > [`BadgesComponent.getBadgesOfflineHabbo()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L75)
> > [`BadgesComponent.createBadge()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L90)
> > [`BadgesComponent.deleteBadge()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L113)
> > [`BadgesComponent.getWearingBadges()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L123)
> > [`BadgesComponent.hasBadge()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L147)
> > [`BadgesComponent.getBadge()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L151)
> > [`BadgesComponent.removeBadge()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/inventory/BadgesComponent.java#L167)
>
> ##### Load Currency and Seasonal Currency - ✔️
>
> > [`RequestUserCreditsEvent`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserCreditsEvent.java)
> > [`UserCurrencyComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/users/UserCurrencyComposer.java)
> > [`UserCreditsComposer`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/messages/outgoing/users/UserCreditsComposer.java)
> > [`Habbo.getHabboInfo()`](https://git.krews.org/morningstar/Arcturus-Community/-/blob/dev/src/main/java/com/eu/habbo/habbohotel/users/Habbo.java#L90)
> Save/Load Achievements
>
> Save/Load Friends
>
> Save/Load Own Rooms
>
> Save/Load Guilds
>
> Save/Load Currencies
>
> Save/Load Inventory
>
> Save/Load Friendships - Love/Hate/Like
-

176
packages/emulator/pom.xml Executable file
View File

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.eu.habbo</groupId>
<artifactId>Habbo</artifactId>
<version>3.5.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
<profiles>
<profile>
<id>java8-doclint-disabled</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.eu.habbo.Emulator</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<additionalOptions>
<additionalOption>-Xdoclint:none</additionalOption>
</additionalOptions>
<show>public</show>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>mvnrepo</id>
<url>https://mvnrepository.com/</url>
</repository>
</repositories>
<dependencies>
<!-- Netty -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.49.Final</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit2</groupId>
<artifactId>retrofit</artifactId>
<version>2.4.0</version>
</dependency>
<!-- GSON -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<!-- MySQL Connector -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.22</version>
<scope>runtime</scope>
</dependency>
<!-- Trove -->
<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
<version>3.0.3</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.18</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.6</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,27 @@
#DATABASE UPDATE: 1.0.10 -> 1.1.0
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.error.cmd_unmute.not_specified', 'No user specified to unmute!'),
('commands.error.cmd_unmute.not_found', '%user% is not online!'),
('commands.succes.cmd_unmute', '%user% has been unmuted!'),
('commands.keys.cmd_unmute', 'unmute'),
('commands.description.cmd_unmute', ':unmute <username>');
ALTER TABLE `permissions` ADD `cmd_unmute` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_unload`;
ALTER TABLE `bans` ADD `timestamp` INT NOT NULL AFTER `user_staff_id`;
ALTER TABLE `permissions` ADD `cmd_give_rank` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_gift`;
INSERT INTO`emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_give_rank', 'giverank;setrank;give_rank;set_rank'),
('commands.description.cmd_give_rank', ':giverank <username> <rank>'),
('commands.error.cmd_give_rank.not_found', 'Rank %id% was not found!'),
('commands.succes.cmd_give_rank.updated', '%username% has been given the rank %id%'),
('commands.error.cmd_give_rank.higher', 'You cannot rank %username% to a higher rank than you are!'),
('commands.error.cmd_give_rank.user_offline', '%username% is not online!'),
('commands.error.cmd_give_rank.missing_rank', 'Missing rank. Usage: '),
('commands.error.cmd_give_rank.missing_username', 'Missing username. Usage: '),
('commands.generic.cmd_give_rank.new_rank', 'Your rank has been updated. Your rank is now %id%');
#END DATABASE UPDATE: 1.0.10 -> 1.1.0

View File

@ -0,0 +1,79 @@
#DATABASE UPDATE: 1.0.0 -> 1.0.1
#IF YOU GET ERRORS ON THIS PROCEDURE, JUST DROP THE acc_kickwars COLUMN FROM THE permissions TABLE!!
drop procedure if exists drop_acc_kickwars;
delimiter ';;'
create procedure drop_acc_kickwars() begin
if exists (select * from information_schema.columns where table_name = 'permissions' and column_name = 'acc_kickwars') then
alter table permissions drop column `acc_kickwars`;
end if;
end;;
delimiter ';'
call drop_acc_kickwars();
drop procedure if exists drop_acc_kickwars;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.navigator.camera', '1');
ALTER TABLE `navigator_flatcats` ADD `max_user_count` INT( 11 ) NOT NULL DEFAULT '100';
ALTER TABLE `navigator_flatcats` ADD `public` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
DELETE FROM `navigator_flatcats`;
ALTER TABLE `navigator_flatcats` AUTO_INCREMENT = 1;
INSERT INTO `navigator_flatcats` (`id`, `min_rank`, `caption`, `can_trade`, `max_user_count`, `public`) VALUES
(NULL, '1', '${navigator.flatcategory.global.BC}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.BUILDING}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.CHAT}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.FANSITE}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.GAMES}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.HELP}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.LIFE}', '0', '100', '0'),
(NULL, '7', '${navigator.flatcategory.global.OFFICIAL}', '0', '100', '1'),
(NULL, '1', '${navigator.flatcategory.global.PARTY}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.PERSONAL}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.REVIEWS}', '0', '100', '0'),
(NULL, '1', '${navigator.flatcategory.global.TRADING}', '1', '100', '0');
CREATE TABLE `navigator_publiccats` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` VARCHAR( 32 ) NOT NULL DEFAULT 'Staff Picks',
`visible` ENUM( '0', '1' ) NOT NULL DEFAULT '1'
) ENGINE = MYISAM ;
INSERT INTO `navigator_publiccats` (`id`, `name`) VALUES
('1', 'Staff Picks'),
('2', 'Official Games'),
('3', 'Official Fansites'),
('4', 'BAW: Builders at Work'),
('5', 'Room Bundles'),
('6', 'Safety');
DROP TABLE `navigator_publics`;
CREATE TABLE `navigator_publics` (
`public_cat_id` INT NOT NULL ,
`room_id` INT NOT NULL,
`visible` ENUM( '0', '1' ) NOT NULL DEFAULT '1'
) ENGINE = MYISAM ;
CREATE TABLE `navigator_filter` (
`field` VARCHAR( 32 ) NOT NULL ,
`compare` ENUM( 'equals', 'equals_ignore_case', 'contains' ) NOT NULL
) ENGINE = MYISAM ;
INSERT INTO `navigator_filter` (`field`, `compare`) VALUES
('ownerName', 'equals'),
('description', 'contains'),
('name', 'contains'),
('tags', 'equals');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_update_hotel_view', 'update_view;update_hotel_view;update_hotelview'),
('commands.description.cmd_update_hotel_view', ':update_hotel_view'),
('commands.succes.cmd_update_hotel_view', 'Hotelview reloaded!');
ALTER TABLE `permissions` ADD `cmd_update_hotel_view` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_update_guildparts`;
#END DATABASE UPDATE 1.0.0 -> 1.0.1

View File

@ -0,0 +1,22 @@
#DATABASE UPDATE: 1.0.1 -> 1.0.2
CREATE TABLE `users_clothing` (
`user_id` INT NOT NULL ,
`clothing_id` INT NOT NULL ,
UNIQUE (
`user_id` ,
`clothing_id`
)
) ENGINE = MYISAM ;
#FILLING PERMISSIONS TABLE TILL RANK 7.
INSERT INTO permissions (id, rank_name) VALUES (1, 'rank_1');
INSERT INTO permissions (id, rank_name) VALUES (2, 'rank_2');
INSERT INTO permissions (id, rank_name) VALUES (3, 'rank_3');
INSERT INTO permissions (id, rank_name) VALUES (4, 'rank_4');
INSERT INTO permissions (id, rank_name) VALUES (5, 'rank_5');
INSERT INTO permissions (id, rank_name) VALUES (6, 'rank_6');
INSERT INTO permissions (id, rank_name) VALUES (7, 'rank_7');
#END DATABASE UPDATE: 1.0.1 -> 1.0.2

View File

@ -0,0 +1,9 @@
#DATABASE UPDATE: 1.0.2 -> 1.0.3
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_bundle', 'Roombundle succesfully created with page id %id%');
ALTER TABLE `users_settings` CHANGE `can_trade` `can_trade` ENUM( '0', '1' ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '1';
UPDATE `users_settings` SET `can_trade` = '1';
ALTER TABLE `rooms` ADD `trade_mode` INT NOT NULL DEFAULT '2';
ALTER TABLE `permissions` ADD `acc_trade_anywhere` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
#END DATABASE UPDATE: 1.0.2 -> 1.0.3

View File

@ -0,0 +1,12 @@
#DATABASE UPDATE: 1.0.3 -> 1.0.4
ALTER TABLE `navigator_publiccats` ADD `image` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `name`;
ALTER IGNORE TABLE pet_breeds
ADD UNIQUE INDEX idx_name (race, color_one, color_two, has_color_one, has_color_two);
#Removing favourite guilds for deleted guilds:
UPDATE users_settings SET guild_id = 0 WHERE guild_id NOT IN (SELECT id FROM guilds) and guild_id > 0;
UPDATE achievements SET category = 'explore' WHERE name LIKE 'CameraPhotoCount';
#END DATABASE UPDATE: 1.0.3 -> 1.0.4

View File

@ -0,0 +1,54 @@
#DATABASE UPDATE: 1.0.4 -> 1.0.5
INSERT INTO emulator_settings (`key`, `value`) VALUES
('camera.enabled', '1'),
('camera.price.credits', '100'),
('camera.price.points', '100'),
('camera.price.points.publish', '1000'),
('camera.item_id', '23425'),
('camera.extradata', '{"t":%timestamp%, "u":"%id%", "s":%room_id%, "w":"%url%"}'),
('hotel.navigator.search.maxresults', '35'),
('hotel.rooms.max.favorite', '30');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.error.cmd_kick.unkickable', '%username% is unkickable!'),
('camera.disabled', 'Sorry! Camera is disabled :(');
DROP TABLE navigator_filter;
CREATE TABLE IF NOT EXISTS `navigator_filter` (
`key` varchar(11) NOT NULL,
`field` varchar(32) NOT NULL,
`compare` enum('equals','equals_ignore_case','contains') NOT NULL,
`database_query` varchar(256) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `navigator_filter` (`key`, `field`, `compare`, `database_query`) VALUES
('owner', 'getOwnerName', 'equals_ignore_case', 'SELECT * FROM rooms WHERE owner_name LIKE ?'),
('anything', 'filterAnything', 'contains', 'SELECT rooms.* FROM rooms INNER JOIN guilds ON rooms.guild_id = guilds.id = WHERE CONCAT(rooms.owner_name, rooms.name, rooms.description, rooms.tags, guilds.name, guilds.description) LIKE ?'),
('roomname', 'getName', 'equals_ignore_case', 'SELECT * FROM rooms WHERE name LIKE ?'),
('tag', 'getTags', 'equals', 'SELECT * FROM rooms WHERE tags LIKE ?'),
('group', 'getGuildName', 'contains', 'SELECT rooms.* FROM guilds INNER JOIN rooms ON guilds.room_id = rooms.id WHERE CONCAT(guilds.name, guilds.description) LIKE ?'),
('desc', 'getDescription', 'contains', 'SELECT * FROM rooms WHERE description LIKE ?'),
('promo', 'getPromotionDesc', 'contains', 'SELECT rooms.* FROM rooms INNER JOIN room_promotions ON rooms.id = room_promotions.id WHERE room_promotions.end_timestamp >= UNIX_TIMESTAMP() AND CONCAT (room_promotions.title, room_promotions.description) LIKE ?');
ALTER TABLE `rooms` ADD `users` INT NOT NULL DEFAULT '0' AFTER `state`;
CREATE TABLE `users_favorite_rooms` (
`user_id` INT NOT NULL ,
`room_id` INT NOT NULL ,
UNIQUE (
`user_id` ,
`room_id`
)
) ENGINE = MYISAM ;
ALTER TABLE `catalog_pages` CHANGE `page_headline` `page_headline` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `catalog_pages` CHANGE `page_teaser` `page_teaser` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `catalog_pages` CHANGE `page_special` `page_special` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `catalog_pages` CHANGE `page_text1` `page_text1` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `catalog_pages` CHANGE `page_text2` `page_text2` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `catalog_pages` CHANGE `page_text_details` `page_text_details` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `catalog_pages` CHANGE `page_text_teaser` `page_text_teaser` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
#END DATABASE UPDATE: 1.0.4 -> 1.0.5

View File

@ -0,0 +1,12 @@
#DATABASE UPDATE: 1.0.5 -> 1.0.6
INSERT INTO `emulator_settings` (`key`, `value`) VALUES
('catalog.guild.price', '10');
ALTER TABLE `permissions` ADD `cmd_update_navigator` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_update_items`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_update_navigator', 'update_navigator;update_nav'),
('commands.succes.cmd_update_navigator', 'Navigator succesfully reloaded!');
#END DATABASE UPDATE: 1.0.5 -> 1.0.6

View File

@ -0,0 +1,6 @@
#DATABASE UPDATE: 1.0.6 -> 1.0.7
ALTER TABLE `permissions` ADD `"acc_update_notifications"` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
DELETE FROM emulator_settings WHERE `key` LIKE 'emulator.version';
#END DATABASE UPDATE: 1.0.5 -> 1.0.6

View File

@ -0,0 +1,176 @@
#DATABASE UPDATE: 1.0.7 -> 1.0.8
DROP TABLE `crafting_recipes`;
CREATE TABLE IF NOT EXISTS `crafting_altars_recipes` (
`altar_id` int(11) NOT NULL,
`recipe_id` int(11) NOT NULL,
UNIQUE KEY `altar_id` (`altar_id`,`recipe_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `crafting_altars_recipes` (`altar_id`, `recipe_id`) VALUES
(22319, 1),
(22319, 2),
(22319, 3),
(22319, 4),
(22319, 5),
(22319, 6),
(22319, 7),
(22319, 8),
(22319, 9),
(22319, 10),
(22319, 11),
(22319, 12),
(22319, 13),
(22319, 14),
(22319, 15),
(22319, 16),
(22319, 17),
(22319, 18),
(22319, 19),
(22319, 20),
(22319, 21),
(22319, 22),
(22319, 23),
(22319, 24);
CREATE TABLE IF NOT EXISTS `crafting_recipes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product_name` varchar(32) NOT NULL COMMENT 'WARNING! This field must match a entry in your productdata or crafting WILL NOT WORK!',
`reward` int(11) NOT NULL,
`enabled` enum('0','1') NOT NULL DEFAULT '1',
`achievement` varchar(255) NOT NULL DEFAULT '',
`secret` enum('0','1') NOT NULL DEFAULT '1',
`limited` enum('0','1') NOT NULL DEFAULT '0',
`remaining` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `name` (`product_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=25 ;
INSERT INTO `crafting_recipes` (`id`, `product_name`, `reward`, `enabled`, `achievement`, `secret`, `limited`, `remaining`) VALUES
(1, 'clothing_firehelm', 22273, '1', '', '0', '0', 0),
(2, 'clothing_airhelm', 22271, '1', '', '0', '0', 0),
(3, 'clothing_waterhelm', 22267, '1', '', '0', '0', 0),
(4, 'clothing_earthhelm', 22277, '1', '', '0', '0', 0),
(5, 'hween_c15_purecrystal2', 22294, '1', '', '1', '0', 0),
(6, 'hween_c15_purecrystal3', 22304, '1', '', '1', '0', 0),
(7, 'hween_c15_evilcrystal2', 22293, '1', '', '1', '0', 0),
(8, 'hween_c15_evilcrystal3', 22296, '1', '', '1', '0', 0),
(9, 'gothic_c15_chandelier', 22161, '1', '', '1', '0', 0),
(10, 'hween12_guillotine', 18669, '1', '', '1', '0', 0),
(11, 'hween14_mariachi', 20110, '1', '', '1', '0', 0),
(12, 'hween14_doll3', 20134, '1', '', '1', '0', 0),
(13, 'hween14_doll4', 20135, '1', '', '1', '0', 0),
(14, 'clothing_wavy2', 20217, '1', '', '1', '0', 0),
(15, 'guitar_skull', 22953, '1', '', '1', '0', 0),
(16, 'fxbox_fx152', 20253, '1', '', '1', '0', 0),
(17, 'LT_skull', 17136, '1', '', '1', '0', 0),
(18, 'hween14_skelepieces', 20109, '1', '', '1', '0', 0),
(19, 'hween13_bldtrail', 19231, '1', '', '1', '0', 0),
(20, 'penguin_glow', 16940, '1', '', '1', '0', 0),
(21, 'skullcandle', 15722, '1', '', '1', '0', 0),
(22, 'fxbox_fx125', 20255, '1', '', '1', '0', 0),
(23, 'deadduck', 15723, '1', '', '1', '0', 0),
(24, 'qt_xm10_iceduck', 17670, '1', '', '1', '0', 0);
CREATE TABLE IF NOT EXISTS `crafting_recipes_ingredients` (
`recipe_id` int(11) NOT NULL,
`item_id` int(11) NOT NULL,
`amount` int(11) NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `crafting_recipes_ingredients` (`recipe_id`, `item_id`, `amount`) VALUES
(6, 22294, 3),
(5, 22335, 3),
(7, 22301, 3),
(8, 22293, 3),
(2, 22294, 4),
(2, 22304, 4),
(4, 22335, 4),
(4, 22294, 4),
(1, 22304, 4),
(3, 22294, 8),
(9, 17136, 6),
(9, 22293, 1),
(9, 17237, 1),
(9, 17177, 2),
(10, 18248, 2),
(10, 19231, 1),
(10, 18231, 4),
(10, 22296, 1),
(11, 20109, 3),
(11, 22294, 1),
(11, 18022, 1),
(11, 17136, 1),
(12, 20109, 3),
(12, 22294, 1),
(12, 18933, 1),
(13, 20109, 3),
(13, 22294, 1),
(13, 15696, 1),
(14, 22294, 1),
(14, 19800, 1),
(14, 20084, 2),
(15, 18933, 1),
(15, 22335, 1),
(15, 17191, 1),
(16, 18669, 1),
(16, 22296, 1),
(16, 20122, 1),
(17, 15724, 2),
(17, 22335, 1),
(18, 22335, 1),
(18, 15723, 3),
(19, 15723, 2),
(19, 22335, 1),
(20, 22293, 1),
(20, 16893, 1),
(20, 16924, 1),
(21, 17136, 1),
(21, 17181, 1),
(22, 18207, 1),
(22, 22293, 1),
(23, 15696, 1),
(24, 15696, 1),
(23, 22301, 1),
(24, 22335, 1);
UPDATE achievements SET category = 'explore' WHERE name LIKE 'CameraPhotoCount';
CREATE TABLE `room_mutes` (
`room_id` INT NOT NULL ,
`user_id` INT NOT NULL ,
`ends` INT NOT NULL
) ENGINE = MYISAM ;
CREATE TABLE `catalog_items_limited` (
`catalog_item_id` INT NOT NULL ,
`number` INT NOT NULL ,
`user_id` INT NOT NULL DEFAULT '0',
`timestamp` INT NOT NULL DEFAULT '0',
`item_id` INT NOT NULL DEFAULT '0',
UNIQUE (
`catalog_item_id` ,
`number`
)
) ENGINE = MYISAM ;
ALTER TABLE `items_crackable` CHANGE `prizes` `prizes` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT 'Used in the format of item_id:chance;item_id_2:chance. item_id must be id in the items_base table. Default value for chance is 100.';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.trading.enabled', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.catalog.recycler.enabled', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('debug.show.errors', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.wired.furni.selection.count', '5');
UPDATE `emulator_settings` SET `key` = 'hotel.catalog.discounts.amount' WHERE `emulator_settings`.`key` = 'hotel.catalogue.discounts.amount';
DELETE FROM emulator_settings WHERE `key` LIKE 'emulator.log%';
CREATE TABLE IF NOT EXISTS `users_recipes` (
`user_id` int(11) NOT NULL,
`recipe` int(11) NOT NULL,
UNIQUE KEY `user_id` (`user_id`,`recipe`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
#END DATABASE UPDATE: 1.0.7 -> 1.0.8

View File

@ -0,0 +1,134 @@
#DATABASE UPDATE: 1.0.8 -> 1.0.9
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_plugins', ':plugins');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_massbadge', ':massbadge <badge>');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_update_bots', ':update_bots');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_update_navigator', ':update_navigator');
ALTER TABLE `bans` ADD `type` ENUM( 'account', 'ip', 'machine', 'super' ) NOT NULL DEFAULT 'account';
ALTER TABLE `bans` ADD `ip` VARCHAR( 50 ) NOT NULL DEFAULT '' AFTER `user_id`;
ALTER TABLE `bans` ADD `machine_id` VARCHAR( 255 ) NOT NULL AFTER `ip`;
ALTER TABLE `bans` CHANGE `type` `type` ENUM( 'account', 'ip', 'machine', 'super' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'account' COMMENT 'Account is the entry in the users table banned.
IP is any client that connects with that IP.
Machine is the computer that logged in.
Super is all of the above.';
ALTER TABLE `permissions` ADD `cmd_ip_ban` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_ha`;
ALTER TABLE `permissions` ADD `cmd_machine_ban` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_ip_ban`;
ALTER TABLE `permissions` ADD `cmd_super_ban` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_summonrank`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_ip_ban', 'ipban;banip;ip_ban;ban_ip'), ('commands.description.cmd_ip_ban', ':ipban <username> [reason]');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_machine_ban', 'machineban;banmachine;banmac;macban'), ('commands.description.cmd_machine_ban', ':machineban <username> [reason]');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_super_ban', 'superban;megaban'), ('commands.description.cmd_super_ban', ':superban <username> [reason]');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_machine_ban', '%count% accounts have been MAC banned!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_ip_ban', '%count% accounts have been IP banned!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_super_ban', '%count% accounts have been Super banned!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_ip_ban.ban_self', 'You cannot IP Ban yourself!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_machine_ban.ban_self', 'You cannot issue yourself a MAC Ban!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_super_ban.ban_self', 'You cannot superban yourself!');
ALTER TABLE `items` CHANGE `extra_data` `extra_data` VARCHAR(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('runtime.threads', '8');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('io.bossgroup.threads', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('io.workergroup.threads', '5');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.teleport.locked.allowed', '1');
ALTER TABLE `users` CHANGE `ip_register` `ip_register` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
CHANGE `ip_current` `ip_current` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
ALTER TABLE `items` CHANGE `z` `z` DOUBLE( 10, 5 ) NOT NULL DEFAULT '0.0';
ALTER TABLE `catalog_pages` ADD `includes` VARCHAR( 32 ) NOT NULL DEFAULT '' COMMENT 'Example usage: 1;2;3
This will include page 1, 2 and 3 in the current page.
Note that permissions are only used for the current entry.';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('pathfinder.step.maximum.height', '1.1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('pathfinder.step.allow.falling', '1');
ALTER TABLE `guilds`
ADD `forum` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
ADD `read_forum` ENUM( 'EVERYONE', 'MEMBERS', 'ADMINS' ) NOT NULL DEFAULT 'EVERYONE',
ADD `post_messages` ENUM( 'EVERYONE', 'MEMBERS', 'ADMINS', 'OWNER' ) NOT NULL DEFAULT 'EVERYONE',
ADD `post_threads` ENUM( 'EVERYONE', 'MEMBERS', 'ADMINS', 'OWNER' ) NOT NULL DEFAULT 'EVERYONE',
ADD `mod_forum` ENUM( 'ADMINS', 'OWNER' ) NOT NULL DEFAULT 'ADMINS';
CREATE TABLE `guilds_forums` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`guild_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`subject` mediumtext NOT NULL,
`message` longtext NOT NULL,
`state` enum('OPEN','CLOSED','HIDDEN_BY_ADMIN','HIDDEN_BY_STAFF') NOT NULL DEFAULT 'OPEN',
`admin_id` int(11) NOT NULL DEFAULT '0',
`pinned` enum('0','1') NOT NULL DEFAULT '0',
`locked` enum('0','1') NOT NULL DEFAULT '0',
`timestamp` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
CREATE TABLE `guilds_forums_comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`thread_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`timestamp` int(11) NOT NULL,
`message` longtext NOT NULL,
`state` enum('OPEN','CLOSED','HIDDEN_BY_ADMIN','HIDDEN_BY_STAFF') NOT NULL DEFAULT 'OPEN',
`admin_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_alert.cmd_connect_camera', 'Camera reconnected!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_connect_camera', 'connectcamera;connect_camera;cameraconnect');
ALTER TABLE `permissions` ADD `cmd_connect_camera` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_commands`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_disconnect.higher_rank', 'The Habbo you wanted to disconnect is more important than you are.');
ALTER TABLE `catalog_pages` CHANGE `page_layout` `page_layout` ENUM(
'default_3x3', 'club_buy', 'club_gift', 'frontpage', 'spaces', 'recycler', 'recycler_info',
'recycler_prizes', 'trophies', 'marketplace', 'marketplace_own_items', 'pets',
'spaces_new', 'soundmachine', 'guilds', 'guild_furni', 'info_duckets', 'info_rentables',
'info_pets', 'roomads', 'single_bundle', 'sold_ltd_items', 'badge_display', 'bots', 'pets2',
'pets3', 'room_bundle', 'recent_purchases', 'pets2', 'pets3', 'default_3x3_color_grouping',
'guild_forum', 'vip_buy', 'loyalty_info', 'loyalty_vip_buy', 'collectibles' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'default_3x3';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.rooms.handitem.time', '100');
ALTER TABLE `permissions` ADD `cmd_diagonal` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `cmd_danceall`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_diagonal', 'diagonal;disablediagonal;diagonally'), ('commands.description.cmd_diagonal', ':diagonal');
ALTER TABLE `rooms` ADD `move_diagonally` ENUM( '0', '1' ) NOT NULL DEFAULT '1';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_diagonal.disabled', 'You can no longer walk diagonally!'), ('commands.succes.cmd_diagonal.disabled', 'You can now walk diagonally!');
CREATE TABLE `youtube_items` (
`id` INT NOT NULL ,
`video` VARCHAR( 128 ) NOT NULL ,
`title` VARCHAR( 128 ) NOT NULL ,
`description` VARCHAR( 128 ) NOT NULL ,
`start_time` INT( 5 ) NOT NULL DEFAULT '0',
`end_time` INT( 5 ) NOT NULL DEFAULT '0'
) ENGINE = MYISAM ;
CREATE TABLE `youtube_playlists` (
`item_id` INT NOT NULL ,
`video_id` INT NOT NULL ,
`order` INT NOT NULL ,
UNIQUE (
`item_id` ,
`video_id` ,
`order`
)
) ENGINE = MYISAM ;
ALTER TABLE `youtube_items` ADD PRIMARY KEY ( `id` );
ALTER TABLE `youtube_items` CHANGE `id` `id` INT( 11 ) NOT NULL AUTO_INCREMENT;
INSERT INTO `emulator_settings` (
`key` ,
`value`
)
VALUES (
'imager.url.youtube', 'imager.php?url=http://img.youtube.com/vi/%video%/default.jpg'
);
ALTER TABLE `permissions` ADD `room_effect` INT NOT NULL DEFAULT '0' AFTER `rank_name`;
#END DATABASE UPDATE: 1.0.8 -> 1.0.9

View File

@ -0,0 +1,92 @@
#DATABASE UPDATE: 1.0.9 -> 1.0.10
ALTER TABLE `polls_questions` ADD `parent_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `id`;
ALTER TABLE `polls_questions` CHANGE `question_number` `order` INT( 11 ) NOT NULL;
ALTER TABLE `permissions` ADD `cmd_word_quiz` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_userinfo`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_word_quiz', 'wordquiz;quiz'),
('commands.description.cmd_word_quiz', ':wordquiz <question>');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('scripter.warning.marketplace.forbidden', '%username% tried to sell an %itemname% for %credits% which is not allowed to be sold on the marketplace!');
ALTER TABLE `permissions`
ADD `acc_helper_use_guide_tool` ENUM('0','1') NOT NULL DEFAULT '0',
ADD `acc_helper_give_guide_tours` ENUM('0','1') NOT NULL DEFAULT '0',
ADD `acc_helper_judge_chat_reviews` ENUM('0','1') NOT NULL DEFAULT '0';
ALTER TABLE `achievements_talents` ADD `reward_badges` VARCHAR( 100 ) NOT NULL DEFAULT '';
ALTER TABLE `pet_actions` ADD `pet_name` VARCHAR( 32 ) NOT NULL AFTER `pet_type`;
CREATE TABLE `pet_breeding` (
`pet_id` INT( 2 ) NOT NULL ,
`offspring_id` INT( 2 ) NOT NULL
) ENGINE = MYISAM ;
CREATE TABLE `pet_breeding_races` (
`pet_type` INT( 2 ) NOT NULL ,
`rarity_level` INT( 2 ) NOT NULL ,
`breed` INT( 2 ) NOT NULL
) ENGINE = MYISAM ;
ALTER TABLE `users_settings` ADD `talent_track_citizenship_level` INT( 2 ) NOT NULL DEFAULT '0',
ADD `talent_track_helpers_level` INT( 2 ) NOT NULL DEFAULT '0';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.navigator.popular.amount', '35');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.navigator.popular.listtype', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('inventory.max.items', '7500');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('inventory.full', 'You''ve reached the inventory limit. Move furniture out of your inventory before buying more!');
ALTER TABLE `navigator_flatcats` ADD `list_type` INT NOT NULL DEFAULT '0' COMMENT 'Display mode in the navigator. 0 for list, 1 for thumbnails.';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_setmax.invalid_number', 'Invalid number. Specify a number between 0 and 9999'), ('commands.error.cmd_setmax.forgot_number', 'No number specified. Dork.');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_setmax', 'setmax;set_max'), ('commands.description.cmd_setmax', ':setmax <amount>'), ('commands.description.cmd_staffalert', ':sA <message>');
ALTER TABLE `permissions` ADD `cmd_setmax` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_say_all`;
ALTER TABLE `catalog_pages` ADD `room_id` INT( 11 ) NOT NULL DEFAULT '0';
ALTER TABLE `permissions` ADD `cmd_take_badge` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_superpull`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.description.cmd_take_badge', ':takebadge <username> <badge>'),
('commands.keys.cmd_take_badge', 'takebadge;take_badge;remove_badge;removebadge'),
('commands.error.cmd_take_badge.forgot_badge', 'No badge specified!'),
('commands.error.cmd_take_badge.forgot_username', 'No username specified!'),
('commands.error.cmd_take_badge.no_badge', '%username% does not have %badge%!'),
('commands.succes.cmd_take_badge', 'Badge has been taken!');
ALTER TABLE `permissions`
ADD `acc_floorplan_editor` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
ADD `acc_camera` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('camera.permission', 'You don''t have permission to use the camera!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('floorplan.permission', 'You don''t have permission to use the floorplan editor!');
ALTER TABLE `room_wordfilter` CHANGE `word` `word` VARCHAR( 25 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_update_polls', 'update_polls;reload_polls'),
('commands.description.cmd_update_polls', ':update_polls'),
('commands.keys.cmd_set_poll', 'setpoll;set_poll'),
('commands.description.cmd_set_poll', ':setpoll <id>'),
('commands.succes.cmd_set_poll', 'Room poll has been updated!'),
('commands.error.cmd_set_poll.invalid_number', 'Please specify a valid number. Use 0 to remove the poll.'),
('commands.error.cmd_set_poll.missing_arg', 'Missing poll id. Use 0 to remove the poll from this room.'),
('commands.keys.cmd_roomcredits', 'roomcredits;room_credits;roomcoins;room_coins'),
('commands.description.cmd_roomcredits', ':roomcredits <amount>'),
('commands.keys.cmd_roompixels', 'roompixels;room_pixels;roomduckets;room_duckets'),
('commands.description.cmd_roompixels', ':roompixels <amount>'),
('commands.keys.cmd_roompoints', 'roompoints;room_points'),
('commands.description.cmd_roompoints', ':roompoints <amount>'),
('commands.keys.cmd_roomgift', 'roomgift;room_gift'),
('commands.description.cmd_roomgift', ':roomgift <item_id> [message]'),
('commands.succes.cmd_update_polls', 'Room polls have been reloaded!'),
('commands.error.cmd_set_poll.not_found', 'Poll %id% not found!');
ALTER TABLE `permissions` ADD `cmd_set_poll` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_setmax`;
ALTER TABLE `permissions` ADD `cmd_update_polls` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_update_plugins`;
ALTER TABLE `permissions` ADD `cmd_roomcredits` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_redeem`;
ALTER TABLE `permissions` ADD `cmd_roompixels` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_roomitem` , ADD `cmd_roompoints` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_roompixels`;
ALTER TABLE `permissions` ADD `cmd_roomgift` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_roomeffect`;
#END DATABASE UPDATE: 1.0.9 -> 1.0.10

View File

@ -0,0 +1,34 @@
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('hotel.wired.superwired.info', 'Superwired Usage Information. Possible reward types:<br/>badge: BADGE CODE<br/>Credits: credits#amount</br>Pixels: pixels#amount</br>Points: points#amount</br>Respect: respect#amount<br/>Furniture: furni#FurnitureID<br/>Catalog Item: cata#CatalogItemID<br/>');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.calendar.enabled', '0');
ALTER TABLE `permissions` ADD `acc_inifnite_friends` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('hotel.wired.kickexception.unkickable', 'Wired Kick Exception: Unkickable'), ('hotel.wired.kickexception.owner', 'Wired Kick Exception: Room Owner');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('images.gamecenter.snowwar', 'c_images/gamecenter_snowwar/'), ('images.gamecenter.basejump', 'c_images/gamecenter_basejump/');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES
('hotel.purchase.ltd.limit.daily.total', '10'), #Amount of LTDs you can buy per day.
('hotel.purchase.ltd.limit.daily.item', '3'); #Amount of LTDs you can buy of a specific item per day.
CREATE INDEX user_timestamp_index ON catalog_items_limited (user_id, timestamp);
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('error.catalog.buy.limited.daily.item', 'You cannot purchase any limited %itemname% for today as you have reached the limt of %limit%. Come back tomorrow.'),
('error.catalog.buy.limited.daily.total', 'You cannot purchase any limited furniture as you have reached the limited of %limit% for today. Come back tomorrow.');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.catalog.ltd.limit.enabled', '1');
INSERT INTO `emulator_settings` (`key` ,`value`) VALUES ('hotel.welcome.alert.oldstyle', '0'); #Set to 1 to use the old Black MOTD Style (Same as commands window)
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.welcome.alert.delay', '10000');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.calendar.starttimestamp', '1512238152');
ALTER TABLE `permissions` ADD `cmd_calendar` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `cmd_bundle`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_calendar', 'calendar'), ('commands.description.cmd_calendar', ':calendar');
ALTER TABLE `pet_actions` CHANGE `pet_name` `pet_name` VARCHAR(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `pet_actions` CHANGE `happy_actions` `happy_actions` VARCHAR(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
ALTER TABLE `pet_actions` CHANGE `tired_actions` `tired_actions` VARCHAR(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', CHANGE `random_actions` `random_actions` VARCHAR(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';

View File

@ -0,0 +1,41 @@
#DATABASE UPDATE: 1.11.0 -> 1.12.0
#Texts update
INSERT INTO `emulator_texts` (`key` ,`value`) VALUES
('scripter.warning.chat.length', '%username% tried to send a room chat message with length %length% while the maximum length is 100 characters.');
#Update catalog_pages table.
ALTER TABLE `catalog_pages` CHANGE `page_headline` `page_headline` VARCHAR(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', CHANGE `page_teaser` `page_teaser` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', CHANGE `page_special` `page_special` VARCHAR(2048) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', CHANGE `page_text1` `page_text1` VARCHAR(2048) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', CHANGE `page_text2` `page_text2` VARCHAR(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', CHANGE `page_text_details` `page_text_details` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '', CHANGE `page_text_teaser` `page_text_teaser` VARCHAR(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
#Configuration Update
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.room.nooblobby', '3'); #Defines the noob lobby for NUX
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.floorplan.max.widthlength', '64'); #Maximum x/y size for the floorplan editor.
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.floorplan.max.totalarea', '4096'); #Maximum total tiles for the floor plan editor.
ALTER TABLE `bots` CHANGE `chat_lines` `chat_lines` VARCHAR(5112) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
UPDATE bots SET chat_lines = '' WHERE chat_lines LIKE 'Default Message!%';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.max.chatlength', '120');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.max.namelength', '15');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.max.chatdelay', '604800');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.chat.max.length', '100');
UPDATE items_base SET interaction_type = 'tent' WHERE item_name LIKE '%tent%';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_invisible', 'invisible;hideme'), ('commands.description.cmd_invisible', ':invisible');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_invisible.updated', 'You are now invisible. Reload the room to reset.');
ALTER TABLE `permissions` ADD `cmd_invisible` ENUM('0','1','2') NOT NULL DEFAULT '0' AFTER `cmd_hal`;
ALTER TABLE `permissions` ADD `acc_can_stalk` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `cmd_ha`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_hidewired', 'hidewired;hidemywired;wiredbegone'),
('commands.succes.cmd_hidewired.hidden', 'Wired is now hidden.'),
('commands.succes.cmd_hidewired.shown', 'Wired is now shown.'),
('commands.errors.cmd_hidewired.permission', 'You don\'t have permission to hide wireds in this room!');
ALTER TABLE `permissions` ADD `cmd_hidewired` ENUM('0','1','2') NOT NULL DEFAULT '2' AFTER `cmd_happyhour`;
ALTER TABLE `rooms` ADD `hidewired` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `jukebox_active`;
UPDATE `emulator_texts` SET `value` = ':masspoints <amount> [type] ' WHERE `emulator_texts`.`key` = 'commands.description.cmd_masspoints';
#END DATABASE UPDATE: 1.11.0 -> 1.12.0

View File

@ -0,0 +1,78 @@
#DATABASE UPDATE: 1.12.0 -> 1.13.0
#IF YOU ARE NOT USING HTTPS RUN:
#UPDATE emulator_settings SET `value` = '0' WHERE `key` LIKE 'camera.use.https';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES
('hotel.view.ltdcountdown.enabled', '1'),
('hotel.view.ltdcountdown.timestamp', '1519496132'),
('hotel.view.ltdcountdown.itemid', '10388'),
('hotel.view.ltdcountdown.pageid', '13'),
('hotel.view.ltdcountdown.itename', 'trophy_netsafety_0');
CREATE TABLE `users_ignored` (
`user_id` int(11) NOT NULL,
`target_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `users_ignored`
ADD KEY `user_id` (`user_id`,`target_id`);
COMMIT;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('io.client.multithreaded.handler', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.room.stickypole.prefix', '%timestamp%, %username%:\\r');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('support.ticket.picked.failed', 'Picking issue failedd: <br>Ticket already picked or does not exist!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('camera.error.creation', 'Failed to create your picture. *sadpanda*');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('scripter.warning.sticky.size', '%username% tried to create a sticky with %amount% characters where %limit% characters are allowed!');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.trading.requires.perk', '1');
ALTER TABLE `users_settings` ADD `perk_trade` ENUM('0','1') NOT NULL DEFAULT '0' COMMENT 'Defines if a player has obtained the perk TRADE. When hotel.trading.requires.perk is set to 1, this perk is required in order to trade. Perk is obtained from the talen track.' AFTER `allow_name_change`;
UPDATE users_settings SET perk_trade = '1' WHERE talent_track_citizenship_level >= (SELECT `level` FROM achievements_talents WHERE reward_perks LIKE '%TRADE%' ORDER BY level ASC LIMIT 1);
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.targetoffer.id', '1');
CREATE TABLE `catalog_target_offers` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`offer_code` varchar(32) NOT NULL,
`title` varchar(128) NOT NULL DEFAULT '',
`description` varchar(2048) NOT NULL DEFAULT '',
`image` varchar(128) NOT NULL,
`icon` varchar(128) NOT NULL,
`end_timestamp` int(11) NOT NULL,
`credits` int(5) NOT NULL DEFAULT '10',
`points` int(5) NOT NULL DEFAULT '10',
`points_type` int(3) NOT NULL DEFAULT '5',
`purchase_limit` int(2) NOT NULL DEFAULT '5',
`catalog_item` int(11) NOT NULL,
`vars` varchar(1024) NOT NULL DEFAULT '' COMMENT 'List of strings seperated by a ;',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
CREATE TABLE `users_target_offer_purchases` (
`user_id` int(11) NOT NULL,
`offer_id` int(11) NOT NULL,
`state` int(11) NOT NULL DEFAULT '0',
`amount` int(11) NOT NULL DEFAULT '0',
`last_purchase` int(11) NOT NULL DEFAULT '0',
UNIQUE KEY `use_id` (`user_id`,`offer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `permissions` ADD `cmd_promote_offer` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `cmd_points`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_promote_offer', 'promoteoffer;promotetargetoffer;promote_offer'), ('commands.description.cmd_promote_offer', ':promoteoffer <offer_id> [info]');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.cmd_promote_offer.info', 'info'), ('commands.error.cmd_promote_offer.not_found', 'The offer could not be found. Use :promoteoffer info to see a list of active offers.');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.cmd_promote_offer.list', 'All available offers (%amount%):<br>%list%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.cmd_promote_offer.list.entry', '%id%: %title% %description%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_promote_offer', 'The promoted offer has been changed to %id%: %title%');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.wordfilter.replacement', 'bobba');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_filterword', 'filter;banword;filterword'),
('commands.error.cmd_filterword.missing_word', 'Please specify the word to filter, with an optional replacement.'),
('commands.error.cmd_filterword.error', 'Failed to add the word to the wordfilter. Possible duplicate?'),
('commands.succes.cmd_filterword.added', 'Wordfilter word %word% has been added with replacement %replacement%!'),
('commands.description.cmd_filterword', ':filter <word> [replacement]');
ALTER TABLE `permissions` ADD `cmd_filterword` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `cmd_fastwalk`;
INSERT IGNORE INTO `emulator_settings` (`key`, `value`) VALUES ('debug.show.headers', '');
UPDATE `navigator_filter` SET `database_query` = 'SELECT * FROM rooms WHERE tags LIKE CONCAT(?, \";%\") ' WHERE `navigator_filter`.`key` = 'tag';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.catalog.purchase.cooldown', '3');
#DATABASE UPDATE: 1.12.0 -> 1.13.0

View File

@ -0,0 +1,21 @@
#DATABASE UPDATE: 1.13.0 -> 1.14.0
#Defines if you are sorting the catalog items using the catalog_items.order_number column or using the regular IDs.
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.catalog.items.display.ordernum', '0');
#Enables / Disables the talenttrack. If set to false, trading does not require the perk (even if 'hotel.trading.requires.perk' is set to 1)
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.talenttrack.enabled', '1');
#Sort using the navigator_flatcats and navigator_publiccats order_num If false use activity as sorting.
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.navigator.sort.ordernum', '1');
ALTER TABLE `catalog_items` ADD `order_number` TINYINT(2) NOT NULL DEFAULT '0' AFTER `offer_id`;
ALTER TABLE `permissions` CHANGE `acc_inifnite_friends` `acc_infinite_friends` ENUM('0','1') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
UPDATE `emulator_texts` SET `value` = 'Superwired Usage Information. Possible reward types:<br/>badge: BADGE CODE<br/>Credits: credits#amount<br/>Pixels: pixels#amount<br/>Points: points#amount<br/>Respect: respect#amount<br/>Furniture: furni#FurnitureID<br/>Catalog Item: cata#CatalogItemID<br/>' WHERE `emulator_texts`.`key` = 'hotel.wired.superwired.info';
ALTER TABLE `navigator_publiccats` ADD `order_num` INT(3) NOT NULL DEFAULT '0' AFTER `visible`;
ALTER TABLE `navigator_flatcats` ADD `order_num` INT(3) NOT NULL DEFAULT '0' AFTER `list_type`;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.wordfilter.automute', '1');
#DATABASE UPDATE: 1.13.0 -> 1.14.0

View File

@ -0,0 +1,74 @@
#DATABASE UPDATE: 1.14.0 -> 1.15.0
ALTER TABLE `pet_commands_data` ADD PRIMARY KEY(`command_id`);
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '1', '1');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '1', '2');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '1', '3');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '1', '4');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '1', '5');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '1', '6');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '1', '7');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '2', '8');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '2', '9');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '2', '10');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '2', '11');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '2', '12');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '2', '13');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '3', '14');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '3', '15');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '3', '16');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '3', '17');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '4', '18');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '4', '19');
INSERT INTO `pet_breeding_races` (`pet_type`, `rarity_level`, `breed`) VALUES ('28', '4', '20');
ALTER TABLE `pet_actions` ADD `offspring_type` INT(3) NOT NULL DEFAULT '-1' AFTER `pet_name`;
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '1', '10', '0', '10', '1');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '2', '20', '0', '20', '10');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '3', '30', '0', '30', '30');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '4', '40', '0', '40', '60');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '5', '50', '0', '50', '120');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '6', '60', '0', '60', '240');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '7', '70', '0', '70', '600');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '8', '80', '0', '80', '1200');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '9', '90', '0', '90', '2400');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Trampolinist', 'games', '10', '100', '0', '100', '4800');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '1', '10', '0', '10', '1');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '2', '20', '0', '20', '10');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '3', '30', '0', '30', '30');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '4', '40', '0', '40', '60');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '5', '50', '0', '50', '120');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '6', '60', '0', '60', '240');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '7', '70', '0', '70', '600');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '8', '80', '0', '80', '1200');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '9', '90', '0', '90', '2400');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'CrossTrainer', 'games', '10', '100', '0', '100', '4800');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '1', '10', '0', '10', '1');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '2', '20', '0', '20', '10');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '3', '30', '0', '30', '30');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '4', '40', '0', '40', '60');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '5', '50', '0', '50', '120');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '6', '60', '0', '60', '240');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '7', '70', '0', '70', '600');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '8', '80', '0', '80', '1200');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '9', '90', '0', '90', '2400');
INSERT INTO `achievements` (`id`, `name`, `category`, `level`, `reward_amount`, `reward_type`, `points`, `progress_needed`) VALUES (NULL, 'Jogger', 'games', '10', '100', '0', '100', '4800');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.furni.gym.achievement.olympics_c16_trampoline', 'Trampolinist'), ('hotel.furni.gym.achievement.olympics_c16_crosstrainer', 'CrossTrainer'), ('hotel.furni.gym.achievement.olympics_c16_treadmill', 'Jogger');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.furni.gym.forcerot.olympics_c16_trampoline', '0'), ('hotel.furni.gym.forcerot.olympics_c16_crosstrainer', '1'), ('hotel.furni.gym.forcerot.olympics_c16_treadmill', '1');
UPDATE emulator_settings SET `key` = 'hotel.view.ltdcountdown.itemname' WHERE `key` = 'hotel.view.ltdcountdown.itename';
INSERT IGNORE INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_empty_pets', 'emptypets;empty_pets');
INSERT IGNORE INTO `emulator_texts` (`key`, `value`) VALUES ('debug.show.headers', '');
ALTER TABLE `items_crackable` ADD PRIMARY KEY(`item_id`);
ALTER TABLE `items_crackable` ADD `required_effect` INT(3) NOT NULL DEFAULT '0' AFTER `achievement_cracked`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('generic.tile.not.exists', 'Tile does not exist!');
ALTER TABLE `items` CHANGE `z` `z` DOUBLE(10,6) NOT NULL DEFAULT '0.000000';
ALTER TABLE `items_base` ADD `customparams` VARCHAR(256) NOT NULL DEFAULT '' AFTER `multiheight`;
#END DATABASE UPDATE: 1.14.0 -> 1.15.0

View File

@ -0,0 +1,5 @@
CREATE INDEX room_enter_log_room_id ON room_enter_log (room_id);
CREATE INDEX room_enter_log_user_entry ON room_enter_log (user_id, timestamp);
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.messenger.search.maxresults', '50');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.alert.oldstyle', '0');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.navigator.staffpicks.categoryid', '1'); #NOTE THIS IS navigator_publiccats

View File

@ -0,0 +1,19 @@
#DATABASE UPDATE: 1.15.2 -> 1.16.0
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.room.rollers.norules', '0');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('postit.charlimit', '366');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.max.friends.hc', '300');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.navigator.populartab.publics', '0');
ALTER TABLE `items_base` CHANGE `stack_height` `stack_height` DOUBLE(4,2) NOT NULL DEFAULT '0.00';
ALTER TABLE `permissions` ADD `badge` VARCHAR(12) NOT NULL DEFAULT '' AFTER `rank_name`;
ALTER TABLE `permissions` ADD `acc_ads_background` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `acc_camera`;
ALTER TABLE `permissions` ADD `cmd_update_achievements` ENUM('0','1') NOT NULL DEFAULT '0' AFTER `cmd_unmute`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.errors.cmd_give_rank.not_found', 'Rank %id% could not be given to %username% as it does not exist!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('hotel.wired.giveachievement.invalid.points', 'This is not a number!'), ('hotel.wired.giveachievement.invalid.achievement', '%achievement% does not exist!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('hotel.error.roomads.nopermission', 'You have no permission to modify room ads!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_update_achievements', 'uach;update_achievements'), ('commands.description.cmd_update_achievements', ':update_achievements');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_update_achievements.updated', 'Achievements have been reloaded!');
#END DATABASE UPDATE: 1.15.2 -> 1.16.0

View File

@ -0,0 +1,9 @@
#DATABASE UPDATE: 1.16.0 -> 2.0.0
INSERT INTO `catalog_pages`(`id`, `parent_id`, `caption_save`, `caption`, `icon_color`, `icon_image`, `visible`, `enabled`, `min_rank`, `club_only`, `order_num`, `page_layout`, `page_headline`, `page_teaser`, `page_special`, `page_text1`, `page_text2`, `page_text_details`, `page_text_teaser`, `vip_only`, `includes`, `room_id`) VALUES (null, -1, 'guilds_forum', 'Group Forums', 1, 27181, '1', '1', 1, '0', 2, 'guild_forum', 'catalog_groups_en', 'catalog_groupsteaser_en', '', 'Group Forums are here! Buy a terminal and chat to your groups!', '', 'Group Forums are here!', '', '0', '', 0);
SET @page_id = LAST_INSERT_ID();
UPDATE catalog_items SET page_id = @page_id WHERE catalog_name LIKE '%guild_forum%';
UPDATE items_base SET `interaction_type` = 'guild_furni' WHERE item_name LIKE '%guild_forum%';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.butler.commanddistance', '5');
#END DATABASE UPDATE: 1.16.0 -> 2.0.0

View File

@ -0,0 +1,21 @@
#DATABASE UPDATE: 1.1.0 -> 1.2.0
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_roommute', 'roommute;room_mute'),
('commands.description.cmd_roommute', ':roommute'),
('commands.succes.cmd_roommute.unmuted', 'The room has been unmuted!'),
('commands.succes.cmd_roommute.muted', 'The room has been muted!'),
('commands.keys.cmd_lay', 'lay'),
('commands.description.cmd_lay', ':lay');
#This is your backup table. Just incase you mess things up.
CREATE TABLE catalog_pages_1_1_0 SELECT * FROM catalog_pages;
ALTER TABLE `catalog_pages` CHANGE `page_layout` `page_layout` ENUM('default_3x3','club_buy','club_gift','frontpage','spaces','recycler','recycler_info','recycler_prizes','trophies','plasto','marketplace','marketplace_own_items','pets','spaces_new','soundmachine','guilds','guild_furni','info_duckets','info_rentables','info_pets','roomads','single_bundle','sold_ltd_items','badge_display','bots','pets2','pets3','productpage1','room_bundle','recent_purchases','default_3x3_color_grouping','guild_forum','vip_buy','info_loyalty','loyalty_vip_buy','collectibles','frontpage_featured') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'default_3x3';
INSERT INTO `catalog_pages` (`id`, `parent_id`, `caption_save`, `caption`, `icon_color`, `icon_image`, `visible`, `enabled`, `min_rank`, `club_only`, `order_num`, `page_layout`, `page_headline`, `page_teaser`, `page_special`, `page_text1`, `page_text2`, `page_text_details`, `page_text_teaser`, `vip_only`, `includes`, `room_id`) VALUES (NULL, '-1', 'furni', 'Furni', '1', '1', '1', '0', '1', '0', '1', 'default_3x3', '', '', '', '', '', '', '', '0', '', '0');
UPDATE catalog_pages, (SELECT id FROM catalog_pages ORDER BY id DESC LIMIT 1) new_id SET parent_id = new_id.id WHERE parent_id = -1;
UPDATE catalog_pages SET parent_id = -1, page_layout = 'frontpage_featured' WHERE caption LIKE 'frontpage';
UPDATE catalog_pages SET parent_id = -1 ORDER BY id DESC LIMIT 1;
#END DATABASE UPDATE: 1.1.0 -> 1.2.0

View File

@ -0,0 +1,58 @@
#DATABASE UPDATE: 1.2.0 -> 1.3.0
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('camera.wait', 'Please wait %seconds% seconds before making another picture.');
ALTER TABLE `rooms` CHANGE `name` `name` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';
ALTER TABLE `rooms` CHANGE `description` `description` VARCHAR( 512 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
ALTER TABLE `rooms` CHANGE `password` `password` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '';
UPDATE `items_base` SET `interaction_type` = 'switch' WHERE `item_name` LIKE 'wf_floor_switch%';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.chat.minimum.interval', '5');
DELETE FROM `emulator_settings` WHERE `key` LIKE 'hotel.home.room';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.home.room', '0');
ALTER TABLE `users` CHANGE `ip_current` `ip_current` VARCHAR( 45 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'Have your CMS update this IP. If you do not do this IP banning won''t work!';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('loggedin.elsewhere', 'You have been disconnected as you logged in from somewhere else.');
CREATE TABLE `catalog_featured_pages` (
`slot_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`image` VARCHAR( 64 ) NOT NULL DEFAULT '',
`caption` VARCHAR( 128 ) NOT NULL DEFAULT '',
`type` ENUM( 'page_name', 'page_id', 'product_name' ) NOT NULL DEFAULT 'page_name',
`expire_timestamp` INT NOT NULL DEFAULT '-1',
`page_name` VARCHAR( 16 ) NOT NULL DEFAULT '',
`page_id` INT NOT NULL DEFAULT '0',
`product_name` VARCHAR( 32 ) NOT NULL DEFAULT ''
) ENGINE = MYISAM ;
INSERT INTO `catalog_featured_pages` (`slot_id`, `image`, `caption`, `type`, `expire_timestamp`, `page_name`, `page_id`, `product_name`) VALUES
('1', 'catalogue/feature_cata_vert_oly16bundle4.png', 'New Olympic 2016 bundle!', 'page_name', '-1', 'olympic_2016', '0', ''),
('2', 'catalogue/feature_cata_hort_habbergerbundle.png', 'Get your own Habbo FASTFOOD restaurant!', 'page_name', '-1', 'fastfood', '0', ''),
('3', 'catalogue/feature_cata_hort_olympic16.png', 'HabboLympix are here!', 'page_name', '-1', 'habbo_lympix', '0', ''),
('4', 'catalogue/feature_cata_hort_HC_b.png', 'Obtain Habbo Club Today!', 'page_name', '-1', 'habbo_club', '0', '');
ALTER TABLE `users_settings` ADD `ignore_bots` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
ADD `ignore_pets` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.keys.cmd_mute_pets', 'mutepets;ignorepets;mute_pets;ignore_pets'),
('commands.succes.cmd_mute_pets.ignored', 'You''re now ignoring pets.'),
('commands.succes.cmd_mute_pets.unignored', 'You''re no longer ignoring pets.'),
('commands.keys.cmd_mute_bots', 'mutebots;ignorebots;mute_bots;ignore_bots'),
('commands.succes.cmd_mute_bots.ignored', 'You are now ignoring bots.'),
('commands.succes.cmd_mute_bots.unignored', 'You are no longer ignoring bots.');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.daily.respect', '3'), ('hotel.daily.respect.pets', '3'), ('hotel.refill.daily', '86400');
CREATE TABLE `commandlogs` (
`user_id` INT NOT NULL ,
`timestamp` INT NOT NULL ,
`command` VARCHAR( 32 ) NOT NULL DEFAULT '',
`params` VARCHAR( 100 ) NOT NULL DEFAULT '',
`succes` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'yes',
INDEX ( `user_id` )
) ENGINE = MYISAM ;
ALTER TABLE `permissions` ADD `log_commands` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `room_effect`;
#END DATABASE UPDATE: 1.2.0 -> 1.3.0

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,107 @@
#DATABASE UPDATE: 1.4.0 -> 1.5.0
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.bot.butler.servedistance', '5');
UPDATE items_base SET interaction_type = 'fx_box' WHERE item_name LIKE 'fxbox_fx%';
ALTER TABLE `rooms` CHANGE `paper_floor` `paper_floor` VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `rooms` CHANGE `paper_wall` `paper_wall` VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `rooms` CHANGE `paper_landscape` `paper_landscape` VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` ADD `cmd_transform` ENUM( '0', '1', '2' ) NOT NULL DEFAULT '0' AFTER `cmd_trash`;
ALTER IGNORE TABLE `pet_actions` ADD PRIMARY KEY ( `pet_type` );
ALTER TABLE `pet_actions` CHANGE `pet_type` `pet_type` INT( 2 ) NOT NULL AUTO_INCREMENT;
ALTER TABLE `pet_actions` AUTO_INCREMENT=0;
SET SESSION sql_mode='NO_AUTO_VALUE_ON_ZERO';
INSERT IGNORE INTO `pet_actions` (`pet_type`) VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11), (12), (13), (14), (15), (16), (17), (18), (19), (20), (21), (22), (23), (24), (25), (26), (27), (28), (29), (30), (31), (32), (33), (34), (35);
UPDATE `pet_actions` SET `pet_name` = 'Dog' WHERE `pet_actions`.`pet_type` = 0;
UPDATE `pet_actions` SET `pet_name` = 'Cat' WHERE `pet_actions`.`pet_type` = 1;
UPDATE `pet_actions` SET `pet_name` = 'Crocodile' WHERE `pet_actions`.`pet_type` = 2;
UPDATE `pet_actions` SET `pet_name` = 'Terrier' WHERE `pet_actions`.`pet_type` = 3;
UPDATE `pet_actions` SET `pet_name` = 'Bear' WHERE `pet_actions`.`pet_type` = 4;
UPDATE `pet_actions` SET `pet_name` = 'Pig' WHERE `pet_actions`.`pet_type` = 5;
UPDATE `pet_actions` SET `pet_name` = 'Lion' WHERE `pet_actions`.`pet_type` = 6;
UPDATE `pet_actions` SET `pet_name` = 'Rhino' WHERE `pet_actions`.`pet_type` = 7;
UPDATE `pet_actions` SET `pet_name` = 'Spider' WHERE `pet_actions`.`pet_type` = 8;
UPDATE `pet_actions` SET `pet_name` = 'Turtle' WHERE `pet_actions`.`pet_type` = 9;
UPDATE `pet_actions` SET `pet_name` = 'Chicken' WHERE `pet_actions`.`pet_type` = 10;
UPDATE `pet_actions` SET `pet_name` = 'Frog' WHERE `pet_actions`.`pet_type` = 11;
UPDATE `pet_actions` SET `pet_name` = 'Dragon' WHERE `pet_actions`.`pet_type` = 12;
UPDATE `pet_actions` SET `pet_name` = '' WHERE `pet_actions`.`pet_type` = 13;
UPDATE `pet_actions` SET `pet_name` = 'Monkey' WHERE `pet_actions`.`pet_type` = 14;
UPDATE `pet_actions` SET `pet_name` = 'Horse' WHERE `pet_actions`.`pet_type` = 15;
UPDATE `pet_actions` SET `pet_name` = 'Monsterplant' WHERE `pet_actions`.`pet_type` = 16;
UPDATE `pet_actions` SET `pet_name` = 'Bunny' WHERE `pet_actions`.`pet_type` = 17;
UPDATE `pet_actions` SET `pet_name` = 'Evil Bunny' WHERE `pet_actions`.`pet_type` = 18;
UPDATE `pet_actions` SET `pet_name` = 'Bored Bunny' WHERE `pet_actions`.`pet_type` = 19;
UPDATE `pet_actions` SET `pet_name` = 'Love Bunny' WHERE `pet_actions`.`pet_type` = 20;
UPDATE `pet_actions` SET `pet_name` = 'Wise Pidgeon' WHERE `pet_actions`.`pet_type` = 21;
UPDATE `pet_actions` SET `pet_name` = 'Cunning Pidgeon' WHERE `pet_actions`.`pet_type` = 22;
UPDATE `pet_actions` SET `pet_name` = 'Evil Monkey' WHERE `pet_actions`.`pet_type` = 23;
UPDATE `pet_actions` SET `pet_name` = 'Baby Bear' WHERE `pet_actions`.`pet_type` = 24;
UPDATE `pet_actions` SET `pet_name` = 'Baby Terrier' WHERE `pet_actions`.`pet_type` = 25;
UPDATE `pet_actions` SET `pet_name` = 'Gnome' WHERE `pet_actions`.`pet_type` = 26;
UPDATE `pet_actions` SET `pet_name` = 'Leprechaun' WHERE `pet_actions`.`pet_type` = 27;
UPDATE `pet_actions` SET `pet_name` = 'Baby Cat' WHERE `pet_actions`.`pet_type` = 28;
UPDATE `pet_actions` SET `pet_name` = 'Baby Dog' WHERE `pet_actions`.`pet_type` = 29;
UPDATE `pet_actions` SET `pet_name` = 'Baby Pig' WHERE `pet_actions`.`pet_type` = 30;
UPDATE `pet_actions` SET `pet_name` = 'Haloompa' WHERE `pet_actions`.`pet_type` = 31;
UPDATE `pet_actions` SET `pet_name` = 'Fools' WHERE `pet_actions`.`pet_type` = 32;
UPDATE `pet_actions` SET `pet_name` = 'Pterodactyl' WHERE `pet_actions`.`pet_type` = 33;
UPDATE `pet_actions` SET `pet_name` = 'Velociraptor' WHERE `pet_actions`.`pet_type` = 34;
UPDATE `pet_actions` SET `pet_name` = 'Cow' WHERE `pet_actions`.`pet_type` = 35;
INSERT INTO `pet_breeds` (`race`, `color_one`, `color_two`, `has_color_one`, `has_color_two`) VALUES ('26', '0', '0', '0', '0'), ('27', '0', '0', '0', '0');
ALTER IGNORE TABLE `emulator_texts` ADD PRIMARY KEY(`key`);
INSERT IGNORE INTO `emulator_texts` (`key`, `value`) VALUES
('commands.generic.cmd_transform.title', 'The following pets are available:'),
('commands.generic.cmd_transform.line', '%name%'),
('commands.description.cmd_transform', ':transform <name> <race> <color>'),
('commands.keys.cmd_transform', 'transform;becomepet'),
('commands.description.cmd_connect_camera', ':connectcamera'),
('commands.description.cmd_roompoints', ':roompoints <amount>'),
('commands.description.cmd_setmax', ':setmax <amount>'),
('commands.description.cmd_staffalert', ':sa <message>');
ALTER TABLE `permissions` CHANGE `cmd_bots` `cmd_bots` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1';
ALTER TABLE `permissions` CHANGE `cmd_control` `cmd_control` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_coords` `cmd_coords` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '2';
ALTER TABLE `permissions` CHANGE `cmd_danceall` `cmd_danceall` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_diagonal` `cmd_diagonal` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1';
ALTER TABLE `permissions` CHANGE `cmd_ejectall` `cmd_ejectall` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '2';
ALTER TABLE `permissions` CHANGE `cmd_enable` `cmd_enable` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1';
ALTER TABLE `permissions` CHANGE `cmd_fastwalk` `cmd_fastwalk` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_freeze_bots` `cmd_freeze_bots` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1';
ALTER TABLE `permissions` CHANGE `cmd_hand_item` `cmd_hand_item` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1';
ALTER TABLE `permissions` CHANGE `cmd_kickall` `cmd_kickall` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '2';
ALTER TABLE `permissions` CHANGE `cmd_moonwalk` `cmd_moonwalk` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_multi` `cmd_multi` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_pet_info` `cmd_pet_info` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '2';
ALTER TABLE `permissions` CHANGE `cmd_pull` `cmd_pull` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_push` `cmd_push` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_roomalert` `cmd_roomalert` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_roomeffect` `cmd_roomeffect` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_roomitem` `cmd_roomitem` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_say` `cmd_say` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_say_all` `cmd_say_all` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_setmax` `cmd_setmax` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_setspeed` `cmd_setspeed` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1';
ALTER TABLE `permissions` CHANGE `cmd_shout` `cmd_shout` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_shout_all` `cmd_shout_all` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_sitdown` `cmd_sitdown` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_superpull` `cmd_superpull` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_teleport` `cmd_teleport` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `cmd_unload` `cmd_unload` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` ADD `cmd_wordquiz` ENUM('0','1','2') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0';
ALTER TABLE `permissions` CHANGE `acc_unlimited_bots` `acc_unlimited_bots` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT 'Overrides the bot restriction to the inventory and room.';
ALTER TABLE `permissions` CHANGE `acc_unlimited_pets` `acc_unlimited_pets` ENUM( '0', '1', '2' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT 'Overrides the pet restriction to the inventory and room.';
DROP TABLE support_chatlogs;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('generic.gift.received.anonymous', 'You''ve received a gift!'), ('generic.gift.received', '%username% gave you a gift!');
ALTER TABLE `emulator_settings` CHANGE `value` `value` VARCHAR( 300 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
#When changing the query make sure the look, username, id and hof_points are available.
INSERT INTO `emulator_settings` (`key`,`value`) VALUES ('hotelview.halloffame.query', 'SELECT users.look, users.username, users.id, users_settings.hof_points FROM users_settings INNER JOIN users ON users_settings.user_id = users.id WHERE hof_points > 0 ORDER BY hof_points DESC, users.id ASC LIMIT 10');
#END DATABASE UPDATE: 1.4.0 -> 1.5.0

View File

@ -0,0 +1,26 @@
#DATABASE UPDATE: 1.5.0 -> 1.6.0
ALTER TABLE `users` ADD `machine_id` VARCHAR( 64 ) NOT NULL DEFAULT '' AFTER `ip_current`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('generic.user.not_found', '%user% not found.');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.name', 'Habbo Hotel'), ('hotel.player.name', 'Habbo');
UPDATE `emulator_texts` SET `key` = 'commands.succes.cmd_ban.ban_issued' WHERE `emulator_texts`.`key` = 'commands.succes.cmd_about.ban_issued';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('catalog.page.vipgifts', '0');
CREATE TABLE `users_achievements_queue` (
`user_id` INT NOT NULL ,
`achievement_id` INT NOT NULL ,
`amount` INT NOT NULL
) ENGINE = MYISAM ;
ALTER TABLE users_achievements_queue ADD UNIQUE `unique_index` (`user_id`, `achievement_id`);
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.rollers.speed.maximum', '100');
ALTER TABLE `vouchers` ADD `catalog_item_id` INT NOT NULL DEFAULT '0';
ALTER TABLE `permissions` ADD `cmd_reload_room` ENUM( '0', '1', '2' ) NOT NULL DEFAULT '2' AFTER `cmd_redeem`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_reload_room', 'reload_room;reload;reloadroom'), ('commands.description.cmd_reload_room', ':reload_room');
ALTER TABLE `bots` ADD `effect` INT( 3 ) NOT NULL DEFAULT '0';
UPDATE `emulator_texts` SET `key` = 'commands.error.cmd_ban.forgot_user' WHERE `emulator_texts`.`key` = 'commands.error.cmd_ban.forgot_message';
#END DATABASE UPDATE: 1.5.0 -> 1.6.0

View File

@ -0,0 +1,22 @@
#DATABASE UPDATE: 1.6.0 -> 1.7.0
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('scripter.warning.packet.closedice', '%username% tried to change furniture state on non dice using the close dice packet on item %id% %itemname%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.succes.cmd_update_guildparts', 'Succes! Guild badgeparts and guild badge imager has been reloaded!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('ban.info.user_id', 'User ID: '), ('ban.info.type', 'Ban Type: '), ('ban.info.reason', 'Reason: '), ('ban.info.staff_id', 'Staff ID: '), ('ban.info.date_issued', 'Date: '), ('ban.info.date_expire', 'Expire Date: '), ('ban.info.ip', 'IP: '), ('ban.info.machine', 'Machine: ');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('command.cmd_userinfo.user_id', 'ID'), ('command.cmd_userinfo.user_name', 'Username'), ('command.cmd_userinfo.motto', 'Motto'), ('command.cmd_userinfo.rank', 'Rank'), ('command.cmd_userinfo.online', 'Online'), ('command.cmd_userinfo.email', 'Email'), ('command.cmd_userinfo.ip_register', 'Register IP'), ('command.cmd_userinfo.ip_current', 'Current IP'), ('command.cmd_userinfo.banned', 'Banned'), ('command.cmd_userinfo.currencies', 'Currencies'), ('command.cmd_userinfo.achievement_score', 'Score'), ('command.cmd_userinfo.credits', 'Credits'), ('command.cmd_userinfo.current_activity', 'Current Activity'), ('command.cmd_userinfo.room', 'Room'), ('command.cmd_userinfo.respect_left', 'Respect Left'), ('command.cmd_userinfo.pet_respect_left', 'Pet Respect Left'), ('command.cmd_userinfo.allow_trade', 'Allow Trade'), ('command.cmd_userinfo.allow_follow', 'Allow Follow'), ('command.cmd_userinfo.allow_friend_request', 'Allow Friend Request'), ('command.cmd_userinfo.total_bans', 'Total bans'), ('command.cmd_userinfo.ban_info', 'Recent Ban Info'), ('command.cmd_userinfo.userinfo', 'Userinfo');
ALTER TABLE `users_wardrobe` CHANGE `look` `look` VARCHAR( 256 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
UPDATE `items_base` SET `interaction_type` = 'football_goal_blue', stack_height = '0.01' WHERE item_name LIKE 'fball_goal_b';
UPDATE `items_base` SET `interaction_type` = 'football_goal_green', stack_height = '0.01' WHERE item_name LIKE 'fball_goal_g';
UPDATE `items_base` SET `interaction_type` = 'football_goal_red', stack_height = '0.01' WHERE item_name LIKE 'fball_goal_r';
UPDATE `items_base` SET `interaction_type` = 'football_goal_yellow', stack_height = '0.01' WHERE item_name LIKE 'fball_goal_y';
UPDATE `items_base` SET `interaction_type` = 'football_counter_blue' WHERE item_name LIKE 'fball_score_b';
UPDATE `items_base` SET `interaction_type` = 'football_counter_green' WHERE item_name LIKE 'fball_score_g';
UPDATE `items_base` SET `interaction_type` = 'football_counter_red' WHERE item_name LIKE 'fball_score_r';
UPDATE `items_base` SET `interaction_type` = 'football_counter_yellow' WHERE item_name LIKE 'fball_score_y';
UPDATE `items_base` SET `interaction_type` = 'football_gate' WHERE item_name LIKE 'fball_gate';
ALTER TABLE `achievements` CHANGE `pixels` `reward_amount` INT( 11 ) NOT NULL DEFAULT '100';
ALTER TABLE `achievements` ADD `reward_type` INT( 2 ) NOT NULL DEFAULT '0' AFTER `reward_amount`;
#END DATABASE UPDATE: 1.6.0 -> 1.7.0

View File

@ -0,0 +1,100 @@
#DATABASE UPDATE: 1.7.0 -> 1.8.0
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_pet_info.pet_not_found', '"Please provide a petname!"');
ALTER TABLE `bans` ADD `cfh_topic` INT( 4 ) NOT NULL DEFAULT '-1';
ALTER TABLE `rooms` CHANGE `paper_floor` `paper_floor` VARCHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0.0';
ALTER TABLE `rooms` CHANGE `paper_wall` `paper_wall` VARCHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0.0';
ALTER TABLE `rooms` CHANGE `paper_landscape` `paper_landscape` VARCHAR( 5 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0.0';
UPDATE rooms SET paper_floor = '0.0' WHERE paper_floor = '0';
UPDATE rooms SET paper_wall = '0.0' WHERE paper_wall = '0';
UPDATE rooms SET paper_landscape = '0.0' WHERE paper_landscape = '0';
UPDATE items_base SET interaction_type = item_name WHERE item_name LIKE 'wf_xtra_%';
UPDATE items_base SET interaction_type = item_name WHERE item_name LIKE 'wf_act_move_furni_to';
UPDATE items_base SET allow_walk = '0' WHERE interaction_type LIKE 'gate';
#Thanks Beny
DROP TABLE IF EXISTS `support_cfh_categories`;
CREATE TABLE `support_cfh_categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name_internal` varchar(255) DEFAULT NULL,
`name_external` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
INSERT INTO `support_cfh_categories` VALUES ('1', 'cyber', 'Cyber sex');
INSERT INTO `support_cfh_categories` VALUES ('2', 'scamming', 'Scamming');
INSERT INTO `support_cfh_categories` VALUES ('3', 'badwords', 'Inappropriate words');
INSERT INTO `support_cfh_categories` VALUES ('4', 'badbehavior', 'Bad behavior');
INSERT INTO `support_cfh_categories` VALUES ('5', 'account', 'Account Issues');
INSERT INTO `support_cfh_categories` VALUES ('6', 'hacking', 'Hacking');
DROP TABLE IF EXISTS `support_cfh_topics`;
CREATE TABLE `support_cfh_topics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`category_id` int(11) DEFAULT NULL,
`name_internal` varchar(255) DEFAULT NULL,
`name_external` varchar(255) DEFAULT NULL,
`action` enum('mods','auto_ignore','auto_reply') DEFAULT 'mods',
`auto_reply` text DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1;
INSERT INTO `support_cfh_topics` VALUES ('1', '1', 'cyber.sextalk', 'Sexual talk', 'auto_ignore', 'Thank you for reporting someone for sexual talk. We have put this user on ignore for you. This means that you can no longer see what they are saying. To turn ignore off for this person you need to click on them and press \'Listen\'. We will take a look at this.');
INSERT INTO `support_cfh_topics` VALUES ('2', '1', 'cyber.asking', 'Asking for cyber sex', 'auto_ignore', 'Thank you for reporting someone for sexual talk. We have put this user on ignore for you. This means that you can no longer see what they are saying. To turn ignore off for this person you need to click on them and press \'Listen\'. We will take a look at this.');
INSERT INTO `support_cfh_topics` VALUES ('3', '1', 'cyber.offering', 'Offering cyber sex', 'auto_ignore', 'Thank you for reporting someone for sexual talk. We have put this user on ignore for you. This means that you can no longer see what they are saying. To turn ignore off for this person you need to click on them and press \'Listen\'. We will take a look at this.');
INSERT INTO `support_cfh_topics` VALUES ('4', '1', 'cyber.porn', 'Sending porn', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('5', '2', 'scamming.scamsite', 'Promoting scam sites', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('6', '2', 'scamming.sellingirl', 'Selling virtual items for real money', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('7', '2', 'scamming.stealingfurni', 'Stealing furni or coins', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('8', '2', 'scamming.account', 'Stealing account information', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('9', '2', 'scamming.casino', 'Casino scamming', 'auto_reply', 'Habbo does not get involved with the casino community due to cases being complex and hard to track. Players gamble at their own risk. When the fun stops, stop.');
INSERT INTO `support_cfh_topics` VALUES ('10', '3', 'badwords.roomname', 'Room name', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('11', '3', 'badwords.roomdesc', 'Room description', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('12', '3', 'badwords.username', 'Username', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('13', '3', 'badwords.motto', 'Moto', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('14', '3', 'badwords.grouporevent', 'Group or event name', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('15', '4', 'badbehavior.trolling', 'Trolling', 'auto_reply', 'Thanks for your report. Please call a moderator to the room by following these steps.\r\n1. Under the Help window click on \'Get immediate help\'.\r\n2. Then click on \'Chat to a Moderator\'.\r\n3. Let them know that somebody is trolling in the room.\r\n4. A moderator will open a chat session with you to resolve the problem.');
INSERT INTO `support_cfh_topics` VALUES ('16', '4', 'badbehavior.blocking', 'Blocking', 'auto_reply', 'Thanks for your report. Please call a moderator to the room by following these steps.\r\n1. Under the Help window click on \'Get immediate help\'.\r\n2. Then click on \'Chat to a Moderator\'.\r\n3. Let them know that somebody is blocking in the room.\r\n4. A moderator will open a chat session with you to resolve the problem.');
INSERT INTO `support_cfh_topics` VALUES ('17', '4', 'badbehavior.flooding', 'Flooding', 'auto_reply', 'Thanks for your report. Please call a moderator to the room by following these steps.\r\n1. Under the Help window click on \'Get immediate help\'.\r\n2. Then click on \'Chat to a Moderator\'.\r\n3. Let them know that somebody is flooding the room.\r\n4. A moderator will open a chat session with you to resolve the problem.');
INSERT INTO `support_cfh_topics` VALUES ('18', '4', 'badbehavior.young', 'Too young for Habbo', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('19', '4', 'badbehavior.staffimpersonation', 'Staff impersonation', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('20', '4', 'badbehavior.offensive', 'Offensive language', 'auto_ignore', 'We have put this user on ignore for you. This means that you can no longer see what they are saying. To turn ignore off for this person you need to click on them and press \'Listen\'');
INSERT INTO `support_cfh_topics` VALUES ('21', '4', 'badbehavior.hate', 'Hate speech', 'auto_ignore', 'We have put this user on ignore for you. This means that you can no longer see what they are saying. To turn ignore off for this person you need to click on them and press \'Listen\'');
INSERT INTO `support_cfh_topics` VALUES ('22', '4', 'badbehavior.violence', 'Violence', 'auto_ignore', 'We have put this user on ignore for you. This means that you can no longer see what they are saying. To turn ignore off for this person you need to click on them and press \'Listen\'');
INSERT INTO `support_cfh_topics` VALUES ('23', '5', 'account.username', 'Change username', 'auto_reply', 'It is currently not possible to change your username in Habbo. When that feature becomes available you\'ll be sure to know! :)');
INSERT INTO `support_cfh_topics` VALUES ('24', '5', 'accunt.payment', 'Payment issues', 'auto_reply', 'Thanks for your report. Unfortunately Game Moderators cannot help with payment issues. Please report your payment issue to us at the help desk on the website where our team of specialists will get back to you.');
INSERT INTO `support_cfh_topics` VALUES ('25', '5', 'account.earn', 'Earn gems', 'auto_reply', 'Thanks for your report. Unfortunately Game Moderators cannot help with payment issues. Please report your payment issue to us at the help desk on the website where our team of specialists will get back to you.');
INSERT INTO `support_cfh_topics` VALUES ('26', '5', 'account.other', 'Something else', 'auto_reply', 'Please use the helpdesk on the website for help with this matter.');
INSERT INTO `support_cfh_topics` VALUES ('27', '6', 'hacking.game', 'Threat to hack Habbo', 'auto_reply', 'We work very hard to ensure that Habbo is safe for all that play. This involves using only the best security technology. We would like to thank you for reporting this to us, but we don\'t think this person is capable of hacking Habbo :)');
INSERT INTO `support_cfh_topics` VALUES ('28', '6', 'hacking.player', 'Threat to hack a player', 'auto_reply', 'There is no way that another Habbo can hack you without knowing your Habbo password or Habbo email address. Please make sure that you are using a secure password which is not easy to remember. We recommend passwords which include letters and numbers such as fl0w3rs. If you wanted to be even more secure you could include a special letter, such as fl0w3r$.\r\n\r\nTo change your Habbo password go to your profile on the website.');
INSERT INTO `support_cfh_topics` VALUES ('29', '6', 'hacking.furni', 'Scripted furniture', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('30', '6', 'hacking.room', 'Scripted room', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('31', '6', 'hacking.character', 'Scripted character', 'mods', null);
INSERT INTO `support_cfh_topics` VALUES ('32', '6', 'hacking.other', 'Other hacking', 'mods', null);
ALTER TABLE `camera_web` ADD `room_id` INT( 11 ) NOT NULL DEFAULT '0' AFTER `user_id`;
ALTER TABLE `commandlogs` CHANGE `command` `command` VARCHAR( 256 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
UPDATE emulator_settings SET `value` = '0' WHERE `key` LIKE 'debug.show.%';
DELETE FROM emulator_errors;
DELETE FROM gift_wrappers;
INSERT INTO gift_wrappers (sprite_id, item_id) SELECT sprite_id, id FROM items_base WHERE item_name LIKE 'present_gen%';
UPDATE gift_wrappers SET type = 'gift';
INSERT INTO gift_wrappers (sprite_id, item_id) SELECT sprite_id, id FROM items_base WHERE item_name LIKE 'present_wrap%';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES
('seasonal.currency.ducket', '0'),
('seasonal.currency.pixel', '0'),
('seasonal.currency.diamond', '5'),
('seasonal.currency.shell', '4'),
('seasonal.currency.names', 'ducket;pixel;shell;diamond');
ALTER TABLE `permissions` ADD `cmd_hal` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_ha`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_hal', ':hal <url> <message>'), ('commands.keys.cmd_hal', 'hal;halink');
ALTER TABLE `permissions` ADD `acc_enable_others` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `acc_empty_others`;
ALTER TABLE `rooms` CHANGE `chat_mode` `chat_mode` INT( 11 ) NOT NULL DEFAULT '0';
UPDATE `emulator_settings` SET `value` = '0' WHERE `emulator_settings`.`key` = 'debug.show.packets';
UPDATE `emulator_settings` SET `value` = '0' WHERE `emulator_settings`.`key` = 'debug.show.packets.undefined';
#END DATABASE UPDATE: 1.7.0 -> 1.8.0

View File

@ -0,0 +1,139 @@
#DATABASE UPDATE: 1.8.0 -> 1.9.0
ALTER TABLE `permissions` ADD `cmd_empty_bots` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `cmd_empty`;
ALTER TABLE `permissions` ADD `cmd_empty_pets` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `cmd_empty_bots`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.succes.cmd_empty_bots.cleared', 'Bots inventory cleared!'),
('commands.succes.cmd_empty_bots.verify', 'This will remove all bots from your inventory. Type :emptybots %generic.yes% to continue!'),
('commands.keys.cmd_empty_bots', 'emptybots;empty_bots;deletebots'),
('commands.description.cmd_empty_bots', ':emptybots'),
('commands.succes.cmd_empty_pets.cleared', 'Pets inventory cleared!'),
('commands.succes.cmd_empty_pets.verify', 'This will remove all pets from your inventory. Type :emptypets %generic.yes% to continue!'),
('commands.keys.cmd_empty_pets', 'emptypets;empty_pets;deletepets'),
('commands.description.cmd_empty_pets', ':emptypets');
CREATE TABLE `users_effects` (
`user_id` INT NOT NULL,
`effect` INT(5) NOT NULL,
`duration` INT NOT NULL DEFAULT '86400',
`activation_timestamp` INT NOT NULL DEFAULT '-1',
`total` INT(2) NOT NULL DEFAULT '1',
UNIQUE(user_id, effect)
) ENGINE = MyISAM;
ALTER TABLE `users_settings` CHANGE `talent_track_citizenship_level` `talent_track_citizenship_level` INT( 2 ) NOT NULL DEFAULT '-1',
CHANGE `talent_track_helpers_level` `talent_track_helpers_level` INT( 2 ) NOT NULL DEFAULT '-1';
UPDATE users_settings SET talent_track_citizenship_level = -1;
UPDATE users_settings SET talent_track_helpers_level = -1;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.room.tags.staff', 'staff;official;habbo');
ALTER TABLE `permissions` ADD `acc_room_staff_tags` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
CREATE TABLE `catalog_club_offers` (
`id` INT NOT NULL DEFAULT NULL AUTO_INCREMENT PRIMARY KEY ,
`enabled` ENUM( '0', '1' ) NOT NULL DEFAULT '1',
`name` VARCHAR( 35 ) NOT NULL ,
`days` INT( 7 ) NOT NULL ,
`credits` INT( 5 ) NOT NULL DEFAULT '10',
`points` INT( 5 ) NOT NULL DEFAULT '0',
`points_type` INT( 3 ) NOT NULL DEFAULT '0',
`type` ENUM( 'HC', 'VIP' ) NOT NULL DEFAULT 'HC',
`deal` ENUM( '0', '1' ) NOT NULL DEFAULT '0'
) ENGINE = MYISAM ;
INSERT INTO `catalog_club_offers` (`id`, `enabled`, `name`, `days`, `credits`, `points`, `points_type`, `type`, `deal`) VALUES
(NULL, '1', 'HABBO_CLUB_7_DAY', '7', '5', '0', '0', 'VIP', '0'),
(NULL, '1', 'HABBO_CLUB_1_MONTH', '31', '20', '0', '0', 'VIP', '0');
UPDATE catalog_pages SET page_layout = 'vip_buy' WHERE page_layout = 'club_buy';
ALTER TABLE `support_cfh_topics` ADD `ignore_target` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `action`;
ALTER TABLE `users_settings` ADD `nux` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('nux.step.1', 'This is the reception button, it will take you to the hotelview.'),
('nux.step.2', 'This is the navigator button, from here you can visit other rooms.'),
('nux.step.3', 'To talk, just enter your message here.'),
('nux.step.4', 'The chat history window lets you read back your previous conversations.'),
('nux.step.5', 'If you want to change your looks, you can use the wardrobe.'),
('nux.step.6', 'In the catalog you can purchase furniture to decorate your own room.'),
('nux.step.7', 'Furniture can be bought with a combination of credits...'),
('nux.step.8', '...duckets,'), ('nux.step.9', 'or diamonds.'),
('nux.step.10', 'All your friends are located down here.'),
('nux.step.11', 'Lets have some fun and start exploring the hotel!');
ALTER TABLE `commandlogs` CHANGE `params` `params` VARCHAR( 256 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('alert.superwired.invalid', 'Invalid superwired configuration. Make sure to NOT use <b>;</b> in the product field!');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.navigator.popular.category.maxresults', '10');
ALTER TABLE `navigator_flatcats` ADD `caption_save` VARCHAR( 32 ) NOT NULL DEFAULT 'caption_save' AFTER `min_rank`;
CREATE TABLE `users_navigator_settings` (
`user_id` INT NOT NULL ,
`caption` VARCHAR( 128 ) NOT NULL ,
`list_type` ENUM( 'list', 'thumbnails' ) NOT NULL DEFAULT 'list',
`display` ENUM( 'visible', 'collapsed' ) NOT NULL DEFAULT 'visible'
) ENGINE = MYISAM ;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_building' WHERE `navigator_flatcats`.`id` =2;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_chat' WHERE `navigator_flatcats`.`id` =3;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_fansite' WHERE `navigator_flatcats`.`id` =4;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_games' WHERE `navigator_flatcats`.`id` =5;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_help' WHERE `navigator_flatcats`.`id` =6;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_life' WHERE `navigator_flatcats`.`id` =7;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_official' WHERE `navigator_flatcats`.`id` =8;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_party' WHERE `navigator_flatcats`.`id` =9;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_personal' WHERE `navigator_flatcats`.`id` =10;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_reviews' WHERE `navigator_flatcats`.`id` =11;
UPDATE `navigator_flatcats` SET `caption_save` = 'caption_save_trading' WHERE `navigator_flatcats`.`id` =12;
ALTER TABLE `permissions` ADD `cmd_allow_trading` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_alert`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES
('commands.description.cmd_allow_trading', ":blocktrading - Enables / Disables the tradelock for a user."),
('commands.keys.cmd_allow_trading', 'tradelock;blocktrading;disabletrade'),
('commands.error.cmd_allow_trading.forgot_username', 'Please specify the user to enable / disable trading for.'),
('commands.error.cmd_allow_trading.forgot_trade', 'Please specify if you want to enable trading for %username%.'),
('commands.succes.cmd_allow_trading.enabled', 'Trading has been enabled for %username%!'),
('commands.succes.cmd_allow_trading.disabled', 'Trading has been disabled for %username%!'),
('commands.error.cmd_allow_trading.user_not_found', 'Target Habbo does not exist.'),
('commands.error.cmd_allow_trading.incorrect_setting', 'Please use %enabled% to enable trading. Use %disabled% to disable trading.');
ALTER TABLE `rooms` CHANGE `allow_walkthrough` `allow_walkthrough` ENUM( '0', '1' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '1';
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('debug.show.users', '1');
#This is work in progress.
CREATE TABLE IF NOT EXISTS `nux_gifts` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`type` enum('item','room') NOT NULL DEFAULT 'item',
`value` varchar(32) NOT NULL COMMENT 'If type item then items.item_name. If type room then room id to copy.',
`image` varchar(256) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
INSERT INTO `nux_gifts` (`id`, `type`, `value`, `image`) VALUES
(1, 'item', 'rare_daffodil_rug', 'notifications/rare_daffodil_rug.png'),
(2, 'item', 'rare_moonrug', 'notifications/rare_moonrug.png'),
(3, 'item', 'sandrug', 'notifications/sandrug.png');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('room.chat.delay', '0');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('room.chat.prefix.format', '[<font color="%color%">%prefix%</font>] ');
ALTER TABLE `permissions` ADD `cmd_roommute` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_roomitem`;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('camera.use.https', '1');
ALTER TABLE `permissions` ADD `prefix` VARCHAR( 5 ) NOT NULL AFTER `log_commands` ,
ADD `prefix_color` VARCHAR( 7 ) NOT NULL AFTER `prefix`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_give_rank.higher.other', '%username% has an higher rank than you and thus cannot change it!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_unmute.not_muted', '%user% is not muted.');
ALTER TABLE `navigator_filter` ADD PRIMARY KEY ( `key` );
ALTER TABLE `navigator_filter` CHANGE `database_query` `database_query` VARCHAR( 1024 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
UPDATE `navigator_filter` SET `compare` = 'contains' WHERE `navigator_filter`.`key` = 'roomname';
UPDATE `navigator_filter` SET `database_query` = 'SELECT * FROM rooms WHERE name COLLATE UTF8_GENERAL_CI LIKE ? ', `compare` = 'contains' WHERE `navigator_filter`.`key` = 'roomname';
UPDATE `navigator_filter` SET `database_query` = 'SELECT rooms.*, CONCAT_WS(rooms.owner_name, rooms.name, rooms.description, rooms.tags, guilds.name, guilds.description) as whole FROM rooms LEFT JOIN guilds ON rooms.guild_id = guilds.id HAVING whole LIKE ? ' WHERE `navigator_filter`.`key` = 'anything';
ALTER TABLE `users_settings` ADD `mute_end_timestamp` INT( 11 ) NOT NULL DEFAULT '0' AFTER `nux`;
ALTER TABLE `wordfilter` ADD `mute` INT( 3 ) NOT NULL DEFAULT '0' COMMENT 'Time user gets muted for mentioning this word.' AFTER `report`;
#END DATABASE UPDATE: 1.7.0 -> 1.8.0

View File

@ -0,0 +1,63 @@
ALTER TABLE `support_tickets` ADD `category` INT( 3 ) NOT NULL DEFAULT '0' AFTER `issue`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('supporttools.not_ticket_owner', 'You are not the moderator currently handling the ticket.');
ALTER TABLE `support_cfh_topics` ADD `default_sanction` INT( 3 ) NOT NULL DEFAULT '0' AFTER `auto_reply`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.success.cmd_setmax', 'Success! Maximum users in this room changed to %value%.');
CREATE TABLE `calendar_rewards` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`name` VARCHAR( 128 ) NOT NULL ,
`custom_image` VARCHAR( 128 ) NOT NULL ,
`credits` INT( 11 ) NOT NULL DEFAULT '0',
`points` INT( 11 ) NOT NULL DEFAULT '0',
`points_type` INT( 3 ) NOT NULL DEFAULT '0',
`badge` VARCHAR( 25 ) NOT NULL DEFAULT '',
`catalog_item_id` INT( 11 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;
CREATE TABLE `calendar_rewards_claimed` (
`user_id` INT NOT NULL ,
`reward_id` INT NOT NULL ,
`timestamp` INT NOT NULL
) ENGINE = MYISAM ;
ALTER TABLE `permissions` ADD `cmd_changename` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `cmd_bundle`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_changename', ':changename'), ('commands.keys.cmd_changename', 'changename;flagme;change_name;namechange');
ALTER TABLE `users_settings` ADD `allow_name_change` ENUM( '0', '1' ) NOT NULL DEFAULT '0';
CREATE TABLE `namechange_log` (
`user_id` INT( 11 ) NOT NULL ,
`old_name` VARCHAR( 32 ) NOT NULL ,
`new_name` VARCHAR( 32 ) NOT NULL ,
`timestamp` INT( 11 ) NOT NULL
) ENGINE = MYISAM ;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES
('basejump.url', 'http://localhost/game/BaseJump.swf'),
('basejump.assets.url', 'http://localhost/gamecenter/gamecenter_basejump/BasicAssets.swf');
DROP INDEX `user_id` ON users_recipes;
ALTER TABLE `users_recipes` ADD UNIQUE KEY ( `user_id`, `recipe` );
DELETE FROM emulator_settings WHERE `key` LIKE 'hotel.max.bots.inventory';
UPDATE `emulator_settings` SET `key` = 'hotel.inventory.max.items' WHERE `emulator_settings`.`key` = 'inventory.max.items';
INSERT INTO `emulator_texts` (`key` , `value` ) VALUES
('commands.error.cmd_credits.user_not_found', 'Could net send %amount% credits to %user%. %user% does not exist.');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.marketplace.currency', '0');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_pull.invalid', 'You cannot pull %username% to there.');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_push.invalid', 'You cannot push %username% to there.');
ALTER TABLE `marketplace_items` ADD `sold_timestamp` INT( 11 ) NOT NULL DEFAULT '0' AFTER `timestamp`;
UPDATE permissions SET acc_debug = '0';
ALTER TABLE `permissions` ADD `level` INT( 2 ) NOT NULL DEFAULT '1' AFTER `rank_name`;
UPDATE permissions SET `level` = `id`;
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('networking.tcp.proxy', '0');
CREATE TABLE `room_trax_playlist` (
`room_id` INT NOT NULL ,
`item_id` INT NOT NULL ,
INDEX ( `room_id` )
) ENGINE = INNODB ;
ALTER TABLE `rooms` ADD `jukebox_active` ENUM( '0', '1' ) NOT NULL DEFAULT '0';

View File

@ -0,0 +1,31 @@
#DATABASE UPDATE: 2.0.0 RC-2 -> 2.0.0 RC-3
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('commands.plugins.oldstyle', '0');
ALTER TABLE `emulator_errors`
ADD COLUMN `version` varchar(64) NOT NULL AFTER `timestamp`,
ADD COLUMN `build_hash` varchar(64) NOT NULL AFTER `version`;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('scripter.modtool.tickets', '1');
ALTER TABLE `items_crackable`
ADD COLUMN `subscription_duration` int(3) NULL AFTER `required_effect`,
ADD COLUMN `subscription_type` varchar(255) NULL COMMENT 'hc for Habbo Club, bc for Builders Club' AFTER `subscription_duration`;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('invisible.prevent.chat', '0');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('invisible.prevent.chat.error', 'While being invisible you cannot talk.');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.succes.cmd_invisible.updated.back', 'You are now visible again.');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.error.cmd_mimic.forbidden_clothing', 'The other user has clothing that you do not own yet.');
ALTER TABLE `permissions`
ADD COLUMN `acc_mimic_unredeemed` enum('0','1') NOT NULL DEFAULT '0';
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('discount.max.allowed.items', '100');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('discount.batch.size', '6');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('discount.batch.free.items', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('discount.bonus.min.discounts', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('discount.additional.thresholds', '40;99');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('clothing.strip_unowned', '0');
#END DATABASE UPDATE: 2.0.0 RC-2 -> 2.0.0 RC-3

View File

@ -0,0 +1,126 @@
CREATE TABLE `users_saved_searches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`search_code` varchar(255) NOT NULL,
`filter` varchar(255) NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
ALTER TABLE `users_settings`
ADD COLUMN `ui_flags` int(11) NOT NULL DEFAULT 1 AFTER `forums_post_count`;
ALTER TABLE `users_settings`
ADD COLUMN `has_gotten_default_saved_searches` tinyint(1) NOT NULL DEFAULT 0 AFTER `ui_flags`;
ALTER TABLE `support_tickets`
ADD COLUMN `group_id` int(11) NOT NULL AFTER `category`,
ADD COLUMN `thread_id` int(11) NOT NULL AFTER `group_id`,
ADD COLUMN `comment_id` int(11) NOT NULL AFTER `thread_id`;
ALTER TABLE `pet_actions`
ADD COLUMN `can_swim` enum('1','0') NULL DEFAULT '0' AFTER `random_actions`;
UPDATE `pet_actions` SET `can_swim` = '1' WHERE `pet_type` = 9 OR `pet_type` = 14 OR `pet_type` = 23 OR `pet_type` = 24 OR `pet_type` = 25 OR `pet_type` = 28 OR `pet_type` = 29 OR `pet_type` = 30 OR `pet_type` = 32;
UPDATE `items_base` SET `customparams` = '30,60,120,180,300,600', `interaction_type` = 'game_timer', `interaction_modes_count` = 1 WHERE `item_name` IN ('fball_counter','bb_counter','es_counter');
ALTER TABLE `youtube_playlists`
CHANGE COLUMN `video_id` `playlist_id` varchar(255) NOT NULL COMMENT 'YouTube playlist ID' AFTER `item_id`;
DROP TABLE `youtube_items`;
TRUNCATE TABLE `youtube_playlists`;
DROP PROCEDURE IF EXISTS DEFAULT_YTTV_PLAYLISTS;
DELIMITER ;;
CREATE PROCEDURE DEFAULT_YTTV_PLAYLISTS()
BEGIN
DECLARE n INT DEFAULT 0;
DECLARE i INT DEFAULT 0;
DECLARE a INT DEFAULT 0;
DECLARE itemId INT default 0;
SELECT COUNT(*) FROM `items_base` WHERE `interaction_type` = 'youtube' INTO n;
SET i=0;
SET @defaultPlaylistIds = '["PL4YfV2mXS8WXOkxFly7YsGL8cKtqp873p","PL4F5KzcUTpEdux38c8CYunT9uNh_k2NPt","PL4F5KzcUTpEcO-1iw3P6gavJ_ALTxqNHn","PL4F5KzcUTpEfpHad_B7j_MulB3-cwtLFh","PL4F5KzcUTpEekJPbcVOaNYVV6VLSo9zRB","PL80F08DAE1B614BA9","PL4F5KzcUTpEfeS5t7EiEIYbpplZivDZTL","PL4ACB18CA629E650A","PL4F5KzcUTpEfyRBCOVKQ4qxlSoHsGDZ82","PL4F5KzcUTpEet7EMwhw0ge5n2oNMr7JY8","PL4F5KzcUTpEfTW4fkX9vrt497MEvWorwK","PL4F5KzcUTpEcit3i1q55-IFFndmo_dsR8","PL4F5KzcUTpEeJleVUhO1MWRJyYDWWp9Do","PL4F5KzcUTpEcFzCpH2_EXtwzKQH8mJGd9","PL4F5KzcUTpEcIiSOH2x3sg2jwACNbSIm9","PL4F5KzcUTpEfRxBiXwTBA7oiybPqoZD_j","PL4YfV2mXS8WUo09aevZX-b47k4PD08-i8","PL4F5KzcUTpEcFzCpH2_EXtwzKQH8mJGd9"]';
WHILE i < n DO
SET itemId = (SELECT id FROM `items_base` WHERE `interaction_type` = 'youtube' LIMIT i, 1);
WHILE a<JSON_LENGTH(@defaultPlaylistIds) DO
INSERT IGNORE INTO `youtube_playlists` (item_id, playlist_id) VALUES (itemId, TRIM(BOTH '"' FROM JSON_EXTRACT(@defaultPlaylistIds, CONCAT('$[',a,']'))));
SET a = a + 1;
END WHILE;
SET a = 0;
SET i = i + 1;
END WHILE;
END;
;;
DELIMITER ;
CALL DEFAULT_YTTV_PLAYLISTS();
DROP PROCEDURE IF EXISTS DEFAULT_YTTV_PLAYLISTS;
ALTER TABLE `permissions`
ADD COLUMN `cmd_update_youtube_playlists` enum('0','1') NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.keys.cmd_update_youtube_playlists', 'update_youtube;update_youtube_playlists');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.succes.cmd_update_youtube_playlists', 'YouTube playlists have been refreshed!');
DROP PROCEDURE IF EXISTS UPDATE_TEAM_WIREDS;
DELIMITER ;;
CREATE PROCEDURE UPDATE_TEAM_WIREDS()
BEGIN
IF (SELECT COUNT(*) FROM emulator_settings WHERE `key` = 'team.wired.update.rc-1') = 0 THEN
INSERT INTO emulator_settings (`key`, `value`) VALUES ('team.wired.update.rc-1', 'DO NOT REMOVE THIS SETTING!');
UPDATE
items
INNER JOIN
items_base
ON
items.item_id = items_base.id
SET items.wired_data = CONCAT(
SUBSTRING_INDEX(items.wired_data, ';', 2),
';',
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(items.wired_data, ';', 3), ';', -1) AS SIGNED INTEGER) + 1,
';',
SUBSTRING_INDEX(SUBSTRING_INDEX(items.wired_data, ';', 4), ';', -1)
)
WHERE
items_base.interaction_type = 'wf_act_give_score_tm';
UPDATE
items
INNER JOIN
items_base
ON
items.item_id = items_base.id
SET items.wired_data = CONCAT(
SUBSTRING_INDEX(items.wired_data, '\t', 1),
'\t',
CAST(SUBSTRING_INDEX(items.wired_data, '\t', -1) AS SIGNED INTEGER) + 1
)
WHERE
items_base.interaction_type = 'wf_act_join_team';
UPDATE
items
INNER JOIN
items_base
ON
items.item_id = items_base.id
SET items.wired_data = CAST(items.wired_data AS SIGNED INTEGER) + 1
WHERE
items_base.interaction_type = 'wf_cnd_actor_in_team' OR items_base.interaction_type = 'wf_cnd_not_in_team';
END IF;
END;
;;
DELIMITER ;
CALL UPDATE_TEAM_WIREDS();
DROP PROCEDURE IF EXISTS UPDATE_TEAM_WIREDS;

View File

@ -0,0 +1,74 @@
#DATABASE UPDATE: 2.0.0 -> DEV
ALTER TABLE `guilds_forums` RENAME TO `old_guilds_forums`;
ALTER TABLE `guilds_forums_comments` RENAME TO `old_guilds_forums_comments`;
DROP TABLE IF EXISTS `guilds_forums_comments`;
CREATE TABLE `guilds_forums_comments` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`thread_id` int(11) NOT NULL DEFAULT 0,
`user_id` int(11) NOT NULL DEFAULT 0,
`message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`created_at` int(11) NOT NULL DEFAULT 0,
`state` int(11) NOT NULL DEFAULT 0,
`admin_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
CREATE TABLE `guilds_forums_threads` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`guild_id` int(11) NULL DEFAULT 0,
`opener_id` int(11) NULL DEFAULT 0,
`subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '',
`posts_count` int(11) NULL DEFAULT 0,
`created_at` int(11) NULL DEFAULT 0,
`updated_at` int(11) NULL DEFAULT 0,
`state` int(11) NULL DEFAULT 0,
`pinned` tinyint(4) NULL DEFAULT 0,
`locked` tinyint(4) NULL DEFAULT 0,
`admin_id` int(11) NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Compact;
DROP PROCEDURE IF EXISTS MIGRATION_FORUMS;
DELIMITER ;;
CREATE PROCEDURE MIGRATION_FORUMS()
BEGIN
DECLARE n INT DEFAULT 0;
DECLARE i INT DEFAULT 0;
SELECT COUNT(*) FROM `old_guilds_forums` INTO n;
SET i=0;
WHILE i<n DO
SET @old_id = (SELECT id FROM `old_guilds_forums` LIMIT i,1);
INSERT INTO `guilds_forums_threads` (`guild_id`, `opener_id`, `subject`, `posts_count`, `created_at`, `updated_at`, `state`, `pinned`, `locked`, `admin_id`)
SELECT `guild_id`, `user_id`, `subject`, 0 AS `posts_count`, `timestamp`, `timestamp`, IF(STRCMP(`state`,'OPEN')=0, 0, IF(STRCMP(`state`,'HIDDEN_BY_ADMIN')=0, 10, IF(STRCMP(`state`,'HIDDEN_BY_STAFF')=0, 20, 1))) AS `state`, IF(STRCMP(`pinned`,'1')=0, 1, 0), IF(STRCMP(`locked`,'1')=0, 1, 0), `admin_id` FROM `old_guilds_forums`
LIMIT i,1;
SET @new_id = LAST_INSERT_ID();
INSERT INTO `guilds_forums_comments` (`thread_id`, `user_id`, `message`, `created_at`, `state`, `admin_id`)
SELECT @new_id AS `thread_id`, `user_id`, `message`, `timestamp`, IF(STRCMP(`state`,'OPEN')=0, 0, IF(STRCMP(`state`,'HIDDEN_BY_ADMIN')=0, 10, IF(STRCMP(`state`,'HIDDEN_BY_STAFF')=0, 20, 1))) AS `state`, `admin_id` FROM `old_guilds_forums_comments`
WHERE thread_id = @old_id;
SET i = i + 1;
END WHILE;
END;
;;
DELIMITER ;
CALL MIGRATION_FORUMS();
DROP PROCEDURE IF EXISTS MIGRATION_FORUMS;
UPDATE `users_pets` LEFT JOIN `rooms` ON `users_pets`.`room_id` = `rooms`.`id` SET `users_pets`.`room_id` = 0 WHERE `users_pets`.`room_id` != 0 AND `rooms`.`id` IS NULL;
ALTER TABLE `users_settings` ADD COLUMN `forums_post_count` int(11) NULL DEFAULT 0 AFTER `perk_trade`;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('catalog.guild.hc_required', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('catalog.ltd.random', '1');
UPDATE `emulator_settings` SET `value` = '0' WHERE `key` = 'hotel.banzai.points.tile.steal';
UPDATE `emulator_settings` SET `value` = '0' WHERE `key` = 'hotel.banzai.points.tile.fill';
UPDATE `emulator_settings` SET `value` = '1' WHERE `key` = 'hotel.banzai.points.tile.lock';
#END DATABASE UPDATE: 2.0.0 -> DEV

View File

@ -0,0 +1,10 @@
ALTER TABLE `permissions`
ADD COLUMN `cmd_add_youtube_playlist` enum('0','1') NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.keys.cmd_add_youtube_playlist', 'add_youtube;add_playlist;add_youtube_playlist');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.error.cmd_add_youtube_playlist.usage', 'Usage: base_item_id youtube_playlist_id');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.error.cmd_add_youtube_playlist.no_base_item', 'A base item with that ID could not be found.');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.error.cmd_add_youtube_playlist.failed_playlist', 'Error: unable to fetch the given YouTube playlist.');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.succes.cmd_add_youtube_playlist', 'The playlist has been added successfully!');
UPDATE `emulator_texts` SET `value` = 'Superwired Usage Information. Possible reward types:<br/>badge: BADGE CODE<br/>Credits: credits#amount<br/>Pixels: pixels#amount<br/>Points: points#amount<br/>Respect: respect#amount<br/>Furniture: furni#FurnitureID<br/>Catalog Item: cata#CatalogItemID' WHERE `key` = 'hotel.wired.superwired.info';

View File

@ -0,0 +1 @@
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.room.floorplan.check.enabled', '1');

View File

@ -0,0 +1,56 @@
ALTER TABLE `permissions`
ADD COLUMN `auto_credits_amount` INT DEFAULT '0',
ADD COLUMN `auto_pixels_amount` INT DEFAULT '0',
ADD COLUMN `auto_gotw_amount` INT DEFAULT '0',
ADD COLUMN `auto_points_amount` INT DEFAULT '0';
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.enabled', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.interval', '600');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.ignore.idled', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.ignore.hotelview', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.type', '4');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.name', 'shell');
CREATE TABLE `items_highscore_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`item_id` int(11) NOT NULL,
`user_ids` varchar(500) NOT NULL,
`score` int(11) NOT NULL,
`is_win` tinyint(1) NULL DEFAULT 0,
`timestamp` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
DROP TABLE IF EXISTS `calendar_rewards`;
CREATE TABLE `calendar_rewards` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`custom_image` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`credits` int(11) NOT NULL DEFAULT 0,
`points` int(11) NOT NULL DEFAULT 0,
`points_type` int(3) NOT NULL DEFAULT 0,
`badge` varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`item_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 3 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE `voucher_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`voucher_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`timestamp` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
ALTER TABLE `vouchers`
ADD COLUMN `amount` int(11) NOT NULL DEFAULT 1,
ADD COLUMN `limit` int(11) NOT NULL DEFAULT -1;
ALTER TABLE `users_pets`
ADD COLUMN `mp_is_dead` tinyint(1) NOT NULL DEFAULT 0;
ALTER TABLE `items` CHARACTER SET = utf8, COLLATE = utf8_general_ci;
ALTER TABLE `items_base`
ADD COLUMN `clothing_on_walk` varchar(255) NOT NULL DEFAULT '';

View File

@ -0,0 +1 @@
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.error.cmd_badge.unknown_user', 'Failed to find the given user.');

View File

@ -0,0 +1,2 @@
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.room.furni.max', '2500');
UPDATE items_base SET interaction_type = 'vote_counter' WHERE item_name = 'vote_count_add';

View File

@ -0,0 +1,6 @@
UPDATE items_base SET interaction_type = 'totem_leg' WHERE item_name = 'totem_leg';
UPDATE items_base SET interaction_type = 'totem_head' WHERE item_name = 'totem_head';
UPDATE items_base SET interaction_type = 'totem_planet' WHERE item_name = 'totem_planet';
UPDATE items_base SET interaction_modes_count = '3' WHERE item_name = 'totem_planet';
UPDATE items_base SET interaction_modes_count = '12' WHERE item_name = 'totem_leg';
UPDATE items_base SET interaction_modes_count = '9' WHERE item_name = 'totem_head';

View File

@ -0,0 +1,32 @@
CREATE TABLE `sanctions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`habbo_id` int(11) NOT NULL DEFAULT '0',
`sanction_level` int(11) NOT NULL DEFAULT '0',
`probation_timestamp` int(32) NOT NULL DEFAULT '0',
`reason` varchar(255) NOT NULL DEFAULT '',
`trade_locked_until` int(32) NOT NULL DEFAULT '0',
`is_muted` tinyint(1) NOT NULL DEFAULT '0',
`mute_duration` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `sanction_levels` (
`level` int(1) NOT NULL,
`type` enum('ALERT', 'BAN', 'MUTE') NOT NULL,
`hour_length` int(12) NOT NULL,
`probation_days` int(12) NOT NULL,
PRIMARY KEY (`level`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `sanction_levels`
ADD CONSTRAINT `level` CHECK (`level`<=7);
INSERT INTO `sanction_levels` VALUES (1, 'ALERT', 0, 30);
INSERT INTO `sanction_levels` VALUES (2, 'MUTE', 1, 30);
INSERT INTO `sanction_levels` VALUES (3, 'BAN', 18, 30);
INSERT INTO `sanction_levels` VALUES (4, 'BAN', 168, 30);
INSERT INTO `sanction_levels` VALUES (5, 'BAN', 720, 60);
INSERT INTO `sanction_levels` VALUES (6, 'BAN', 720, 60);
INSERT INTO `sanction_levels` VALUES (7, 'BAN', 876581, 876581);
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.sanctions.enabled', '1');

View File

@ -0,0 +1,23 @@
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('camera.price.points.publish', '5');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('camera.price.points.publish.type', '0');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('camera.price.points.type', '0');
ALTER TABLE `room_promotions`
ADD COLUMN `start_timestamp` int(11) NOT NULL DEFAULT -1 AFTER `end_timestamp`;
ALTER TABLE `room_promotions`
ADD COLUMN `category` int(11) NOT NULL DEFAULT 0 AFTER `start_timestamp`;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('navigator.eventcategories', '1,Hottest Events,false;2,Parties & Music,true;3,Role Play,true;4,Help Desk,true;5,Trading,true;6,Games,true;7,Debates & Discussions,true;8,Grand Openings,true;9,Friending,true;10,Jobs,true;11,Group Events,true');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('room.promotion.badge', 'RADZZ');
CREATE TABLE `guild_forum_views` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`guild_id` int(11) NOT NULL,
`timestamp` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
ALTER TABLE `support_tickets`
ADD COLUMN `photo_item_id` int(11) NOT NULL DEFAULT -1 AFTER `comment_id`;

View File

@ -0,0 +1,7 @@
ALTER TABLE `users_pets`
ADD COLUMN `saddle_item_id` int(11) NULL;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.bot.placement.messages', 'Yo!;Hello I\'m a real party animal!;Hello!');
UPDATE `items_base` SET `customparams` = '1,true' WHERE `item_name` = 'wf_blob';
UPDATE `items_base` SET `customparams` = '5,false' WHERE `item_name` = 'wf_blob2';

View File

@ -0,0 +1,7 @@
ALTER TABLE `users_pets`
ADD COLUMN `saddle_item_id` int(11) NULL;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.bot.placement.messages', 'Yo!;Hello I\'m a real party animal!;Hello!');
UPDATE `items_base` SET `customparams` = '1,true' WHERE `item_name` = 'wf_blob';
UPDATE `items_base` SET `customparams` = '5,false' WHERE `item_name` = 'wf_blob2';

View File

@ -0,0 +1,2 @@
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.generic.cmd_commands.text', 'Your Commands');
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('commands.keys.cmd_stand', 'stand');

View File

@ -0,0 +1,3 @@
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.room.stickies.max', '200');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('retro.style.homeroom', '1');

View File

@ -0,0 +1,132 @@
CREATE TABLE `users_subscriptions` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` int(10) UNSIGNED NULL,
`subscription_type` varchar(255) NULL,
`timestamp_start` int(10) UNSIGNED NULL,
`duration` int(10) UNSIGNED NULL,
`active` tinyint(1) NULL DEFAULT 1,
PRIMARY KEY (`id`),
INDEX `user_id`(`user_id`),
INDEX `subscription_type`(`subscription_type`),
INDEX `timestamp_start`(`timestamp_start`),
INDEX `active`(`active`)
);
CREATE TABLE `logs_shop_purchases` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`timestamp` int(10) UNSIGNED NULL,
`user_id` int(10) UNSIGNED NULL,
`catalog_item_id` int(10) UNSIGNED NULL,
`item_ids` text DEFAULT NULL,
`catalog_name` varchar(255) NULL,
`cost_credits` int(10) NULL,
`cost_points` int(10) NULL,
`points_type` int(10) NULL,
`amount` int(10) NULL,
PRIMARY KEY (`id`),
INDEX `timestamp`(`timestamp`),
INDEX `user_id`(`user_id`)
);
CREATE TABLE `logs_hc_payday` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`timestamp` int(10) UNSIGNED NULL,
`user_id` int(10) UNSIGNED NULL,
`hc_streak` int(10) UNSIGNED NULL,
`total_coins_spent` int(10) UNSIGNED NULL,
`reward_coins_spent` int(10) UNSIGNED NULL,
`reward_streak` int(10) UNSIGNED NULL,
`total_payout` int(10) UNSIGNED NULL,
`currency` varchar(255) NULL,
`claimed` tinyint(1) DEFAULT 0 NULL,
PRIMARY KEY (`id`),
INDEX `timestamp`(`timestamp`),
INDEX `user_id`(`user_id`)
);
ALTER TABLE `emulator_settings` MODIFY COLUMN `value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `key`;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.enabled', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.next_date', '2020-10-15 00:00:00');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.interval', '1 month');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.query', 'SELECT SUM(cost_credits) AS `amount_spent` FROM `logs_shop_purchases` WHERE `user_id` = @user_id AND `timestamp` > @timestamp_start AND `timestamp` <= @timestamp_end AND `catalog_name` NOT LIKE \'CF_%\' AND `catalog_name` NOT LIKE \'CFC_%\';');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.streak', '7=5;30=10;60=15;90=20;180=25;365=30');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.currency', 'credits');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.percentage', '10');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.payday.creditsspent_reset_on_expire', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.achievement', 'VipHC');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.discount.enabled', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.hc.discount.days_before_end', '7');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.scheduler.enabled', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('subscriptions.scheduler.interval', '10');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.clothingvalidation.onhcexpired', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.clothingvalidation.onlogin', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.clothingvalidation.onchangelooks', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.clothingvalidation.onmimic', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.clothingvalidation.onmannequin', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.clothingvalidation.onfballgate', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('gamedata.figuredata.url', 'https://habbo.com/gamedata/figuredata/0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.max.friends', '300');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.max.friends.hc', '1100');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.max.rooms', '50');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.users.max.rooms.hc', '75');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.pixels.hc_modifier', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.points.hc_modifier', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.credits.hc_modifier', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.auto.gotwpoints.hc_modifier', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('room.chat.mutearea.allow_whisper', '1');
DELETE FROM `emulator_settings` WHERE `key` IN ('hotel.max.rooms.per.user', 'hotel.max.rooms.user', 'hotel.max.rooms.vip', 'max.friends', 'hotel.max.friends', 'max.friends.hc', 'hotel.max.friends.hc');
ALTER TABLE `users_settings` ADD COLUMN `max_friends` int(10) NULL DEFAULT 300 AFTER `has_gotten_default_saved_searches`;
ALTER TABLE `users_settings` ADD COLUMN `max_rooms` int(10) NULL DEFAULT 50 AFTER `has_gotten_default_saved_searches`;
ALTER TABLE `users_settings` ADD COLUMN `last_hc_payday` int(10) NULL DEFAULT 0 AFTER `has_gotten_default_saved_searches`;
ALTER TABLE `users_settings` ADD COLUMN `hc_gifts_claimed` int(10) NULL DEFAULT 0 AFTER `has_gotten_default_saved_searches`;
ALTER TABLE `permissions` ADD COLUMN `cmd_subscription` enum('0','1') NULL DEFAULT '0' AFTER `cmd_credits`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_subscription', 'subscription;sub');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.invalid_action', 'Invalid action specified. Must be add, +, remove or -');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.type_not_found', '%subscription% is not a valid subscription type');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.invalid_params_time', 'Invalid time span, try: x minutes/days/weeks/months');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.success_add_time', 'Successfully added %time% seconds to %subscription% on %user%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.user_not_have', '%user% does not have the %subscription% subscription');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.success_remove_time', 'Successfully removed %time% seconds from %subscription% on %user%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.success_remove_sub', 'Successfully removed %subscription% sub from %user%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.user_not_found', '%user% was not found');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscription.invalid_params', 'Invalid command format');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('subscriptions.hc.payday.message', 'Woohoo HC Payday has arrived! You have received %amount% credits to your purse. Enjoy!');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.roomuser.idle.not_dancing.ignore.wired_idle', '0');
-- OPTIONAL HC MIGRATION
-- INSERT INTO users_subscriptions SELECT NULL, user_id, 'HABBO_CLUB' as `subscription_type`, UNIX_TIMESTAMP() AS `timestamp_start`, (club_expire_timestamp - UNIX_TIMESTAMP()) AS `duration`, 1 AS `active` FROM users_settings WHERE club_expire_timestamp > UNIX_TIMESTAMP();
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.rooms.deco_hosting', '1');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('easter_eggs.enabled', '1');
ALTER TABLE `bots`
ADD COLUMN `bubble_id` int(3) NULL DEFAULT 31 AFTER `effect`;
-- Permissions to see tent chat
ALTER TABLE `permissions` ADD `acc_see_tentchat` ENUM('0', '1') NOT NULL DEFAULT '0' AFTER `acc_see_whispers`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('hotel.room.tent.prefix', 'Tent');
-- Roombadge command
ALTER TABLE `permissions` ADD `cmd_roombadge` ENUM('0', '1') NOT NULL DEFAULT '0' AFTER `cmd_massbadge`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_roombadge.no_badge', 'No badge specified!');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_roombadge', 'roombadge');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_roombadge', ':roombadge <badge>');
-- Making items.wired_data column bigger since wired data is saved as JSON now
ALTER TABLE `items` MODIFY COLUMN `wired_data` varchar(10000);
-- Mute area sqls
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('room.chat.mutearea.allow_whisper', 'false');

View File

@ -0,0 +1,52 @@
-- Hide email from specific ranks.
ALTER TABLE `permissions` ADD `acc_hide_mail` ENUM('0', '1') NOT NULL DEFAULT '0' AFTER `acc_hide_ip`;
-- Flood with rights.
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('flood.with.rights', '0');
-- Softkick command.
ALTER TABLE `permissions` ADD `cmd_softkick` ENUM('0', '1') NOT NULL DEFAULT '0' AFTER `cmd_kickall`;
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.keys.cmd_softkick', 'softkick');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_softkick_not_found', '%user% not found');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_softkick_error_self', 'You can not softkick yourself!');
-- Rank ignoring
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('generic.error.ignore_higher_rank', 'You can\'t ignore this user.');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.allow.ignore.staffs', '1');
-- Inventory Limiting
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('error.bots.max.inventory', 'You can\'t buy or pickup anymore bots until you place some, the maximum amount of bots you are allowed is %amount%.');
UPDATE `emulator_texts` SET `value` = 'You\'ve reached the maximum amount of pets in your inventory! The Limit is %amount%!' WHERE `key` = 'error.pets.max.inventory';
-- Tradelock counter
ALTER TABLE `users_settings` ADD `tradelock_amount` INT(11) NOT NULL DEFAULT '0' AFTER `helper_level`;
-- Gift wrapping configuration
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.gifts.box_types', '0,1,2,3,4,5,6,8');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.gifts.ribbon_types', '0,1,2,3,4,5,6,7,8,9,10');
-- Configurable mute time
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.flood.mute.time', '30');
-- TraxManager Jukebox Limits
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.jukebox.limit.large', '20');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.jukebox.limit.normal', '10');
-- Background Toner Scripter Warning
INSERT INTO `emulator_texts`(`key`, `value`) VALUES ('scripter.warning.item.bgtoner.permission', '%username% tried to change the background toner without rights in %room% owned by %owner%');
-- Table structure for room_trax
DROP TABLE IF EXISTS `room_trax`;
CREATE TABLE `room_trax` (
`room_id` int(11) NOT NULL,
`trax_item_id` int(11) NOT NULL
) ENGINE = InnoDB CHARACTER SET = armscii8 COLLATE = armscii8_general_ci ROW_FORMAT = Compact;
-- Table structure for trax_playlist
DROP TABLE IF EXISTS `trax_playlist`;
CREATE TABLE `trax_playlist` (
`trax_item_id` int(11) NOT NULL,
`item_id` int(11) NOT NULL
) ENGINE = InnoDB CHARACTER SET = armscii8 COLLATE = armscii8_general_ci ROW_FORMAT = Compact;

View File

@ -0,0 +1,2 @@
-- Recycler value fix
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('recycler.value', '8');

View File

@ -0,0 +1,3 @@
-- Adds config value for max amount of people to move per roller. Default is like habbo.
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.room.rollers.roll_avatars.max', '1');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.nux.gifts.enabled', '0');

View File

@ -0,0 +1,96 @@
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('wired.place.under', '0');
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('wired.custom.enabled', '0');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_stalk.forgot_username', 'Specify the username of the Habbo you want to follow!');
-- Enable or Disable TTY in console (Default is enabled)
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('console.mode', '1');
-- Youtube Api v3 key to YoutubeManager
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('youtube.apikey', '');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.gifts.length.max', '300');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.trophies.length.max', '300');
-- Add friendship categories table
CREATE TABLE `messenger_categories` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(25) NOT NULL,
`user_id` int NOT NULL,
UNIQUE KEY `identifier` (`id`)
);
-- Set an ID (int) from category list items
ALTER TABLE messenger_friendships ADD category int NOT NULL DEFAULT '0' AFTER friends_since;
-- ----------------------------
-- Table structure for calendar_campaigns
-- ----------------------------
DROP TABLE IF EXISTS `calendar_campaigns`;
CREATE TABLE `calendar_campaigns` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`image` varchar(255) NOT NULL DEFAULT '',
`start_timestamp` int NOT NULL DEFAULT '0',
`total_days` int NOT NULL DEFAULT '30',
`lock_expired` enum('1','0') NOT NULL DEFAULT '1',
`enabled` enum('1','0') NOT NULL DEFAULT '1',
UNIQUE KEY `id` (`id`)
);
-- ----------------------------
-- Table structure for calendar_rewards
-- ----------------------------
DROP TABLE IF EXISTS `calendar_rewards`;
CREATE TABLE `calendar_rewards` (
`id` int NOT NULL AUTO_INCREMENT,
`campaign_id` int NOT NULL DEFAULT '0',
`product_name` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`custom_image` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`credits` int NOT NULL DEFAULT '0',
`pixels` int NOT NULL DEFAULT '0',
`points` int NOT NULL DEFAULT '0',
`points_type` int NOT NULL DEFAULT '0',
`badge` varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '',
`item_id` int NOT NULL DEFAULT '0',
`subscription_type` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT '',
`subscription_days` int NOT NULL DEFAULT '0',
PRIMARY KEY (`id`) USING BTREE
);
-- ----------------------------
-- Table structure for calendar_rewards_claimed
-- ----------------------------
DROP TABLE IF EXISTS `calendar_rewards_claimed`;
CREATE TABLE `calendar_rewards_claimed` (
`user_id` int NOT NULL,
`campaign_id` int NOT NULL DEFAULT '0',
`day` int NOT NULL,
`reward_id` int NOT NULL,
`timestamp` int NOT NULL
);
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.calendar.default', 'test');
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.calendar.pixels.hc_modifier', '2.0');
-- Calendar force open
ALTER TABLE `permissions` ADD COLUMN `acc_calendar_force` enum('0','1') NULL DEFAULT '0';
-- UpdateCalendar command.
ALTER TABLE `permissions` ADD `cmd_update_calendar` ENUM('0', '1') NOT NULL DEFAULT '0';
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_update_calendar', ':update_calendar'), ('commands.keys.cmd_update_calendar', 'update_calendar');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.success.cmd_update_calendar', 'Calendar updated successfully!');
-- add moodlight configuration
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('moodlight.color_check.enabled', '1');
-- Mannequin name
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('hotel.mannequin.name.default', 'My look');
-- RCON: Change Username
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('rcon.alert.user.change_username', 'You can change your username. Click on yourself to change it.');
-- Custom Stacking Setting
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('custom.stacking.enabled', '0');

View File

@ -0,0 +1,9 @@
-- Wired variables for bots
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.name', '%name%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.roomname', '%roomname%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.user_count', '%user_count%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.owner', '%owner%');
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.item_count', '%item_count%');
-- Enable bubble alerts
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('bubblealerts.enabled', '1');

View File

@ -0,0 +1,496 @@
package com.eu.habbo;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.ConsoleAppender;
import com.eu.habbo.core.*;
import com.eu.habbo.core.consolecommands.ConsoleCommand;
import com.eu.habbo.database.Database;
import com.eu.habbo.habbohotel.GameEnvironment;
import com.eu.habbo.networking.camera.CameraClient;
import com.eu.habbo.networking.gameserver.GameServer;
import com.eu.habbo.networking.rconserver.RCONServer;
import com.eu.habbo.plugin.PluginManager;
import com.eu.habbo.plugin.events.emulator.EmulatorConfigUpdatedEvent;
import com.eu.habbo.plugin.events.emulator.EmulatorLoadedEvent;
import com.eu.habbo.plugin.events.emulator.EmulatorStartShutdownEvent;
import com.eu.habbo.plugin.events.emulator.EmulatorStoppedEvent;
import com.eu.habbo.threading.ThreadPooling;
import com.eu.habbo.util.imager.badges.BadgeImager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.security.MessageDigest;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public final class Emulator {
private static final Logger LOGGER = LoggerFactory.getLogger(Emulator.class);
private static final String OS_NAME = (System.getProperty("os.name") != null ? System.getProperty("os.name") : "Unknown");
private static final String CLASS_PATH = (System.getProperty("java.class.path") != null ? System.getProperty("java.class.path") : "Unknown");
public final static int MAJOR = 3;
public final static int MINOR = 5;
public final static int BUILD = 0;
public final static String PREVIEW = "";
public static final String version = "v" + " " + MAJOR + "." + MINOR + "." + BUILD + " " + PREVIEW;
public static String build = "";
public static boolean isReady = false;
public static boolean isShuttingDown = false;
public static boolean stopped = false;
public static boolean debugging = false;
private static int timeStarted = 0;
private static Runtime runtime;
private static ConfigurationManager config;
private static CryptoConfig crypto;
private static TextsManager texts;
private static GameServer gameServer;
private static RCONServer rconServer;
private static CameraClient cameraClient;
private static Logging logging;
private static Database database;
private static DatabaseLogger databaseLogger;
private static ThreadPooling threading;
private static GameEnvironment gameEnvironment;
private static PluginManager pluginManager;
private static BadgeImager badgeImager;
static {
Thread hook = new Thread(new Runnable() {
public synchronized void run() {
Emulator.dispose();
}
});
hook.setPriority(10);
Runtime.getRuntime().addShutdownHook(hook);
}
public static void main(String[] args) throws Exception {
try {
if (OS_NAME.startsWith("Windows") && !CLASS_PATH.contains("idea_rt.jar")) {
ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
ConsoleAppender<ILoggingEvent> appender = (ConsoleAppender<ILoggingEvent>) root.getAppender("Console");
appender.stop();
appender.setWithJansi(true);
appender.start();
}
Locale.setDefault(new Locale("en"));
setBuild();
Emulator.stopped = false;
ConsoleCommand.load();
Emulator.logging = new Logging();
LOGGER.info("Version: {}", version);
LOGGER.info("Build: {}", build);
long startTime = System.nanoTime();
Emulator.runtime = Runtime.getRuntime();
Emulator.config = new ConfigurationManager("config.ini");
Emulator.crypto = new CryptoConfig(
Emulator.getConfig().getBoolean("enc.enabled", false),
Emulator.getConfig().getValue("enc.e"),
Emulator.getConfig().getValue("enc.n"),
Emulator.getConfig().getValue("enc.d"));
Emulator.database = new Database(Emulator.getConfig());
Emulator.databaseLogger = new DatabaseLogger();
Emulator.config.loaded = true;
Emulator.config.loadFromDatabase();
Emulator.threading = new ThreadPooling(Emulator.getConfig().getInt("runtime.threads"));
Emulator.getDatabase().getDataSource().setMaximumPoolSize(Emulator.getConfig().getInt("runtime.threads") * 2);
Emulator.getDatabase().getDataSource().setMinimumIdle(10);
Emulator.pluginManager = new PluginManager();
Emulator.pluginManager.reload();
Emulator.getPluginManager().fireEvent(new EmulatorConfigUpdatedEvent());
Emulator.texts = new TextsManager();
new CleanerThread();
Emulator.gameServer = new GameServer(getConfig().getValue("game.host", "127.0.0.1"), getConfig().getInt("game.port", 30000));
Emulator.rconServer = new RCONServer(getConfig().getValue("rcon.host", "127.0.0.1"), getConfig().getInt("rcon.port", 30001));
Emulator.gameEnvironment = new GameEnvironment();
Emulator.gameEnvironment.load();
Emulator.gameServer.initializePipeline();
Emulator.gameServer.connect();
Emulator.rconServer.initializePipeline();
Emulator.rconServer.connect();
Emulator.badgeImager = new BadgeImager();
LOGGER.info("Arcturus Morningstar has successfully loaded.");
LOGGER.info("System launched in: {}ms. Using {} threads!", (System.nanoTime() - startTime) / 1e6, Runtime.getRuntime().availableProcessors() * 2);
LOGGER.info("Memory: {}/{}MB", (runtime.totalMemory() - runtime.freeMemory()) / (1024 * 1024), (runtime.freeMemory()) / (1024 * 1024));
Emulator.debugging = Emulator.getConfig().getBoolean("debug.mode");
if (debugging) {
ch.qos.logback.classic.Logger root = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
root.setLevel(Level.DEBUG);
LOGGER.debug("Debugging enabled.");
}
Emulator.getPluginManager().fireEvent(new EmulatorLoadedEvent());
Emulator.isReady = true;
Emulator.timeStarted = getIntUnixTimestamp();
if (Emulator.getConfig().getInt("runtime.threads") < (Runtime.getRuntime().availableProcessors() * 2)) {
LOGGER.warn("Emulator settings runtime.threads ({}) can be increased to ({}) to possibly increase performance.",
Emulator.getConfig().getInt("runtime.threads"),
Runtime.getRuntime().availableProcessors() * 2);
}
Emulator.getThreading().run(() -> {
}, 1500);
// // Check if console mode is true or false, default is true
// if (Emulator.getConfig().getBoolean("console.mode", true)) {
// BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// while (!isShuttingDown && isReady) {
// try {
// String line = reader.readLine();
// if (line != null) {
// ConsoleCommand.handle(line);
// }
// System.out.println("Waiting for command: ");
// } catch (Exception e) {
// if (!(e instanceof IOException && e.getMessage().equals("Bad file descriptor"))) {
// LOGGER.error("Error while reading command", e);
// }
// }
// }
// }
} catch (Exception e) {
e.printStackTrace();
}
}
private static void setBuild() {
if (Emulator.class.getProtectionDomain().getCodeSource() == null) {
build = "UNKNOWN";
return;
}
StringBuilder sb = new StringBuilder();
try {
String filepath = new File(Emulator.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getAbsolutePath();
MessageDigest md = MessageDigest.getInstance("MD5");// MD5
FileInputStream fis = new FileInputStream(filepath);
byte[] dataBytes = new byte[1024];
int nread = 0;
while ((nread = fis.read(dataBytes)) != -1) {
md.update(dataBytes, 0, nread);
}
byte[] mdbytes = md.digest();
for (int i = 0; i < mdbytes.length; i++) {
sb.append(Integer.toString((mdbytes[i] & 0xff) + 0x100, 16).substring(1));
}
} catch (Exception e) {
build = "UNKNOWN";
return;
}
build = sb.toString();
}
private static void dispose() {
Emulator.getThreading().setCanAdd(false);
Emulator.isShuttingDown = true;
Emulator.isReady = false;
LOGGER.info("Stopping emulator...");
try {
if (Emulator.getPluginManager() != null) {
Emulator.getPluginManager().fireEvent(new EmulatorStartShutdownEvent());
}
} catch (Exception e) {
}
try {
if (Emulator.cameraClient != null) {
Emulator.cameraClient.disconnect();
}
} catch (Exception e) {
}
try {
if (Emulator.rconServer != null) {
Emulator.rconServer.stop();
}
} catch (Exception e) {
}
try {
if (Emulator.gameEnvironment != null) {
Emulator.gameEnvironment.dispose();
}
} catch (Exception e) {
}
try {
if (Emulator.getPluginManager() != null) {
Emulator.getPluginManager().fireEvent(new EmulatorStoppedEvent());
}
} catch (Exception e) {
}
try {
if (Emulator.pluginManager != null) {
Emulator.pluginManager.dispose();
}
} catch (Exception e) {
}
try {
if (Emulator.config != null) {
Emulator.config.saveToDatabase();
}
} catch (Exception e) {
}
try {
if (Emulator.gameServer != null) {
Emulator.gameServer.stop();
}
} catch (Exception e) {
}
LOGGER.info("Stopped emulator");
if (Emulator.database != null) {
Emulator.getDatabase().dispose();
}
Emulator.stopped = true;
try {
if (Emulator.threading != null) {
Emulator.threading.shutDown();
}
} catch (Exception e) {
}
}
public static ConfigurationManager getConfig() {
return config;
}
public static CryptoConfig getCrypto() {
return crypto;
}
public static TextsManager getTexts() {
return texts;
}
public static Database getDatabase() {
return database;
}
public static DatabaseLogger getDatabaseLogger() {
return databaseLogger;
}
public static Runtime getRuntime() {
return runtime;
}
public static GameServer getGameServer() {
return gameServer;
}
public static RCONServer getRconServer() {
return rconServer;
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public static Logging getLogging() {
return logging;
}
public static ThreadPooling getThreading() {
return threading;
}
public static GameEnvironment getGameEnvironment() {
return gameEnvironment;
}
public static PluginManager getPluginManager() {
return pluginManager;
}
public static Random getRandom() {
return ThreadLocalRandom.current();
}
public static BadgeImager getBadgeImager() {
return badgeImager;
}
public static CameraClient getCameraClient() {
return cameraClient;
}
public static synchronized void setCameraClient(CameraClient client) {
cameraClient = client;
}
public static int getTimeStarted() {
return timeStarted;
}
public static int getOnlineTime() {
return getIntUnixTimestamp() - timeStarted;
}
public static void prepareShutdown() {
System.exit(0);
}
public static int timeStringToSeconds(String timeString) {
int totalSeconds = 0;
Matcher m = Pattern.compile("(([0-9]*) (second|minute|hour|day|week|month|year))").matcher(timeString);
Map<String,Integer> map = new HashMap<String,Integer>() {
{
put("second", 1);
put("minute", 60);
put("hour", 3600);
put("day", 86400);
put("week", 604800);
put("month", 2628000);
put("year", 31536000);
}
};
while (m.find()) {
try {
int amount = Integer.parseInt(m.group(2));
String what = m.group(3);
totalSeconds += amount * map.get(what);
}
catch (Exception ignored) { }
}
return totalSeconds;
}
public static Date modifyDate(Date date, String timeString) {
int totalSeconds = 0;
Calendar c = Calendar.getInstance();
c.setTime(date);
Matcher m = Pattern.compile("(([0-9]*) (second|minute|hour|day|week|month|year))").matcher(timeString);
Map<String, Integer> map = new HashMap<String, Integer>() {
{
put("second", Calendar.SECOND);
put("minute", Calendar.MINUTE);
put("hour", Calendar.HOUR);
put("day", Calendar.DAY_OF_MONTH);
put("week", Calendar.WEEK_OF_MONTH);
put("month", Calendar.MONTH);
put("year", Calendar.YEAR);
}
};
while (m.find()) {
try {
int amount = Integer.parseInt(m.group(2));
String what = m.group(3);
c.add(map.get(what), amount);
}
catch (Exception ignored) { }
}
return c.getTime();
}
private static String dateToUnixTimestamp(Date date) {
String res = "";
Date aux = stringToDate("1970-01-01 00:00:00");
Timestamp aux1 = dateToTimeStamp(aux);
Timestamp aux2 = dateToTimeStamp(date);
long difference = aux2.getTime() - aux1.getTime();
long seconds = difference / 1000L;
return res + seconds;
}
public static Date stringToDate(String date) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date res = null;
try {
res = format.parse(date);
} catch (Exception e) {
LOGGER.error("Error parsing date", e);
}
return res;
}
public static Timestamp dateToTimeStamp(Date date) {
return new Timestamp(date.getTime());
}
public static Date getDate() {
return new Date(System.currentTimeMillis());
}
public static String getUnixTimestamp() {
return dateToUnixTimestamp(getDate());
}
public static int getIntUnixTimestamp() {
return (int) (System.currentTimeMillis() / 1000);
}
public static boolean isNumeric(String string)
throws IllegalArgumentException {
boolean isnumeric = false;
if ((string != null) && (!string.equals(""))) {
isnumeric = true;
char[] chars = string.toCharArray();
for (char aChar : chars) {
isnumeric = Character.isDigit(aChar);
if (!isnumeric) {
break;
}
}
}
return isnumeric;
}
public int getUserCount() {
return gameEnvironment.getHabboManager().getOnlineCount();
}
public int getRoomCount() {
return gameEnvironment.getRoomManager().getActiveRooms().size();
}
}

View File

@ -0,0 +1,169 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.guilds.forums.ForumThread;
import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.messages.incoming.friends.SearchUserEvent;
import com.eu.habbo.messages.incoming.navigator.SearchRoomsEvent;
import com.eu.habbo.messages.outgoing.users.UserDataComposer;
import com.eu.habbo.threading.runnables.AchievementUpdater;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Map;
public class CleanerThread implements Runnable {
private static final Logger LOGGER = LoggerFactory.getLogger(CleanerThread.class);
private static final int DELAY = 10000;
private static final int RELOAD_HALL_OF_FAME = 1800;
private static final int RELOAD_NEWS_LIST = 3600;
private static final int REMOVE_INACTIVE_ROOMS = 120;
private static final int REMOVE_INACTIVE_GUILDS = 60;
private static final int REMOVE_INACTIVE_TOURS = 600;
private static final int SAVE_ERROR_LOGS = 30;
private static final int CLEAR_CACHED_VALUES = 60 * 60;
private static final int CALLBACK_TIME = 60 * 15;
private static int LAST_HOF_RELOAD = Emulator.getIntUnixTimestamp();
private static int LAST_NL_RELOAD = Emulator.getIntUnixTimestamp();
private static int LAST_INACTIVE_ROOMS_CLEARED = Emulator.getIntUnixTimestamp();
private static int LAST_INACTIVE_GUILDS_CLEARED = Emulator.getIntUnixTimestamp();
private static int LAST_INACTIVE_TOURS_CLEARED = Emulator.getIntUnixTimestamp();
private static int LAST_ERROR_LOGS_SAVED = Emulator.getIntUnixTimestamp();
private static int LAST_DAILY_REFILL = Emulator.getIntUnixTimestamp();
private static int LAST_CALLBACK = Emulator.getIntUnixTimestamp();
private static int LAST_HABBO_CACHE_CLEARED = Emulator.getIntUnixTimestamp();
public CleanerThread() {
this.databaseCleanup();
Emulator.getThreading().run(this, DELAY);
Emulator.getThreading().run(new AchievementUpdater());
// Emulator.getThreading().run(new HTTPVersionCheck(), 10000);
}
@Override
public void run() {
Emulator.getThreading().run(this, DELAY);
int time = Emulator.getIntUnixTimestamp();
if (time - LAST_HOF_RELOAD > RELOAD_HALL_OF_FAME) {
Emulator.getGameEnvironment().getHotelViewManager().getHallOfFame().reload();
LAST_HOF_RELOAD = time;
}
if (time - LAST_NL_RELOAD > RELOAD_NEWS_LIST) {
Emulator.getGameEnvironment().getHotelViewManager().getNewsList().reload();
LAST_NL_RELOAD = time;
}
if (time - LAST_INACTIVE_ROOMS_CLEARED > REMOVE_INACTIVE_ROOMS) {
Emulator.getGameEnvironment().getRoomManager().clearInactiveRooms();
LAST_INACTIVE_ROOMS_CLEARED = time;
}
if (time - LAST_INACTIVE_GUILDS_CLEARED > REMOVE_INACTIVE_GUILDS) {
Emulator.getGameEnvironment().getGuildManager().clearInactiveGuilds();
ForumThread.clearCache();
LAST_INACTIVE_GUILDS_CLEARED = time;
}
if (time - LAST_INACTIVE_TOURS_CLEARED > REMOVE_INACTIVE_TOURS) {
Emulator.getGameEnvironment().getGuideManager().cleanup();
LAST_INACTIVE_TOURS_CLEARED = time;
}
if (time - LAST_ERROR_LOGS_SAVED > SAVE_ERROR_LOGS) {
Emulator.getDatabaseLogger().save();
LAST_ERROR_LOGS_SAVED = time;
}
if (time - LAST_CALLBACK > CALLBACK_TIME) {
// Emulator.getThreading().run(new HTTPPostStatus());
LAST_CALLBACK = time;
}
if (time - LAST_DAILY_REFILL > Emulator.getConfig().getInt("hotel.refill.daily")) {
this.refillDailyRespects();
LAST_DAILY_REFILL = time;
}
if (time - LAST_HABBO_CACHE_CLEARED > CLEAR_CACHED_VALUES) {
this.clearCachedValues();
LAST_HABBO_CACHE_CLEARED = time;
}
SearchRoomsEvent.cachedResults.clear();
SearchUserEvent.cachedResults.clear();
}
void databaseCleanup() {
this.refillDailyRespects();
int time = Emulator.getIntUnixTimestamp();
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) {
try (Statement statement = connection.createStatement()) {
statement.execute("UPDATE users SET online = '0' WHERE online = '1'");
statement.execute("UPDATE rooms SET users = '0' WHERE users > 0");
statement.execute("DELETE FROM room_mutes WHERE ends < " + time);
statement.execute("DELETE FROM room_bans WHERE ends < " + time);
statement.execute("DELETE users_favorite_rooms FROM users_favorite_rooms LEFT JOIN rooms ON room_id = rooms.id WHERE rooms.id IS NULL");
}
try (PreparedStatement statement = connection.prepareStatement("UPDATE users_effects SET total = total - 1 WHERE activation_timestamp + duration < ? AND activation_timestamp > 0 AND duration > 0")) {
statement.setInt(1, Emulator.getIntUnixTimestamp());
statement.execute();
}
try (Statement statement = connection.createStatement()) {
statement.execute("DELETE FROM users_effects WHERE total <= 0");
}
} catch (SQLException e) {
LOGGER.error("Caught SQL exception", e);
}
LOGGER.info("Database -> Cleaned!");
}
public void refillDailyRespects() {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE users_settings SET daily_respect_points = ?, daily_pet_respect_points = ?")) {
statement.setInt(1, Emulator.getConfig().getInt("hotel.daily.respect"));
statement.setInt(2, Emulator.getConfig().getInt("hotel.daily.respect.pets"));
statement.executeUpdate();
} catch (SQLException e) {
LOGGER.error("Caught SQL exception", e);
}
if (Emulator.isReady) {
for (Habbo habbo : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().values()) {
habbo.getHabboStats().respectPointsToGive = Emulator.getConfig().getInt("hotel.daily.respect");
habbo.getHabboStats().petRespectPointsToGive = Emulator.getConfig().getInt("hotel.daily.respect.pets");
habbo.getClient().sendResponse(new UserDataComposer(habbo));
}
}
}
private void clearCachedValues() {
Habbo habbo;
for (Map.Entry<Integer, Habbo> map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
habbo = map.getValue();
try {
if (habbo != null) {
habbo.clearCaches();
}
} catch (Exception e) {
LOGGER.error("Caught exception", e);
}
}
}
}

View File

@ -0,0 +1,41 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.commands.Command;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class CommandLog implements DatabaseLoggable {
private static final String INSERT_QUERY = "INSERT INTO commandlogs (`user_id`, `timestamp`, `command`, `params`, `succes`) VALUES (?, ?, ?, ?, ?)";
private final int userId;
private final int timestamp = Emulator.getIntUnixTimestamp();
private final Command command;
private final String params;
private final boolean succes;
public CommandLog(int userId, Command command, String params, boolean succes) {
this.userId = userId;
this.command = command;
this.params = params;
this.succes = succes;
}
@Override
public String getQuery() {
return CommandLog.INSERT_QUERY;
}
@Override
public void log(PreparedStatement statement) throws SQLException {
statement.setInt(1, this.userId);
statement.setInt(2, this.timestamp);
statement.setString(3, this.command.getClass().getSimpleName());
statement.setString(4, this.params);
statement.setString(5, this.succes ? "yes" : "no");
statement.addBatch();
}
}

View File

@ -0,0 +1,228 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.plugin.events.emulator.EmulatorConfigUpdatedEvent;
import gnu.trove.map.hash.THashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.sql.*;
import java.util.Map;
import java.util.Properties;
public class ConfigurationManager {
private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationManager.class);
private final Properties properties;
private final String configurationPath;
public boolean loaded = false;
public boolean isLoading = false;
public ConfigurationManager(String configurationPath) {
this.properties = new Properties();
this.configurationPath = configurationPath;
this.reload();
}
public void reload() {
this.isLoading = true;
this.properties.clear();
InputStream input = null;
String envDbHostname = System.getenv("DB_HOSTNAME");
boolean useEnvVarsForDbConnection = false;
if(envDbHostname != null)
{
useEnvVarsForDbConnection = envDbHostname.length() > 1;
}
if (!useEnvVarsForDbConnection) {
try {
File f = new File(this.configurationPath);
input = new FileInputStream(f);
this.properties.load(input);
} catch (IOException ex) {
LOGGER.error("Failed to load config file.", ex);
ex.printStackTrace();
} finally {
if (input != null) {
try {
input.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
} else {
Map<String, String> envMapping = new THashMap<>();
// Database section
envMapping.put("db.hostname", "DB_HOSTNAME");
envMapping.put("db.port", "DB_PORT");
envMapping.put("db.database", "DB_DATABASE");
envMapping.put("db.username", "DB_USERNAME");
envMapping.put("db.password", "DB_PASSWORD");
envMapping.put("db.params", "DB_PARAMS");
// Game Configuration
envMapping.put("game.host", "EMU_HOST");
envMapping.put("game.port", "EMU_PORT");
// RCON
envMapping.put("rcon.host", "RCON_HOST");
envMapping.put("rcon.port", "RCON_PORT");
envMapping.put("rcon.allowed", "RCON_ALLOWED");
// Runtime
envMapping.put("runtime.threads", "RT_THREADS");
envMapping.put("logging.errors.runtime", "RT_LOG_ERRORS");
for (Map.Entry<String, String> entry : envMapping.entrySet()) {
String envValue = System.getenv(entry.getValue());
if (envValue == null || envValue.length() == 0) {
LOGGER.info("Cannot find environment-value for variable `" + entry.getValue() + "`");
} else {
this.properties.setProperty(entry.getKey(), envValue);
}
}
}
if (this.loaded) {
this.loadFromDatabase();
}
this.isLoading = false;
LOGGER.info("Configuration Manager -> Loaded!");
if (Emulator.getPluginManager() != null) {
Emulator.getPluginManager().fireEvent(new EmulatorConfigUpdatedEvent());
}
}
public void loadFromDatabase() {
LOGGER.info("Loading configuration from database...");
long millis = System.currentTimeMillis();
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement()) {
if (statement.execute("SELECT * FROM emulator_settings")) {
try (ResultSet set = statement.getResultSet()) {
while (set.next()) {
this.properties.put(set.getString("key"), set.getString("value"));
}
}
}
} catch (SQLException e) {
LOGGER.error("Caught SQL exception", e);
}
LOGGER.info("Configuration -> loaded! (" + (System.currentTimeMillis() - millis) + " MS)");
}
public void saveToDatabase() {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE emulator_settings SET `value` = ? WHERE `key` = ? LIMIT 1")) {
for (Map.Entry<Object, Object> entry : this.properties.entrySet()) {
statement.setString(1, entry.getValue().toString());
statement.setString(2, entry.getKey().toString());
statement.executeUpdate();
}
} catch (SQLException e) {
LOGGER.error("Caught SQL exception", e);
}
}
public String getValue(String key) {
return this.getValue(key, "");
}
public String getValue(String key, String defaultValue) {
if (this.isLoading)
return defaultValue;
if (!this.properties.containsKey(key)) {
LOGGER.error("Config key not found {}", key);
}
return this.properties.getProperty(key, defaultValue);
}
public boolean getBoolean(String key) {
return this.getBoolean(key, false);
}
public boolean getBoolean(String key, boolean defaultValue) {
if (this.isLoading)
return defaultValue;
try {
return (this.getValue(key, "0").equals("1")) || (this.getValue(key, "false").equals("true"));
} catch (Exception e) {
LOGGER.error("Failed to parse key {} with value '{}' to type boolean.", key, this.getValue(key));
}
return defaultValue;
}
public int getInt(String key) {
return this.getInt(key, 0);
}
public int getInt(String key, Integer defaultValue) {
if (this.isLoading)
return defaultValue;
try {
return Integer.parseInt(this.getValue(key, defaultValue.toString()));
} catch (Exception e) {
LOGGER.error("Failed to parse key {} with value '{}' to type integer.", key, this.getValue(key));
}
return defaultValue;
}
public double getDouble(String key) {
return this.getDouble(key, 0.0);
}
public double getDouble(String key, Double defaultValue) {
if (this.isLoading)
return defaultValue;
try {
return Double.parseDouble(this.getValue(key, defaultValue.toString()));
} catch (Exception e) {
LOGGER.error("Failed to parse key {} with value '{}' to type double.", key, this.getValue(key));
}
return defaultValue;
}
public void update(String key, String value) {
this.properties.setProperty(key, value);
}
public void register(String key, String value) {
if (this.properties.getProperty(key, null) != null)
return;
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO emulator_settings VALUES (?, ?)")) {
statement.setString(1, key);
statement.setString(2, value);
statement.execute();
} catch (SQLException e) {
LOGGER.error("Caught SQL exception", e);
}
this.update(key, value);
}
}

View File

@ -0,0 +1,70 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.users.Habbo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
public class CreditsScheduler extends Scheduler {
private static final Logger LOGGER = LoggerFactory.getLogger(CreditsScheduler.class);
public static boolean IGNORE_HOTEL_VIEW;
public static boolean IGNORE_IDLED;
public static double HC_MODIFIER;
public CreditsScheduler() {
super(Emulator.getConfig().getInt("hotel.auto.credits.interval"));
this.reloadConfig();
}
public void reloadConfig() {
if (Emulator.getConfig().getBoolean("hotel.auto.credits.enabled")) {
IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.hotelview");
IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.credits.ignore.idled");
HC_MODIFIER = Emulator.getConfig().getDouble("hotel.auto.credits.hc_modifier", 1.0);
if (this.disposed) {
this.disposed = false;
this.run();
}
} else {
this.disposed = true;
}
}
@Override
public void run() {
super.run();
Habbo habbo;
for (Map.Entry<Integer, Habbo> map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
habbo = map.getValue();
try {
if (habbo != null) {
if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW)
continue;
if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED)
continue;
habbo.giveCredits((int)(habbo.getHabboInfo().getRank().getCreditsTimerAmount() * (habbo.getHabboStats().hasActiveClub() ? HC_MODIFIER : 1.0)));
}
} catch (Exception e) {
LOGGER.error("Caught exception", e);
}
}
}
public boolean isDisposed() {
return this.disposed;
}
public void setDisposed(boolean disposed) {
this.disposed = disposed;
}
}

View File

@ -0,0 +1,33 @@
package com.eu.habbo.core;
public class CryptoConfig {
private final boolean enabled;
private final String exponent;
private final String modulus;
private final String privateExponent;
public CryptoConfig(boolean enabled, String exponent, String modulus, String privateExponent) {
this.enabled = enabled;
this.exponent = exponent;
this.modulus = modulus;
this.privateExponent = privateExponent;
}
public boolean isEnabled() {
return enabled;
}
public String getExponent() {
return exponent;
}
public String getModulus() {
return modulus;
}
public String getPrivateExponent() {
return privateExponent;
}
}

View File

@ -0,0 +1,12 @@
package com.eu.habbo.core;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public interface DatabaseLoggable {
String getQuery();
void log(PreparedStatement statement) throws SQLException;
}

View File

@ -0,0 +1,46 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.concurrent.ConcurrentLinkedQueue;
public class DatabaseLogger {
private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseLogger.class);
private final ConcurrentLinkedQueue<DatabaseLoggable> loggables = new ConcurrentLinkedQueue<>();
public void store(DatabaseLoggable loggable) {
this.loggables.add(loggable);
}
public void save() {
if (Emulator.getDatabase() == null || Emulator.getDatabase().getDataSource() == null) {
return;
}
if (this.loggables.isEmpty()) {
return;
}
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection()) {
while (!this.loggables.isEmpty()) {
DatabaseLoggable loggable = this.loggables.remove();
try (PreparedStatement statement = connection.prepareStatement(loggable.getQuery())) {
loggable.log(statement);
statement.executeBatch();
}
}
} catch (SQLException e) {
LOGGER.error("Exception caught while saving loggables to database.", e);
}
}
}

View File

@ -0,0 +1,7 @@
package com.eu.habbo.core;
public interface Disposable {
void dispose();
boolean disposed();
}

View File

@ -0,0 +1,25 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.rooms.RoomChatMessage;
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserRemoveComposer;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserWhisperComposer;
import com.eu.habbo.plugin.EventHandler;
import com.eu.habbo.plugin.events.users.UserSavedMottoEvent;
public class Easter {
@EventHandler
public static void onUserChangeMotto(UserSavedMottoEvent event) {
if (Emulator.getConfig().getBoolean("easter_eggs.enabled") && event.newMotto.equalsIgnoreCase("crickey!")) {
event.habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(event.newMotto, event.habbo, event.habbo, RoomChatMessageBubbles.ALERT)));
Room room = event.habbo.getHabboInfo().getCurrentRoom();
room.sendComposer(new RoomUserRemoveComposer(event.habbo.getRoomUnit()).compose());
room.sendComposer(new RoomUserPetComposer(2, 1, "FFFFFF", event.habbo).compose());
}
}
}

View File

@ -0,0 +1,68 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.sql.PreparedStatement;
import java.sql.SQLException;
public class ErrorLog implements DatabaseLoggable {
private static final Logger LOGGER = LoggerFactory.getLogger(ErrorLog.class);
private static final String QUERY = "INSERT INTO emulator_errors (timestamp, version, build_hash, type, stacktrace) VALUES (?, ?, ?, ?, ?)";
public final String version;
public final String buildHash;
public final int timeStamp;
public final String type;
public final String stackTrace;
public ErrorLog(String type, Throwable e) {
this.version = Emulator.version;
this.buildHash = Emulator.version;
this.timeStamp = Emulator.getIntUnixTimestamp();
this.type = type;
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
this.stackTrace = sw.toString();
try {
pw.close();
sw.close();
} catch (IOException e1) {
LOGGER.error("Exception caught", e1);
}
}
public ErrorLog(String type, String message) {
this.version = Emulator.version;
this.buildHash = Emulator.build;
this.timeStamp = Emulator.getIntUnixTimestamp();
this.type = type;
this.stackTrace = message;
}
@Override
public String getQuery() {
return QUERY;
}
@Override
public void log(PreparedStatement statement) throws SQLException {
statement.setInt(1, this.timeStamp);
statement.setString(2, this.version);
statement.setString(3, this.buildHash);
statement.setString(4, this.type);
statement.setString(5, this.stackTrace);
statement.addBatch();
}
}

View File

@ -0,0 +1,83 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.users.Habbo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
public class GotwPointsScheduler extends Scheduler {
private static final Logger LOGGER = LoggerFactory.getLogger(GotwPointsScheduler.class);
public static boolean IGNORE_HOTEL_VIEW;
public static boolean IGNORE_IDLED;
public static String GOTW_POINTS_NAME;
public static double HC_MODIFIER;
public GotwPointsScheduler() { //TODO MOVE TO A PLUGIN. IS NOT PART OF OFFICIAL HABBO.
super(Emulator.getConfig().getInt("hotel.auto.gotwpoints.interval"));
this.reloadConfig();
}
public void reloadConfig() {
if (Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.enabled")) {
IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.ignore.hotelview");
IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.gotwpoints.ignore.idled");
HC_MODIFIER = Emulator.getConfig().getDouble("hotel.auto.gotwpoints.hc_modifier", 1.0);
GOTW_POINTS_NAME = Emulator.getConfig().getValue("hotel.auto.gotwpoints.name");
if (this.disposed) {
this.disposed = false;
this.run();
}
} else {
this.disposed = true;
}
}
@Override
public void run() {
super.run();
Habbo habbo;
for (Map.Entry<Integer, Habbo> map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
habbo = map.getValue();
try {
if (habbo != null) {
if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW)
continue;
if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED)
continue;
int type;
boolean found = false;
for (String s : Emulator.getConfig().getValue("seasonal.currency.names").split(";")) {
if (s.equalsIgnoreCase(GOTW_POINTS_NAME) || (GOTW_POINTS_NAME.startsWith(s) && Math.abs(s.length() - GOTW_POINTS_NAME.length()) < 3)) {
found = true;
break;
}
}
type = Emulator.getConfig().getInt("seasonal.currency." + GOTW_POINTS_NAME, -1);
if (found || type != -1) {
habbo.givePoints(type, (int)(habbo.getHabboInfo().getRank().getGotwTimerAmount() * (habbo.getHabboStats().hasActiveClub() ? HC_MODIFIER : 1.0)));
}
}
} catch (Exception e) {
LOGGER.error("Caught exception", e);
}
}
}
public boolean isDisposed() {
return this.disposed;
}
public void setDisposed(boolean disposed) {
this.disposed = disposed;
}
}

View File

@ -0,0 +1,97 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.SQLException;
public class Logging {
private static final Logger LOGGER = LoggerFactory.getLogger("LegacyLogger");
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logStart(Object line) {
LOGGER.info("[LOADING] {}", line);
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logShutdownLine(Object line) {
LOGGER.info("[SHUTDOWN] {}", line);
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logUserLine(Object line) {
LOGGER.info("[USER] {}", line);
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logDebugLine(Object line) {
LOGGER.debug("[DEBUG] {}", line);
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logPacketLine(Object line) {
if (Emulator.getConfig().getBoolean("debug.show.packets")) {
LOGGER.debug("[PACKET] {}", line);
}
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logUndefinedPacketLine(Object line) {
if (Emulator.getConfig().getBoolean("debug.show.packets.undefined")) {
LOGGER.debug("[PACKET] [UNDEFINED] {}", line);
}
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logErrorLine(Object line) {
LOGGER.error("[ERROR] {}", line);
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logSQLException(SQLException e) {
LOGGER.error("[ERROR] SQLException", e);
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void logPacketError(Object e) {
LOGGER.error("[ERROR] PacketError {}", e);
}
/**
* @deprecated Do not use. Please use LoggerFactory.getLogger(YourClass.class) to log.
*/
@Deprecated
public void handleException(Exception e) {
LOGGER.error("[ERROR] Exception", e);
}
}

View File

@ -0,0 +1,67 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.users.Habbo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
public class PixelScheduler extends Scheduler {
private static final Logger LOGGER = LoggerFactory.getLogger(PixelScheduler.class);
public static boolean IGNORE_HOTEL_VIEW;
public static boolean IGNORE_IDLED;
public static double HC_MODIFIER;
public PixelScheduler() {
super(Emulator.getConfig().getInt("hotel.auto.pixels.interval"));
this.reloadConfig();
}
public void reloadConfig() {
if (Emulator.getConfig().getBoolean("hotel.auto.pixels.enabled")) {
IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.hotelview");
IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.pixels.ignore.idled");
HC_MODIFIER = Emulator.getConfig().getDouble("hotel.auto.pixels.hc_modifier", 1.0);
if (this.disposed) {
this.disposed = false;
this.run();
}
} else {
this.disposed = true;
}
}
@Override
public void run() {
super.run();
Habbo habbo;
for (Map.Entry<Integer, Habbo> map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
habbo = map.getValue();
try {
if (habbo != null) {
if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW)
continue;
if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED)
continue;
habbo.givePixels((int)(habbo.getHabboInfo().getRank().getPixelsTimerAmount() * (habbo.getHabboStats().hasActiveClub() ? HC_MODIFIER : 1.0)));
}
} catch (Exception e) {
LOGGER.error("Caught exception", e);
}
}
}
public boolean isDisposed() {
return this.disposed;
}
public void setDisposed(boolean disposed) {
this.disposed = disposed;
}
}

View File

@ -0,0 +1,70 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.users.Habbo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
public class PointsScheduler extends Scheduler {
private static final Logger LOGGER = LoggerFactory.getLogger(PointsScheduler.class);
public static boolean IGNORE_HOTEL_VIEW;
public static boolean IGNORE_IDLED;
public static double HC_MODIFIER;
public PointsScheduler() {
super(Emulator.getConfig().getInt("hotel.auto.points.interval"));
this.reloadConfig();
}
public void reloadConfig() {
if (Emulator.getConfig().getBoolean("hotel.auto.points.enabled")) {
IGNORE_HOTEL_VIEW = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.hotelview");
IGNORE_IDLED = Emulator.getConfig().getBoolean("hotel.auto.points.ignore.idled");
HC_MODIFIER = Emulator.getConfig().getDouble("hotel.auto.points.hc_modifier", 1.0);
if (this.disposed) {
this.disposed = false;
this.run();
}
} else {
this.disposed = true;
}
}
@Override
public void run() {
super.run();
Habbo habbo;
for (Map.Entry<Integer, Habbo> map : Emulator.getGameEnvironment().getHabboManager().getOnlineHabbos().entrySet()) {
habbo = map.getValue();
try {
if (habbo != null) {
if (habbo.getHabboInfo().getCurrentRoom() == null && IGNORE_HOTEL_VIEW)
continue;
if (habbo.getRoomUnit().isIdle() && IGNORE_IDLED)
continue;
//habbo.givePoints(POINTS);
habbo.givePoints((int)(habbo.getHabboInfo().getRank().getDiamondsTimerAmount() * (habbo.getHabboStats().hasActiveClub() ? HC_MODIFIER : 1.0)));
}
} catch (Exception e) {
LOGGER.error("Caught exception", e);
}
}
}
public boolean isDisposed() {
return this.disposed;
}
public void setDisposed(boolean disposed) {
this.disposed = disposed;
}
}

View File

@ -0,0 +1,49 @@
package com.eu.habbo.core;
import com.eu.habbo.habbohotel.users.Habbo;
import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.messages.outgoing.MessageComposer;
import com.eu.habbo.messages.outgoing.Outgoing;
public class RoomUserPetComposer extends MessageComposer {
private final int petType;
private final int race;
private final String color;
private final Habbo habbo;
public RoomUserPetComposer(int petType, int race, String color, Habbo habbo) {
this.petType = petType;
this.race = race;
this.color = color;
this.habbo = habbo;
}
@Override
protected ServerMessage composeInternal() {
this.response.init(Outgoing.RoomUsersComposer);
this.response.appendInt(1);
this.response.appendInt(this.habbo.getHabboInfo().getId());
this.response.appendString(this.habbo.getHabboInfo().getUsername());
this.response.appendString("");
this.response.appendString(this.petType + " " + this.race + " " + this.color + " 2 2 -1 0 3 -1 0");
this.response.appendInt(this.habbo.getRoomUnit().getId());
this.response.appendInt(this.habbo.getRoomUnit().getX());
this.response.appendInt(this.habbo.getRoomUnit().getY());
this.response.appendString(this.habbo.getRoomUnit().getZ() + "");
this.response.appendInt(this.habbo.getRoomUnit().getBodyRotation().getValue());
this.response.appendInt(2);
this.response.appendInt(this.petType);
this.response.appendInt(this.habbo.getHabboInfo().getId());
this.response.appendString(this.habbo.getHabboInfo().getUsername());
this.response.appendInt(1);
this.response.appendBoolean(false);
this.response.appendBoolean(true);
this.response.appendBoolean(true); //Can toggle breeding permissions.
this.response.appendBoolean(true);
this.response.appendBoolean(true); //Can treat?
this.response.appendBoolean(true); //Can breed
this.response.appendInt(0);
this.response.appendString("");
return this.response;
}
}

View File

@ -0,0 +1,36 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
public class Scheduler implements Runnable {
protected boolean disposed;
protected int interval;
public Scheduler(int interval) {
this.interval = interval;
}
public boolean isDisposed() {
return this.disposed;
}
public void setDisposed(boolean disposed) {
this.disposed = disposed;
}
public int getInterval() {
return this.interval;
}
public void setInterval(int interval) {
this.interval = interval;
}
@Override
public void run() {
if (this.disposed)
return;
Emulator.getThreading().run(this, this.interval * 1000);
}
}

View File

@ -0,0 +1,99 @@
package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.sql.*;
import java.util.Properties;
public class TextsManager {
private static final Logger LOGGER = LoggerFactory.getLogger(TextsManager.class);
private final Properties texts;
public TextsManager() {
long millis = System.currentTimeMillis();
this.texts = new Properties();
try {
this.reload();
LOGGER.info("Texts Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS)");
} catch (Exception e) {
e.printStackTrace();
}
}
public void reload() throws Exception {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM emulator_texts")) {
while (set.next()) {
if (this.texts.containsKey(set.getString("key"))) {
this.texts.setProperty(set.getString("key"), set.getString("value"));
} else {
this.texts.put(set.getString("key"), set.getString("value"));
}
}
} catch (SQLException e) {
LOGGER.error("Caught SQL exception", e);
}
}
public String getValue(String key) {
return this.getValue(key, "");
}
public String getValue(String key, String defaultValue) {
if (!this.texts.containsKey(key)) {
LOGGER.error("Text key not found: {}", key);
}
return this.texts.getProperty(key, defaultValue);
}
public boolean getBoolean(String key) {
return this.getBoolean(key, false);
}
public boolean getBoolean(String key, Boolean defaultValue) {
try {
return (this.getValue(key, "0").equals("1")) || (this.getValue(key, "false").equals("true"));
} catch (Exception e) {
LOGGER.error("Caught exception", e);
}
return defaultValue;
}
public int getInt(String key) {
return this.getInt(key, 0);
}
public int getInt(String key, Integer defaultValue) {
try {
return Integer.parseInt(this.getValue(key, defaultValue.toString()));
} catch (NumberFormatException e) {
LOGGER.error("Caught exception", e);
}
return defaultValue;
}
public void update(String key, String value) {
this.texts.setProperty(key, value);
}
public void register(String key, String value) {
if (this.texts.getProperty(key, null) != null)
return;
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO emulator_texts VALUES (?, ?)")) {
statement.setString(1, key);
statement.setString(2, value);
statement.execute();
} catch (SQLException e) {
LOGGER.error("Caught SQL exception", e);
}
this.update(key, value);
}
}

View File

@ -0,0 +1,65 @@
package com.eu.habbo.core.consolecommands;
import gnu.trove.map.hash.THashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class ConsoleCommand {
private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleCommand.class);
private static final THashMap<String, ConsoleCommand> commands = new THashMap<>();
public final String key;
public final String usage;
public ConsoleCommand(String key, String usage) {
this.key = key;
this.usage = usage;
}
public static void load() {
addCommand(new ConsoleShutdownCommand());
addCommand(new ConsoleInfoCommand());
addCommand(new ConsoleTestCommand());
addCommand(new ConsoleReconnectCameraCommand());
addCommand(new ShowInteractionsCommand());
addCommand(new ShowRCONCommands());
addCommand(new ThankyouArcturusCommand());
}
public static void addCommand(ConsoleCommand command) {
commands.put(command.key, command);
}
public static ConsoleCommand findCommand(String key) {
return commands.get(key);
}
public static boolean handle(String line) {
String[] message = line.split(" ");
if (message.length > 0) {
ConsoleCommand command = ConsoleCommand.findCommand(message[0]);
if (command != null) {
try {
command.handle(message);
return true;
} catch (Exception e) {
LOGGER.error("Caught exception", e);
}
} else {
LOGGER.info("Unknown Console Command " + message[0]);
LOGGER.info("Commands Available (" + commands.size() + "): ");
for (ConsoleCommand c : commands.values()) {
LOGGER.info(c.key + " - " + c.usage);
}
}
}
return false;
}
public abstract void handle(String[] args) throws Exception;
}

View File

@ -0,0 +1,42 @@
package com.eu.habbo.core.consolecommands;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.catalog.CatalogManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.concurrent.TimeUnit;
public class ConsoleInfoCommand extends ConsoleCommand {
private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleInfoCommand.class);
public ConsoleInfoCommand() {
super("info", "Show current statistics.");
}
@Override
public void handle(String[] args) throws Exception {
int seconds = Emulator.getIntUnixTimestamp() - Emulator.getTimeStarted();
int day = (int) TimeUnit.SECONDS.toDays(seconds);
long hours = TimeUnit.SECONDS.toHours(seconds) - (day * 24);
long minute = TimeUnit.SECONDS.toMinutes(seconds) - (TimeUnit.SECONDS.toHours(seconds) * 60);
long second = TimeUnit.SECONDS.toSeconds(seconds) - (TimeUnit.SECONDS.toMinutes(seconds) * 60);
LOGGER.info("Emulator version: " + Emulator.version);
LOGGER.info("Emulator build: " + Emulator.build);
LOGGER.info("");
LOGGER.info("Hotel Statistics");
LOGGER.info("- Users: " + Emulator.getGameEnvironment().getHabboManager().getOnlineCount());
LOGGER.info("- Rooms: " + Emulator.getGameEnvironment().getRoomManager().getActiveRooms().size());
LOGGER.info("- Shop: " + Emulator.getGameEnvironment().getCatalogManager().catalogPages.size() + " pages and " + CatalogManager.catalogItemAmount + " items.");
LOGGER.info("- Furni: " + Emulator.getGameEnvironment().getItemManager().getItems().size() + " items.");
LOGGER.info("");
LOGGER.info("Server Statistics");
LOGGER.info("- Uptime: " + day + (day > 1 ? " days, " : " day, ") + hours + (hours > 1 ? " hours, " : " hour, ") + minute + (minute > 1 ? " minutes, " : " minute, ") + second + (second > 1 ? " seconds!" : " second!"));
LOGGER.info("- RAM Usage: " + (Emulator.getRuntime().totalMemory() - Emulator.getRuntime().freeMemory()) / (1024 * 1024) + "/" + (Emulator.getRuntime().freeMemory()) / (1024 * 1024) + "MB");
LOGGER.info("- CPU Cores: " + Emulator.getRuntime().availableProcessors());
LOGGER.info("- Total Memory: " + Emulator.getRuntime().maxMemory() / (1024 * 1024) + "MB");
}
}

View File

@ -0,0 +1,19 @@
package com.eu.habbo.core.consolecommands;
import com.eu.habbo.networking.camera.CameraClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ConsoleReconnectCameraCommand extends ConsoleCommand {
private static final Logger LOGGER = LoggerFactory.getLogger(ConsoleReconnectCameraCommand.class);
public ConsoleReconnectCameraCommand() {
super("camera", "Attempt to reconnect to the camera server.");
}
@Override
public void handle(String[] args) throws Exception {
LOGGER.info("Connecting to the camera...");
CameraClient.attemptReconnect = true;
}
}

View File

@ -0,0 +1,14 @@
package com.eu.habbo.core.consolecommands;
import com.eu.habbo.habbohotel.commands.ShutdownCommand;
public class ConsoleShutdownCommand extends ConsoleCommand {
public ConsoleShutdownCommand() {
super("stop", "Stop the emulator.");
}
@Override
public void handle(String[] args) throws Exception {
new ShutdownCommand().handle(null, args);
}
}

Some files were not shown because too many files have changed in this diff Show More