채팅0

    스크립트 봐줄사람

    조회수 305

    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

      게시글 리스트
      제목작성자작성일조회
      공지10-2022387
      6179406:0839
      6179312-30252
      6179212-28525
      6179112-28571
      6179012-26802
      6178912-25957
      6178812-25897
      6178712-241187
      6178612-231547
      6178512-221537
      6178412-221696
      6178312-221493
      6178212-211559
      6178112-211741
      6178012-211651
      6177912-191840
      6177812-181930
      6177712-182574
      6177612-162451
      안내 배너 이미지