--------- 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 | 22138 | |
| 61681 | 03:18 | 10 | ||
| 61680 | 00:43 | 73 | ||
| 61679 | 11-15 | 48 | ||
| 61678 | 11-15 | 45 | ||
| 61677 | 11-15 | 232 | ||
| 61676 | 11-14 | 285 | ||
| 61675 | 11-14 | 350 | ||
| 61674 | 11-14 | 317 | ||
| 61673 | 11-14 | 296 | ||
| 61672 | 11-13 | 395 | ||
| 61671 | 11-13 | 473 | ||
| 61670 | 11-13 | 449 | ||
| 61669 | 11-13 | 407 | ||
| 61668 | 11-13 | 419 | ||
| 61667 | 11-13 | 442 | ||
| 61666 | 11-13 | 566 | ||
| 61665 | 11-12 | 570 | ||
| 61664 | 11-12 | 591 | ||
| 61663 | 11-12 | 654 |
댓글0