晨风 发表于 2025-3-10 06:19:02

攻击随机获得1-10钱币

function OnHit(SelfP, PlayP, ...)
    if BasicObj.GetRace(PlayP) == 1 then
      local coinCount = math.random(1, 10)-- 生成1到10的随机数
      Player.Putmagicitem(PlayP, '钱币:' .. coinCount)
    end
end

soulwei 发表于 2025-7-21 04:42:54

这个就是稻草人的吗???打稻草人获得金币
页: [1]
查看完整版本: 攻击随机获得1-10钱币