北大侠客行MUD论坛

 找回密码
 注册
搜索
热搜: 新手 wiki 升级
查看: 4212|回复: 3

2019-03-02 状态插件修改版

[复制链接]
发表于 2019-3-2 14:03:45 | 显示全部楼层 |阅读模式
这是枫哥的状态插件修改版






北大侠客行MUD,中国最好的MUD

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
北大侠客行Mud(pkuxkx.net),最好的中文Mud游戏!
 楼主| 发表于 2019-3-2 14:10:39 | 显示全部楼层
因为mush和插件之间互通搞不定,mush又写了个触发

自己删掉zja_cd 和@Q_name部分,你可以理解为示范或者其它什么的(就是我懒得删)


      enabled="y"
   expand_variables="y"
   group="Status"
   lines_to_match="3"
   keep_evaluating="y"
   match="\#(.*)\,[-]*(\d+)\,(\d+)\,[-]*(\d+)\,(\d+)\,(\d+)\n\#(\d+)\,(\d+)\,(\d+)\,(\d+)\,(\d+)\,(\d+)\n\#(\d+)\,(\d+)\,[-]*(\d+)\,[-]*(\d+)\,(\S+)\,(\S+)\Z"
   multi_line="y"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  hpbrief_status("%1","%2","%3","%4","%5","%6","%7","%8","%9","%<10>","%<11>","%<12>","%<13>","%<14>","%<15>","%<16>","%<17>","%<18>")

if busy_sc == nil then
  Execute("pfm_all;heal_sc")
end

if zja_cd then
  if zja_cd >0 and zja_cd< 900 then
    zja_cd = zja_cd -1
  end
end



if "@Q_name" == "谍报" then
  if combat_sc == nil and db_suc == 3 then
    db_suc = "回复"
    busy_cmd2 = "quickon;h;gt yujie"
    EnableGroup("check_busy2",1)
    Execute("checkbusy;check_busy2")
    SetVariable ("Q_status","回复")
  end
end

  




上面那触发需要脚本里加上下面这个,mush变量和lua都有是历史遗留问题,你可以只留一份
function hpbrief_status(h_exp,h_qianneng,h_maxnl,h_nl,h_maxjing,h_jing,h_max_qi,h_maxqi,h_qi,h_max_shen,h_maxshen,h_shen,h_zhenqi,h_zhanyi,h_shiwu,h_yinshui,h_combat,h_busy)
  status = {}
  SetVariable("exp",h_exp)
  if string.find (h_exp,"M") then
    status.exp=tonumber(string.sub (h_exp,1,-2))*1000000
  elseif string.find (h_exp,"K") then
    status.exp=tonumber(string.sub (h_exp,1,-2))*1000
  end
  SetVariable("qianneng",tonumber(h_qianneng))
  status.qianneng = tonumber(h_qianneng)
  SetVariable("maxli",tonumber(h_maxnl))
  status.maxnl = tonumber(h_maxnl)
  SetVariable("li",tonumber(h_nl))
  status.nl = tonumber(h_nl)
  SetVariable("maxjing",tonumber(h_maxjing))
  status.maxjing = tonumber(h_maxjing)
  SetVariable("jing",tonumber(h_jing))
  status.jing = tonumber(h_jing)
  SetVariable("perqi", tonumber(h_maxqi)/tonumber(h_max_qi)*100)
  status.perqi = tonumber(h_maxqi)/tonumber(h_max_qi)*100
  SetVariable("pershen", tonumber(h_maxshen)/tonumber(h_max_shen)*100)
  status.pershen = tonumber(h_maxshen)/tonumber(h_max_shen)*100
  SetVariable("maxqi", tonumber(h_maxqi))
  status.maxqi = tonumber(h_maxqi)
  SetVariable("qi", tonumber(h_qi))
  status.qi = tonumber(h_qi)
  SetVariable("maxshen", tonumber(h_maxshen))
  status.maxshen = tonumber(h_maxshen)
  SetVariable("shen", tonumber(h_shen))
  status.shen = tonumber(h_shen)
  SetVariable("zhenqi", tonumber(h_zhenqi))
  status.zhenqi = tonumber(h_zhenqi)
  SetVariable("zhanyi", tonumber(h_zhanyi))
  status.zhanyi = tonumber(h_zhanyi)
  SetVariable("shiwu", tonumber(h_shiwu))
  status.shiwu = tonumber(h_shiwu)
  SetVariable("yinshui", tonumber(h_yinshui))
  status.yinshui = tonumber(h_yinshui)
  if h_combat == "战斗" then
    if combat_sc == nil then
      combat_sc = 1
      ColourNote("yellow","","************开始战斗************")
    end
  elseif h_combat == "非战斗" then
    if combat_sc == 1 then
      combat_sc = nil
      ColourNote("yellow","","************战斗结束************")
    end
  end
  if h_busy == "忙" then
    busy_sc = 1
    if combat_sc == 1 then
      ColourNote("red","","************正在BUSY中************")   
    end
  elseif h_busy == "不忙" then
    busy_sc = nil
  end
end
北大侠客行Mud(pkuxkx.net),最好的中文Mud游戏!
发表于 2019-3-2 14:15:18 | 显示全部楼层
多谢了了
北大侠客行Mud(pkuxkx.net),最好的中文Mud游戏!
发表于 2019-3-15 11:23:56 | 显示全部楼层
其实我很好奇大佬你的工作是啥
北大侠客行Mud(pkuxkx.net),最好的中文Mud游戏!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|北大侠客行MUD ( 京ICP备16065414号-1 )

GMT+8, 2024-4-20 07:40 AM , Processed in 0.009679 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表