jarlyyn 发表于 2024-4-20 00:33:46

求助,关于mudlet的使用

如何获得比较原始的当前行的ansi或相关信息?

mush有getstyleinfo,当作插件可以获取到原始的包或想对原始的包信息。

mudlet我爬了一圈wiki,只有得到如下信息

[*]一个全局的line变量,纯文本
[*]GetTextFormat函数,以光标位置为单位的样式获取
[*]isAnsiFgColor/isAnsiFgColor 判断当前位置的
[*]sendSocket,一个可以发送原始数据的方法


都是以光标/显示行的位置为单位的函数,没有以样式为单位过去信息的方法。

由于我会需要

[*]将样式信息标准化甚至格式化为字符串形式
[*]自己维护若干行的相应信息
[*]以样式为单位进行触发


没有在mudlet找到相关的信息,希望有谁能给我个方向。

nny 发表于 2024-4-20 00:40:41

mudlet 目前只能通过移动光标至过去的某行,再用类似GetTextFormat函数来获取过去信息,但我一直觉得GetTextFormat在最后一个字符的获取上有问题。可能是我用的不对{:7_274:}

dtp 发表于 2024-4-20 00:54:52

根据资深人士的反馈,mudlet 没有这个功能。

杰哥可以开骂了。

这方面做得最好的目前是 PaoTin++,就连 TinTin++ 都不如 PaoTin++

holygb 发表于 2024-4-20 01:01:33

我也有类似需求,写了个函数获取一行或几行间字符的属性,代码如下:
function get_color_string(from_line, to_line)
TOOL.colors = {}
local line,len,char,fmt,key

for i=from_line,to_line do
    moveCursor(1, i)
    line = getCurrentLine()
    len = utf8.len(line)

    -- 不知道为什么,最后一个字的fmt取不出来,需要在最后插入一个字符
    moveCursor(len, i)
    insertText(" ")

    for j=0,len-1 do
      selectSection(j, 1)
      char = getSelection()
      fmt = getTextFormat()
      if fmt then
      key = string.format("%d-%d-%d-%d-%d-%d",
          fmt.foreground,fmt.foreground,fmt.foreground,
          fmt.background,fmt.background,fmt.background)
      table.insert(TOOL.colors, {key, char})
      end
    end

    -- 插入一个换行标记
    table.insert(TOOL.colors, {"255-255-255-255-255-255", "\n"})
end

return TOOL.colors
end
其中函数参数from_line, to_line是行数,可以在触发器中用getLineNumber()获取,返回构造的字符和属性的列表。

例如这行:
data:image/png;base64,i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FG6BMjS/UII4wwwggjjDDCCCP0id9cWZEf/tbPRH76Sx/ya4y/WBGZ/ZbIV38l8pP/9YEl+OSmyPe/K/ItXPOrL0QSLukdfyCy8tfZvWx75Xn4qsgXP8nCBopPRP7m+yK3gvt+MPh6yNsI+bv5JyLfRf5+9p8iIzUeYYQRRhhhhBGuHiL/B9gX1VoztpKCAAAAAElFTkSuQmCC
返回:
{ { "0-255-255-0-0-0", "【" }, { "0-255-255-0-0-0", "闲" }, { "0-255-255-0-0-0", "聊" }, { "0-255-255-0-0-0", "】" }, {
"255-255-255-128-128-0", "☆" }, { "255-255-255-128-128-0", "句" }, { "255-255-255-128-128-0", "比" }, { "255-255-255-128-
128-0", "字" }, { "255-255-255-128-128-0", "栉" }, { "255-255-255-128-128-0", "☆" }, { "192-192-192-0-0-0", " " }, { "180-
0-0-0-0-0", "欧" }, { "180-0-0-0-0-0", "阳" }, { "180-0-0-0-0-0", "摇" }, { "0-255-0-0-0-0", "(" }, { "0-255-0-0-0-0", "Y"
}, { "0-255-0-0-0-0", "a" }, { "0-255-0-0-0-0", "o" }, { "0-255-0-0-0-0", "o" }, { "0-255-0-0-0-0", "u" }, { "0-255-0-0-
0-0", ")" }, { "0-255-255-0-0-0", ":" }, { "0-255-255-0-0-0", " " }, { "0-255-255-0-0-0", "估" }, { "0-255-255-0-0-0",
"计" }, { "0-255-255-0-0-0", "至" }, { "0-255-255-0-0-0", "少" }, { "0-255-255-0-0-0", "1" }, { "0-255-255-0-0-0", "0" },
{ "0-255-255-0-0-0", "0" }, { "0-255-255-0-0-0", "天" }, { "0-255-255-0-0-0", "," }, { "0-255-255-0-0-0", "很" }, { "0-
255-255-0-0-0", "可" }, { "0-255-255-0-0-0", "能" }, { "0-255-255-0-0-0", "得" }, { "0-255-255-0-0-0", "1" }, { "0-255-255-
0-0-0", "年" }, { "192-192-192-0-0-0", " " }, { "192-192-192-0-0-0", " " }, { "255-255-255-0-128-0", "◆" }, { "255-255-
255-0-128-0", "主" }, { "255-255-255-0-128-0", "站" }, { "255-255-255-0-128-0", "◆" }, { "255-255-255-255-255-255", "\n"
} }

有了这个函数,就可以在任务中获取各种颜色特别的显示,比如公孙止、韩员外等就是统计颜色种类最少的字符。

nny 发表于 2024-4-20 01:02:57

炮爷有打广告的嫌疑,嘿嘿。

dtp 发表于 2024-4-20 01:03:19

真是辛苦你们了。够难为的。

holygb 发表于 2024-4-20 01:03:49

holygb 发表于 2024-4-20 01:01 AM
我也有类似需求,写了个函数获取一行或几行间字符的属性,代码如下:
function get_color_string(from_line ...

中间的贴图怎么不见了?只能贴个文字
【闲聊】☆句比字栉☆ 欧阳摇(Yaoou): 估计至少100天,很可能得1年◆主站◆

dtp 发表于 2024-4-20 01:04:33

nny 发表于 2024-4-20 01:02 AM
炮爷有打广告的嫌疑,嘿嘿。

倒也不全对,杰哥说了,要支持 PaoTin++ 的。

bbcallen 发表于 2024-4-20 01:17:40

https://forums.mudlet.org/viewtopic.php?t=5979
我能找到的最官方的解释。

nny 发表于 2024-4-20 01:18:37

holygb 发表于 2024-4-20 01:03 AM
中间的贴图怎么不见了?只能贴个文字
【闲聊】☆句比字栉☆ 欧阳摇(Yaoou): 估计至少100天,很可能得1年...

哈哈,你这个例子举得好,竟然是我的闲聊{:7_279:}
页: [1] 2 3
查看完整版本: 求助,关于mudlet的使用