| 
 | 
 
 
发表于 2019-11-16 09:11:56
|
显示全部楼层
 
 
 
 本帖最后由 aoxue@tj 于 2019-11-16 09:18 编辑  
 
第二个地方加了应该就可以了吧,不过由于没给触发的时间,下面的判断会不能正确应用 
我的做法是把毒状态单独拿出来做个触发,在函数前面状态归零,这个办法种多个毒有点小问题,但这个情况很少发生,所以懒得改了 
-     create_trigger_t('score5',"^│(寒毒|星宿掌毒|蔓陀萝花毒|虎爪绝户手伤)\\s*(\\D*)(分|秒)\\s*",'','score_drug_check')
 
  复制代码- score_drug_check=function(n,l,w)
 
 -     local l_char=del_string(w[2],' ')
 
 -     l_char=del_string(l_char,'')
 
 -     local l_cnt=trans(l_char)
 
 -         vippoison=0
 
 -         condition.poison=0
 
 -     if w[3]=='分' then        
 
 -         if w[1]=="寒毒" then
 
 -                         vippoison=1
 
 -                         condition.poison=l_cnt * 60
 
 -             end
 
 -         if w[1]=="蔓陀萝花毒" then
 
 -                         vippoison=1
 
 -                         condition.poison=l_cnt * 60
 
 -             end
 
 -         if w[1]=="星宿掌毒" then
 
 -                         vippoison=1
 
 -                         condition.poison=l_cnt * 60
 
 -             end
 
 -         if w[1]=="虎爪绝户手伤" then
 
 -                         condition.poison=l_cnt * 60
 
 -             end
 
 -         else
 
 -         if w[1]=="寒毒" then
 
 -                         vippoison=1
 
 -                         condition.poison=l_cnt
 
 -             end
 
 -         if w[1]=="蔓陀萝花毒" then
 
 -                         vippoison=1
 
 -                         condition.poison=l_cnt
 
 -             end
 
 -         if w[1]=="星宿掌毒" then
 
 -                         vippoison=1
 
 -                         condition.poison=l_cnt
 
 -             end
 
 -         if w[1]=="虎爪绝户手伤" then
 
 -                         condition.poison=l_cnt
 
 -             end                
 
 -         end
 
 - end
 
  复制代码 |   
 
 
 
 |