Git Product home page Git Product logo

transfromage's Introduction

Donate

Transformice's API written in Lua (5.1▲) using the Luvit runtime environment

About

Transformice is an online independent multiplayer free-to-play platform video game created by the French company Atelier801.

Luvit is an open-source, asynchronous I/O Lua runtime environment that makes requests and connections possible for the Lua programming language.

Transfromage API is a documented API that allows developers to make bots for the aforementioned game.

Join the Fifty Shades of Lua discord to discuss about this API and to receive special support.

You can also check out Fromage API for Atelier801's forum.

This API had many indirect contributors, including @Tocutoeltuco, @Useems, @Turkitutu, @Athesdrake and the python version of Transfromage API.

/!\ Versions under 2.0 are no longer working due to internal changes of the game.
To persist using an older version, please check the changes in enum.lua in this commit.

Keys Endpoint

This API depends on an endpoint that gives you access to the Transformice encryption keys.

To use it you will need a token which you can get by applying through this form. See below to know the names of Transfromage managers who handle the token system.

  • Tocutoeltuco @discord=> Tocutoeltuco#0018 212634414021214209;
  • Blank3495 @discord=> 󠂪󠂪 󠂪󠂪 󠂪󠂪󠂪󠂪 󠂪󠂪 󠂪󠂪󠂪󠂪 󠂪󠂪 󠂪󠂪#8737 436703225140346881;
  • Bolodefchoco @discord=> Lautenschlager#2555 285878295759814656.

Installation

  • To install Luvit, visit https://luvit.io and follow the instructions provided for your platform.
    • If you face problems installing it on Windows, please use Get-Lit
  • To install Transfromage, run lit install Lautenschlager-id/transfromage
  • Run your bot script using luvit, for example: luvit bot.lua
If you are new and can't follow these steps, please consider using the MyFirstBot.zip that has been premade with the executables and the API.
(4MB) Windows | Linux

API Update

To update the API automatically all you need to do is to create a file named autoupdate in the bot's path.
You can create it running cd. > autoupdate (for Windows) or touch autoupdate (for Linux);

The update will overwrite all the old files and dependencies.

For semi-automatic updates (which asks for your permission before updating), create the file semiautoupdate instead.

Contributing

The best way to contribute to this API is by donating creating pull requests with bug fixes and new events / methods (like joining the map editor, getting a map XML, loading Lua...)

Read CONTRIBUTING to learn about how you can contribute to the API.
See CONTRIBUTORS.

Base example

You can check more examples here.
local api = require("Transfromage")
local client = api.client()

client:once("ready", function()
	client:connect("Username#0000", "password")
end)

client:start("PLAYER_ID", "API_TOKEN")
Suggestion to prevent this issue
client:on("whisperMessage", function(playerName, message, playerCommunity)
	if playerName == "OWNER_NAME#0000" then -- Not the bot name, but yours (the bot developer)
		if message == "shutdown" then -- Command shutdown
			client:disconnect()
		end
	end
end)
Suggestion for reconnection on login failure to prevent this issue
client:on("ready", function()
	client:connect("Username#0000", "password")
end)

client:on("connectionFailed", function()
	client:start("PLAYER_ID", "API_TOKEN")
end)

client:emit("connectionFailed")

transfromage's People

Contributors

lautenschlager-id avatar blank3495 avatar robotex avatar

Watchers

James Cloos avatar

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.