NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Kamihime Project R - More character statuses // @description Displays more character statuses, max 38 instead of 8 // @updateURL https://openuserjs.org/meta/nike/Kamihime_Project_R_-_More_character_statuses.meta.js // @license MIT // @match https://gnkh-api-r.prod.nkh.dmmgames.com/front/cocos2d-proj/components-pc/game/app.html // @run-at document-start // ==/UserScript== (function() { var interval = setInterval(function() { if (typeof kh !== 'undefined' && kh.CharacterCard) { clearInterval(interval); kh.CHARACTER_PANEL_STATUS_ICONS.COUNT = 38 var generateStatusUi = function(characterCard, index, x, y, opacity) { var newStatusName = "status_" + index.toString() var targetStatus = characterCard._widget.seekWidgetByName(newStatusName) if (typeof targetStatus === 'undefined' || targetStatus === null) { var status7 = characterCard._widget.seekWidgetByName("status_7") var new_status = khutil.cloneWithAction(status7) new_status.setName(newStatusName) new_status.setPosition(x, y) new_status.setOpacity(opacity) characterCard._widget.addChild(new_status) } } kh.CharacterCard.prototype._initStatusEffectIconHandler = function(rootNode, widgetNamePrefixes) { generateStatusUi(this, 8, 190.8633, 11, 255) generateStatusUi(this, 9, 210.4537, 19.7952, 255) generateStatusUi(this, 10, 219.4537, 39.3856, 255) generateStatusUi(this, 11, 219.4537, 60.976, 255) generateStatusUi(this, 12, 210.4537, 80.5664, 255) generateStatusUi(this, 13, 210.4537 - 21.5904 + 2, 86.5664, 255) generateStatusUi(this, 14, 190.8633 - 21.5904, 86.5664, 255) generateStatusUi(this, 15, 190.8633 - 21.5904 * 2, 86.5664, 255) generateStatusUi(this, 16, 190.8633 - 21.5904 * 3, 86.5664, 255) generateStatusUi(this, 17, 190.8633 - 21.5904 * 4, 86.5664, 255) generateStatusUi(this, 18, 190.8633 - 21.5904 * 5, 86.5664, 255) generateStatusUi(this, 19, 190.8633 - 21.5904 * 6, 86.5664, 255) generateStatusUi(this, 20, 190.8633 - 21.5904 * 7, 86.5664, 255) generateStatusUi(this, 21, 190.8633 - 21.5904 * 8, 86.5664, 255) generateStatusUi(this, 22, 190.8633 - 21.5904 * 9, 86.5664, 255) generateStatusUi(this, 23, 190.8633 - 21.5904 * 9, 86.5664 - 21.5904 * 1, 255) generateStatusUi(this, 24, 190.8633 - 21.5904 * 9, 86.5664 - 21.5904 * 2, 255) generateStatusUi(this, 25, 190.8633 - 21.5904 * 9, 86.5664 - 21.5904 * 3, 255) generateStatusUi(this, 26, 190.8633 - 21.5904 * 10, 86.5664, 255) generateStatusUi(this, 27, 190.8633 - 21.5904 * 10, 86.5664 - 21.5904 * 1, 255) generateStatusUi(this, 28, 190.8633 - 21.5904 * 10, 86.5664 - 21.5904 * 2, 255) generateStatusUi(this, 29, 190.8633 - 21.5904 * 10, 86.5664 - 21.5904 * 3, 255) generateStatusUi(this, 30, 190.8633 - 21.5904 * 11, 86.5664, 255) generateStatusUi(this, 31, 190.8633 - 21.5904 * 11, 86.5664 - 21.5904 * 1, 255) generateStatusUi(this, 32, 190.8633 - 21.5904 * 11, 86.5664 - 21.5904 * 2, 255) generateStatusUi(this, 33, 190.8633 - 21.5904 * 11, 86.5664 - 21.5904 * 3, 255) generateStatusUi(this, 34, 190.8633 - 21.5904 * 12, 86.5664, 255) generateStatusUi(this, 35, 190.8633 - 21.5904 * 12, 86.5664 - 21.5904 * 1, 255) generateStatusUi(this, 36, 190.8633 - 21.5904 * 12, 86.5664 - 21.5904 * 2, 255) generateStatusUi(this, 37, 190.8633 - 21.5904 * 12, 86.5664 - 21.5904 * 3, 255) var widgetList = this._setUiArrayList(rootNode, widgetNamePrefixes); var statusEffectIconList = _.map(widgetList, function(widget, index) { return kh.createInstance("StatusEffectIcon").init(widget, index); }, this); return kh.createInstance("StatusEffectIconHandler").init(statusEffectIconList, 'member'); } } }, 10); })();