--------- flag ----------
zz_y7.is_others = false;
zz_y7.teleported_to_mob = false;
--------- 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)
--[[
_PlayerAttackLogic:PlayAction(_UserService.LocalPlayer
, _UserService.LocalPlayer.AvatarRendererComponent:GetBodyEntity()
, nil
, _CharacterAction:GetActionString(_CharacterAction.SWINGT1)
, 0
)
]]
local output = {}
--> BoxShape(vec2, vec2, angle)
--> TryDoingMeleeAttack(self, user, skillId, skillLevel, output, lastFinalAttack)
--> OverlapAllFast(CollisionGroup, Shape, output)
local box = BoxShape(Vector2(0.0, 0.0), Vector2(100.0, 100.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 output = {}
local output2 = {}
local hit = simulator:OverlapAllFast(CollisionGroups.MapleMob, box, temp)
local count = zz_y7.filter_only_live_mobs(hit, temp, output)
_ChatMessageLogic:Add(_ChatMessageType.System, "남은 몹 수: " .. count)
if count == 0 then return end
zz_y7.teleported_to_mob = false;
for i,v in ipairs(output) do
local mob_pos = v.Entity.TransformComponent.WorldPosition
if zz_y7.is_someone_in_world() then return end
-- to do: change lookat
zz_y7.teleported_to_mob = true;
break
end
end
zz_y7.hit_timer_func = function(self)
if zz_y7.teleported_to_mob then
_PlayerActiveSkillLogic:DoActiveSkill(_UserService.LocalPlayer, 0, 0, output2, 0)
_UserService.LocalPlayer.WsUserController:ActionPickUp()
end
end| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 공지 | 게시판 이용 안내+156 | 10-20 | 22391 | |
| 61796 | 14:20 | 7 | ||
| 61795 | 12-31 | 194 | ||
| 61794 | 12-31 | 246 | ||
| 61793 | 12-30 | 441 | ||
| 61792 | 12-28 | 739 | ||
| 61791 | 12-28 | 777 | ||
| 61790 | 12-26 | 985 | ||
| 61789 | 12-25 | 1149 | ||
| 61788 | 12-25 | 1080 | ||
| 61787 | 12-24 | 1372 | ||
| 61786 | 12-23 | 1744 | ||
| 61785 | 12-22 | 1726 | ||
| 61784 | 12-22 | 1892 | ||
| 61783 | 12-22 | 1675 | ||
| 61782 | 12-21 | 1731 | ||
| 61781 | 12-21 | 1928 | ||
| 61780 | 12-21 | 1838 | ||
| 61779 | 12-19 | 2015 | ||
| 61778 | 12-18 | 2100 |
댓글0