사이트 로그인
2024.03.31 17:15
Magic 전체노획 {
set @id, myid();
set @sd, mysd();
if(get_mp(@sd) < 1000)
{
message @sd, 3, "마력이 부족합니다.";
end;
}
set_mp @sd, get_mp(@sd) - 1000;
action @id, 6, 30, 37;
effect @id, 462;
magic_delay @sd, 15;
message @sd, 3, "전체 노획을 외웠습니다.";
set @x1, get_x(@id)-7;
set @x2, get_x(@id)+7;
set @y1, get_y(@id)-7;
set @y2, get_y(@id)+7;
if (@x1 < 0) { set @x1, 0; }
if (@x2 > get_mapwidth(@sd) -1) { set @x2, get_mapwidth(@sd) -1; }
if (@y1 < 0) { set @y1, 0; }
if (@y2 > get_mapheight(@sd)-1) { set @y2, get_mapheight(@sd) -1; }
for (set @i, @x1; @i <= @x2; set @i, @i+1)
{
for (set @j, @y1; @j<=@y2; set @j, @j+1)
{
set @target, obj_getxy(@i, @j);
set @istype, istype(@target);
if(@istype != 0) continue;
getitem @sd, @i, @j;
}
}
}