魔力宝贝

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

[NL库] RegLoginEvent

[复制链接]
发表于 6 天前 | 显示全部楼层 |阅读模式
RegLoginEventNL.RegLoginEvent(Dofile, FuncName)函数功能
创建一个所有玩家登陆游戏时候自动触发的Lua函数。
参数说明
  • Dofile: 字符串 要加载的脚本文件名,如果为当前文件,则定义nil即可
  • InitFuncName: 字符串 触发的Lua函数的名称,玩家登陆会自动触发FuncName的Lua函数,该函数的申明格式请参考[LoginEventCallBack]
返回值
无返回值
LoginEventCallBack(CharIndex)参数说明
CharIndex: 数值型 响应事件的对象index,该值由Lua引擎传递给本函数。
返回值
返回0即可
参考实例

NL.RegLoginEvent(nil,”MyLoginEvent”);
function MyLoginEvent(CharIndex)  
   print(Char.GetData(CharIndex, %对象_姓名%));
  return 0;
end





回复

使用道具 举报

Archiver|魔力研究社

GMT+8, 2025-5-16 07:01 , Processed in 0.111122 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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