<commit_before>--------------------------------------------------------
-- This file is part of the JX3 Mingyi Plugin.
-- @link     : https://jx3.derzh.com/
-- @desc     : Ե
-- @author   :  @˫ @׷Ӱ
-- @modifier : <NAME> (<EMAIL>)
-- @copyright: Copyright (c) 2013 EMZ Kingsoft Co., Ltd.
--------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
-- these global functions are accessed all the time by the event handler
-- so caching them is worth the effort
-----------------------------------------------------------------------------------------------------------
local setmetatable = setmetatable
local ipairs, pairs, next, pcall, select = ipairs, pairs, next, pcall, select
local sub, len, format, rep = string.sub, string.len, string.format, string.rep
local find, byte, char, gsub = string.find, string.byte, string.char, string.gsub
local type, tonumber, tostring = type, tonumber, tostring
local HUGE, PI, random, abs = math.huge, math.pi, math.random, math.abs
local min, max, floor, ceil = math.min, math.max, math.floor, math.ceil
local pow, sqrt, sin, cos, tan, atan = math.pow, math.sqrt, math.sin, math.cos, math.tan, math.atan
local insert, remove, concat, sort = table.insert, table.remove, table.concat, table.sort
local pack, unpack = table.pack or function(...) return {...} end, table.unpack or unpack
-- jx3 apis caching
local wsub, wlen, wfind, wgsub = wstring.sub, wstring.len, wstring.find, StringReplaceW
local GetTime, GetLogicFrameCount, GetCurrentTime = GetTime, GetLogicFrameCount, GetCurrentTime
local GetClientTeam, UI_GetClientPlayerID = GetClientTeam, UI_GetClientPlayerID
local GetClientPlayer, GetPlayer, GetNpc, IsPlayer = GetClientPlayer, GetPlayer, GetNpc, IsPlayer
local LIB = MY
local UI, DEBUG_LEVEL, PATH_TYPE, PACKET_INFO = LIB.UI, LIB.DEBUG_LEVEL, LIB.PATH_TYPE, LIB.PACKET_INFO
local spairs, spairs_r, sipairs, sipairs_r = LIB.spairs, LIB.spairs_r, LIB.sipairs, LIB.sipairs_r
local ipairs_r, count_c, pairs_c, ipairs_c = LIB.ipairs_r, LIB.count_c, LIB.pairs_c, LIB.ipairs_c
local IsNil, IsBoolean, IsUserdata, IsFunction = LIB.IsNil, LIB.IsBoolean, LIB.IsUserdata, LIB.IsFunction
local IsString, IsTable, IsArray, IsDictionary = LIB.IsString, LIB.IsTable, LIB.IsArray, LIB.IsDictionary
local IsNumber, IsHugeNumber, IsEmpty, IsEquals = LIB.IsNumber, LIB.IsHugeNumber, LIB.IsEmpty, LIB.IsEquals
local Call, XpCall, GetTraceback, RandomChild = LIB.Call, LIB.XpCall, LIB.GetTraceback, LIB.RandomChild
local Get, Set, Clone, GetPatch, ApplyPatch = LIB.Get, LIB.Set, LIB.Clone, LIB.GetPatch, LIB.ApplyPatch
local EncodeLUAData, DecodeLUAData, CONSTANT = LIB.EncodeLUAData, LIB.DecodeLUAData, LIB.CONSTANT
-----------------------------------------------------------------------------------------------------------
local PLUGIN_NAME = 'MY_Toolbox'
local PLUGIN_ROOT = PACKET_INFO.ROOT .. PLUGIN_NAME
local MODULE_NAME = 'MY_Love'
local _L = LIB.LoadLangPack(PLUGIN_ROOT .. '/lang/')
--------------------------------------------------------------------------
if not LIB.AssertVersion(MODULE_NAME, _L[MODULE_NAME], 0x2013900) then
	return
end
--------------------------------------------------------------------------

local LOVER_DATA = {
	dwID = 0, -- Ե ID
	szName = '', -- Ե
	dwAvatar = 0, -- Եͷ
	dwForceID = 0, -- 
	nRoleType = 0, -- Եͣ0Ե
	nLoverType = 0, -- Եͣ0˫1
	nLoverTime = 0, -- Եʼʱ䣨λ룩
	dwMapID = 0, -- ڵͼ
	bOnline = false, -- Ƿ
}

