搜索
查看: 611|回复: 2

[求助] 自动入包LUA求助!

[复制链接]
发表于 2020-11-20 14:53:29 | 显示全部楼层 |阅读模式
以下LUA是在LUA专区找来的
怎么才能改成条件:游戏点300触发自动入包?
还有这写代码放在服务端还是客户端?哪个LUA文件里?


--怪死亡爆物品时,启用直接进玩家包前回调(返回值决定是否物品直接进包裹)
function DropItemToBag(actor, killactor, item)
  local RaceId = killactor:getRace()--种族ID
  local actorname = actor:getCharName()      
  local itemName = item:getName()      
  local killname = killactor:getCharName()      


             local CH = killactor:checkFengHao('钻石会员')
             local Quest401 = killactor:getQuest(401)--等同于脚本 check [1] 0
             local Quest402 = killactor:getQuest(402)--等同于脚本 check [1] 0
        if Quest401 == 1 then
               if s.share.checkListText("..\\Envir\\QuestDiary\\自动捡物配置\\自动捡物赤月.txt", itemName) == 1 and CH > 0 then--检测称号个人标识
                 return true
                end
    end
      
        if Quest402 == 1 then
                if s.share.checkListText("..\\Envir\\QuestDiary\\自动捡物配置\\自动捡物雷霆.txt", itemName) == 1 and CH > 0 then
                 return true
                end
    end


        if s.share.checkListText("..\\Envir\\QuestDiary\\自动捡物配置\\自动捡物.txt", itemName) == 1 then--不检测别的条件只要在列表就自动进包裹
         return true
    end
    return false
end
发表于 2020-11-20 18:45:33 | 显示全部楼层
检测个人标识的同时检测 游戏点是否符合条件就行了
发表于 2020-11-21 02:07:18 | 显示全部楼层
这是服务端里设置的。在你的版本里
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|HGEM2论坛

GMT+8, 2024-9-21 00:36 , Processed in 0.470336 second(s), 13 queries .

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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