找回密码
 register

QQ登录

只需一步,快速开始

查看: 24|回复: 0

[扩展函数] LuaFnCanUseSkill 当前角色状态是否允许使用此技能

[复制链接]

[扩展函数] LuaFnCanUseSkill 当前角色状态是否允许使用此技能

[复制链接]
  • 打卡等级:热心大叔
  • 打卡总天数:200
  • 打卡月天数:23
  • 打卡总奖励:198
  • 最近打卡:2025-05-30 11:48:35
Waylee

主题

0

回帖

2万

积分

仙帝

积分
20017
Waylee 2025-5-26 16:46 | 显示全部楼层 |阅读模式 | Google Chrome | Windows 10

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×

    --当前状态是否允许释放犀牛望月(返回值小于0就是禁止释放技能)
    local res =  LuaFnCanUseSkill(sceneId, selfId,392)
    if res == 0 then
        x900001_PushDebugMessage(sceneId,selfId,"技能允许释放")
    elseif res == -100 then
        x900001_PushDebugMessage(sceneId,selfId,"角色ID值错误 15000~29999")
    elseif res == OR_INVALID_SKILL then
        x900001_PushDebugMessage(sceneId,selfId,"无效技能")
    elseif res == -101 then
        x900001_PushDebugMessage(sceneId,selfId,"技能ID值错误 0~2048")
    elseif res == OR_CANTDO_FOR_RIDING then
        x900001_PushDebugMessage(sceneId,selfId,"你乘着坐骑呢,别想放技能")
    elseif res == OR_BUS_CANNOT_CHANGE_MODEL then
        x900001_PushDebugMessage(sceneId,selfId,"你变身呢,别想放技能")
    elseif res == OR_U_CANNT_DO_THIS_RIGHT_NOW then
        x900001_PushDebugMessage(sceneId,selfId,"你无法这样做")
    elseif res == OR_CANTDO_INSTALL then
        x900001_PushDebugMessage(sceneId,selfId,"你在摆摊")
    elseif res == -234 then
        x900001_PushDebugMessage(sceneId,selfId,"标记1限制和标记2限制")
    end

    --不想详细判断,那么返回值小于0就是禁止释放技能
    if res < 0 then
        x900001_PushDebugMessage(sceneId,selfId,"返回值小于0,你就是不能放技能!")
    end
    print(res)
您需要登录后才可以回帖 登录 | register

本版积分规则

雪舞知识库 | 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 |网站地图|天天打卡

GMT+8, 2025-5-30 12:48 , Processed in 0.138736 second(s), 5 queries , Redis On.

Powered by XueWu Licensed

Copyright © Tencent Cloud.

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