找回密码
 注册/Sign up
搜索
查看: 1454|回复: 2

通过内挂来修改旗杆(flg)的ng.lua

[复制链接]

发表于 2022-5-26 23:03:36 | 显示全部楼层 |阅读模式
没事在自己写任务,在做测试时用到需要旗杆的地方发现很不方便,就弄了个这个,fdflgc是查询,fdflgx是写入。

ng.lua msg中添加
  1. if string.find(msg,"/fdflgc")~=nil then
  2.         fdflginput = Split(msg," ")
  3.         fdflg = tonumber(fdflginput[2])
  4.         if fdflg == "" or fdflg ==nil then
  5.                 NLG.TalkToCli( player, -1, "格式:/fdflgc+空格+flg值", 1, 2)
  6.         else
  7.                 NLG.TalkToCli( player, -1, fdflg.."号flg结果为:"..Char.EndEvent(player,fdflg), 1, 2)
  8.         end
  9.         return 0
  10. end
  11. if string.find(msg,"/fdflgx")~=nil then
  12.         fdflgxinput = Split(msg," ")
  13.         fdflgx1 = tonumber(fdflgxinput[2])
  14.         fdflgx2 = tonumber(fdflgxinput[3])
  15.         if fdflgx1 == "" or fdflgx1 ==nil then
  16.                 NLG.TalkToCli( player, -1, "格式:/fdflgx+空格+flg编号+空格+flg值", 1, 2)
  17.         else
  18.                 if fdflgx2 == "" or fdflgx2 ==nil then
  19.                         NLG.TalkToCli( player, -1, "格式:/fdflgx+空格+flg编号+空格+flg值", 1, 2)
  20.                 else
  21.                         Char.EndEvent(player,fdflgx1,fdflgx2)
  22.                         NLG.TalkToCli( player, -1, fdflgx1.."号flg被设置为:"..Char.EndEvent(player,fdflgx1), 1, 2)
  23.                 end
  24.         end
  25.         return 0
  26. end
复制代码
查询:/fdflgc+空格+flg值,如查询200号FLG的值那么输入“/fdflgc 200”
写入:/fdflgx+空格+flg编号+空格+flg值,如将200号FLG修改为1,那么输入“/fdflgx 200 1”

发表于 2022-5-29 23:42:39 | 显示全部楼层
本帖最后由 珊瑚 于 2022-5-29 23:44 编辑

不是可以用GM命令查询吗?

查询:
checkendflg [flg编号]
checknowflg [flg编号]

设置:
setendflg [flg编号]
setnowflg [flg编号]

发表于 2022-5-30 20:18:32 | 显示全部楼层
珊瑚 发表于 2022-5-29 23:42
不是可以用GM命令查询吗?

查询:

这是 珊瑚大佬吗?
您需要登录后才可以回帖 登录 | 注册/Sign up

本版积分规则

手机版|cgmsv引擎论坛

GMT+8, 2026-6-5 11:53 , Processed in 0.031151 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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