首 页最新软件下载排行文章资讯投稿发布下载专题
维维下载站
您的位置:首页游戏攻略 → 饥荒怎么刷金锭方法

饥荒怎么刷金锭方法

来源:本站整理 发布时间:2014-1-17 16:44:11 人气:

《饥荒》怎么刷金锭方法,游戏中玩家需求搜集各种资源来晋级科技,然后翻开通往下一国际的大门,近来不少玩家发现十分缺少金锭,下面是刷刷金锭的办法详解。

刷金锭的办法

首要

用记事本翻开游戏目录\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

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

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

相关下载
栏目导航
本类热门阅览