Skip to content

This will read directly from cdclient.sqlite and locale.xml so it can be compatible with any customized servers.

License

Notifications You must be signed in to change notification settings

MasterTemple/LEGO-Universe-Discord-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LEGO Universe Discord Bot

Overview

  1. Prerequisites: what you need prior to setting the bot up
  2. Setup: instructions on how to set up the bot
  3. Features: the bots functionality within Discord
  4. Commands: a short description and example for each command

Prerequisites

  1. Create a Discord Application

    View the Official Guide on how to create a Discord Application

    *Please note that this Discord Bot does not require any special intents

    Invite the bot to your server with the following link: https://discord.com/api/oauth2/authorize?client_id={YOUR_BOTS_ID}&permissions=242666032192&scope=applications.commands%20bot

  2. Have a LEGO Universe client

    You are not required to be hosting a LEGO Universe server to host this bot

    All you are required is to have the locale.xml and the cdclient.sqlite files

    The locale.xml can be found at PATH_TO_LU_CLIENT\client\locale\locale.xml

    The cdclient.sqlite is not found in the client. You must create it from the cdclient.fdb which is found in unpacked clients.

    If you are using a packed client, you can unpack just the cdclient.fdb using lunpack.exe with the following command:

    • Make sure the contents of globs.txt is just *.fdb, otherwise you will unpack the whole client (which takes a lot more time)
    • Make sure lunpack.exe and globs.txt are in the same folder
    lunpack.exe "PATH_TO_LU_CLIENT" - g "globs.txt"

    To convert the cdclient.fdb to the cdclient.sqlite, upload the cdclient.fdb to https://fdb.lu-dev.net/.

Setup

  1. Run git clone https://github.com/MasterTemple/LEGO-Universe-Discord-Bot.git

  2. Configuration

    Rename .env.template to .env and fill in the data from the comments provided.

    If you do not have a cdclient.sqlite create one from your cdclient.fdb at https://fdb.lu-dev.net/.

  3. Install proper dependencies with npm install

  4. Transpile with tsc --build

    If tsc is not found, install it with npm i typescript -g and then run tsc --build.

  5. Run ./lib/index.js

    I would recommend using something that restarts if it crashes such as pm2

    Install pm2 with npm install pm2 -g and run it with pm2 start .

    Restart with pm2 restart all and stop with pm2 stop all

    If you edit the cdclient.sqlite or locale.xml, they can be reloaded without restarting the bot by using the Slash Command /reload in Discord.

    If you edit the .env file, you just need to restart the bot.

Features

Autocomplete

This allows users to search objects by their name instead of relying on knowing the internal object id. autocomplete

Message Embeds

Message embeds allow for organizing and displaying data in a much more visually appealing way.

They are indicated below by the colored bar on the left and the darker background.

Normal Message

no embed

Message Embed

embed

Message Components

Message components are the buttons underneath the embed. These allow for the user to execute related commands on an object.

For example, an item that can be earned can also be bought. Instead of having to use /earn and then /buy, the user can use /earn and then click the Buy button.

The green button indicates the current command. Disabled/faded buttons show that an item cannot be obtained through a certain method.

message components

If the user clicks the Buy button, the message is edited to display the following

message components

Paging

The current page index is indicated between the parenthesis in the title.

Page navigation can be controlled through the buttons on the bottom.

/buy

External Links

The blue hyper-linked text will take the user to the corresponding page of hosted LU Explorer that is specified in the configuration.

LU Explorer an angular.io webapp that displays LEGO Universe game data..

Commands

/activity

View the stats of an achievement!

/achievement

/activity

View all rewards given from an activity!

/activity

/drop

View all smashables that drop an item!

/drop

/get

View how to get an item!

/get

/mission

View the stats of a mission!

/mission

/reload

Reload the data from the cdclient.sqlite and locale.xml!

/reload

/skillitems

View all items that have a skill!

/skillitems

/vendor

View all items sold from a vendor!

/vendor

/brick

View the stats of a brick!

/brick

/earn

View all missions that reward an item!

/earn

/item

View the stats of an item!

/item

/npc

View all missions from an NPC!

/npc

/report

Open a dialog to report anything about this bot!

/report

/skills

View all skills attached to an item!

/skills

/buy

View all vendors that sell an item!

/buy

/enemy

View the stats of an enemy!

/enemy

/level

View stats about a level in LEGO Universe!

/level

/package

View all items given from a package!

/package

/reward

View all activities that drop an item!

/reward

/smash

View all enemys given from a package!

/smash

/cooldowngroup

View the skills in a cooldowngroup!

/cooldowngroup

/execute

Open a dialog to execute multiple commands on this bot!

/execute dialog

/execute

/loottable

View all items in a loot table!

/loottable

/preconditions

View the preconditions to use an item!

/preconditions

/skill

View the stats of a skill!

/skill

/unpack

View all packages that drop an item!

/unpack

About

This will read directly from cdclient.sqlite and locale.xml so it can be compatible with any customized servers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published