Coder Social home page Coder Social logo

mrtwidget / livemaps Goto Github PK

View Code? Open in Web Editor NEW
22.0 5.0 8.0 98.97 MB

Livemap Rocket Mod plugin for the Steam game Unturned. This plugin displays a dynamically generated "live map" on your website of any currently running Unturned servers on your network, and then continuously updates the data - including, but certainly not limited to, all player locations.

Home Page: http://nexisrealms.com

License: MIT License

C# 43.02% PHP 6.66% CSS 7.02% JavaScript 42.36% TSQL 0.94%
unturned rocketmod livemap plugin nexisrealms nexis

livemaps's Introduction

Livemaps

This plugin was developed using Rocket Mod libraries for the Steam game Unturned. This Rocket Mod plugin collects server, player, and chat data recurrently and then saves the retrieved data to a user-configured MySQL database or uploads valid JSON to a web address of your choosing. The API provides an AJAX interface for retrieving the latest JSON-encoded server data. Livemap API responses are then used to update the WebUI maps.

The WebUI portion of this plugin is optional, and is intended only as a default theme for this project. The API may be used independently to support fully custom livemap themes and features.

Current Release:

alt text

How to Install:

There are three parts to this plugin:

  1. Rocket Mod plugin (livemap.dll)
  2. WebUI - the website files
  3. API - how the WebUI gets updates from the server

Livemap Rocket Plugin

  1. Compile this project
  2. Copy the compiled Livemap.dll to your Rocket Mod plugin directory
  3. Start/stop your server to generate Livemap.configuration.xml
  4. Edit Livemap.configuration.xml and configure MySQL database settings (if desired)
  5. Add a Rocket Mod permission for the /hide command by adding it to your Permissions.config.xml
    • Example: <Permission Cooldown="0">hide</Permission>
  6. Start Unturned Server

WebUI

  1. Copy the complete contents of the www folder to your web server.

** INFORMATION BELOW HAS CHANGED. API SUPPORT WILL BE ADDED IN UPCOMING UPDATE **

API

  1. Edit www/api/config.api.php and configure your MySQL database settings

    • Note: For standalone API usage, copy only the www/api folder to your web server
  2. Send a GET request to the API to retrieve a JSON-encoded response:

    Sending Requests

    • Here is a JavaScript example of how to send an API request using AJAX:
        $.ajax({
            dataType: "json",
            type: "GET",
            url: "api/livemap.api.php",
            data: {
                livemap: server_id,
                filter: null
            },
            success: function(data) {
                console.log(data);
            },
            error: function(e) {
                console.log(e);
            }
        });
    • You may also view results in a browser:
      • Example
        • Navigate to http://www.example.com/api/livemap.api.php?livemap=server_id; replacing server_id with your own server instance name
        • Result: The results of the request will be displayed directly on the page in JSON format

    Filtering

    • By default, a filter parameter is not required to successfully process an API GET request. When no filter parameter is passed all of the tables are processed and returned in the request. The tables include livemap_server, livemap_data and livemap_chat.

    • Table filtering is accomplished by passing a specific MySQL table name to the filter parameter within an API GET request:

      • Example
        • URI: http://www.example.com/api/livemap.api.php?livemap=server_id&filter=livemap_data
        • Result: Only livemap_data table results are returned
    • Player filtering is accomplished by passing a specific player "Steam64ID" (i.e. 7656#############) to the filter parameter within an API GET request:

      • Example
        • URI: http://www.example.com/api/livemap.api.php?livemap=server_id&filter=7656#############
        • Result: Only specified player data is returned
    1. Append the returned data to your website

API Returnable Fields:

  • Server ID

  • Server Name

  • App Version

  • Map Name

  • Online Player Count

  • Max Player Count

  • PvP

  • Gold / Pro

  • Has Cheats

  • Hide Admins

  • Cycle Time

  • Cycle Length

  • Full Moon

  • Up-time

  • Packets Received

  • Packets Sent

  • Port

  • Mode

  • Player Position

  • Player Rotation

  • Player Stats

    • Health
    • Stamina
    • Hunger
    • Thirst
    • Infection
    • Bleeding
    • Broken Bones
    • Experience
    • Reputation
    • All Skill Levels
  • Steam Data

    • Avatar
    • Group ID
  • Player IP address

  • Player status/features

    • Admin
    • Gold
    • God Mode
    • Vanish Mode
    • Dead
    • Dead Body Location
    • In Vehicle
      • Is Driver
      • Instance ID
      • Vehicle ID
      • Fuel
      • Health
      • Headlights On/Off
      • Taillights On/Off
      • Sirens On/Off
      • Speed
      • Has Battery
      • Battery Charge
      • Exploded
      • Locked
  • Player Appearance

    • Skin Color
    • Hair Type
    • Face Type
    • Beard Type
    • Hat
    • Glasses
    • Mask
  • Livemap Hidden Status


Price:

  • Free, and it always will be.

Requirements:

  • PHP 5.6.+
  • MySQL 5.6.5+
    • It is required to have a minimum MySQL version of 5.6.5 to use this plugin (if mysql is enabled). This is to support the use of tables with multiple timestamp fields.

Resources:


author: Nexis (steam:iamtwidget) <[email protected]>

livemaps's People

Contributors

ceansbzh avatar kr4ken-9 avatar mrtwidget avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

livemaps's Issues

Random disconnects

Seems to lose connection after awhile and can't reconnect.

I can seem it has posted to the api on the site within data.json.

But after the inital post it seems to stop working

Plugin doesn't initialize.

Hello, I have compiled the livemap.dll via livemap.cs in Visual Studio and dropped it into my plugins folder. When I go ahead and turn on the server it doesn't recognize the plugin at all.

Player Names

Hello, This isn't really an Issue but I'm posting it here. I also emailed you just in case. How would I go about adding the player's name above their heads on the live map? Is that in the API or Livemap.js?
Thanks.

chat and map being off

chat messes up if i refresh it shows it right then all of a sudden it repeats the chat in reverse order
and i noticed the icons are off to the right of where they really are on the map

Chat scrolling

when using scroll bar with chat having alot of lines in it moving it a pixel up or down moves it 20 something lines. Scrolling with a scroll wheel in free scroll (no resistance) takes 30 seconds to scroll from top to bottom.
Chat box displays when chat is empty. Maybe make it not visible when its empty?

Workshop Maps

You mentioned working on supporting workshop maps, how do i use workshop maps with this

Error reading Steam Profile

I am running into a little issue with Steam Profiles not being able to read. I believe it's a quick fix, let me know if you are able to help.

dwdwd

  • Dr. Frostie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.