local D = {}
local O = {
	-- 
	bQuiet = false, -- ţܾ˵Ĳ鿴
	szNone = _L['Singleton'], -- ûԵʱʾ
	szJabber = _L['Hi, I seem to meet you somewhere ago'], -- ڨ
	szSign = '', -- Եԣǩ
	bAutoFocus = true, -- Զ
	bHookPlayerView = false, -- ڲ鿴װʾԵ
	-- ر
	aAutoSay = { -- رף˫ȡ֪ͨ
		_L['Some people fancy you'],
		_L['Other side terminate love you'],
		_L['Some people fall in love with you'],
		_L['Other side gave up love you'],
	},
	lover = Clone(LOVER_DATA),
	tOtherLover = {}, -- 鿴Ե
	tViewer = {}, -- Ⱥ鿴б
}
RegisterCustomData('MY_Love.bQuiet')
RegisterCustomData('MY_Love.szNone')
RegisterCustomData('MY_Love.szJabber')
RegisterCustomData('MY_Love.szSign')
RegisterCustomData('MY_Love.bAutoFocus')
RegisterCustomData('MY_Love.bHookPlayerView')

--[[
Ե
========
1. ÿɫֻһԵԵǺ
2. Ҫ̹ԵϢ޷أѿֱӲ鿴ȷϣ
3. ˫ԵҪغӲ5ڣҪ֮ģѡΪĿ꣬ٵȷ
4. Եѡһ 3غøϵߺѣԷյ֪ͨ
5. Եʱ֪ͨԷԵ֪ͨ
6. ɾԵԶԵϵ


ĶԵ
	XXXXXXXXX (198 ...) [ն˿]
	ͣ/˫  ʱXXСʱXX

	ضѽ[___________] 4ڣһ֮ģ
	ĳغѣ[___________] Ҫߣ֪ͨԷ
	ûԵʱʾʲô[___________]  [**] ģʽ

	Եԣ [________________________________________________________]
	ڨ [________________________________________________________]

Сʾ
	1. װҲ໥
	2. ԵԵɾ˫Եͨĸ֪Է
	3. ǶѲ鿴ԵʱĿᵯȷϿ򣨿ɿΣ
--]]

---------------------------------------------------------------------
-- غͱ
---------------------------------------------------------------------

-- ڲ
function D.IsShielded()
	if LIB.IsShieldedVersion() and not IsLocalFileExist('interface/MY#DATA/tester.jx3dat') and GetCurrentTime() < 1579795200 then -- Ϧ
		return true
	end
	return false
end

-- ȡָƷ
function D.GetBagItemPos(szName)
	local me = GetClientPlayer()
	for dwBox = 1, LIB.GetBagPackageCount() do
		for dwX = 0, me.GetBoxSize(dwBox) - 1 do
			local it = me.GetItem(dwBox, dwX)
			if it and GetItemNameByItem(it) == szName then<commit_msg>修改屏蔽时间<commit_after>--------------------------------------------------------
-- This file is part of the JX3 Mingyi Plugin.
-- @link     : https://jx3.derzh.com/
-- @desc     : Ե
-- @author   :  @˫ @׷Ӱ
-- @modifier : <NAME> (<EMAIL>)
-- @copyright: Copyright (c) 2013 EMZ Kingsoft Co., Ltd.
--------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
-- these global functions are accessed all the time by the event handler
-- so caching them is worth the effort
-----------------------------------------------------------------------------------------------------------
local setmetatable = setmetatable
local ipairs, pairs, next, pcall, select = ipairs, pairs, next, pcall, select
local sub, len, format, rep = string.sub, string.len, string.format, string.rep
local find, byte, char, gsub = string.find, string.byte, string.char, string.gsub
local type, tonumber, tostring = type, tonumber, tostring
local HUGE, PI, random, abs = math.huge, math.pi, math.random, math.abs
local min, max, floor, ceil = math.min, math.max, math.floor, math.ceil
local pow, sqrt, sin, cos, tan, atan = math.pow, math.sqrt, math.sin, math.cos, math.tan, math.atan
local insert, remove, concat, sort = table.insert, table.remove, table.concat, table.sort
local pack, unpack = table.pack or function(...) return {...} end, table.unpack or unpack
-- jx3 apis caching
local wsub, wlen, wfind, wgsub = wstring.sub, wstring.len, wstring.find, StringReplaceW
local GetTime, GetLogicFrameCount, GetCurrentTime = GetTime, GetLogicFrameCount, GetCurrentTime
local GetClientTeam, UI_GetClientPlayerID = GetClientTeam, UI_GetClientPlayerID
local GetClientPlayer, GetPlayer, GetNpc, IsPlayer = GetClientPlayer, GetPlayer, GetNpc, IsPlayer
local LIB = MY
local UI, DEBUG_LEVEL, PATH_TYPE, PACKET_INFO = LIB.UI, LIB.DEBUG_LEVEL, LIB.PATH_TYPE, LIB.PACKET_INFO
local spairs, spairs_r, sipairs, sipairs_r = LIB.spairs, LIB.spairs_r, LIB.sipairs, LIB.sipairs_r
local ipairs_r, count_c, pairs_c, ipairs_c = LIB.ipairs_r, LIB.count_c, LIB.pairs_c, LIB.ipairs_c
local IsNil, IsBoolean, IsUserdata, IsFunction = LIB.IsNil, LIB.IsBoolean, LIB.IsUserdata, LIB.IsFunction
local IsString, IsTable, IsArray, IsDictionary = LIB.IsString, LIB.IsTable, LIB.IsArray, LIB.IsDictionary
local IsNumber, IsHugeNumber, IsEmpty, IsEquals = LIB.IsNumber, LIB.IsHugeNumber, LIB.IsEmpty, LIB.IsEquals
local Call, XpCall, GetTraceback, RandomChild = LIB.Call, LIB.XpCall, LIB.GetTraceback, LIB.RandomChild
local Get, Set, Clone, GetPatch, ApplyPatch = LIB.Get, LIB.Set, LIB.Clone, LIB.GetPatch, LIB.ApplyPatch
local EncodeLUAData, DecodeLUAData, CONSTANT = LIB.EncodeLUAData, LIB.DecodeLUAData, LIB.CONSTANT
-----------------------------------------------------------------------------------------------------------
local PLUGIN_NAME = 'MY_Toolbox'
local PLUGIN_ROOT = PACKET_INFO.ROOT .. PLUGIN_NAME
local MODULE_NAME = 'MY_Love'
local _L = LIB.LoadLangPack(PLUGIN_ROOT .. '/lang/')
--------------------------------------------------------------------------
if not LIB.AssertVersion(MODULE_NAME, _L[MODULE_NAME], 0x2013900) then
	return
