作者hmml (hmml)
看板mud_sanc
标题Re: [心得] MushClient 圣殿技能排还原度较好的写法
时间Sat Jun 8 23:54:50 2013
同场加映:
1.组队状态:顺便请教一下红字部份直接写在if判断的方法。
桃色字自行依角色中文名的长度去调整。
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<triggers>
<trigger
enabled="y"
keep_evaluating="y"
match="(Lv.\d+|\[队长\])(.*) HP:(\**※|\**○|\**☆|\**★)(\**) SP:(\**※|\**
○|\**☆|\**★)(\**) PP:(\**※|\**○|\**☆|\**★)(\**)"
omit_from_output="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>
for k,v in pairs(GetStyleInfo (GetLinesInBufferCount())) do
if string.find('%2',v.text) then
_,j= string.find('%2',v.text)
if string.len('%2')-j == 0 then
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
string.format("%%-"..
30-(GetLineInfo
(GetLinesInBufferCount(),2)).."s",v.text))
else
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end --j
else
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end --find
end -- for
Note ("")
</send>
</trigger>
</triggers>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
排版前:
*
两仪 式wWw拔刀队*战队中共有 10 个成员。
[队长]两仪 式 HP:*********※*
SP:*********☆*
PP:**********※
Lv.120
羽衣狐 HP:*********※*
SP:**********※ PP:**********※
Lv.120
齐格飞 HP:*********※*
SP:**********※ PP:**********※
Lv.120
库夫林 HP:*********※*
SP:**********※ PP:**********※
Lv.120
卡莲.奥尔黛西亚 HP:*********※*
SP:*********※*
PP:**********※
Lv.120
乙橘槙绘 HP:*********※*
SP:**********※ PP:**********※
Lv.120
雷提雅.雅雷提雅 HP:*********※*
SP:**********※ PP:**********※
Lv.120
羿云身上的爱困无尾熊
HP:*********※*
SP:**********※ PP:**********※
Lv.120
紫苑‧
亚特拉希亚 HP:*********※*
SP:**********※ PP:**********※
Lv.120洁克蒂.
安 HP:*********※*
SP:**********※ PP:**********※
排版後:
*
两仪 式wWw拔刀队*战队中共有 10 个成员。
[队长]两仪 式 HP:****※******
SP:**********☆ PP:*********※*
Lv.120
羽衣狐 HP:**********※ SP:**********※ PP:**********※
Lv.120
齐格飞 HP:**********※ SP:**********※ PP:**********※
Lv.120
库夫林 HP:********※**
SP:**********※ PP:**********※
Lv.120
卡莲.奥尔黛西亚 HP:*********※*
SP:********※**
PP:**********※
Lv.120
乙橘槙绘 HP:**********※ SP:**********※ PP:**********※
Lv.120
雷提雅.雅雷提雅 HP:**********※ SP:**********※ PP:**********※
Lv.120
羿云身上的爱困无尾熊
HP:**********※ SP:**********※ PP:**********※
Lv.120
紫苑‧
亚特拉希亚 HP:**********※ SP:**********※ PP:**********※
Lv.120洁克蒂.
安 HP:**********※ SP:**********※ PP:**********※
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
2.公会技能表,有三条:
a.下指令list时,会打开触发b和c,至结尾会关闭b和c。
b.不能学或未学的技能显示重排。
c.已经学会的技能显示编排。
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<triggers>
<trigger
enabled="y"
group="TypeFix"
match="^(你是第.+你能学的技能如下(:)|你还有.+点的学习点数可供锻练用(!))$"
name="GuildSkTypeControl"
regexp="y"
send_to="12"
sequence="100"
>
<send>if "%2" == ":" then
SetTriggerOption ("GuildSkList", "enabled", "y")
SetTriggerOption ("GuildSkList2", "enabled", "y")
elseif "%3" == "!" then
SetTriggerOption ("GuildSkList", "enabled", "n")
SetTriggerOption ("GuildSkList2", "enabled", "n")
end--if</send>
</trigger>
<trigger
enabled="y"
keep_evaluating="y"
match="^(\S+\([a-z0-9 -_]+\)) (<要\d+级\S+能学唷!>|<主公会\S+能学喔>)$"
omit_from_output="y"
name="GuildSkList2"
regexp="y"
send_to="12"
sequence="100"
>
<send>for k,v in pairs(GetStyleInfo (GetLinesInBufferCount())) do
if string.find(v.text,'<') then
text2 = string.sub(v.text,string.find(v.text,'<'),-1)
text1 = string.gsub(v.text,text2,"")
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
string.format("%%-"..28-v.column.."s",text1)..text2)
else
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end --if
end -- for
Note ("")
</send>
</trigger>
<trigger
enabled="y"
keep_evaluating="y"
match="^.+\(.+\) 第.+\/.+级.*int.+\(.+\)$"
omit_from_output="y"
name="GuildSkList1"
regexp="y"
send_to="12"
sequence="100"
>
<send>for k,v in pairs(GetStyleInfo (GetLinesInBufferCount())) do
if string.find(v.text,'第') then
text2 = '第 '
text1 = string.sub(v.text,1,-3)
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
string.format("%%-"..28-v.column.."s",text1)..text2)
elseif string.find(v.text,'级') then
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
' 级'..string.format("%%12s",string.sub(v.text,3,-1)))
elseif string.find(v.text,'%d+') then
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
string.format("%%4s",v.text))
else
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end --if
end -- for
Note ("")
</send>
</trigger>
</triggers>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
排版前:
你是第 16 级的剑士(slasher)你能学的技能如下:
------------------------------------------------------------
技能名称 训练费用 学习点数
------------------------------------------------------------
剑士之心(slasher heart) 第
900/
384级 350 int (
2)
基本剑法(sword) 第
9900/
384级2000 int (
182)
彩虹七色剑(rainbow slash) 第
9900/
240级5000 int (
182)
身体平衡(body control) 第
1000/
240级 550 int (
4)
剑诀(swordmaster) 第
2000/
50级2100 int (
24)
四时剑法(4-season slash) 第
2000/
50级2100 int (
24)
舞凤诀(phoenix-recipe) <要21级剑士一-能学唷!>
潜能激发(talent-arouse) <要22级剑士一-能学唷!>
阿邦剑法(avan slash) <要23级剑士一-能学唷!>
独孤九剑(nine-sword) <要24级剑士一-能学唷!>
灵力武器(spiriten) <要25级剑士一-能学唷!>
大!剑!技!(crack slash) <主公会剑士一-能学喔>
-----------------------------------------------------------
你还有
37589541 的存款跟
3001 点的学习点数可供锻练用!
排版後:
你是第 16 级的剑士(slasher)你能学的技能如下:
------------------------------------------------------------
技能名称 训练费用 学习点数
------------------------------------------------------------
剑士之心(slasher heart) 第
900/
384 级 350 int (
2)
基本剑法(sword) 第
9900/
384 级 2000 int (
182)
彩虹七色剑(rainbow slash) 第
9900/
240 级 5000 int (
182)
身体平衡(body control) 第
1000/
240 级 550 int (
4)
剑诀(swordmaster) 第
2000/
50 级 2100 int (
24)
四时剑法(4-season slash) 第
2000/
50 级 2100 int (
24)
舞凤诀(phoenix-recipe) <要21级剑士一-能学唷!>
潜能激发(talent-arouse) <要22级剑士一-能学唷!>
阿邦剑法(avan slash) <要23级剑士一-能学唷!>
独孤九剑(nine-sword) <要24级剑士一-能学唷!>
灵力武器(spiriten) <要25级剑士一-能学唷!>
大!剑!技!(crack slash) <主公会剑士一-能学喔>
-----------------------------------------------------------
你还有
37589541 的存款跟
3001 点的学习点数可供锻练用!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3.天空城家里物品列表,有三条:
a.回家会打开b和c,回recall处则关闭b和c。
b.表头栏位移动。其实只要一行ColourNote取代原行就可以了!(avert)
c.物品栏位调整,其实也就把数量栏位对齐,如果物品名称很长,还是会偏移。
这条难度仅次於技能表而以。
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<triggers>
<trigger
enabled="y"
group="TypeFix"
match="^(你....了自己位於天空城的家(\.)|这里是罗德斯镇的巨型高塔(,)是人们与
神最为接近的地方,每天)$"
name="HomeItemTypeControl"
regexp="y"
send_to="12"
sequence="100"
>
<send>
if "%2" == "." then
SetTriggerOption ("HomeItemOne", "enabled", "y")
SetTriggerOption ("HomeItemList", "enabled", "y")
elseif "%3" == "," then
SetTriggerOption ("HomeItemOne", "enabled", "n")
SetTriggerOption ("HomeItemList", "enabled", "n")
end--if
</send>
</trigger>
<trigger
enabled="y"
keep_evaluating="y"
match="^(序号 lv 物..名称) (数量)$"
omit_from_output="y"
name="HomeItemOne"
regexp="y"
send_to="12"
sequence="100"
>
<send>for k,v in pairs(GetStyleInfo (GetLinesInBufferCount())) do
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
"%1"..string.format("%%"..70-string.len("%1").."s","%2"))
end --for
Note("")
</send>
</trigger>
<trigger
enabled="y"
keep_evaluating="y"
match="^( +\d+\. +\d+ )(.*) +(\(\d\))$"
omit_from_output="y"
name="HomeItemList"
regexp="y"
send_to="12"
sequence="100"
>
<send>for k,v in pairs(GetStyleInfo (GetLinesInBufferCount())) do
if string.find(v.text,"%(%d%)") and string.len(Trim(v.text)) == 3 then
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
string.format("%%"..70-GetLineInfo (GetLinesInBufferCount(),2).."s",v.text))
elseif string.find(v.text,"%(%d%)") and string.len(Trim(v.text)) > 3 then
text2 = Trim(string.sub(v.text,-3))
text1 = Trim(string.sub(v.text,1,-4))
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
text1..string.format("%%"..70-GetLineInfo
(GetLinesInBufferCount(),2)-string.len(text1).."s",text2))
else
ColourTell (RGBColourToName (v.textcolour),
RGBColourToName (v.backcolour),
v.text)
end --if
end -- for
Note ("")
</send>
</trigger>
</triggers>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
排版前:
序号 lv 物品名称 数量
1. 120
天谴(The Warth Of Heaven) (1)
2. 110
狐鸣岐(Foxy Fork) (1)
3. 120
誓约法愿(Vow Wish) (1)
4. 125 石
神之戒(Stone God Ring) (1)
5. 200
幻月剑(Moonsword) (1)
6. 120
【月神】月神微笑(Smile Of Artemis) (1)
7. 1
中秋月饼(Moon Cake) (6)
8. 125
魔法漩涡(
Magic Swirl) (1)
9. 110
玉板指(Jade Finger) (1)
10. 120
翾风回雪抄(
Flutter Keith Gyrate Snowy) (1)
11. 120
欧西里斯の天空盔(
Slifer the Sky Helmet) (1)
12. 110 巫婆帽
(Wizer hat) (1)
13. 180
紫绶羽衣(Purple Feather) (2)
14. 130
星光腰带(Star Belt) (1)
15. 150
荣光之钻(
Diamond of Glory) (1)
16. 130
雪夜星天镯(Snow-Night Bracelet) (1)
17. 110
艾丽丝的围裙(Alice's Apron) (1)
18. 115
银河之左戒(Leftring Of Galaxy) (1)
19. 120
九阳泺(Fall Sun Bracelet) (1)
20. 1
许愿卡(Votive Card) (1)
21. 130
痞子の记忆裤(Ruffian's Pants) (1)
排版後:
序号 lv 物品名称 数量
1. 120
天谴(The Warth Of Heaven) (1)
2. 110
狐鸣岐(Foxy Fork) (1)
3. 120
誓约法愿(Vow Wish) (1)
4. 125 石
神之戒(Stone God Ring) (1)
5. 200
幻月剑(Moonsword) (1)
6. 120
【月神】月神微笑(Smile Of Artemis) (1)
7. 1
中秋月饼(Moon Cake) (6)
8. 125
魔法漩涡(
Magic Swirl) (1)
9. 110
玉板指(Jade Finger) (1)
10. 120
翾风回雪抄(
Flutter Keith Gyrate Snowy) (1)
11. 120
欧西里斯の天空盔(
Slifer the Sky Helmet) (1)
12. 110 巫婆帽
(Wizer hat) (1)
13. 180
紫绶羽衣(Purple Feather) (2)
14. 130
星光腰带(Star Belt) (1)
15. 150
荣光之钻(
Diamond of Glory) (1)
16. 130
雪夜星天镯(Snow-Night Bracelet) (1)
17. 110
艾丽丝的围裙(Alice's Apron) (1)
18. 115
银河之左戒(Leftring Of Galaxy) (1)
19. 120
九阳泺(Fall Sun Bracelet) (1)
20. 1
许愿卡(Votive Card) (1)
21. 130
痞子の记忆裤(Ruffian's Pants) (1)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
注:在if判断式常会看到"
>"及"
<",这是当从MushClient里复制机码或汇出
出Plugin的时候,将"
<"及"
>"转换出来的代码,因为在xml里,"<"与">"用来
做标签宣告,所以位阶非常高,如果直接用在机码里做比大小,会直接当做标
签符号来用,然後就一直说有bug...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.132.196.45
1F:→ laechan :这个 wiz 可协助排为上述模式但需用到 [24;XXH 06/10 07:47
2F:→ laechan :所以我倾向不使用,玩家可透过hmml的方式自行为显示做 06/10 07:47
3F:→ laechan :排版,这样一般玩家下list时可正常看到东西,mush玩家 06/10 07:48
4F:→ laechan :下list时可看到自己想要的排版格式 06/10 07:48
5F:→ laechan :而如果有难搞的显示时就说一下我们再配合修改 06/10 07:48