MiscCommands *OLD*

Adds slap commands

  1. // ==UserScript==
  2. // @name MiscCommands *OLD*
  3. // @namespace skyboy@kongregate
  4. // @description Adds slap commands
  5. // @author skyboy
  6. // @include http://www.kongregate.com/games/*/*
  7. // @homepage http://userscripts-mirror.org/scripts/show/75201
  8. // @version 0.0.1.20160401080327
  9. // ==/UserScript==
  10. if (/^\/?games\/[^\/]+\/[^\/?]+(\?.*)?$/.test(window.location.pathname))
  11. window.location.assign("javascript:function foc(){holodeck.activeDialogue()._input_node.focus();};function s(b,a){sendChatMessage('*slaps'+a.replace(/\\/slap/,'')+' with a trout*');foc();return false};function r(a){return a.replace(/\\\\(?!u[0-9a-fA-f]{4}|x[0-9a-fA-f]{2})/g, '\\\\\\\\')};function sp(b,a){sendPrivMessage('*slaps you with a trout*',a); return false};function sendChatMessage(a){dispatchToKonduit({type:KonduitEvent.ROOM_MESSAGE,data:{message:r(a),room:holodeck.chatWindow()._active_room._room}});return a;};function sendPrivMessage(a,b){dispatchToKonduit({type:KonduitEvent.PRIVATE_MESSAGE,data:{message:r(a),username:b.replace(/\\/\\S*\\s([\\s\\S]+)/,'$1')}});return a;};holodeck.addChatCommand('slap', s);holodeck.addChatCommand('pmslap', sp);void(0);")

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址