A Discord chat bot for playing ENDLESS WAR in the RFCK Discord server
Switch branches/tags
Nothing to show
Clone or download
krakissi Merge pull request #175 from lateralyst/master
fixed the 'ghost busting gives way too much slime' bug
Latest commit c9c6f1b Nov 17, 2018

README

Create a file in the same directory as client.py named "token", which
contains only your API token.

Run client.py (with python 3.5+).

------------------------------------------------------------------------

Creating the database tables:
 
CREATE TABLE users (
	id_user varchar(128) NOT NULL,
	id_server varchar(128) NOT NULL,
	slimes bigint NOT NULL DEFAULT '0',
	time_lastkill int NOT NULL DEFAULT '0',
	time_lastrevive int NOT NULL DEFAULT '0',
	id_killer varchar(128) NOT NULL DEFAULT '',
	time_lastspar int NOT NULL DEFAULT '0',
	time_lasthaunt int NOT NULL DEFAULT '0',
	slimecredit bigint NOT NULL DEFAULT '0',
	time_lastinvest int NOT NULL DEFAULT '0',
	slimelevel int NOT NULL DEFAULT '1',
	hunger int NOT NULL DEFAULT '0',
	weapon varchar(64) NOT NULL DEFAULT '',
	trauma varchar(64) NOT NULL DEFAULT '',
	totaldamage bigint NOT NULL DEFAULT '0',
	weaponskill int NOT NULL DEFAULT '0',
	bounty bigint NOT NULL DEFAULT '0',
	weaponname varchar(32) NOT NULL DEFAULT '',
	ghostbust int NOT NULL DEFAULT '0',
	inebriation int NOT NULL DEFAULT '0',
	faction varchar(32) NOT NULL default '',
	poi varchar(64) NOT NULL default 'downtown',
	life_state int NOT NULL DEFAULT '1',
	busted int NOT NULL DEFAULT '0',
	rr_challenger_id varchar(128) NOT NULL DEFAULT '',
	CONSTRAINT id_user_server PRIMARY KEY (id_user, id_server)
);

CREATE TABLE stats (
	id_user varchar(128) NOT NULL,
	id_server varchar(128) NOT NULL,
	stat_metric varchar(64) NOT NULL,
	stat_value bigint,

	PRIMARY KEY (id_user, id_server, stat_metric)
);

CREATE TABLE markets (
	id_server varchar(128) NOT NULL,
	slimes_casino bigint NOT NULL DEFAULT '0',
	rate_market bigint NOT NULL DEFAULT '1000',
	rate_exchange bigint NOT NULL DEFAULT '1000000',
	boombust int NOT NULL DEFAULT '0',
	time_lasttick int NOT NULL DEFAULT '0',
	slimes_revivefee bigint NOT NULL DEFAULT '0',
	negaslime bigint NOT NULL DEFAULT '0',
	clock int NOT NULL DEFAULT '0',
	weather varchar(32) NOT NULL DEFAULT 'sunny',
	day int NOT NULL DEFAULT '726',
	decayed_slimes bigint NOT NULL DEFAULT '0',


	PRIMARY KEY (id_server)
);

CREATE TABLE weaponskills (
	id_user varchar(128) NOT NULL,
	id_server varchar(128) NOT NULL,
	weapon varchar(64) NOT NULL,
	weaponskill int NOT NULL DEFAULT '0',
	name varchar(32) NOT NULL DEFAULT '',

	PRIMARY KEY (id_user, id_server, weapon)
);

CREATE TABLE players (
	id_user varchar(128) NOT NULL,
	id_server varchar(128) NOT NULL,

	avatar varchar(1024) NOT NULL DEFAULT '',
	display_name varchar(256) NOT NULL DEFAULT '',

	PRIMARY KEY (id_user)
);

CREATE TABLE servers (
	id_server varchar(128) NOT NULL,

	name varchar(256) NOT NULL DEFAULT '',
	icon varchar(1024) NOT NULL DEFAULT '',

	PRIMARY KEY (id_server)
);

CREATE TABLE items (
	id_item int NOT NULL AUTO_INCREMENT,
	id_server varchar(128) NOT NULL,
	id_user varchar(128) NOT NULL,
	item_type varchar(64) NOT NULL,
	time_expir int,
	stack_max int NOT NULL DEFAULT '-1',
	stack_size int NOT NULL DEFAULT '1',
	soulbound int NOT NULL DEFAULT '0',

	PRIMARY KEY (id_item)
);

CREATE TABLE items_prop (
	id_item int NOT NULL,

	name varchar(64) NOT NULL,
	value varchar(2048),

	FOREIGN KEY (id_item)
		REFERENCES items(id_item)
		ON DELETE CASCADE
);