Skip to content

Instantly share code, notes, and snippets.

@jd4564
jd4564 / emoticons.js
Last active February 23, 2022 11:19
Emoticon plugin for Pokémon Showdown
/*
Emoticon plugin
This plugin allows you to use emoticons in both chat rooms (as long as they are enabled in the room) and private messages.
Adding this plugin to your server is fairly simple.
1) Add this file to your chat-plugins folder.
2) Open the rooms.js file in your favourite text editor and replace this.add('|c|' + user.getIdentity(this.id) + '|' + message); with:
var emoticons = parseEmoticons(user.getIdentity(this.roomid), message);
if (emoticons && !room.disableEmoticons) {
this.addRaw(emoticons);
@jd4564
jd4564 / anagram.js
Last active January 11, 2018 07:03
Anagram plugin for Pokémon Showdown
/**************************************
* Anagram plugin for Pokémon Showdown *
* By: jd *
**************************************/
'use strict';
const fs = require('fs');
const http = require('http');
@jd4564
jd4564 / economy.js
Last active January 11, 2018 07:03
Economy plugin for Pokémon Showdown
var sqlite3 = require('sqlite3');
var db = new sqlite3.Database('config/users.db', function() {
db.run("CREATE TABLE if not exists users (userid TEXT, name TEXT, bucks INTEGER)");
});
var fs = require('fs');
var http = require('http');
var MD5 = require('MD5');
var shopTitle = 'Shop';
var serverIp = '127.0.0.1';