A high fantasy MORPG inspired by the MUDs of olde.
While I appreciate contributions, consider that all contributions, significant or otherwise, cannot be compensated for at this time.
- Node.js (recommended: 8.0.0+)
- npm (needed: 5.x+)
- MongoDB (recommended: 3.4.4+, or a hosted service, like MLab)
- Redis (or a hosted redis service, like Redis Lab)
npm install
npm run setup
npm start
First, create a .env
file in the root. Then, populate it with these values:
MONGODB_URI
- the URI that leads to a mongodb instanceAUTH0_SECRET
- Auth0 server secretREDIS_URL
- a URI that leads to a redis cache
If you want strict validation of users (ie, if you're doing anything sensitive like taking payments), set these values:
AUTH0_JWKS_URI
- the URI that leads to the Auth0 JWKS JSON file
If you want to test Discord integration, you can also add:
DISCORD_SECRET
- the discord secret for your discord botDISCORD_GUILD
- the discord guild for your discord botDISCORD_WATCHER_ROLE
- the watcher role for your discord bot (default: "Event Watcher")DISCORD_VERIFIED_ROLE
- the role for a user to get when they connect their discord (default: "Verified")DISCORD_MUTED_ROLE
- the role for a user who is muted in game (default: "Muted")DISCORD_SUBSCRIBER_ROLE
- the role for a user to get when they subscribe (default: "Subscriber")DISCORD_CHANNEL
- the id of the channel for your discord bot to talk inDISCORD_BOT_CHANNEL
- the id of the channel for your discord bot to listen for commands inDISCORD_BOT_NAME
- the name of the bot as it was set up (default: "LandOfTheRairLobby")
If you want to test Stripe, you need to add:
STRIPE_TOKEN
- the Stripe secret key
Also, your bot will need a role that can assign roles.
For initial setup, run this:
npm run setup
For subsequent updates and specific changes, you can run these instead:
npm run seed:items
- this will populate the database with itemsnpm run seed:npcs
- this will populate the database with npc datanpm run seed:drops
- this will populate the database with drop table datanpm run seed:recipes
- this will populate the database with recipe datanpm run task:macros
- this will generate the macro icon metadata. If you add new icons, please only take from my repository.
If you want to do any debugging, you'll need to make yourself a GM. To do that, you'll want to set your account to be a GM. Open up a mongo shell or run this query through an external tool:
db.accounts.update({ username: 'YOUR_ACCOUNT_NAME' }, { $set: { isGM: true } });
You only need to do this once.
Some routes are enabled for debugging purposes and are otherwise unused. You can visit:
/server
for server stats/premium-stats
for premium buying stats/item-stats
for avg. item stats/logs
for server logs (log entries expire after 6h)/maps
to see all of the maps in the game presently
Some commands are hidden and don't really need to be used by players, but should be used when testing out moderation features. Commands have varying prefixes, such as:
~
- an internal command used by the UI~~
- a debugging command for players^
- a command for testers (and GMs)@
- a command for GMs
~clear
- clear the command buffer~drink
- drink a potion from your potion slot~interact
- called when clicking on something interactable~look
- look at the ground (only used by~search
)~move
- called when clicking on the map to move~restore
- be dead no more~say
- talk to other players nearby~search
- search corpses on the ground, then look~talk
- called automatically when doingxxx, message
- will trigger appropriate dialog for an npc if it has any~trait
- buy traits~unapply
- unapply a buff by name~use
- use an item
~~pos
- get your current x, y, and map.~~reset
- reset your buffs and additionalStats~~items
- count the number of items in the world~~mobs
- count the number of mobs in the world~~ping
- check your ping~~flagged
- check your flagged skills~~lag
- runpos
,items
,mobs
, andping
~~combatlogstart <maxentries=1000>
- start logging combat data (this will clear any existing combat log data) - more than 1000 entries is not recommended~~combatlogstop
- stop logging combat data~~combatlogdownload
- download a CSV of your combat log data
Certain accounts designated as testers get access to several in game commands:
^gold <gold>
- gain<gold>
gold^loadout <level>
- generate a loadout for your class level^level <level>
- set your level to<level>
^owts <boost>
- increase all of your worn/held gear with an Owts enchantment by<boost>
^hp <newhp>
- set your hp to<newhp>
^mp <newmp>
- set your mp to<newmp>
^regen <newregen>
- set your hp/mp regen to<newregen>
^skills <level>
- set your skills to<level>
^stats <level>
set your stats to<level>
^traits
- reset your traits and gain 1000 TP
As a GM, you get access to several commands in the lobby:
/motd <motd>
- set the MOTD in the lobby/resetmotd
- unset the MOTD/alert <msg>
- alert every player with a certain message (very annoying!)/subscribe <period> <account>
- set the account on a trial subscription lasting forperiod
days/unsubscribe <account>
- remove the accounts subscription/silver <silver> <account>
- givesilver
silver to the target account/festival <festivalish>
- update the global festival data using festivalish (settings that can be changed areGameSettings
, see below)
You also get access to some commands in-game:
@allegiance <allegiance>
- change your allegiance toallegiance
. IfGM
is specified, then you will be non-hostle to everything, and they will be non-hostile to you@gold <num>
- create gold on your tile@item <item name>
- create a particular item on your tile@itemdupe
- copy your right hand to your left hand@examine <nothing|npcish> <nothing|prop>
- ifnpcish
is specified, will examine an npc (ifprop
is specified, it will print only that prop). Otherwise, it'll examine your right hand item@itemforge propsish
- create an item using props syntax, for example:sprite=1 type=Hammer stats.str=1
@skill <skillname> <xpgain>
- gainxpgain
skill forskillname
@tp <tpgain>
- gaintpgain
trait points@xp <xp>
- gain XP@intercept <target>
- you will see log messages as this target (as well as your own).@kill <target>
- will instantly killtarget
@lootvortex <radius>
- pull every item inradius
tiles to the current one@itemmod propsish
- modify your rightHand item based on props specified, for example:ounces=10
@npcmod npcish propsish
- modify the npc based on propsish@partyjoin partyname
- automatically joinpartyname
if it exists, regardless of leader visibility@respawn lairname
- respawnlairname
on the current map@searchitems itemname
- search all the items for itemname@searchnpcs npcname
- search all the items for npcname@spawnnpc npc.npcId="NPC Internal ID" spawner.*=*
- spawn a monster of the given id, with optional spawner props@summon playerish
- summon any player who matches playerish@teleport <x> <y> [map]
- teleport to X,Y, and if map is specified, you'll also change maps@teleportto npcish
- teleport to an npc matching a name like npcish@sight
- give yourself the ability to see through walls
Internally, there are a large handful of game settings that control how players gain anything. They are pretty self-explanatory:
xpMult
- the xp multiplier, default 1skillMult
- the skill multiplier, default 1goldMult
- the gold multiplier, default 1numberOfRandomStatsForItems
- the number of random stats an item can generate with, default 0randomStatMaxValue
- the max value a random stat can be on an item, default 0randomStatChance
- the chance of an item generating with a random stat (1-1000000), default 0