채팅0

    스크립트 봐줄사람

    조회수 304

    makeCommand(_MobActionPartType.Fly, targetX, targetY, math.abs(targetY - mobPos.y) < 0.6, "Npc")

    else

    nextAction = (_GlobalRand32:RandomIntegerRange(540, 550) / 1000)

    local platformCandidates = {}

    local platformCandidatesNum = 0

            local function findTryingPlatformCandidates(range)
                for i=1,#platforms do
                    local checkPlatform = platforms[i]
                    local left = checkPlatform.left
                    local right = checkPlatform.right
                    if (left.x == right.x) then
                        continue
                    end
                    local centerX = left.x + right.x / 2
                    local centerY = left.y + right.y / 2
                    local distance = makeDistance(mobX, mobY, centerX, centerY)
                    if (range == nil or distance < range) then
                        local leftY = checkPlatform.left.y
                        local rightY = checkPlatform.right.y
                        local leftX = checkPlatform.left.x
                        local rightX = checkPlatform.right.x
                        if (abs(leftY - rightY) > 0.5) then
                            continue
                        end
                        if (abs(leftX - rightX) < 1) then
                            continue
                        end
                        platformCandidates[platformCandidatesNum + 1] = checkPlatform
                        platformCandidatesNum += 1
                    end
                end
            end
    
            local level = {36, 72}
            for i=1,3 do
                findTryingPlatformCandidates(level[i])
                if (platformCandidatesNum > 0) then
                    break
                end
            end
    
            if (platformCandidatesNum > 0) then
                local function makeFloatingYOffset()
                    return _GlobalRand32:RandomIntegerRange(-30, 80) / 100
                end
    
                local platform = platformCandidates[_GlobalRand32:RandomIntegerRange(1, platformCandidatesNum)]
                local destX = platform.left.x + (_GlobalRand32:RandomDouble() * platform.right.x - platform.left.x)
                local destY = platform.left.y + makeFloatingYOffset()
                local moveToTargetPlatform = true
    
                nextAction += makeCommand(_MobActionPartType.Fly, destX, destY, false, "Npc")
    
                inputX = _GlobalRand32:RandomDouble() < 0.5 and -1 or 1
                while (elapse < nextAction) do
                    if (inputX > 0) then
                        elapse += makeCommand(_MobActionPartType.Fly, platform.right.x, destY, true, "Npc")
                        inputX = -1
                    else
                        elapse += makeCommand(_MobActionPartType.Fly, platform.left.x, destY, true, "Npc")
                        inputX = 1
                    end
                end
    
                if (inputX > 0) then
                    makeCommand(_MobActionPartType.Fly, platform.right.x, destY, true, "Npc")
                else
                    makeCommand(_MobActionPartType.Fly, platform.left.x, destY, true, "Npc")

    댓글1

    회원프로필

    이동제한 푸는거임 ? 아니면 듀프 스크립트 ?

    2024.01.27 12:05

      게시글 리스트
      제목작성자작성일조회
      1893501-27847
      1893401-27538
      1893301-27537
      1893201-271233
      1893101-27353
      1893001-27505
      1892901-27321
      1892801-27486
      1892701-27495
      1892601-27305
      1892501-27218
      1892401-271535
      1892301-27593
      1892201-27772
      1892101-27463
      1892001-27485
      1891901-27579
      1891801-27400
      1891701-27347
      1891601-27356
      안내 배너 이미지