闪点行动2吧 关注:1,973贴子:52,872

回复:runerback

只看楼主收藏回复

渣!!


IP属地:安徽来自Android客户端162楼2014-12-31 09:09
回复


    IP属地:安徽来自Android客户端163楼2014-12-31 09:10
    收起回复
      【坐标转方格(grid)】
      美帝之前写过,我也写一个热闹热闹
      function pos2grid(x,z)
        if x > 0
        and x < 32000
        and z < 0
        and z > -16000
        then
          local bigx
          local bigz
          local tempz
          local detx
          local detz
          bigx=math.floor(x/1000)
          detx=math.floor((x-bigx*1000)/100)
          tempz=math.floor(math.abs(z)/1000)
          bigz=string.char(80-tempz)
          detz=9-math.floor((math.abs(z)-tempz*1000)/100)
          if string.len(bigx)==1 then
            bigx='0'..bigx
          end
          return bigx..bigz..' X'..detx..'Y'..detz
        else
          return 'err'
        end
      end


      IP属地:四川164楼2015-01-10 22:31
      回复
        【通过任意坐标得到语音代码】
        gridsp={
          ['0']='cs_zero',
          ['1']='cs_one',
          ['2']='cs_two',
          ['3']='cs_three',
          ['4']='cs_four',
          ['5']='cs_five',
          ['6']='cs_six',
          ['7']='cs_seven',
          ['8']='cs_eight',
          ['9']='cs_nine',
          A='cs_alpha',
          B='cs_bravo',
          C='cs_charlie',
          D='cs_delta',
          E='cs_echo',
          F='cs_foxtrot',
          G='cs_golf',
          H='cs_hotel',
          I='cs_india',
          J='cs_juliet',
          K='cs_kilo',
          L='cs_lima',
          M='cs_mike',
          N='cs_november',
          O='cs_oscar',
          P='cs_papa',
          X='cs_xray',
          Y='cs_yankee'
        }
        function pos2grid(x,z)
          if x > 0
          and x < 32000
          and z < 0
          and z > -16000
          then
            local bigx
            local bigz
            local tempz
            local detx
            local detz
            bigx=math.floor(x/1000)
            detx=math.floor((x-bigx*1000)/100)
            tempz=math.floor(math.abs(z)/1000)
            bigz=string.char(80-tempz)
            detz=9-math.floor((math.abs(z)-tempz*1000)/100)
            if string.len(bigx)==1 then
              bigx='0'..bigx
            end
            return bigx..bigz..' X'..detx..'Y'..detz
          else
            return 'err'
          end
        end
        function grid2sent(grid)
          if grid~='err' then
            local newgrid=string.sub(grid,1,3)..string.sub(grid,5)
            local sent={}
            local str
            for i=1,string.len(newgrid) do
              str=gridsp[string.sub(newgrid,i,i)]
              if str then
                sent[i]=str
              end
            end
            return sent
          end
        end
        先通过 pos2grid(x,z) 得到坐标文本,然后用 grid2sent 将坐标文本转为语音代码


        IP属地:四川165楼2015-01-11 10:36
        回复
          好!!!


          IP属地:安徽来自Android客户端166楼2015-01-11 11:40
          回复


            IP属地:安徽来自Android客户端167楼2015-01-12 23:58
            回复


              IP属地:重庆169楼2015-02-08 18:47
              回复
                【震动镜头】
                @atearsboy
                function onCreate()
                pos={}
                ds={}
                end
                function onMissionStart()
                pos.x=2750
                pos.z=-8370
                pos.y=OFP:getTerrainHeight(pos.x,pos.z)
                t=0.01
                end
                function updateFrame(currentTime, frameNo)
                if math.mod(frameNo,3)==0 then
                if t>0 then t=0 elseif t==0 then t=math.random(10,30)*0.0005 end
                OFP:spawnEntitySetAtLocation('e',pos.x,pos.y+t,pos.z)
                end
                if #ds>5 then OFP:destroyEntitySet(ds[1]) table.remove(ds,1) end
                end
                function onSpawnedReady( setName, setID, tableOfEntities, errorCode )
                if setName=='e' then
                ds[#ds+1]=setID
                OFP:selectCamera(tableOfEntities[1])
                end
                end
                镜头放成水平的


                IP属地:四川170楼2015-02-16 12:52
                回复
                  【单兵云梯】
                  @afjahgja

                  function onMissionStart()
                  x=0
                  y=0
                  z=0
                  th=0
                  target=''
                  g=false
                  ds={}
                  end
                  function onMissionTime_00x00x10(missionTimeInMilliSeconds)
                  OFP:forceDismountVehicle('t','override')
                  end
                  function updateFrame(currentTime, frameNo)
                  if g then
                  if math.mod(frameNo,3)==0 then
                  if y>=th then
                  _,y,_=OFP:getPosition(target)
                  OFP:spawnEntitySetAtLocation('e',x,y,z)
                  else
                  y=th-1
                  if #ds>0 then
                  OFP:destroyEntitySet(ds[#ds])
                  table.remove(ds,#ds)
                  else
                  OFP:setInvulnerable(target,false)
                  g=false
                  end
                  end
                  end
                  end
                  end
                  function onSpawnedReady( setName, setID, tableOfEntities, errorCode )
                  if setName=='e' then
                  ds[#ds+1]=setID
                  end
                  end
                  ----------------------------------------------------------------------------------------------------------------------
                  function onDismount(vehicleName, unitName, echelonName)
                  if isAir(vehicleName) and OFP:getHeight(vehicleName)>=10 then
                  if isSoldier(unitName) then
                  target=unitName
                  x,y,z=OFP:getPosition(target)
                  th=OFP:getTerrainHeight(x,z)
                  OFP:setInvulnerable(target,true)
                  OFP:addTimer('start',500)
                  end
                  end
                  end
                  function onTimer_start()
                  g=true
                  OFP:removeTimer('start')
                  end
                  function isAir(name)
                  return OFP:getBroadUnitCategory(name)=='BROAD_UNIT_AIRCRAFT'
                  end
                  function isSoldier(name)
                  return OFP:getBroadUnitCategory(name)=='BROAD_UNIT_SOLDIER'
                  end


                  IP属地:四川171楼2015-02-16 13:41
                  收起回复
                    【多人云梯】
                    直接给出mssn:
                    http://pan.baidu.com/s/1kTze8zt
                    截图:

                    (此图为回收状态)
                    首先劳资不怕别人拿去说这是他做的,至于原因的话自己用用就懂了。另外我只给出方法,实际怎么用自己摸索去吧,劳资要潜水(美帝我来咯@美帝的阴谋
                    ————无论谁问啥我都不理,这样才能追随美帝的步伐


                    IP属地:四川172楼2015-02-16 16:02
                    回复
                      Huck!!!想来找个圆环范围内刷兵的代码竟然木有,又得自己重新写了


                      IP属地:四川173楼2015-05-23 23:04
                      回复
                        我要将此帖变成超级无敌宇宙大水贴
                        视频来自:优酷


                        IP属地:四川174楼2015-05-23 23:07
                        回复
                          甚好!!


                          IP属地:安徽来自Android客户端175楼2015-05-23 23:12
                          回复
                            小美帝啊,今晚玩闪点2吧


                            IP属地:安徽来自Android客户端176楼2015-05-23 23:13
                            收起回复
                              zhazha


                              IP属地:重庆177楼2015-10-10 21:06
                              回复