作者hmml (hmml)
看板mud_sanc
标题Re: [心得] Zmud 撷取讯息至新视窗试作,参考用!
时间Sun Nov 2 21:14:54 2008
前面全删!
由於前篇使用的函数begins与ends判断要求较严格,容易误判,
一般认为会抓进来的讯息都会漏掉,这次是针对上次的缺点稍做改进
,效果还不错!
写法如下:
Pattern:
(%1) 抓所有讯息!
Commands:
01
#var hide2 3 3 设定变数(hide2),内容是3,对应15行的
{#noop}!
02
#if (%pos("【",%1)) {#var hide2 1}
03
#if (%pos("频道-",%1)) {#var hide2 1}
04
#if (%pos("$友克鑫拍卖会$",%1)) {#var hide2 1}
05
#if (%pos("〔队伍频道〕",%1)) {#var hide2 1}
06
#if (%pos("偷偷的告诉",%1)) {#var hide2 1}
07
#if (%pos("大呼",%1)) {#var hide2 1}
08
#if (%pos("说道",%1)) {#var hide2 1} 蓝色行判定1,对应15行
{#cap chat}
09
#if (%pos("织依",%1)) {#var hide2 3} 黄色行判定3,对尘15行
{#cap noop}
10
#if (%pos("你的技能",%1)) {#var hide2 2} 绿色行判定2,对应15行
{#cap skill}
11
#if (%pos("你技能中",%1)) {#var hide2 2}
12
#if (%pos("【 等级 】",%1)) {#var hide2 3}
13
#if (%pos("【 国 家 名 】",%1)) {#var hide2 3}
14
#if (%pos("【 牧师 】",%1)) {#var hide2 3}
15
#case @hide2 {#cap chat} {#cap skill} {#noop} {#c+ chat} {#c- chat}
原则:有关联的判断句,肯定要放前面,排除要放後面。否则排除判断会被盖掉!
如: 织依说道:
第8行抓到说道来判定1,接着第9行则会判断成3,送到15行会依判断做第三
道指令!如果将两行对调,就会先判定3再判定1,在15行就会做第一道指令
!那织依就会对你叫个不停喔!
如需要在增加判断的部份,只要在行1和行15之间增加即可,但要注意顺序!
要增加指令,在15行不停增加即可,但指令们的座号别弄错!
注:在hmml用很正常,只保证在hmml上可用!
Commands部份在下方,想做活体实验可以复制回去!
#var hide2 3 3
#if (%pos("【",%1)) {#var hide2 1}
#if (%pos("频道-",%1)) {#var hide2 1}
#if (%pos("$友克鑫拍卖会$",%1)) {#var hide2 1}
#if (%pos("〔队伍频道〕",%1)) {#var hide2 1}
#if (%pos("偷偷的告诉",%1)) {#var hide2 1}
#if (%pos("大呼",%1)) {#var hide2 1}
#if (%pos("说道",%1)) {#var hide2 1}
#if (%pos("织依",%1)) {#var hide2 3}
#if (%pos("你的技能",%1)) {#var hide2 2}
#if (%pos("你技能中",%1)) {#var hide2 2}
#if (%pos("【 等级 】",%1)) {#var hide2 3}
#if (%pos("【 国 家 名 】",%1)) {#var hide2 3}
#if (%pos("【 牧师 】",%1)) {#var hide2 3}
#case @hide2 {#cap chat} {#cap skill} {#noop} {#c+ chat} {#c- chat}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.163.171.99
1F:推 asara :大推...^^ 11/02 21:18