Skip to content

Instantly share code, notes, and snippets.

@kyubuns
Created November 9, 2015 00:26
Show Gist options
  • Save kyubuns/0c3c810e2e736b681e1c to your computer and use it in GitHub Desktop.
Save kyubuns/0c3c810e2e736b681e1c to your computer and use it in GitHub Desktop.
###:
# @plugindesc ツイートするやつ
# @author kyubuns
#
# @help
#
# Plugin Command:
# Tweet (message)
#
# Example:
# Tweet \V[0001]点を取りました! http://kyubuns.net/
#
# License:
# Copyright (c) 2015 kyubuns
#
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
###
_Game_Interpreter_command356 = Game_Interpreter.prototype.command356
Game_Interpreter.prototype.command356 = ->
if this._params[0].split(" ")[0] == 'Tweet'
$gameSystem.tweet(this._params[0])
_Game_Interpreter_command356.call(this)
Game_System.prototype.tweet = (rawMessage) ->
message = Window_Base.prototype.convertEscapeCharacters(rawMessage.slice(6))
link = 'http://twitter.com/home?status=' + encodeURIComponent(message)
window.open(link, '_blank')
console.log(message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment