找回密码
 register

QQ登录

只需一步,快速开始

搜索
查看: 9|回复: 0

[系统函数] BaibaoshuxiaItemDropItem 获取百宝书匣奖品信息

[复制链接]
  • 打卡等级:热心大叔
  • 打卡总天数:284
  • 打卡月天数:5
  • 打卡总奖励:282
  • 最近打卡:2025-09-05 07:16:12
Waylee 发表于 2025-9-4 14:07 | 显示全部楼层 |阅读模式 | Google Chrome | Windows 10

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

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

×
***付费内容***

x332205_g_giftitem_index = 30501318

--**********************************
--只会执行一次入口:
--聚气和瞬发技能会在消耗完成后调用这个接口(聚气结束并且各种条件都满足的时候),而引导
--技能也会在消耗完成后调用这个接口(技能的一开始,消耗成功执行之后)。
--返回1:处理成功;返回0:处理失败。
--注:这里是技能生效一次的入口
--**********************************
function x332205_OnActivateOnce( sceneId, selfId )

    local RandomBase = GetBaibaoshuxiaItemDropBase( sceneId, selfId )
    if( RandomBase > 0 ) then    

        local RandomNum = random( 0, RandomBase - 1 )
        local RandomID, Notice = BaibaoshuxiaItemDropItem( sceneId, selfId, RandomNum )

        if( RandomID > 0 ) then
            BeginAddItem(sceneId)
            AddItem( sceneId, RandomID, 1 )
            AddItem( sceneId, x332205_g_giftitem_index, 1 )
            local Ret = LuaFnEndAddItemIgnoreFatigueState( sceneId, selfId )
            if Ret > 0 then
                LuaFnAddItemListToHumanIgnoreFatigueState(sceneId,selfId)
                if 1 == Notice then
                    local szItemTransfer = GetItemTransfer(sceneId,selfId, 0)
                        x332205_ShowRandomSystemNotice( sceneId, selfId, szItemTransfer )
                    end

                    local ItemName = GetItemName(sceneId, RandomID)
                    local strNotice = "#{BBSX_081106_2}"..ItemName
                    x332205_ShowNotice( sceneId, selfId, strNotice)
                    LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 18, 0);
                 else
                    local strNotice = "#{BBSX_081106_1}"
                    x332205_ShowNotice( sceneId, selfId, strNotice)
                 end        
            end
        end

    return 1;
end

付费看帖
剩余 4% 内容需要支付 1.00 金币 后可完整阅读
支持付费阅读,激励作者创作更好的作品。
您需要登录后才可以回帖 登录 | register

本版积分规则

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

GMT+8, 2025-9-5 21:41 , Processed in 0.121808 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2025 Discuz! Team.

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