YN230-五彩木箱(找东西直接看木箱颜色,木箱可搬动)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三0.五彩木箱(找东西直接看木箱颜色,木箱可搬动) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/treasurechest.lua文件,将下列内容: inst.OnSave = onsave inst.OnLoad = onload 替换为: local colours= { {198/255,43/255,43/255}, {79/255,153/255,68/255}, {35/255,105/255,235/255}, {233/255,208/255,69/255}, {109/255,50/255,163/255}, {222/255,126/255,39/255}, } local function onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_body", "swap_backpack", "swap_body") end local function onunequip(inst, owner) owner.AnimState:ClearOverrideSymbol("swap_body") end local function turnon(inst) inst.components.machine.ison = true if inst.prefab == "treasurechest" then inst:AddComponent("inventoryitem") end end local function turnoff(inst) inst.components.machine.ison = false if inst.prefab == "treasurechest" then inst:RemoveComponent("inventoryitem") end end local function onsave2(inst, data) data.num = inst.balloon_num data.colour_idx = inst.colour_idx end local function onload2(inst, data) if data then if data.num then inst.balloon_num = data.num inst.AnimState:OverrideSymbol("swap_balloon", "balloon_shapes", "balloon_" .. tostring(inst.balloon_num)) end if data.colour_idx then inst.colour_idx = math.min(#colours, data.colour_idx) inst.AnimState:SetMultColour(colours[inst.colour_idx][1],colours[inst.colour_idx][2],colours[inst.colour_idx][3],1) end end end inst:AddComponent("machine") inst.components.machine.turnonfn = turnon inst.components.machine.turnofffn = turnoff inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( onequip ) inst.components.equippable:SetOnUnequip( onunequip ) inst.colour_idx = math.random(#colours) inst.AnimState:SetMultColour(colours[inst.colour_idx][1],colours[inst.colour_idx][2],colours[inst.colour_idx][3],1) inst.OnSave = onsave2 inst.OnLoad = onload2 即可使木箱具备不同颜色,找东西直接看颜色,再也不用翻箱倒柜了。木箱可搬动,对地上的木箱按鼠标右键,可拿起木箱。将木箱放在地上后,对其按鼠标右键,可以锁定在地上

2025/04/23 · Bny

