| 123456789101112131415161718 |
- local TipsExcel = require("excel.tips")
- local Msg = require("core.Msg")
- function sendTips(human)
- local lv = human.db.lv
- local tips = ""
- for i= 1,#TipsExcel.levelSec do
- if lv <= TipsExcel.levelSec[i].maxLv and lv >= TipsExcel.levelSec[i].minLv then
- local len = #TipsExcel.tips[i].content
- local random = math.random(1,len)
- tips = TipsExcel.tips[i].content[random]
- break
- end
- end
- local msgRet = Msg.gc.GC_TIPS_SEND
- msgRet.tips = tips
- Msg.send(msgRet,human.fd)
- end
|