xwqxwq 发表于 2024-5-1 13:31:55

求助!大佬给看一下加100层buff, 时间到了不自己补,大佬给看一下

if BeePlayerBuffTime("邪恶能源")<30 and BeePlayerBuffCount(邪恶能源")>=100 then
    BeeRun("/use item:331001","player")
end

类似合剂的buff,点一下叠1层,最高叠100层,2小时到期,时间快到了 不自己补。
用普通的这种 if BeePlayerBuffTime("邪恶能源")<0 then
    BeeRun("/use item:331001") end
就一只吃合剂,100层了也一直吃。。求助

肆哥 发表于 2024-5-1 19:47:03

你这翻译过来就是[如果“邪恶能源”时间小于30并且层数大于或等于100时使用ID为331001的物品],如果BUFF名字和ID没错的话去掉Player试试,不过我认为把and改为or,>=改为<,更合理些,两个条件,时间小于30或者层数小于100层,满足其中一条就会吃
if BeePlayerBuffTime("邪恶能源")<30 or BeePlayerBuffCount(邪恶能源")<100 then
    BeeRun("/use item:331001")
end
试一下

肆哥 发表于 2024-5-1 19:55:09

if BeePlayerBuffTime("邪恶能源")<30 or BeePlayerBuffCount("邪恶能源")<100 then
    BeeRun("/use item:331001")
end
刚又看了一下,层数那里少了个双引号
页: [1]
查看完整版本: 求助!大佬给看一下加100层buff, 时间到了不自己补,大佬给看一下