--------- 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| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 15976 | 01-24 | 276 | ||
| 15975 | 01-24 | 279 | ||
| 15974 | 01-24 | 458 | ||
| 15973 | 따모 매크로+1 | 01-24 | 411 | |
| 15972 | 01-24 | 173 | ||
| 15971 | 01-24 | 311 | ||
| 15970 | 01-24 | 205 | ||
| 15969 | 01-24 | 108 | ||
| 15968 | 01-24 | 136 | ||
| 15967 | 01-24 | 403 | ||
| 15966 | 01-24 | 308 | ||
| 15965 | 01-24 | 167 | ||
| 15964 | 01-24 | 244 | ||
| 15963 | 01-24 | 406 | ||
| 15962 | 01-24 | 251 | ||
| 15961 | 01-24 | 131 | ||
| 15960 | 01-24 | 274 | ||
| 15959 | 01-24 | 275 | ||
| 15958 | 01-24 | 253 | ||
| 15957 | 01-24 | 374 |
댓글0