Lua接口/服务端函数索引/通用与活动
来自天龙知识库
跳到导航跳到搜索
通用与活动:108 个接口,113 个调用名称。
| 函数 / 别名 | 调用与用途 |
|---|---|
| AddDyTitle | AddDyTitle(sceneId, selfId, TitleId)加入新的动态称号,如果满了放在第一个 |
| AddGlobalCountNews LuaFnAddGlobalCountNews |
AddGlobalCountNews(sceneId, newstr)向全组服务器发送新闻公告,公告发送指定次数 |
| AuditBravertChallenge | AuditBravertChallenge(sceneId, selfId, sort)记录勇闯挑战活动日志。 |
| AwardBangpaiTitle | AwardBangpaiTitle(sceneId, selfId, strText)设置此人的帮派称号 |
| AwardGuildContriTitle | AwardGuildContriTitle(sceneId, selfId, strText)设置帮会贡献称号字符串。 |
| AwardJieBaiTitle | AwardJieBaiTitle(sceneId, selfId, strText)设置结拜称号 |
| AwardMasterTitle | AwardMasterTitle(sceneId, selfId, strText)设置师父称号字符串。 |
| AwardNickTitle | AwardNickTitle(sceneId, selfId, strText)设置此人的签名档性质的昵称 |
| AwardShangDianTitle | AwardShangDianTitle(sceneId, selfId, strText)设置此人的帮派称号 |
| AwardShiTuTitle | AwardShiTuTitle(sceneId, selfId, strText)设置此人的帮派称号 |
| AwardSpouseTitle LuaFnAwardSpouseTitle |
AwardSpouseTitle(sceneId, selfId, strText)设置配偶名 |
| AwardTitle LuaFnAwardTitle |
AwardTitle(sceneId, selfId, TitleIndex, TitleId, uDisabledTime)为selfId授予一个称号 |
| BaibaoshuxiaItemDropItem | BaibaoshuxiaItemDropItem(arg1, arg2, randomBase)按传入的随机位置查询百宝书匣掉落物品及公告标志。 |
| BankBegin | BankBegin(sceneId, selfId, targetId)通知客户端开始进行银行交易 |
| BankOpt | BankOpt(sceneId, selfId, targetId, pszOptType)执行钱庄保险箱操作。 |
| CallScriptFunction | CallScriptFunction(scriptId, funcname, sceneId, ...)调用可变参数的任意脚本函数 |
| CheckAccountSafe | CheckAccountSafe(sceneId, selfId)返回账号安全标志;未设置时通知客户端显示安全提示。 |
| CheckActiviyValidity | CheckActiviyValidity(sceneId, uActivityId)检查活动是否仍处于配表定义的有效时间。 |
| CheckTimer | CheckTimer(sceneId, TimeIndex)判断TimeIndex号计时器是否已经在使用中 |
| DarkBoxItemDropRandom | DarkBoxItemDropRandom(arg1, arg2, randomBase)按传入的随机位置查询暗箱掉落物品编号及公告标志。 |
| DeleteTitle | DeleteTitle(sceneId, selfId, TitleIndex)删除某个称号 |
| DispatchAllTitle LuaFnDispatchAllTitle |
DispatchAllTitle(sceneId, selfId)更新此人的所有称号 |
| EnableBankRentIndex | EnableBankRentIndex(sceneId, selfId, RentIndex)打开此人的租赁箱 |
| GetActivityParam | GetActivityParam(sceneId, uActivityId, uIndex)读取活动的脚本参数槽。 |
| GetActivityState | GetActivityState(sceneId, uActivityId)返回活动状态:0 到 4,活动不存在时返回 -1。 |
| GetBaibaoshuxiaItemDropBase | GetBaibaoshuxiaItemDropBase(arg1, arg2)读取百宝书匣掉落表的随机基数。 |
| GetBankRentIndex | GetBankRentIndex(sceneId, selfId)获得当前租赁箱已打开的索引 |
| GetCoupleID | GetCoupleID(sceneId, selfId)读取当前可用的双人活动搭档对象 ID。 |
| GetCoupleQuestionState | GetCoupleQuestionState(sceneId, selfId)读取双人答题是否开始、题数、当前进度、默契值等状态。 |
| GetCurCoupleQuestion | GetCurCoupleQuestion(sceneId, selfId)读取双人答题的当前题号、选项数和答案。 |
| GetCurTitle | GetCurTitle(sceneId, selfId)返回当前显示称号的原始类型值。 |
| GetDarkBoxItemDropCount | GetDarkBoxItemDropCount(arg1, arg2)读取暗箱掉落表的随机基数。 |
| GetDayTime | GetDayTime()取得当前时间的天数,例如:1140 表示2001年的第140天 |
| GetDist | GetDist(sceneId, selfId, targetId, arg4)得到selfId和targetId之间的距离 |
| GetDyTitlesNum | GetDyTitlesNum(sceneId, selfId)获得此人的动态称号个数 |
| GetGameTime | GetGameTime(sceneId, selfId)获取当前玩家在线时间,单位为秒 |
| GetGuildContriTitle | GetGuildContriTitle(sceneId, selfId)获取帮会贡献称号字符串。 |
| GetHour | GetHour()返回当前小时,范围为 0 到 23。 |
| GetHumanMaxLevelLimit | GetHumanMaxLevelLimit()返回玩家等级表允许的脚本等级上界。 |
| GetJuBaoContainerItemDropCount | GetJuBaoContainerItemDropCount(arg1, arg2)读取聚宝盆掉落表的随机基数。 |
| GetMinute | GetMinute()返回当前分钟,范围为 0 到 59。 |
| GetObjCreateTime | GetObjCreateTime(sceneId, selfId)取得ObjID 为 selfId的obj的创建时间 |
| GetQHYTitle | GetQHYTitle(sceneId, selfId)获取群雄逐鹿称号字符串。 |
| GetQuarterTime | GetQuarterTime()返回 15 分钟时间片编号。 |
| GetShimenTitle | GetShimenTitle(sceneId, selfId)获取门派称号字符串。 |
| GetTime2Day | GetTime2Day()返回当前日期的 YYYYMMDD 数值。 |
| GetTitle | GetTitle(sceneId, selfId, TitleIndex)获得此人的某个称号 |
| GetTodayDate | GetTodayDate()返回当前日期在本月中的日号。 |
| GetTodayMonth | GetTodayMonth()返回当前月份索引,范围为 0 到 11。 |
| GetTodayWeek | GetTodayWeek()返回当前星期索引,星期日为 0。 |
| GetTodayYear | GetTodayYear()返回当前四位公历年份。 |
| GetWeekTime | GetWeekTime()返回年份和周序号组合值。 |
| GetZhuanDanItemDropCount | GetZhuanDanItemDropCount(arg1, arg2, type)读取指定类型宝箱掉落表的随机基数。 |
| HitParadeGetPlyInfo | HitParadeGetPlyInfo(sceneId, tabId, plyId)读取排行榜指定条目的角色标识和排序键。 |
| HitParadeGetTabInfo | HitParadeGetTabInfo(sceneId, tabId)查询排行榜中的角色数量。 |
| HitParadeGetTabParam | HitParadeGetTabParam(sceneId, tabId, paramId)读取排行榜的扩展参数。 |
| HitParadePlayerJoin | HitParadePlayerJoin(sceneId, tabId, guid, key)把指定角色 GUID 和排序键加入排行榜。 |
| HitParadeRegisterTab | HitParadeRegisterTab(sceneId)为当前场景创建排行榜,返回排行榜编号。 |
| HitParadeReleaseTab | HitParadeReleaseTab(sceneId, tabId)释放指定排行榜。 |
| HitParadeSetTabParam | HitParadeSetTabParam(sceneId, tabId, paramId, paramValue)设置排行榜的扩展参数。 |
| HitParadeSort | HitParadeSort(sceneId, tabId)重新排序指定排行榜。 |
| IsInDist | IsInDist(sceneId, selfId, targetId, dist)判断selfId与targetId之间的距离是否在dist内(包括) |
| IsPermitAreetAddMenpai | IsPermitAreetAddMenpai()读取加入帮派公告的配置开关;函数名称保留原有拼写。 |
| IsSameMAC | IsSameMAC(sceneId, selfId, otherId)比较两名玩家记录的 MAC 标识是否相同。 |
| JuBaoContainerItemDropRandom | JuBaoContainerItemDropRandom(arg1, arg2, randomBase)按传入的随机位置查询聚宝盆掉落物品编号及公告标志。 |
| LuaFnGetCurrentTime | LuaFnGetCurrentTime()获取当前时间,单位为秒 |
| LuaFnGetCurrentWorldTime | LuaFnGetCurrentWorldTime()返回世界服务器同步的当前十二时辰索引。 |
| LuaFnGetDayOfThisMonth | LuaFnGetDayOfThisMonth()返回当前日期在本月中的日号,范围 1 到 31。 |
| LuaFnGetGemCarveInfo | LuaFnGetGemCarveInfo(gemId)返回雕琢产物、所需物品和金钱;无配置时返回 -1。 |
| LuaFnGetGemMeltingInfo | LuaFnGetGemMeltingInfo(gemId)返回熔炼产物、主所需物品、金钱和替代物品;无配置时返回 -1。 |
| LuaFnGetGuildName | LuaFnGetGuildName(sceneId, selfId)获取玩家当前帮会名称。 |
| LuaFnGetThisMonth | LuaFnGetThisMonth()返回当前月份,遵循 tm 结构约定,范围为 0 到 11。 |
| LuaFnGetThisYear | LuaFnGetThisYear()返回当前公历年份,例如 2026。 |
| LuaFnGetWorldGlobalData | LuaFnGetWorldGlobalData(index)读取世界全局数值变量,索引范围为 0 到 53。 |
| LuaFnGetWorldID | LuaFnGetWorldID()返回当前游戏世界编号。 |
| LuaFnGetZhuanDanIndex | LuaFnGetZhuanDanIndex(itemId)按转蛋物品编号返回基础表索引,不存在时返回 -1。 |
| LuaFnGetZhuanDanInfo | LuaFnGetZhuanDanInfo(typeIndex)按权重抽取转蛋产物,并按配置返回公告模板。 |
| LuaFnGetZhuandanSpace | LuaFnGetZhuandanSpace(typeIndex)返回转蛋所需的道具、材料和任务背包空间。 |
| LuaFnGuid2ObjId | LuaFnGuid2ObjId(sceneId, guid)把Guid转换为objId |
| LuaFnIsPasswordSetup | LuaFnIsPasswordSetup(sceneId, selfId, flag)判断玩家是否设置二级密码,0 为未设置,1 为已设置 |
| LuaFnIsPasswordUnlocked | LuaFnIsPasswordUnlocked(sceneId, selfId, flag)判断玩家是否解锁二级密码,0 为未解锁,1 为已解锁 |
| LuaFnObjId2Guid | LuaFnObjId2Guid(sceneId, selfId)返回selfId的GUID |
| LuaFnSendGuajiQuestion | LuaFnSendGuajiQuestion(sceneId, selfId)向指定玩家发送不发放金钱奖励的挂机验证码。 |
| LuaFnSendOpResult | LuaFnSendOpResult(sceneId, selfId, resultCode)向指定玩家发送操作结果提示,成功不返回 Lua 值。 |
| LuaFnSetWorldGlobalData | LuaFnSetWorldGlobalData(index, value)设置世界全局数值变量并同步,索引范围为 0 到 53。 |
| LuaFnUpdateAttr | LuaFnUpdateAttr(sceneId, selfId, arg3, param1, param2, param3)通过邮件系统更新人物属性 |
| mytime | mytime()返回当前 ANSI 时间戳。 |
| NextCoupleQuestion | NextCoupleQuestion(sceneId, selfId, currentPos, privity, sameNum)更新双人答题进度、默契值和相同答案次数。 |
| OpenWorldReference | OpenWorldReference(sceneId, selfId, pParam)通知客户端打开江湖指南的指定页面。 |
| PrintNum | PrintNum(num)弹出消息框,测试脚本用 |
| PrintStr | PrintStr(strText)弹出消息框,测试脚本用 |
| ResetChallengeData LuaFnResetChallengeData |
ResetChallengeData(sceneId, selfId)重置玩家挑战相关记录。 |
| SetActivityParam | SetActivityParam(sceneId, uActivityId, uIndex, iValue)写入活动的脚本参数槽。 |
| SetCharacterDieTime | SetCharacterDieTime(sceneId, selfId, nTime)设置 Character的消失时间, 只对Monster和Pet有效 |
| SetCharacterTimer | SetCharacterTimer(sceneId, selfId, nTime)设置 Character的时钟间隔,如果是0则,停止时钟 |
| SetCurCoupleQuestion | SetCurCoupleQuestion(sceneId, selfId, question, maxAnswer, answer)设置双人答题的当前题号、选项数和答案。 |
| SetCurTitle | SetCurTitle(sceneId, selfId, titleType, titleIndex)设置当前显示称号。脚本类型 1 到 5 映射到称号类型 2 到 6。 |
| SetPlayerDefaultReliveInfo | SetPlayerDefaultReliveInfo(sceneId, selfId, pszHP, pszMP, pszSP, defaultSceneID, defaultPosX, defaultPosZ)玩家的缺省复活相关的数据设置 |
| SetPlayerDefaultReliveInfoEx | SetPlayerDefaultReliveInfoEx(sceneId, selfId, pszHP, pszMP, pszSP, defaultSceneID, defaultPosX, defaultPosZ, scriptId)设置玩家默认复活的生命、气、怒气、场景、位置及关联脚本。 |
| SetQHYTitle | SetQHYTitle(sceneId, selfId, title)设置群雄逐鹿称号字符串。 |
| SetShimenTitle | SetShimenTitle(sceneId, selfId, title)设置门派称号字符串。 |
| SetTimer | SetTimer(sceneId, selfId, scriptId, funcName, tickTime)给玩家打开计时器,时间到时将自动调用OnTimer函数 |
| StartCoupleQuestion | StartCoupleQuestion(sceneId, selfId, targetId, npcId, maxQuestionNum)设置搭档、NPC 和题数,开始玩家的双人答题流程。 |
| StartOneActivity | StartOneActivity(sceneId, uActivityId, uInterval, iNoticeType)在当前场景启动一个活动实例及其周期计时器。 |
| StopCoupleQuestion | StopCoupleQuestion(sceneId, selfId)清空并停止玩家的双人答题流程。 |
| StopOneActivity | StopOneActivity(sceneId, uActivityId)关闭当前场景中的指定活动。 |
| StopTimer | StopTimer(sceneId, sceneTimerIndex)关闭当前玩家的计时器 //每个玩家身上最多可以绑定三个计时器 |
| ZhuanDanItemDropRandom | ZhuanDanItemDropRandom(arg1, arg2, randomBase, type)按宝箱类型和随机位置查询掉落物品编号及公告标志。 |