|
本帖最后由 fqyy@tj 于 2018-7-7 07:58 编辑
鉴于总有人问单独开一贴
下面代码加到任意一个lua里面 shujian 或者lua/chat.lua 或者 lua/armor.lua里面都行
查找你想保存的信息里面的 messageShow 替换成 item_log 就可以了
例如armor里面的
function fqyyArmorMessage(msg)
if msg~=nil then
messageShow(msg,'#1E90FF','#FFFFFF')
end
end
替换成
function fqyyArmorMessage(msg)
if msg~=nil then
item_log(msg,'#1E90FF','#FFFFFF')
end
end
经过提醒想起来应该再补一个文件 解压到mush根目录,
完整的函数代码如下
- function item_log(logs,color,bcolor)
- local w = GetWorld ("itemlog") -- get "chat" world
- local c_text= color or "#eadb76"
- local c_back= bcolor or "#272822"
- local log_world='itemlog'
-
- --if not flag.log or flag.log=="no" then return end
-
- if score.id then
- logs='【'..score.id..'】'..logs
- end
- if flag.log and flag.log=="yes" then
- -- if not found, try to open it
- if first_time and not w then
- local filename = GetInfo (67) .. log_world .. ".mcl"
- Note(filename)
- --local filename = GetInfo (67) .. "log.mcl"
- Open (filename)
- w = GetWorld (log_world) -- try again
- if not w then
- ColourNote ("white", "red", "Can't open chat world file: " .. filename)
- first_time = false -- don't repeatedly show failure message
- end -- can't find world
- end -- can't find world first time around
-
- if color~=nil then c_text=color end
-
- if w then
- w:ColourTell ("white","black",os.date())
- w:ColourTell (c_text,c_back,logs)
- w:Note("")
- end
- else
- if GetVariable("flagnote") then
- flag.note = tonumber(GetVariable("flagnote"))
- end
- if flag.note and flag.note==1 then
- ColourTell ("white","black",os.date())
- ColourTell (c_text,c_back,logs)
- Note("")
- end
- end
- end
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
评分
-
1
查看全部评分
-
|