搜索
LUA

LUA

本版块未设置版块简介!请后台版块编辑添加。
  •  帖子: 115
  •  讨论: 115
  •  关注: 0

NewbieBless.lua--天使庇护

GA 发表于 2025-5-10 02:18:26 | 显示全部楼层 |阅读模式
136 0
Delegate.RegDelBattleOverEvent("NewbieBless_BattleOver");

--战斗结束全局事件
function NewbieBless_BattleOver(_battle)

        for i=0,9 do
                local player = Battle.GetPlayer(_battle,i);
                if(player>-1 and Char.GetData(player,%对象_等级%)<=20 and Char.GetData(player,%对象_血%)<Char.GetData(player,%对象_最大血%))then
                        Char.SetData(player,%对象_血%,Char.GetData(player,%对象_最大血%));
                        --Char.SetData(player,%对象_魔%,Char.GetData(player,%对象_最大魔%));
                        NLG.UpChar(player);
                        NLG.SystemMessage(player,"[天使庇护]"..Char.GetData(player,%对象_名字%).."受到了天使的祝福,生命值恢复全满.");
                end
                if(player>-1 and Char.GetData(player,%对象_战死%)==0 and Char.GetData(player,%对象_获得经验%)>1 and Battle.GetGainMode(_battle)==%战奖_普通% and Battle.GetType(_battle)==%战斗_普通%)then
                        local battlePrize = math.random(1,100);
                        if(battlePrize >=80 and battlePrize<=82 )then
                                --Char.SetData(player,%对象_获得经验%,Char.GetData(player,%对象_获得经验%)*103/100);
                                --NLG.UpChar(player);
                                --NLG.SystemMessage(player,"[战神庇护]"..Char.GetData(player,%对象_名字%).."受到了战神的祝福,本场战斗经验值增加3%.");
                        elseif(battlePrize >=97 and battlePrize<=99 )then
                                --Char.SetData(player,%对象_获得经验%,Char.GetData(player,%对象_获得经验%)*106/100);
                                --NLG.UpChar(player);
                                --NLG.SystemMessage(player,"[战神庇护]"..Char.GetData(player,%对象_名字%).."受到了战神的祝福,本场战斗经验值增加6%.");
                        elseif(battlePrize >=1 and battlePrize<=2 )then
                                local battlePrizeGold = math.random(50,500);
                                --Char.AddGold(player,battlePrizeGold);
                                --NLG.SystemMessage(player,"[财神庇护]"..Char.GetData(player,%对象_名字%).."受到了财神的祝福,战斗获得"..battlePrizeGold.."金钱奖励.");
                        elseif(battlePrize >=9 and battlePrize<=12 )then
                                --Char.SetData(player,%对象_获得经验%,Char.GetData(player,%对象_获得经验%)*97/100);
                                --NLG.UpChar(player);
                                --NLG.SystemMessage(player,"[衰神庇护]"..Char.GetData(player,%对象_名字%).."受到了衰神的诅咒,本场战斗所得经验降低3%.");
                        end
                end
        end

        return 1;
end


回复

使用道具 举报

全部评论

暂无评论,期待您打破宁静

TA的帖子
相关帖子
  • admin 2025-5-10

    #先到阿斯提亞鎮 打完UD找到NPC卡蓮 拿到給LBLS 的信 然後去打LBLS 再打完 LBLS以後 ...

  • admin 2025-5-10

    用本目录下文件"内容"覆盖服务器data目录下同名文件相应"内容" 请勿直接覆盖文件本身 ...

  • admin 2025-5-11

    ############## 城城的武器强化系统 ############## #剑1 block StrCmpChat == 700 W ...

  • admin 2025-5-11

    魔力宝贝手动架设中遇到的问题及解决方法魔力宝贝手动架设教程—魔力私服,魔力宝贝私 ...

  • admin 2025-5-12

    起始地点法兰城的竞技场的贝贝(34.36)头目战╳ 必要条件---必要等级Lv1 职业限定---建 ...

  • admin 2025-5-12

    1.与里谢里雅堡的H1N1防疫宣传员(28,77)说话,取得"防疫小口罩"。 图例物品名称等级种 ...

  • admin 2025-5-12

    魅惑的哈密瓜无取得宠物「哈密瓜公主」╳╳○ 起始地点魔法大学头目战╳ 必要条件--- ...

  • admin 2025-5-12

    起始地点法兰城的里谢里雅堡头目战○ 必要条件---必要等级--- 职业限定---建议等级--- ...

  • admin 2025-5-12

    起始地点法兰城的里谢里雅堡头目战○ 必要条件---必要等级--- 职业限定---建议等级--- ...

  • admin 2025-5-12

    起始地点法兰城的冒险者旅馆头目战○ 必要条件---必要等级--- 职业限定---建议等级LV8 ...

发布 联系QQ