YN231-随笔涂鸦(用蓝魔杖为物品涂上色彩)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三一.随笔涂鸦(用蓝魔杖为物品涂上色彩) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/staff.lua文件,在local inst = commonfn("blue")的下一行插入以下内容: local function cancreatecolour(staff, caster, target, pos) return true end local function createcolour(staff, target, pos) local caster = staff.components.inventoryitem.owner if caster.components.sanity then caster.components.sanity:DoDelta(5) end local colours= { {198/255,43/255,43/255}, {79/255,153/255,68/255}, {35/255,105/255,235/255}, {233/255,208/255,69/255}, {109/255,50/255,163/255}, {222/255,126/255,39/255}, } inst.colour_idx = math.random(#colours) target.AnimState:SetMultColour(colours[inst.colour_idx][1],colours[inst.colour_idx][2],colours[inst.colour_idx][3],1) end inst:AddComponent("spellcaster") inst.components.spellcaster:SetSpellFn(createcolour) inst.components.spellcaster:SetSpellTestFn(cancreatecolour) inst.components.spellcaster.canuseontargets = true inst.components.spellcaster.canusefrominventory = false 即可用蓝魔杖右键点任何物品,为其涂上随机色彩,存档退出后消失。每涂鸦一次补脑5点。将你涂好的缤纷世界截下图片,给朋友秀秀吧

2025/04/23 · Bny

YN232-移动垃圾桶(狗箱增加删除物品按钮作垃圾桶)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三二.移动垃圾桶(狗箱增加删除物品按钮作垃圾桶) 用MT管理器打开游戏目录/assets/scripts/prefabs/chester.lua文件,在inst:AddComponent("container")的下一行插入以下内容: local widgetbuttoninfo = { text = "Delete", position = Vector3(0, -195, 0), fn = function(inst) inst.components.container:DestroyContents() inst.SoundEmitter:PlaySound("dontstarve/common/destroy_stone") end } inst.components.container.widgetbuttoninfo = widgetbuttoninfo 即可在切斯特狗箱的格子下方增加一个Delete按钮,将不想要的物品放入狗箱,按下Delete按钮即可清除掉,让游戏不会因垃圾太多而越来越卡。不按钮的话,照常可以储存物品。千万不要把骨眼放入狗箱清除掉哦

2025/04/23 · Bny

YN233-垃圾洞(用饥饿腰带种垃圾洞,不想要的物品可扔进去销毁,夜晚自燃,白天熄灭)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三三.垃圾洞(用饥饿腰带种垃圾洞,不想要的物品可扔进去销毁,夜晚自燃,白天熄灭) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/armor_slurper.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function wastehole(inst) local pt = inst:GetPosition() local wastehole = SpawnPrefab("armorslurper") wastehole.Transform:SetPosition(pt.x, pt.y, pt.z) wastehole.AnimState:SetBank("tentaclepillar") wastehole.AnimState:SetBuild("tentacle_pillar") wastehole.AnimState:PlayAnimation("idle_hole",true) wastehole.Transform:SetScale(0.5, 0.5, 0.5) wastehole.entity:AddSoundEmitter() MakeObstaclePhysics(wastehole, .5) wastehole:RemoveComponent("inventoryitem") wastehole:RemoveComponent("equippable") wastehole:RemoveComponent("fueled") wastehole:RemoveComponent("deployable") wastehole:RemoveTag("fur") wastehole:RemoveTag("ruins") local minimap = wastehole.entity:AddMiniMapEntity() minimap:SetIcon( "firepit.png" ) wastehole:AddComponent("burnable") wastehole.components.burnable:SetFXLevel(5) wastehole.components.burnable:AddBurnFX("character_fire", Vector3(0,1.5,0) ) wastehole:ListenForEvent("onignite", function() wastehole:AddComponent("heater") wastehole.components.heater.heat = 50 end ) wastehole:ListenForEvent("onextinguish", function() wastehole.SoundEmitter:PlaySound("dontstarve/common/fireOut") if wastehole.components.heater then wastehole:RemoveComponent("heater") end end ) wastehole:ListenForEvent( "daytime", function() wastehole.components.burnable:Extinguish() end , GetWorld()) wastehole:ListenForEvent( "dusktime", function() wastehole.components.burnable:Ignite(true) end , GetWorld()) wastehole:ListenForEvent( "nighttime", function() wastehole.components.burnable:Ignite(true) end , GetWorld()) if GetClock():IsDay() then wastehole.components.burnable:Extinguish() else wastehole.components.burnable:Ignite(true) end wastehole:AddComponent("workable") wastehole.components.workable:SetWorkAction(ACTIONS.HAMMER) wastehole.components.workable:SetWorkLeft(3) wastehole.components.workable:SetOnFinishCallback(function(wastehole) SpawnPrefab("collapse_big").Transform:SetPosition(wastehole.Transform:GetWorldPosition()) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood") wastehole:Remove() end ) local slotpos = { Vector3(0,-75,0)} wastehole:AddComponent("container") wastehole.components.container:SetNumSlots(#slotpos) wastehole.components.container.widgetslotpos = slotpos wastehole.components.container.widgetpos = Vector3(0,600,0) wastehole.components.container.side_align_tip = 160 wastehole.components.container.itemtestfn = function(wastehole, item, slot) if item.prefab == "teleportato_ring" or item.prefab == "teleportato_box" or item.prefab == "teleportato_crank" or item.prefab == "teleportato_potato" or item.prefab == "chester_eyebone" or item.prefab == "abigail_flower" or item.prefab == "lucy" or item.prefab == "balloons_empty" or item.prefab == "lighter" or item.prefab == "waxwelljournal" then return false end return true end wastehole:DoPeriodicTask(0.25, function(wastehole) if not wastehole.components.container:IsEmpty() then wastehole.components.container:DestroyContents() wastehole.SoundEmitter:PlaySound("dontstarve/common/destroy_stone") local pt0 = wastehole:GetPosition() SpawnPrefab("collapse_small").Transform:SetPosition(pt0.x, 1, pt0.z) end end ) wastehole:AddTag("wastehole") end local function OnDeploy (inst, pt) wastehole(inst) inst:Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy local function onsave(inst, data) if inst:HasTag("wastehole") then data.wastehole = true end end local function onload(inst, data) if data and data.wastehole then wastehole(inst) inst:Remove() end end inst.OnSave = onsave inst.OnLoad = onload 即可用饥饿腰带种垃圾洞,除重要物品外(如露西斧子等),任何不想要的物品都可以扔进去销毁(拿着物品对垃圾洞点鼠标左键),再也不用发愁垃圾越来越多了。垃圾洞里有沼气,在夜晚时会自燃,白天熄灭,可用于照明和取暖,但不能用来烤食物。垃圾洞在小地图上显示为石头营火的图标,不想要垃圾洞时,用锤子砸毁即可。饥饿腰带在魔法选项(画着红骷髅)下,用6个啜食者皮、2个绳子、2个噩梦燃料制造

2025/04/23 · Bny

YN234-生物传送机(探矿杖左键点生物,右键传送到任意地点)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三四.生物传送机(探矿杖左键点生物,右键传送到任意地点) 用MT管理器打开游戏目录/assets/scripts/prefabs/diviningrod.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function onattack(inst, owner, target) SpawnPrefab("lightning_rod_fx").Transform:SetPosition(target.Transform:GetWorldPosition()) target:AddTag("send") end local function canteleport(inst) return true end local function teleport(inst) local player = GetPlayer() local range = 3000 local pos = Vector3(player.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, range) for k,v in pairs(ents) do if v:HasTag("send") then v.Transform:SetPosition(TheInput:GetWorldPosition():Get()) v:RemoveTag("send") end end end inst:AddComponent("spellcaster") inst.components.spellcaster:SetSpellFn(teleport) inst.components.spellcaster:SetSpellTestFn(canteleport) inst.components.spellcaster.canusefrominventory = false inst.components.spellcaster.canuseonpoint = true inst:AddComponent("weapon") inst.components.weapon:SetDamage(0) inst.components.weapon:SetRange(30, 35) inst.components.weapon:SetOnAttack(onattack) inst.components.weapon:SetProjectile("bishop_charge") 即可在装备探矿杖时,用鼠标左键点生物(几个都可以),无论走到地图何处,装备探矿杖用鼠标右键点地面,都可将选中的生物传送过来。生物传送机可让群体性动物落单,让不会相遇的动物碰面,调离守护某处的敌人等。探矿杖在科学选项(画着原子)下,用1个树枝、4个噩梦燃料、1个齿轮制造

2025/04/23 · Bny

YN235-极速快递(拿着背包对地面点右键,将它传送回家)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三五.极速快递(拿着背包对地面点右键,将它传送回家) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/backpack.lua文件,将inst.components.inventoryitem.cangoincontainer = false替换为以下内容: inst.components.inventoryitem.cangoincontainer = true local function OnDeploy (inst, pt) SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition()) local pos = Vector3(inst.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 3000) for k,v in pairs(ents) do if v.prefab == "firepit" then inst.Transform:SetPosition(v.Transform:GetWorldPosition()) end end end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy inst:AddTag("fridge") 即可将拿不下的东西放在普通背包里,拿着背包对地面点鼠标右键,会自动传送到石头营火旁,再多的战利品都可以快递回家。背包同时具备冷藏功能,里面的食物可以长久保鲜。快递只在同一地层服务(不能从地下传送到地面),为保证快递投送准确,请在同一地层只保留一处石头营火(多处的话将随机投送)。如果之前修改过“同时携带多个背包”,就查找不到inst.components.inventoryitem.cangoincontainer = false这句,将inst.components.inventoryitem.cangoincontainer = true替换为下面的内容即可

2025/04/23 · Bny

YN236-帽子戏法(高礼帽放在地上随机变出几十种宝物)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三六.帽子戏法(高礼帽放在地上随机变出几十种宝物) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/hats.lua文件,在inst.components.fueled:InitializeFuelLevel(TUNING.TOPHAT_PERISHTIME)的下一行插入以下内容: local function ondropped(inst) local names = {"bedroll_furry","gunpowder","panflute","onemanband","armor_sanity","nightsword","batbat","armorslurper","amulet","blueamulet","purpleamulet","firestaff","icestaff","telestaff","blowdart_sleep","blowdart_fire","blowdart_pipe","featherhat","cane","trunkvest_summer","trunkvest_winter","nightmare_timepiece","orangeamulet","yellowamulet","greenamulet","orangestaff","yellowstaff","greenstaff","ruinshat","armorruins","ruins_bat","eyeturret_item","trunk_summer","trunk_winter","deerclops_eyeball","gears","nightmarefuel","livinglog","marble","minotaurhorn","krampus_sack","butter","tallbirdegg","honeyham","dragonpie","taffy","mandrakesoup","perogies","waffles","turkeydinner","honeynuggets","wormlight","beefalo","perd","koalefant_summer","koalefant_winter","lureplantbulb","slurtlehat","armorsnurtleshell","bonestew","butterflymuffin","frogglebunwich","pumpkincookie","baconeggs","fruitmedley","fishtacos","fishsticks","stuffedeggplant","meatballs","jammypreserves","bandage","healingsalve","spider_warrior","tentacle","monkey","killerbee","worm"} inst.name = names[math.random(#names)] SpawnPrefab(inst.name).Transform:SetPosition(inst.Transform:GetWorldPosition()) SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition()) end inst:ListenForEvent("ondropped", ondropped) 即可将高礼帽放在地上,随机变出几十种宝物,也有一定几率变出怪物哦,试试你的手气吧。高礼帽在穿戴选项(画着帽子)下,用6个蛛丝制造

2025/04/23 · Bny

YN237-节日礼花(点燃荧光果放礼花)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三七.节日礼花(点燃荧光果放礼花) 用MT管理器打开游戏目录/assets/scripts/prefabs/lightbulb.lua文件,在inst:AddComponent("inventoryitem")的下一行插入以下内容: local function OnIgniteFn(inst) GetPlayer().SoundEmitter:PlaySound("dontstarve/common/blackpowder_explo") inst:DoTaskInTime(1.5, function() inst.Physics:SetMotorVelOverride(0,42,0) end) end local function OnExplodeFn(inst) GetPlayer().components.sanity:DoDelta(5) inst:StartThread(function() for k = 1,3 do GetPlayer().SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo") TheCamera:Shake("FULL", 0.3, 0.02, .5, 40) Sleep(.1) end end) end inst:AddComponent("explosive") inst.components.explosive:SetOnExplodeFn(OnExplodeFn) inst.components.explosive:SetOnIgniteFn(OnIgniteFn) 即可用火炬点燃放在地上的荧光果,荧光果会飞上天空爆炸,每放一颗补5点脑,为你的节日增加一点气氛吧。在地洞里放礼花可以引起地震。如果想连续燃放,就将荧光果摆成一排(距离要近一些),点燃一个,其他就会陆续被点燃

2025/04/23 · Bny

YN238-璀璨流星雨(给远古盔甲10个黄金或荧光果,为你下场流星雨)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三八.璀璨流星雨(给远古盔甲10个黄金或荧光果,为你下场流星雨) 用MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/armor_ruins.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容: local function ShouldAcceptItem(inst, item) if GetPlayer().components.inventory:Has("goldnugget", 10) then if item.prefab == "goldnugget" then return true end end if GetPlayer().components.inventory:Has("lightbulb", 10) then if item.prefab == "lightbulb" then return true end end return false end local function OnGetItemFromPlayer(inst, giver, item) if item.prefab == "goldnugget" then giver.components.inventory:ConsumeByName("goldnugget", 9) elseif item.prefab == "lightbulb" then giver.components.inventory:ConsumeByName("lightbulb", 9) end local bullet = SpawnPrefab("trinket_5") bullet.Transform:SetPosition(inst.Transform:GetWorldPosition()) bullet.components.inventoryitem.canbepickedup = false bullet.Physics:SetMotorVelOverride(0,20,0) giver.components.sanity:DoDelta(10) GetPlayer().SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo") inst:DoTaskInTime(1, function() bullet:Remove() end ) inst:DoTaskInTime(1.5, function() inst:StartThread(function() for k = 1, 200 do local pt = Vector3(GetPlayer().Transform:GetWorldPosition()) local rain = SpawnPrefab("lightbulb") rain:RemoveComponent("edible") rain.components.inventoryitem.canbepickedup = false if item.prefab == "goldnugget" then rain.AnimState:SetMultColour(math.random(255)/255,math.random(255)/255,math.random(255)/255,1) end rain.Transform:SetPosition(pt.x+(math.random(30)-math.random(30)), 20, pt.z+(math.random(30)-math.random(30))) inst:DoTaskInTime(5, function() local pt2 = rain:GetPosition() SpawnPrefab("explode_small").Transform:SetPosition(pt2.x, 0, pt2.z) rain:Remove() end) Sleep(0.2) end end) end) end inst:AddComponent("trader") inst.components.trader.onaccept = OnGetItemFromPlayer inst.components.trader:SetAcceptTest(ShouldAcceptItem) 即可拿着黄金或荧光果,对放在地上的远古盔甲点鼠标左键,将向空中发射火箭,打下漫天的流星雨。每次发射消耗10个黄金或荧光果,身上数量不足时无法发射。如果给远古盔甲的是黄金,则下彩色流星雨,如果给的是荧光果则下白色流星雨。可以连续发射,但不要连续次数太多,除非你的计算机硬件足够坚强。每场流星雨可补脑10点。另外穿着远古盔甲,拿黄金或荧光果对装备格点鼠标右键,同样可以发射。远古盔甲在远古选项(画着远古祭坛)下,用6个铥矿石、4个噩梦燃料制造,制造时需要靠近远古祭坛

2025/04/23 · Bny

YN239-高尔夫球(用蜗牛壳碎片种高尔夫球,锤子作球杆,将球打进兔子洞吧)

代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。 原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html 二三九.高尔夫球(用蜗牛壳碎片种高尔夫球,锤子作球杆,将球打进兔子洞吧) 用MT管理器打开游戏目录/assets/scripts/prefabs/slurtle_shellpieces.lua文件,在inst:AddComponent("inventoryitem")的下一行插入以下内容: local function OnDeploy (inst, pt) local golf = SpawnPrefab("slurtle_shellpieces") golf.Transform:SetPosition(pt.x, pt.y, pt.z) golf.AnimState:SetBank("bulb") golf.AnimState:SetBuild("bulb") golf.AnimState:PlayAnimation("idle") golf.Transform:SetScale(0.8, 0.8, 0.8) golf.components.inventoryitem.canbepickedup = false MakeSmallBurnable(golf) golf:AddComponent("perishable") golf.components.perishable:SetPerishTime(TUNING.PERISH_ONE_DAY) golf.components.perishable:StartPerishing() golf.components.perishable.onperishreplacement = "ash" golf:AddComponent("workable") golf.components.workable:SetWorkAction(ACTIONS.HAMMER) golf.components.workable:SetWorkLeft(10) golf.components.workable:SetOnFinishCallback(function(golf) SpawnPrefab("ground_chunks_breaking").Transform:SetPosition(golf.Transform:GetWorldPosition()) golf:Remove() end ) golf.components.workable:SetOnWorkCallback(function(golf) local pt2 = Vector3(golf.Transform:GetWorldPosition()) local pos = Vector3(GetPlayer().Transform:GetWorldPosition()) golf.Physics:SetMotorVelOverride((pt2.x-pos.x)*13,0,(pt2.z-pos.z)*13) golf:DoTaskInTime(0.2, function() golf.Physics:ClearMotorVelOverride() end ) GetPlayer().components.sanity:DoDelta(5) end ) golf:DoPeriodicTask(.05, function(golf) local pos2 = Vector3(golf.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos2.x,pos2.y,pos2.z, 0.5) for k,v in pairs(ents) do if v.prefab == "rabbithole" then GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/use_axe_tree") golf:Remove() GetPlayer().components.sanity:DoDelta(50) end end end ) golf:AddTag("golfs") inst.components.stackable:Get():Remove() end inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy local function onsave(inst, data) if inst:HasTag("golfs") then data.golfs = true end end local function onload(inst, data) if data and data.golfs then inst.AnimState:SetBank("bulb") inst.AnimState:SetBuild("bulb") inst.AnimState:PlayAnimation("idle") inst.Transform:SetScale(0.8, 0.8, 0.8) inst.components.inventoryitem.canbepickedup = false MakeSmallBurnable(inst) inst:AddComponent("perishable") inst.components.perishable:SetPerishTime(TUNING.PERISH_ONE_DAY) inst.components.perishable:StartPerishing() inst.components.perishable.onperishreplacement = "ash" inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.HAMMER) inst.components.workable:SetWorkLeft(10) inst.components.workable:SetOnFinishCallback(function(inst) SpawnPrefab("ground_chunks_breaking").Transform:SetPosition(inst.Transform:GetWorldPosition()) inst:Remove() end ) inst.components.workable:SetOnWorkCallback(function(inst) local pt2 = Vector3(inst.Transform:GetWorldPosition()) local pos = Vector3(GetPlayer().Transform:GetWorldPosition()) inst.Physics:SetMotorVelOverride((pt2.x-pos.x)*13,0,(pt2.z-pos.z)*13) inst:DoTaskInTime(0.2, function() inst.Physics:ClearMotorVelOverride() end ) GetPlayer().components.sanity:DoDelta(5) end ) inst:DoPeriodicTask(.05, function(inst) local pos2 = Vector3(inst.Transform:GetWorldPosition()) local ents = TheSim:FindEntities(pos2.x,pos2.y,pos2.z, 0.5) for k,v in pairs(ents) do if v.prefab == "rabbithole" then GetPlayer().SoundEmitter:PlaySound("dontstarve/wilson/use_axe_tree") inst:Remove() GetPlayer().components.sanity:DoDelta(50) end end end ) inst:AddTag("golfs") end end inst.OnSave = onsave inst.OnLoad = onload 即可用蜗牛壳碎片种高尔夫球(请种在兔子洞附近),装备锤子对高尔夫球按一下鼠标右键(注意不要按住不放)可以击球。主角站得离球越近,击球的力量越小;站得越远,击球的力量越大。每次挥杆奖励5点脑,将球打入兔子洞奖励50点脑(进洞的球会被兔子拿走,再玩请重新种球)。球能准确入洞的诀窍在于,人、球、洞三点成一线。每个高尔夫球可以击打10次,如果10杆都没有进洞,说明你的技术太烂了,再种一个球重来吧。不想要高尔夫球时,烧掉即可,不会引燃周边物品,如果球打得太远找不到了,1天后会自动降解为灰烬,不会污染环境。蜗牛壳碎片可以通过打蜗牛龟和蜗牛窝得到,如果你同时修改了“巨型超市”,也可以花1-2个黄金购得

2025/04/23 · Bny