风网设计-游戏素材资源爱好者社区's Archiver
全部分类
›
Lua脚本学习
› 攻击随机获得1-10钱币
晨风
发表于 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钱币