local tile = ground.Map:GetTileAtPoint(pos.x, pos.y, pos.z)
return tile ~= GROUND.IMPASSIBLE and tile < GROUND.UNDERGROUND end return false end
local function createlight(staff, target, pos) local light = SpawnPrefab("perd") light.Transform:SetPosition(pos.x, pos.y, pos.z) local caster = staff.components.inventoryitem.owner end
inst:AddComponent("spellcaster") inst.components.spellcaster:SetSpellFn(createlight) inst.components.spellcaster:SetSpellTestFn(cancreatelight)
inst.components.spellcaster.canuseonpoint = true inst.components.spellcaster.canusefrominventory = false
即可装备回旋镖后,在空地上点鼠标右键召唤火鸡。其中perd(火鸡)可以替换为其他物品
六十三.犬牙飞镖(装备犬牙,一招制敌)
用记事本打开游戏目录\\data\\scripts\\prefabs\\houndstooth.lua文件,
1.在下列内容:
local assets= {
Asset("ANIM", "anim/hounds_tooth.zip"), }
的下一行插入以下内容:
local function onequip(inst, owner)
owner.AnimState:OverrideSymbol("swap_object", "swap_houndstooth")
owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal") end
"swap_houndstooth",
local function onunequip(inst, owner)
owner.AnimState:ClearOverrideSymbol("swap_object") owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal") end
local function onhit(inst, attacker, target)
local impactfx = SpawnPrefab("impact") if impactfx then
local follower = impactfx.entity:AddFollower()
follower:FollowSymbol(target.GUID, target.components.combat.hiteffectsymbol, 0, 0, 0 ) impactfx:FacePoint(Vector3(attacker.Transform:GetWorldPosition())) end
inst:Remove() end
local function onthrown(inst, data)
inst.AnimState:SetOrientation( ANIM_ORIENTATION.OnGround ) end
2.在inst:AddComponent("inspectable")的下一行插入以下内容:
inst:AddComponent("weapon") inst.components.weapon:SetDamage(3000) inst.components.weapon:SetRange(15, 18)
inst:AddComponent("equippable") inst.components.equippable:SetOnEquip(onequip) inst.components.equippable:SetOnUnequip(onunequip) inst.components.equippable.equipstack = true
inst:AddComponent("projectile") inst.components.projectile:SetSpeed(60) inst.components.projectile:SetOnHitFn(onhit) inst:ListenForEvent("onthrown", onthrown)
即可使犬牙成为装备的武器,甩出去可一招制敌。用犬牙制造物品时,放在非装备格(普通库存格或背包格)即可
六十四.种腐烂食物得高
鸟,高鸟无攻击行为、下高鸟蛋,高鸟蛋可堆叠
1.用记事本打开游戏目录\\data\\scripts\\prefabs\\spoiledfood.lua文件,在
inst.components.edible.hungervalue = TUNING.SPOILED_HUNGER的下一行插入下列内容:
local function OnDeploy (inst, pt)
local tallbird = SpawnPrefab("tallbird") if tallbird then
tallbird:PushEvent("growfromspoiledfood") tallbird.Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end end
inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy
2.用记事本打开游戏目录\\data\\scripts\\prefabs\\tallbird.lua文件,将以下内容:
inst.components.combat:SetRange(TUNING.TALLBIRD_ATTACK_RANGE) 修改为:
inst.components.combat:SetRange(TUNING.TALLBIRD_ATTACK_RANGE*0)
在inst:AddComponent("inspectable")的下一行插入以下内容:
inst:AddComponent("periodicspawner")
inst.components.periodicspawner:SetPrefab("tallbirdegg") inst.components.periodicspawner:SetRandomTimes(80, 110) inst.components.periodicspawner:SetDensityInRange(20, 2) inst.components.periodicspawner:SetMinimumSpacing(8) inst.components.periodicspawner:Start()
3.用记事本打开游戏目录\\data\\scripts\\prefabs\\tallbirdegg.luainst:AddComponent("edible")的下一行插入下列内容:
inst:AddComponent("stackable")
inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM
文件,在
六十五.青年高鸟不长大,并增加血量及攻击力,喂食可重新认人
1.青年高鸟18000天不长大:用记事本打开游戏目录\\data\\scripts\\prefabs\\smallbird.lua文件,将return TUNING.TEENBIRD_GROW_TIME替换为return TUNING.TEENBIRD_GROW_TIME*1000即可
2.提高青年高鸟血量到30000点:用记事本打开游戏目录\\data\\scripts\\prefabs\\smallbird.lua文件,将
3.提高青年高鸟攻击力到180点:用记事本打开游戏目录\\data\\scripts\\prefabs\\smallbird.lua文件,将
4.通过喂食让高鸟重新认人:用记事本打开游戏目录\\data\\scripts\\prefabs\\smallbird.lua文件,在--print("smallbird - OnGetItemFromPlayer")的下一行插入以下内容:
local player = GetPlayer()
if player and player.components.leader then player.components.leader:AddFollower(inst) end
六十六.喂自养高鸟产便便
用记事本打开游戏目录\\data\\scripts\\prefabs\\smallbird.lua文件,在local function OnEat(inst, food)的下一行插入以下内容:
if food.components.edible then
local poo = SpawnPrefab("poop") poo.Transform:
SetPosition(inst.Transform:GetWorldPosition()) end
即可喂自养高鸟产便便
inst.components.combat:SetDefaultDamage(TUNING.TEENBIRD_DAMAGE)
替
换
为
inst.components.combat:SetDefaultDamage(TUNING.TEENBIRD_DAMAGE*5)
inst.components.health:SetMaxHealth(TUNING.TEENBIRD_HEALTH)
替
换
为
inst.components.health:SetMaxHealth(TUNING.TEENBIRD_HEALTH*100)即可