맵제한 펑션
Func 귀환펑션 {
set @map, get_parentmapid(@sd);
switch(@map)
{
case 2:
a:
set @warp, rand(1,4);
if(@warp == 1) { set @x, rand(15,16); set @y, 14; }
else if(@warp == 2) { set @x, rand(15,16); set @y, 14; }
else if(@warp == 3) { set @x, rand(15,16); set @y, 14; }
else if(@warp == 4) { set @x, rand(15,16); set @y, 14; }
if(rand(1,4) == 1)
{
warp @sd, 10001, @x, @y;
}
else
{
warp @sd, 10001, @x, @y;
}
sound @id, 0, 33;
break;
case 88:
goto a;
case 197:
goto a;
case 220:
set @warp, rand(1,4);
if(@warp == 1) { set @x, rand(3,4); set @y, 6; }
else if(@warp == 2) { set @x, rand(7,8); set @y, 6; }
else if(@warp == 3) { set @x, rand(3,4); set @y, 9; }
else if(@warp == 4) { set @x, rand(7,8); set @y, 9; }
warp @sd, 222, @x, @y;
sound @id, 0, 33;
break;
case 232:
goto a;
case 266:
goto a;
case 284:
goto a;
case 295:
set @warp, rand(1,6);
if(@warp == 1) { set @x, rand(5,6); set @y, 5; }
else if(@warp == 2) { set @x, rand(11,12); set @y, 5; }
else if(@warp == 3) { set @x, rand(17,18); set @y, 5; }
else if(@warp == 4) { set @x, rand(5,6); set @y, 8; }
else if(@warp == 5) { set @x, rand(11,12); set @y, 8; }
else if(@warp == 6) { set @x, rand(17,18); set @y, 8; }
warp @sd, 296, @x, @y;
sound @id, 0, 33;
break;
case 342:
set @x, rand(13,15); set @y, rand(13,15);
warp @sd, 343, @x, @y;
sound @id, 0, 33;
break;
case 397:
set @x, rand(13,15); set @y, rand(13,15);
warp @sd, 398, @x, @y;
sound @id, 0, 33;
break;
case 431:
goto a;
case 578:
goto a;
case 636:
set @warp, rand(1,4);
if(@warp == 1) { set @x, rand(3,4); set @y, 5; }
else if(@warp == 2) { set @x, rand(7,8); set @y, 5; }
else if(@warp == 3) { set @x, rand(3,4); set @y, 9; }
else if(@warp == 4) { set @x, rand(7,8); set @y, 9; }
warp @sd, 637, @x, @y;
sound @id, 0, 33;
break;
case 809:
set @warp, rand(1,4);
if(@warp == 1) { set @x, rand(3,4); set @y, 5; }
else if(@warp == 2) { set @x, rand(7,8); set @y, 5; }
else if(@warp == 3) { set @x, rand(3,4); set @y, 9; }
else if(@warp == 4) { set @x, rand(7,8); set @y, 9; }
warp @sd, 810, @x, @y;
sound @id, 0, 33;
break;
case 1201:
goto a;
case 1283:
set @x, rand(9,12); set @y, rand(13,15);
warp @sd, 1284, @x, @y;
sound @id, 0, 33;
break;
case 1389:
set @x, rand(7,10); set @y, rand(11,13);
warp @sd, 1411, @x, @y;
sound @id, 0, 33;
break;
case 2935:
set @warp, rand(1,4);
if(@warp == 1) { set @x, rand(3,4); set @y, 6; }
else if(@warp == 2) { set @x, rand(7,8); set @y, 6; }
else if(@warp == 3) { set @x, rand(3,4); set @y, 11; }
else if(@warp == 4) { set @x, rand(7,8); set @y, 11; }
warp @sd, 2936, @x, @y;
sound @id, 0, 33;
break;
case 3444:
goto a;
case 3684:
set @x, rand(13,18); set @y, 28;
warp @sd, 3684, @x, @y;
sound @id, 0, 33;
break;
case 3721:
set @x, rand(13,15); set @y, 26;
warp @sd, 3721, @x, @y;
sound @id, 0, 33;
break;
case 3734:
set @x, 58; set @y, rand(17,21);
warp @sd, 3734, @x, @y;
sound @id, 0, 33;
break;
case 3747:
set @x, rand(11,19); set @y, 28;
warp @sd, 3747, @x, @y;
sound @id, 0, 33;
break;
case 3768:
set @x, rand(4,7); set @y, 19;
warp @sd, 3768, @x, @y;
sound @id, 0, 33;
break;
case 3887:
goto a;
case 4158:
set @x, rand(55,61); set @y, rand(53,57);
warp @sd, 4158, @x, @y;
sound @id, 0, 33;
break;
default:
message @sd, 3, "이곳에서 사용할 수 없습니다.";
end;
}
if(get_hp(@sd) != get_maxhp(@sd) || get_mp(@sd) != get_maxmp(@sd))
{
if(get_hp(@sd) != get_maxhp(@sd))
{
effect @id, 254;
heal_hp @id, get_maxhp(@sd);
}
if(get_mp(@sd) != get_maxmp(@sd))
{
effect @id, 253;
heal_mp @id, get_maxmp(@sd);
}
sound @id, 0, 503;
}
return;
}

윤북 님의 최근 댓글