您现在的位置是:网站首页>列表内容

饥荒快速刷金锭的方法_单机游戏_游戏攻略_

2024-07-03 18:59:16 68人已围观

简介 饥荒快速刷金锭的方法_单机游戏_游戏攻略_

饥荒》上市发行已经有很长一段时间,越来越多的玩家喜欢上这款游戏,金锭是非常重要的,缺少金锭也不行,那么怎么才能快速获得金锭呢?下面就来为大家详细的讲解一下快速刷金锭的方法,供玩家们借鉴参考一下。

刷金锭的方法

第一步:

用记事本翻开游戏目录\data\scripts\prefabs\pighouse.lua文件

然后再菜单(标题下面)的“修改”中找到查找

在查找中输入inst:AddComponent("inspectable")进行向下查找

找到之后在inst:AddComponent("inspectable")的下一行添加上:

local function ShouldAcceptItem(inst, item)

if item:HasTag("hat") then

return false

end

if item.components.edible.foodtype == "VEGGIE" then

return false

end

if item.components.edible.foodtype == "SEEDS" then

return false

end

return true

end

local function OnGetItemFromPlayer(inst, giver, item)

local names = {"meat","smallmeat","fish","eel","drumstick","bird_egg","froglegs"}

inst.name = names[math.random(#names)]

local meat = SpawnPrefab(inst.name)

local goldnugget = SpawnPrefab("goldnugget")

if item.components.edible.foodtype == "MEAT" then

giver.components.inventory:GiveItem(goldnugget)

end

if item.prefab == "goldnugget" then

giver.components.inventory:GiveItem(meat)

end

end

inst:AddComponent("trader")

inst.components.trader.onaccept = OnGetItemFromPlayer

inst.components.trader:SetAcceptTest(ShouldAcceptItem)

第二步:

用记事本翻开游戏目录\data\scripts\prefabs\pigman.lua文件

在查找中输入local function OnEat(inst, food)进行向下查找

找到之后在local function OnEat(inst, food)的下一行添加上:

if food.components.edible and food.components.edible.foodtype == "MEAT" then

for k = 1, 5 do

local gold = SpawnPrefab("goldnugget")

gold.Transform:SetPosition(inst.Transform:GetWorldPosition())

end

end

ok

这样就能够用一块肉放在有猪人的当地,猪人会过来吃,吃完后留下五个金锭{你也能够搞一个相似地摊的东西},然后用金锭去换跟猪房换肉,接着分散地放在地板上,猪人过来吃......

这样,就有连绵不断的金锭了。

发布内容
-六神源码网