end
--------------------------------------------------------------------------

local LOVER_DATA = {
	dwID = 0, -- Ե ID
	szName = '', -- Ե
	dwAvatar = 0, -- Եͷ
	dwForceID = 0, -- 
	nRoleType = 0, -- Եͣ0Ե
	nLoverType = 0, -- Եͣ0˫1
	nLoverTime = 0, -- Եʼʱ䣨λ룩
	dwMapID = 0, -- ڵͼ
	bOnline = false, -- Ƿ
}

local D = {}
local O = {
	-- 
	bQuiet = false, -- ţܾ˵Ĳ鿴
	szNone = _L['Singleton'], -- ûԵʱʾ
	szJabber = _L['Hi, I seem to meet you somewhere ago'], -- ڨ
	szSign = '', -- Եԣǩ
	bAutoFocus = true, -- Զ
	bHookPlayerView = false, -- ڲ鿴װʾԵ
	-- ر
	aAutoSay = { -- رף˫ȡ֪ͨ
		_L['Some people fancy you'],
		_L['Other side terminate love you'],
		_L['Some people fall in love with you'],
		_L['Other side gave up love you'],
	},
	lover = Clone(LOVER_DATA),
	tOtherLover = {}, -- 鿴Ե
	tViewer = {}, -- Ⱥ鿴б
}
RegisterCustomData('MY_Love.bQuiet')
RegisterCustomData('MY_Love.szNone')
RegisterCustomData('MY_Love.szJabber')
RegisterCustomData('MY_Love.szSign')
RegisterCustomData('MY_Love.bAutoFocus')
RegisterCustomData('MY_Love.bHookPlayerView')

--[[
Ե
========
1. ÿɫֻһԵԵǺ
2. Ҫ̹ԵϢ޷أѿֱӲ鿴ȷϣ
3. ˫ԵҪغӲ5ڣҪ֮ģѡΪĿ꣬ٵȷ
4. Եѡһ 3غøϵߺѣԷյ֪ͨ
5. Եʱ֪ͨԷԵ֪ͨ
6. ɾԵԶԵϵ


ĶԵ
	XXXXXXXXX (198 ...) [ն˿]
	ͣ/˫  ʱXXСʱXX

	ضѽ[___________] 4ڣһ֮ģ
	ĳغѣ[___________] Ҫߣ֪ͨԷ
	ûԵʱʾʲô[___________]  [**] ģʽ

	Եԣ [________________________________________________________]
	ڨ [________________________________________________________]

Сʾ
	1. װҲ໥
	2. ԵԵɾ˫Եͨĸ֪Է
	3. ǶѲ鿴ԵʱĿᵯȷϿ򣨿ɿΣ
--]]

---------------------------------------------------------------------
-- غͱ
---------------------------------------------------------------------

-- ڲ
function D.IsShielded()
	if GetCurrentTime() < 1579795200 and LIB.IsShieldedVersion() and not IsLocalFileExist('interface/MY#DATA/tester.jx3dat') then -- Ϧ
		return true
	end
	return false
end

-- ȡָƷ
function D.GetBagItemPos(szName)
	local me = GetClientPlayer()
	for dwBox = 1, LIB.GetBagPackageCount() do
		for dwX = 0, me.GetBoxSize(dwBox) - 1 do
			local it = me.GetItem(dwBox, dwX)
			if it and GetItemNameByItem(it) == szName then
{'fraction_non_alphanumeric': 0.2525649630837089, 'fraction_numerical': 0.010355738805254578, 'mean_word_length': 2.335465302206588, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6508233', 'n_tokens_mistral': 4034, 'n_tokens_neox': 3861, 'n_words': 901}