채팅0

    스크립트 봐줄사람

    조회수 295

    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-2022128
      6167701:0352
      6167611-14130
      6167511-14150
      6167411-14146
      6167311-14157
      6167211-13251
      6167111-13305
      6167011-13284
      6166911-13269
      6166811-13282
      6166711-13304
      6166611-13427
      6166511-12436
      6166411-12457
      6166311-12517
      6166211-11657
      6166111-11607
      6166011-11779
      6165911-11656
      안내 배너 이미지