第八号当铺的主题曲

飞舞 飞舞
回答
  • 用户12323333 用户12323333

    一七一.收妖镜(装备铥矿奖章对敌人按右键,将其收入镜中)
    用记事本打开游戏目录\data\scripts\prefabs\nightmare_timepiece.lua文件,在inst:addcomponent("inspectable")的下一行**以下内容:
    local function onequip(inst,owner)
    owner.components.inventory:setoverflow(inst)
    inst.components.container:open(owner)
    end
    local function onunequip(inst,owner)
    owner.components.inventory:setoverflow(nil)
    inst.components.container:close(owner)
    end
    local function itemtest(inst,item,slot)
    if item:hastag("catched")then
    return true
    end
    return false
    end
    local slotpos={}
    for y=0,9 do
    table.insert(slotpos,vector3(-162,-y*75+170,0))
    end
    local function cancatchmonster(inst,caster,target)
    if target then
    return target.components.locomotor and target.components.health and not target.components.health:**dead()and not target:hastag("**allbird")and not target:hastag("chester")
    end
    return true
    end
    local function catchmonster(staff,target,pos)
    if not inst.components.container:**full()then
    if target.components.stackable then target:removecomponent("stackable")end
    if target.components.inventoryitem then target:removecomponent("inventoryitem")end
    target:addcomponent("inventoryitem")
    target.components.inventoryitem.nobounce=true
    target.components.inventoryitem.canbepickedup=true
    target.components.inventoryitem:changeimagename("beard_monster")
    target.components.health.canmurder=true
    target:addtag("catched")
    target.components.inventoryitem:setondroppedfn(function(target)
    target:removecomponent("inventoryitem")
    target:removetag("catched")
    if target.brain then target.brain:start()end
    if target.sg then target.sg:start()end
    end)
    target.components.inventoryitem:setonputininventoryfn(function(target)
    if target.sg then target.sg:gotostate("idle")end
    if target.soundemitter then target.soundemitter:killallsounds()end
    end)
    inst.components.container:giveitem(target)
    end
    end
    inst:addcomponent("spellcaster")
    inst.components.spellcaster:setspellfn(catchmonster)
    inst.components.spellcaster:setspelltestfn(cancatchmonster)
    inst.components.spellcaster.canuseontargets=true
    inst.components.spellcaster.canusefrominventory=false
    inst:addcomponent("equippable")
    inst.components.equippable.equipslot=equipslots.hands
    inst.components.equippable:setonequip(onequip)
    inst.components.equippable:setonunequip(onunequip)
    inst:addcomponent("container")
    inst.components.container:setnumslots(#slotpos)
    inst.components.container.widgetslotpos=slotpos
    inst.components.container.widgetpos=vector3(18,50,0)
    inst.components.container.side_widget=true
    inst.components.container.itemtestfn=itemtest
    inst.components.container.acceptsstacks=false
    即可在装备铥矿奖章时,对敌人按鼠标右键,将敌人收入镜中(画面右边的格子中,显示为烧焦的兔子),如果想杀死它,就对格子中的敌人按鼠标右键,会获得战利品;如果想释放它,就拿出敌人放在地上。“收妖镜”的格子全满后,无法再收新的敌人,可以将敌人放在物品栏或其他背包后再收妖。在存档退出前,请处置(杀掉或释放)全部收来的敌人,否则读档后,敌人将全部被放出。铥矿奖章在远古选项(画着远古祭坛)下,用2个铥矿石、2个噩梦燃料制造,制造时需要靠近远古祭坛
    一六九.速射步**(黄**杖左键点射、右键连射蜂刺**)
    用记事本打开游戏目录\data\dlc0001\scripts\prefabs\staff.lua文件,将下列内容:
    local function yellow()
    local inst=commonfn("yellow")
    inst.fxcolour={223/255,208/255,**/255}
    inst.castsound="dontstarve/common/staffteleport
    inst:addcomponent("spellcaster")
    inst.components.spellcaster:setspellfn(createlight)
    inst.components.spellcaster:setspelltestfn(cancreatelight)
    inst.components.spellcaster.canuseonpoint=true
    inst.components.spellcaster.canusefrominventory=false
    inst:addcomponent("reticule")
    inst.components.reticule.targetfn=function()
    return vector3(getplayer().entity:localtoworldspace(5,0,0))
    end
    inst.components.reticule.ease=true
    inst.components.finiteuses:setmaxuses(tuning.yellowstaff_uses)
    inst.components.finiteuses:setuses(tuning.yellowstaff_uses)
    inst:addtag("nopunch")
    return inst
    end
    替换为:
    local function yellow()
    local inst=commonfn("yellow")
    inst.fxcolour={223/255,208/255,**/255}
    inst.castsound="dontstarve/common/staffteleport
    local function canattack(inst,target)
    if getplayer().components.inventory:has("stinger",1)and theinput:**mousedown(mousebutton_right)then
    inst.components.weapon:launchprojectile(inst,target)
    end
    if getplayer().components.inventory:has("stinger",1)then
    return true
    end
    end
    local function onattack_yellow(inst,owner,target)
    owner.soundemitter:playsound("dontstarve/creatures/eyeballturret/shotexplo")
    spawnprefab("die_fx").transform:setposition(target.transform:getworldposition())
    thecamera:shake("full",0.2,0.02,.5,40)
    owner.components.inventory:consumebyname("stinger",1)
    end
    inst:addcomponent("weapon")
    inst.components.weapon:setdamage(100)
    inst.components.weapon:setrange(25,30)
    inst.components.weapon:setonattack(onattack_yellow)
    inst.components.weapon:setcanattack(canattack)
    inst.components.weapon:setprojectile("fire_projectile")
    inst.components.finiteuses:setmaxuses(tuning.yellowstaff_uses*1000)
    inst.components.finiteuses:setuses(tuning.yellowstaff_uses*1000)
    return inst
    end
    即可在装备黄**杖时,对敌人按鼠标左键点射,按鼠标右键连射,身上没有蜂刺时无法射击(不要光顾着按住右键扫射,时不时关注一下还有多少**)。黄**杖在远古选项(画着远古祭坛)下,用4个噩梦燃料、2个活木头、2个黄色宝石制造,制造时需要靠近远古祭坛。黄**杖原有种小星星功能取消
    一六五.死神之光(拿提灯时右键点空地,满屏敌人通杀)
    用记事本打开游戏目录\data\scripts\prefabs\mininglantern.lua文件,在inst:addcomponent("inspectable")的下一行**以下内容:
    local function cancreatelight(staff,caster,target,pos)
    local fuelpercent=inst.components.fueled:getpercent()
    if fuelpercent>0.5 then
    return true
    else
    return false
    end
    end
    local function createlight(staff,target,pos)
    local shake_d**t=40
    local player=getclosestinstwithtag("player",inst,shake_d**t)
    if player then
    player.components.playercontroller:shakecamera(inst,"vertical",1,0.03,2,shake_d**t)
    end
    inst:dotaskintime(0,function()
    inst.components.combat:doareaattack(inst,30)
    end)
    getclock():dolightninglighting()
    inst.components.fueled.currentfuel=50
    end
    inst:addcomponent("spellcaster")
    inst.components.spellcaster:setspellfn(createlight)
    inst.components.spellcaster:setspelltestfn(cancreatelight)
    inst.components.spellcaster.canuseonpoint=true
    inst.components.spellcaster.canusefrominventory=false
    inst:addcomponent("combat")
    inst.components.combat:setdefaultdamage(3000)
    inst.components.combat.playerdamagepercent = 0
    即可拿提灯时右键点空地,满屏敌人通杀。注意提灯燃料超过50%时,才能释放死神之光,释放后提灯燃料接近耗尽,想再释放需要向提灯中填充荧光果(拿荧光果对装备格中的提灯按右键),大约3颗即可

类似问答
精品推荐

友情链接

友链互换QQ:

谷财 备案编号:蜀ICP备11019336号-3商务合作:235-677-2621

Copyright 2009-2020 Chengdu Sanzilewan Technology Co.,Ltd all rights reserve

抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活