rsc-server
经典经典
私人服务器 mmorpg 模拟器。 旨在与基于网络的
rsc-client 或基于java的
mudclient204。
功能:
- supports TCP and WebSockets via Node.js with SQLite persistence and multiple
worlds (with rsc-data-server),
and single-page with optional
multiplayer on the browser via WebWorkers and WebRTC
- plugin-based content addition.
add files with certain function signatures (
function onTalkToNpc(player, npc) {}
,
function onUseWithInventory(player, item, target) {}
, etc.) to implement
quests, skills, item interactions, and other game content
- simple, JSON-based data formats for spawns, skills, probabilities, etc.
- NPC combat (melee and ranged) with accurate
roll-based RNG drops
are implemented
- all of the free-to-play quests implemented
- accurate sleep captcha
- compatible with period-accurate website replica
install
下载并安装 Node.js(随附
npm)
对于最新的稳定版本,运行:
# npm install -g @2003scape/rsc-data-server @2003scape/ rsc-server
检查最新的不稳定特性,安装
git 并运行:
$ git clone https://github.com/2003scape/rsc-data-server
$ cd rsc-数据服务器 && npm 安装 && 裁谈会../
$ git clone https://github.com/2003scape/rsc-server
$ cd rsc 服务器 && npm install
如果你有 npm build 问题,你可能需要额外的包。
访问 node-canvas
github 获取更多信息
安装
rsc-client 或者
mudclient204 登录
cli usage
rsc-server 连接到
rsc-data-server 用于数据库
保存/加载和管理世界各地的朋友列表。 它支持TCP
TLS 或 IPC 域套接字。
如果与 npm 一起安装,则使用 (-c
两者都是可选的,
他们将首先在自己的目录中查找 config.json:
$ rsc-data-server -c /etc/rsc-data-server/config.json &
$ rsc-server -c /etc/rsc-server/config.json
如果从 git 克隆:
$ cd rsc-data-server && npm 启动 &
$ cd ../rsc 服务器 && npm start
browser usage
使用创建一个新的 Worker
实例
./dist/server.bundle.js
或 ./dist/server.bundle.min.js
。 如果做任何
更改源代码,使用 $ npm run build-browser
重新构建这些文件。
然后你可以将工作实例传递给
mudclient 的 .server
属性。
const serverWorker = new Worker('./server.bundle.min.js');
serverWorker.postMessage({
type: 'start',
config: {
worldID: 1,
version: 204,
members: false,
experienceRate: 1,
fatigue: true,
rememberCombatStyle: false
}
});
// mc.server = serverWorker;
commands
|命令|说明|
|-|-|
|::addexp \ \|将经验添加到技能名称。|
|::appearance|切换角色创建屏幕。|
|::bank|打开银行界面。|
|::bubble \|创建一个带有项目 ID 的玩家操作气泡。|
|::clearinventory|清空你的库存物品。|
|::coords|显示你当前的坐标。|
|::dmg \|移除一定数量的当前生命值。|
|::fatigue|将你的疲劳度设置为100%。|
|::give \ \ \|在其他人的(在线)库存中生成一个项目,数量可选。|
|::goto \|传送到一个用户名(在线)。|
|::gotoentity \ \|传送到某个ID的第一个实体(npcs、gameObjects、groundItems)。|
|::item \ \|在你的库存中产生一个可选数量的项目。|
|::kick \|强制注销用户名(在线)。|
|::npc \|在你的当前位置生成一个 NPC。|
|::setqp \|设置你的任务点数到一定数量。|
|::shop \|按名称打开商店(参见 rsc-data/shops .json)|
|::sound \|播放声音文件(仅限会员客户端,参见 rsc-声音/sounds1.json).|
|::step \; \|朝某个方向步进(delta 可以是-1、0 或1)。
|::传送\; \; | \|传送到 x、y 坐标或区域名称(参见 rsc-data/ regions.json).|
config
使用$ rsc-server
时,传入-c
(或编辑config.json
在 rsc-server 目录中(如果是从 git 克隆的),或者更改对象
传入{ type: 'start' }
Worker消息修改如下
设置:
{
// UNIX socket file used if connecting to rsc-data-server on the same
// machine
"dataServerFile": "/tmp/rsc-data-server.sock",
// optional IP/port if connecting to rsc-data-server on another network
"dataServerTCP": "localhost:9001" || null,
// password used to authenticate with rsc-data-server
"dataServerPassword": "test",
// version to check clients on login
"version": 204,
// the unique world index to communicate to rsc-data-server
"worldID": 1,
// port to listen to for non-websocket regular TCP clients
// (for mudclient204)
"tcpPort": 43594,
// port to listen to https://developer.mozilla.org/en-US/docs/Web/API/WebSocket connections
// (for rsc-client)
"websocketPort": 43595,
// country flag to use on the website
"country": "CAN",
// disable members features and non-members logins & registration for this
// world
"members": false,
// boost or lower the experience rate
"experienceRate": 1,
// enable or disable fatigue gaining
"fatigue": true,
// add from/to bank options for certing NPCs (not supported in real RSC)
"bankCertificates": false,
// store player combat style in database (not supported in real RSC)
"rememberCombatStyle": false
}
see also
- RSCGo by @spkaeros
- runescape classic server written in go
- RuneJS
- runescape 2 server written in javascript
- RuneScape Classic Wiki
- best source of accurate runescape classic data
license
版权所有 (C) 2021 2003Scape Team
本程序是免费软件:您可以重新分发和/或修改
它根据 GNU Affero 通用公共许可证的条款作为
由自由软件基金会发布,无论是第 3 版
许可,或(由您选择)任何更高版本。
这个程序是分发的,希望它有用,
但没有任何保证; 甚至没有默示保证
特定用途的适销性或适用性。 见
GNU Affero 通用公共许可证了解更多详情。
您应该已经收到 GNU Affero 通用公共许可证的副本
随着这个程序。 如果没有,请参阅 http://www.gnu.org/licenses/。
rsc-server
runescape classic
private server mmorpg emulator. designed to work with the web-based
rsc-client or the java-based
mudclient204.
features:
- supports TCP and WebSockets via Node.js with SQLite persistence and multiple
worlds (with rsc-data-server),
and single-page with optional
multiplayer on the browser via WebWorkers and WebRTC
- plugin-based content addition.
add files with certain function signatures (
function onTalkToNpc(player, npc) {}
,
function onUseWithInventory(player, item, target) {}
, etc.) to implement
quests, skills, item interactions, and other game content
- simple, JSON-based data formats for spawns, skills, probabilities, etc.
- NPC combat (melee and ranged) with accurate
roll-based RNG drops
are implemented
- all of the free-to-play quests implemented
- accurate sleep captcha
- compatible with period-accurate website replica
install
download and install Node.js (which comes with
npm)
for the latest stable release, run:
# npm install -g @2003scape/rsc-data-server @2003scape/rsc-server
to check out the latest unstable features, install
git and run:
$ git clone https://github.com/2003scape/rsc-data-server
$ cd rsc-data-server && npm install && cd ../
$ git clone https://github.com/2003scape/rsc-server
$ cd rsc-server && npm install
if you are having npm build issues, you may require additional packages.
visit the node-canvas
github for more information
install
rsc-client or
mudclient204 to login
cli usage
rsc-server connects to
rsc-data-server for database
saving/loading and managing friends lists across worlds. it supports TCP with
TLS or IPC domain sockets.
if installed with npm, use (-c <config-file>
is optional for both,
they will look for config.json in their own directory first):
$ rsc-data-server -c /etc/rsc-data-server/config.json &
$ rsc-server -c /etc/rsc-server/config.json
if cloned from git:
$ cd rsc-data-server && npm start &
$ cd ../rsc-server && npm start
browser usage
create a new Worker
instance using
./dist/server.bundle.js
or ./dist/server.bundle.min.js
. if making any
changes to the source, use $ npm run build-browser
to re-build these files.
you can then pass the worker instance into
mudclient's .server
property.
const serverWorker = new Worker('./server.bundle.min.js');
serverWorker.postMessage({
type: 'start',
config: {
worldID: 1,
version: 204,
members: false,
experienceRate: 1,
fatigue: true,
rememberCombatStyle: false
}
});
// mc.server = serverWorker;
commands
|Command|Description|
|-|-|
|::addexp \ \|Add experience to a skill name.|
|::appearance|Toggle the character creation screen.|
|::bank|Open the bank interface.|
|::bubble \|Create a player action bubble with an item ID.|
|::clearinventory|Clear your inventory items.|
|::coords|Display your current coordinates.|
|::dmg \|Remove a certain amount of current hitpoints.|
|::fatigue|Set your fatigue to 100%.|
|::give \ \ \|Spawn an item in someone else's (online) inventory with optional amount.|
|::goto \|Teleport to a username (online).|
|::gotoentity \ \|Teleport to the first entity (npcs, gameObjects, groundItems) of a certain ID.|
|::item \ \|Spawn an item in your inventory with optional amount.|
|::kick \<username>|Forcefully log out a username (online).|
|::npc \<id>|Spawn an NPC in your current position.|
|::setqp \<amount>|Set your quest points to a certain amount.|
|::shop \<name>|Open a shop by name (see rsc-data/shops.json)|
|::sound \<name>|Play a sound file (members client only, see rsc-sounds/sounds1.json).|
|::step \<deltaX> \<deltaY>|Step in a certain direction (delta can be -1, 0 or 1).
|::teleport \<x> \<y> | \<region>|Teleport to an x, y coordinate or region name (see rsc-data/regions.json).|
config
when using $ rsc-server
, pass in -c <config-file>
(or edit config.json
in the rsc-server directory if cloned from git), or change the object
passed into the { type: 'start' }
Worker message to modify the following
settings:
{
// UNIX socket file used if connecting to rsc-data-server on the same
// machine
"dataServerFile": "/tmp/rsc-data-server.sock",
// optional IP/port if connecting to rsc-data-server on another network
"dataServerTCP": "localhost:9001" || null,
// password used to authenticate with rsc-data-server
"dataServerPassword": "test",
// version to check clients on login
"version": 204,
// the unique world index to communicate to rsc-data-server
"worldID": 1,
// port to listen to for non-websocket regular TCP clients
// (for mudclient204)
"tcpPort": 43594,
// port to listen to https://developer.mozilla.org/en-US/docs/Web/API/WebSocket connections
// (for rsc-client)
"websocketPort": 43595,
// country flag to use on the website
"country": "CAN",
// disable members features and non-members logins & registration for this
// world
"members": false,
// boost or lower the experience rate
"experienceRate": 1,
// enable or disable fatigue gaining
"fatigue": true,
// add from/to bank options for certing NPCs (not supported in real RSC)
"bankCertificates": false,
// store player combat style in database (not supported in real RSC)
"rememberCombatStyle": false
}
see also
- RSCGo by @spkaeros
- runescape classic server written in go
- RuneJS
- runescape 2 server written in javascript
- RuneScape Classic Wiki
- best source of accurate runescape classic data
license
Copyright (C) 2021 2003Scape Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/.