找回密码
 register
搜索
查看: 431|回复: 0

[游戏教程] 检测当前地图马贼总数

[复制链接]
  • 打卡等级:本地老炮
  • 打卡总天数:527
  • 打卡月天数:16
  • 打卡总奖励:525
  • 最近打卡:2026-06-18 02:14:29
Waylee 发表于 2023-5-20 22:20 | 显示全部楼层 |阅读模式

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

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

×
文章编辑人员:雪舞
内容测试时间:2023-5-20 22:20:39
测试版本:新武侠世界
--检测马贼数量 [XUEWU-BUG-338]
        local nMonsterNum = GetMonsterCount(sceneId)
        local nMaZei = 0
        for i=0, nMonsterNum-1 do
                local MonsterId = GetMonsterObjID(sceneId,i)
                local MosDataID = GetMonsterDataID( sceneId, MonsterId )
                if MosDataID >= 3510 and MosDataID <= 3519 then
                        nMaZei = nMaZei + 1
                        if nMaZei > 100 then
                                break
                        end
                end
                if MosDataID >= 33510 and MosDataID <= 33519  then
                        nMaZei = nMaZei + 1
                        if nMaZei > 100 then
                                break
                        end
                end
        end
        if nMaZei >=100 then
                BeginEvent(sceneId)
                        AddText(sceneId, "当前地图出现超过100个夺宝马贼,你的藏宝图暴露在光天化日之下太危险了,请消灭马贼后才能开启藏宝图!")
                EndEvent(sceneId)
                DispatchEventList(sceneId,selfId,-1)
                return 
        end


您需要登录后才可以回帖 登录 | register

本版积分规则

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

GMT+8, 2026-6-19 03:49 , Processed in 0.051380 second(s), 24 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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