迷你世界寻找火山脚本附带雪山

cce73b1928e64075931375912e79848e.jpg

f7f5e5e74c6c4e07b6c3a87052341bbc.jpg 

print("寻找火山雪山\n星空露珠工作室制作")

 local blockbing=120 --冰山

local blockhuo=124 -- 火山

local bing={}

local huo={}

local m,n=0,0

local ra=0

local run=0

local function o(e)

  if run==-1 then return end

  run=-1

    local objid=e.eventobjid--点击方块的玩家

    local moveType=1--移动方式:1飞行 2默认

    --设置玩家的移动方式为飞行

 Player:changPlayerMoveType(objid, moveType) 

local y=127

---9987.-7939

--9987.-6915

 for i=-10,10 do

   for j=-10,10 do   

     local x,z=1000*i+25,1000*j

   Player:setPosition(objid,x,y,z)     

     local result,areaid=Area:createAreaRect({x=x,y=y,z=z},{x=60,y=80,z=60})     

     threadpool:wait(0.3)

     local result=Area:blockInArea(areaid,blockbing)

     local result0=Area:blockInArea(areaid,blockhuo)

       if result==0 then threadpool:wait(5) table.insert(bing,{x=x,y=y,z=z}) m=m+1 end

       if result0==0 then threadpool:wait(5) table.insert(huo,{x=x,y=y,z=z}) n=n+1 end

 end

end

print(m,n)

print(bing)

print(huo)

Player:teleportHome(objid)

Player:changPlayerMoveType(objid,2)

 

 if m>0 then Chat:sendSystemMsg("冰山个数:"..tostring(m))    

   for k,v in pairs(bing) do

print(v)

     Chat:sendSystemMsg("第"..tostring(k).."个冰山坐标x,z:"..tostring(v.x)..","..tostring(v.z))   

   end

 else Chat:sendSystemMsg("冰山个数:0")

 end

if n>0 then Chat:sendSystemMsg("火山个数:"..tostring(n))    

   for k,v in pairs(huo) do

print(v)

     Chat:sendSystemMsg("第"..tostring(k).."个火山坐标x,z:"..tostring(v.x)..","..tostring(v.z))   

   end

 else Chat:sendSystemMsg("火山个数:0")

 end

Chat:sendSystemMsg('点击快捷键道具即可传送')  

end      

ScriptSupportEvent:registerEvent("Player.UseItem",o)

local function p(e)

ra=ra+1 

local objid=e.eventobjid--点击方块的玩家

    local moveType=1--移动方式:1飞行 2默认

    --设置玩家的移动方式为飞行

 Player:changPlayerMoveType(objid, moveType) 

if ra<m then

Player:setPosition(objid,bing[ra].x,120,bing[ra].z)

Chat:sendSystemMsg("雪山编号:"..tostring(ra))

else

 if ra>m+n then ra=0 Chat:sendSystemMsg("已经溜达了一遍")

else Player:setPosition(objid,huo[ra-m].x,120,huo[ra-n].z)

Chat:sendSystemMsg("火山编号:"..tostring(ra-m))

 end

end

threadpool:wait(60)

Player:changPlayerMoveType(objid,2)

end

ScriptSupportEvent:registerEvent("Player.SelectShortcut",p)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值