魔力宝贝

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

[GA] LvOnePet.lua--发现一级宠物

[复制链接]
发表于 前天 02:14 | 显示全部楼层 |阅读模式
Delegate.RegDelBattleStartEvent("LvOnePet_Event");

function LvOnePet_Event(battle)
        for BWhile=10,19 do
                local PlayerIndex = Battle.GetPlayer(battle,BWhile);
                if(VaildChar(PlayerIndex)==true) then
                        if(Char.GetData(PlayerIndex,%对象_等级%) == 1 and Char.GetData(PlayerIndex,%对象_名字%) ~= "哥布林" and Char.GetData(PlayerIndex,%对象_名字%) ~= "迷你蝙蝠") then
                                for BPWhile=0,4 do
                                        local BPlayerIndex = Battle.GetPlayer(battle,BPWhile);
                                        if(BPlayerIndex >= 0) then
                                                local xue = Char.GetData(PlayerIndex,%对象_血%);
                                                NLG.TalkToCli(BPlayerIndex,-1,"『温馨提示』:发现一级宠物「"..Char.GetData(PlayerIndex,%对象_名字%).."」出现!生命值「".. xue.."」",%颜色_黄色%,%字体_小%);
                                        end
                                end
                        end
                end
        end
end


回复

使用道具 举报

Archiver|魔力研究社

GMT+8, 2025-5-12 19:00 , Processed in 0.158305 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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