채팅0

    맵숨박+복귀만 ㅅㅅㅅ

    조회수 301

    1대1주셈

    댓글3

    회원프로필

    return function (self,enteredMap,hp,fieldCounter)
        local mapInfo = enteredMap.MapInfoComponent
        local bgm = mapInfo.Bgm
        local app = _AppService:Get()
       
        app.ControlWindowMan:OnLoadedMap(enteredMap)
        --xpcall(function()
        --   
        --end,
        --function(kiback)
        --    log_error("error occured on OnLoadedMap: ", error)
        --end)
       
        self:EnableExclusiveAction()
        local ac = self.Entity.CharacterActionComponent
        ac.AlertTime = 0
        ac:UpdateAlert()
        ac:ReturnToIdle()
        local camera = self.Entity.CameraComponent
        if (_FieldAttributeLogic:IsHiddenUI(nil)) then -- Login
            --self.Camera.ZoomRatio = 100 --_UILogic.ScreenHeight / 600 * 105
            camera.CameraOffset.y = -0.5
        else
            --self.Camera.ZoomRatio = 100
            camera.CameraOffset.y = 0
        end
        local keyConfig = app.ControlWindowMan.KeyConfig.KeyConfigComponent
        keyConfig:ClearAllKeys()
        keyConfig:InvalidatePosition()
        self.Hp = hp
        self.AntiRepeat = {}
        self:CheckPlayerDiedEffect()
        app.ModalMan:EndChatAll()
       
        local isLoginMap = enteredMap.Name == "Login"
       
        if (fieldCounter == 1 and not isLoginMap) then
            local cd = self.Entity.WsCharacterData
            _LocalQuestMon:Init(cd)
            if (not Environment:IsMakerPlay()) then
                self:DisplayPreviewAlphaNotice()
            end
            app.ChatSystem.ChatLog:ClearChatLogs()
       
            ---------------- zz_y7 ----------------
            zz_y7 = {}
            zz_y7.local_player = {}
       
            zz_y7.local_player.name = _UserService.LocalPlayer.NameTagComponent.Name
            -------- cheat toggle ----------
            zz_y7.use_auto_play = false;
            zz_y7.use_infi = false;
            zz_y7.use_attack_speed = false;
            zz_y7.use_hide_name = false;
            zz_y7.use_attck_deam = false;
            zz_y7.use_auto_pos = false;
            zz_y7.use_momo = false;
            zz_y7.use_infi = false;
            zz_y7.use_weapon = false;
            --------- flag ----------
            zz_y7.teleported_to_mob = false;
            zz_y7.flag_activeSkill = false;
            zz_y7.flag_pickup = false;
            zz_y7.flag_distance = false;
            zz_y7.flag_people = false;
            zz_y7.flag_attack = true;
            zz_y7.flag_buff = false;
            zz_y7.flag_buff2 = false;
            --------- Code ----------
            zz_y7.bool_setSkillCode = false;
            zz_y7.skillCode = 100
            zz_y7.buffCode_1 = 100
            zz_y7.buffCode_2 = 100
            zz_y7.useCount = 1
            zz_y7.posPlayer = {}
            zz_y7.Dupe_Pos = {}
            zz_y7.auto_safe_timer= {}
            zz_y7.auto_safe_count = 0
            zz_y7.auto_safe_time = 0
            zz_y7.AttackCount = 0
            zz_y7.restAttack = 0

            --------- custom functions ---------
            zz_y7.filter_only_live_mobs = function (hit,temp,output)
                if (hit > 0) then
                    local count = 0
                    for _,c in ipairs(temp) do
                        ---@type MobComponent
                        local mob = c.Entity.MobComponent
                        if (mob.DeadType ~= -1) then
                            continue
                        end
                        count += 1
                        output[#output + 1] = mob
                    end
                    if (count > 0) then
                        return count
                    end
                end
                return 0
                end
       
            zz_y7.is_someone_in_world = function()
                local map_name = _UserService.LocalPlayer.CurrentMapName
                local entities = _UserService:GetUsersByMapName(map_name)
                return #entities ~= 1
            end
       
            zz_y7.play_timer_func = function(self)
                local output = {}
                local box = BoxShape(Vector2(0.0, 0.0), Vector2(50.0, 5.0), 0)
                local simulator = _CollisionService:GetSimulator(_UserService.LocalPlayer.WsCharacterData.Entity)
                local temp = {}
                local output2 = {}
                local hit = simulator:OverlapAllFast(CollisionGroups.MapleMob, box, temp)
                local count = zz_y7.filter_only_live_mobs(hit, temp, output)
                if count == 0 then return end
                if zz_y7.is_someone_in_world() then return end
                zz_y7.teleported_to_mob = false;
               
                local player_pos = _UserService.LocalPlayer.TransformComponent.WorldPosition
                local distance = 100.0
                local mob = {}
                for i,v in ipairs(output) do
                    local mob_pos = v.Entity.TransformComponent.WorldPosition
                    local dx = mob_pos.x - player_pos.x
                    local dy = mob_pos.y - player_pos.y
                   
                    local dis = math.sqrt(math.pow(dx,2) + math.pow(dy,2))
                   
                    if(distance > dis) then
                        distance = dis
                        mob = mob_pos
                    end
                end
               
                local x = mob.x - player_pos.x -1.5
                local y = mob.y - player_pos.y
               
                --- 사람이 2명 이상일때 ----
                if zz_y7.is_someone_in_world() then
                    --- 만약에 듀프가 실해중이라면 ---
                    if zz_y7.use_momo then

                        ---- 듀프 종료 ----
                        zz_y7.use_momo = false 

                        --- 테스트 ---
                        zz_y7.dupe_func()
                        ---- 현재 포지션을 저장 ----
                        zz_y7.posPlayer = _UserService.LocalPlayer.TransformComponent.WorldPosition
                        ---- 밖으로 튕겨나감 ----
                        --_UserService.LocalPlayer.TransformComponent:Translate( 200 , 200)
                        zz_y7.auto_safe_count = 0
                        zz_y7.auto_safe_timer = _TimerService:SetTimerRepeat(zz_y7.telport_func, 1)
                        --zz_y7.telport_func()
                    end
                    return
                ---- 나 혼자 맵에 있을때 ----
                else
                    --- 만약에 듀프가 실행상태가 아니라면 ---
                    if not zz_y7.use_momo then
                        ---- 듀프를 킨다 ----
                        zz_y7.use_momo = true           
                        --- 테스트 ---
                        --zz_y7.dupe_func()
                        zz_y7.flag_attack = true
                        ---- 플레이어가 저장된 위치로 이동한다. ----
                        _UserService.LocalPlayer.TransformComponent.WorldPosition = zz_y7.posPlayer

                    end
                end
                _UserService.LocalPlayer.TransformComponent:Translate( x , y)
                -- zz_y7.useCount += 1
                -- if  zz_y7.useCount> 100 then
                --    if zz_y7.isMove then
                --        _UserService.LocalPlayer.TransformComponent:Translate( 0.1 , 0)
                --        zz_y7.isMove = false
                --    else
                --        _UserService.LocalPlayer.TransformComponent:Translate( -0.1 , 0)
                --        zz_y7.isMove = true
                --    end
                --    zz_y7.useCount = 0
                -- end
            end
       
            zz_y7.hit_timer_func = function(self)
                if not zz_y7.flag_attack then return end
                _UserService.LocalPlayer.TransformComponent.WorldPosition = zz_y7.Dupe_Pos
                    if(zz_y7.flag_activeSkill )then
                        _PlayerActiveSkillLogic:DoActiveSkill(zz_y7.skillCode, false)
                        return
                    end
                _PlayerAttackLogic_Melee:TryDoingMeleeAttack(_UserService.LocalPlayer, 0, 0, nil, 0, 0)
            end

            zz_y7.telport_func = function(self)
                zz_y7.auto_safe_count += 1
                if zz_y7.auto_safe_count > zz_y7.auto_safe_time then
                zz_y7.flag_attack = false
                _UserService.LocalPlayer.TransformComponent:Translate( 200 , 200)
                _TimerService:ClearTimer(zz_y7.auto_safe_timer)
                end
            end


           
            -------------------- 자동줍기 --------------------
            zz_y7.auto_root_func = function(self)
                _UserService.LocalPlayer.WsUserController:ActionPickUp()
            end
            -------------------- 자동버프 --------------------
            -------------------- 자동물약 --------------------
            -- zz_y7.auto_pos_func = function(self)
                -- local hp = _UserService.LocalPlayer.WsUser.Hp
                -- local mp = _UserService.LocalPlayer.WsUser.Mp
               
                -- if (hp < 50) then
                    -- _ItemConsumeLogic:TryConsumeFromFuncKey(2000001) --> 주황포션
                -- end
                -- if (mp < 100) then
                    -- _ItemConsumeLogic:TryConsumeFromFuncKey(2000003) --> 파란포션
                -- end
            -- end
           
            --------------------- 펫 먹이 -----------------------------
            zz_y7.auto_pat_func = function(self)
                _ItemConsumeLogic:TryConsumeFromFuncKey(2120000)
                _ItemConsumeLogic:TryConsumeFromFuncKey(2120008)
            end

            -------------------- 버프 설정 ------------------------

            zz_y7.auto_buff1_func = function(self)
                if zz_y7.is_someone_in_world() then return end
                zz_y7.flag_attack = false
                _PlayerActiveSkillLogic:DoActiveSkill(zz_y7.buffCode_1, false)
                zz_y7.flag_attack = true
            end

            zz_y7.auto_buff2_func = function(self)
                if zz_y7.is_someone_in_world() then return end
                zz_y7.flag_attack = false
                _PlayerActiveSkillLogic:DoActiveSkill(zz_y7.buffCode_2, false)
                zz_y7.flag_attack = true
            end
           
            zz_y7.dupe_pos = function(self)
                zz_y7.Dupe_Pos = _UserService.LocalPlayer.TransformComponent.WorldPosition
            end

           
            --------------------- 듀프 설정 ------------------------
            zz_y7.dupe_func = function(self)
                if zz_y7.is_someone_in_world() then return end
                local output = {}
                local box = BoxShape(Vector2(0.0, 0.0), Vector2(300.0, 300.0), 0) --> i think 0 still god cuzof size
                local simulator = _CollisionService:GetSimulator(_UserService.LocalPlayer.WsCharacterData.Entity) --> if not working, lets put map's one
                local temp = {}
                local output2 = {}
                local hit = simulator:OverlapAllFast(CollisionGroups.MapleMob, box, temp)
                local count = zz_y7.filter_only_live_mobs(hit, temp, output)
                if count == 0 then return end

                for i,v in ipairs(output) do
                    _MobWalkLogic:UpdateMovePath(v.Entity)
                end
            end

       
           
            ---------------- zz_y7 ----------------
       
       
       
           
       
            _ChatMessageLogic:Add(_ChatMessageType.Yellow, "\n /? ")
            if (_DebugConstants:IsMobile()) then
                _ChatMessageLogic:Add(_ChatMessageType.Blue, "모바일 환경에서 접속하셨습니다. 현재 모바일 환경에서 원활한 플레이는 다소 어려움을 유의하시기 바랍니다.")
            end
            _ExpDropRate:CheckPrintCurrentRateEvent()
        end
       
        app:SetLoginGroupEnabled(isLoginMap)
        app:ChangeBGM(bgm)
        self.ChangedFieldCounter = fieldCounter
        local cam = self.Entity.CameraComponent
        cam.ZoomRatio = 107
        _PlayerActiveSkillLogic_Teleport:ResetCamera()
        app:CloseAllTooltip()
        _MapEffectLogic:CancelEffectScreen()
        --collectgarbage()
       
        _AppService:Get().FadeScreen:FadeIn(function()
            mapInfo:OnAfterFadeIn()
        end)
       
        _ChatSystemLogic.ProcessingWhisperOnClient = 0
        local party = app.ControlWindowMan.UserList.UserListComponent.Party
        party.Online:UpdateMembersMap()
        party.HpBarEntity.PartyHPComponent:UpdatePartyMemberHPInCurrentMap()
        end

    2024.01.30 11:41
    회원프로필

    알아서 하세요.

    2024.01.30 11:41
    회원프로필

    위에 있는글 복사해서 쓰세요. 기능 잇는것만쓰고없는거지운다음

    2024.01.30 11:42

      게시글 리스트
      제목작성자작성일조회
      2253401-30191
      2253301-30209
      2253201-30439
      2253101-30280
      2253001-30235
      2252901-30167
      2252801-30181
      2252701-30557
      2252601-30641
      2252501-30250
      2252401-30291
      2252301-30130
      2252201-30302
      2252101-30233
      2252001-30110
      2251901-30300
      2251801-30162
      2251701-30227
      2251601-30643
      2251501-30715
      안내 배너 이미지