f1 체마사기
ONKEYF1 {
set @sd, mysd();
set @id, myid();
set @job, get_job(@sd);
set @joblv, get_joblevel(@sd);
set @purehp, get_purehp(@sd);
set @puremp, get_puremp(@sd);
image 0, 74, 0;
set @pos, dialog(0, 0, 1, "현재 경험치 보유량\\n일억경 : " + $saveexp_p_one + " 개\\n십억경 : " + $saveexp_p + " 개");
if(@pos == 0) end;
for(set @i, 0; @i < 8; set @i, @i+1)
{
if(get_equip(@sd, @i) != -1)
{
set @pos, dialog(0, 0, 0, "아이템을 하나라도 착용하고 있으면 날 만날 수 없네!");
end;
}
}
if(get_level(@sd) < 99)
{
set @pos, dialog(0, 0, 0, "수련을 더 쌓으시게..");
end;
}
else
{
set @pos, list2(@list, 0, 0, "바라는 것이 무엇인가?", "체력사기", "마력사기");
if(@pos == 0) end;
else if(@list == 1)
{
if(@job == 1) { setarray @limit_hp[0], 140000, 300000, 1200000, 2400000, 3500000; }
else if(@job == 2) { setarray @limit_hp[0], 130000, 300000, 1200000, 2400000, 3500000; }
else if(@job == 3) { setarray @limit_hp[0], 60000, 300000, 600000, 1300000, 1600000; }
else if(@job == 4) { setarray @limit_hp[0], 50000, 160000, 5000000, 1200000, 1600000; }
else end;
if(@limit_hp[@joblv] < @purehp)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 1, "아직도 승급을 하지 않았다니..\\n\\n일단 승급을 한 뒤에 다시 오도록!");
end;
}
else
{
set @pos, input2(@var, 0, 2, "십억경 몇개를 교환하시겠어요?", "", "(최대99)");
if(@pos == 0 || @var< 0) { deletearray @limit_hp[0], getarraysize(@limit_hp); end; }
else if(get_joblevel(@sd) <= 3 && @var > 3)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 0, get_joblevel(@sd)+"차 승급자는 3개 미만으로만 교환이 가능합니다.");
end;
}
else if($saveexp_p < @var)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 0, "십억경이 부족하네.\\n\\n현재 십억경 : " + $saveexp_p + "");
end;
}
else
{
if(@job == 1 || @job == 2)
{
setarray @calc_hp[0], 1, 800000, 1000000, 1200000, 1500000, 1700000, 2000000, 2200000, 2500000, 3000000, 3100000, 3200000, 3300000, 3400000, 3500000, 3500000;
setarray @plus_hp[0], 5000, 2500, 1000, 500, 250, 175, 125, 95, 40, 25, 12, 5, 2, 1;
}
else if(@job == 3 || @job == 4)
{
setarray @calc_hp[0], 1, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 1100000, 1200000, 1250000, 1300000, 1400000, 1500000, 1600000, 1600000;
setarray @plus_hp[0], 5000, 2500, 1000, 500, 250, 175, 125, 95, 40, 25, 12, 5, 2, 1;
}
else { deletearray @limit_hp[0], getarraysize(@limit_hp); end; }
set @curhp, @purehp;
set @used_cnt, 0;
// 최대 @var 번까지 1개씩 적용 시도
for(set @cnt, 0; @cnt < @var; set @cnt, @cnt+1)
{
set @loop, 0;
set @found, 0;
// 현재 체력이 어느 구간(calc_hp)에 속하는지 다시 계산
for(set @loop, 0; @loop < (getarraysize(@calc_hp)-1); set @loop, @loop+1)
{
if(@curhp >= @calc_hp[@loop] && @curhp < @calc_hp[@loop+1])
{
set @found, 1;
set @delta_hp, @plus_hp[@loop];
set @next_hp, @curhp + @delta_hp;
// 상한(승급별 최대 체력, 절대 최대 체력) 체크
if(@next_hp > @limit_hp[@joblv] || @next_hp > @calc_hp[getarraysize(@calc_hp)-1])
{
// 더 이상 올릴 수 없으니 루프 종료
set @cnt, @var;
}
else
{
// 이번 십억경 1개 적용
set @curhp, @next_hp;
set @used_cnt, @used_cnt+1;
}
// 내부 for 탈출
set @loop, getarraysize(@calc_hp);
}
}
// 해당하는 구간을 못 찾으면 종료
if(@found == 0)
{
set @cnt, @var;
}
}
// 배열 정리
deletearray @limit_hp[0], getarraysize(@limit_hp);
deletearray @calc_hp[0], getarraysize(@calc_hp);
deletearray @plus_hp[0], getarraysize(@plus_hp);
if(@used_cnt == 0)
{
set @pos, dialog(0, 0, 0, "십억경 교환 갯수를 조금 줄여주게나.");
end;
}
else
{
set $saveexp_p, $saveexp_p-@used_cnt;
set_purehp @sd, @curhp;
set_hp @sd, get_maxhp(@sd);
if(@used_cnt < @var)
{
set @pos, dialog(0, 0, 1, "요청한 " + @var + "개 중 " + @used_cnt + "개만 체력으로 교환되었네.");
}
else
{
set @pos, dialog(0, 0, 1, "능력치를 정상적으로 올려주었네.");
}
end;
}
deletearray @limit_hp[0], getarraysize(@limit_hp);
deletearray @calc_hp[0], getarraysize(@calc_hp);
deletearray @plus_hp[0], getarraysize(@plus_hp);
set @pos, dialog(0, 0, 0, "자네는 이미 최고의 경지에 이르렀네.");
end;
}
}
}
else if(@list == 2)
{
if(@job == 1 || @job == 2) { setarray @limit_mp[0], 750000, 750000, 750000, 750000, 750000; }
else if(@job == 3) { setarray @limit_mp[0], 50000, 200000, 850000, 1800000, 1800000; }
else if(@job == 4) { setarray @limit_mp[0], 50000, 140000, 500000, 1500000, 1800000; }
else end;
if(@limit_mp[@joblv] < @puremp)
{
deletearray @limit_mp[0], getarraysize(@limit_mp);
set @pos, dialog(0, 0, 1, "아직도 승급을 하지 않았다니..\\n\\n일단 승급을 한 뒤에 다시 오도록!");
end;
}
else
{
set @pos, input2(@var, 0, 2, "십억경 몇개를 교환하시겠어요?", "", "(최대99)");
if(@pos == 0 || @var < 0) { deletearray @limit_mp[0], getarraysize(@limit_mp); end; }
else if(get_joblevel(@sd) <= 3 && @var > 3)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 0, get_joblevel(@sd)+"차 승급자는 3개 미만으로만 교환이 가능합니다.");
end;
}
else if($saveexp_p < @var)
{
deletearray @limit_mp[0], getarraysize(@limit_mp);
set @pos, dialog(0, 0, 0, "십억경이 부족하네.\\n\\n현재 십억경 : " + $saveexp_p + "");
end;
}
else
{
if(@job == 1 || @job == 2)
{
setarray @calc_mp[0], 1, 100000, 150000, 200000, 250000, 300000, 400000, 450000, 500000, 550000, 600000, 650000, 700000, 750000, 800000, 800000;
setarray @plus_mp[0], 2500, 1250, 500, 250, 150, 125, 65, 40, 25, 12, 6, 3, 1, -1;
}
else if(@job == 3 || @job == 4)
{
setarray @calc_mp[0], 1, 600000, 700000, 800000, 900000, 1000000, 1100000, 1200000, 1400000, 1550000, 1600000, 1650000, 1700000, 1750000, 1800000, 1800000;
setarray @plus_mp[0], 2500, 1250, 500, 250, 125, 65, 60, 40, 22, 12, 6, 3, 1, -1;
}
else { deletearray @limit_mp[0], getarraysize(@limit_mp); end; }
// ★ 여기부터 원래 for(@loop) ~ if(@plus_puremp ...) 블럭 전체를 삭제하고 교체 ★
set @curmp, @puremp;
set @used_cnt, 0;
for(set @cnt, 0; @cnt < @var; set @cnt, @cnt+1)
{
set @loop, 0;
set @found, 0;
// 현재 마력이 어느 구간(calc_mp)에 속하는지 다시 계산
for(set @loop, 0; @loop < (getarraysize(@calc_mp)-1); set @loop, @loop+1)
{
if(@curmp >= @calc_mp[@loop] && @curmp < @calc_mp[@loop+1])
{
set @found, 1;
set @delta_mp, @plus_mp[@loop];
// 마지막 구간에서 @delta_mp 가 0 이하(감소구간)라면 여기서 더 이상 올리지 않음
if(@delta_mp <= 0)
{
set @cnt, @var;
}
else
{
set @next_mp, @curmp + @delta_mp;
if(@next_mp > @limit_mp[@joblv] || @next_mp > @calc_mp[getarraysize(@calc_mp)-1])
{
set @cnt, @var;
}
else
{
set @curmp, @next_mp;
set @used_cnt, @used_cnt+1;
}
}
set @loop, getarraysize(@calc_mp);
}
}
if(@found == 0)
{
set @cnt, @var;
}
}
deletearray @limit_mp[0], getarraysize(@limit_mp);
deletearray @calc_mp[0], getarraysize(@calc_mp);
deletearray @plus_mp[0], getarraysize(@plus_mp);
if(@used_cnt == 0)
{
set @pos, dialog(0, 0, 0, "십억경 교환 갯수를 조금 줄여주게나.");
end;
}
else
{
set $saveexp_p, $saveexp_p-@used_cnt;
set_puremp @sd, @curmp;
set_mp @sd, get_maxmp(@sd);
if(@used_cnt < @var)
{
set @pos, dialog(0, 0, 1, "요청한 " + @var + "개 중 " + @used_cnt + "개만 마력으로 교환되었네.");
}
else
{
set @pos, dialog(0, 0, 1, "능력치를 정상적으로 올려주었네.");
}
end;
}
deletearray @limit_mp[0], getarraysize(@limit_mp);
deletearray @calc_mp[0], getarraysize(@calc_mp);
deletearray @plus_mp[0], getarraysize(@plus_mp);
set @pos, dialog(0, 0, 0, "자네는 이미 최고의 경지에 이르렀네.");
end;
}
}
}
}
}
//한계 제거 버전
ONKEYF1 {
set @sd, mysd();
set @id, myid();
set @job, get_job(@sd);
set @joblv, get_joblevel(@sd);
set @purehp, get_purehp(@sd);
set @puremp, get_puremp(@sd);
set @beforestatsHP, @purehp;
set @beforestatsMP, @puremp;
set @boolfalg, 1;
image 0, 74, 0;
set @pos, dialog(0, 0, 1, "현재 경험치 보유량\\n일억경 : " + $saveexp_p_one + " 개\\n십억경 : " + $saveexp_p + " 개");
if(@pos == 0) end;
for(set @i, 0; @i < 8; set @i, @i+1)
{
if(get_equip(@sd, @i) != -1)
{
set @pos, dialog(0, 0, 0, "아이템을 하나라도 착용하고 있으면 날 만날 수 없네!");
end;
}
}
if(get_level(@sd) < 99)
{
set @pos, dialog(0, 0, 0, "수련을 더 쌓으시게..");
end;
}
else
{
set @pos, list2(@list, 0, 0, "바라는 것이 무엇인가?", "체력사기", "마력사기");
if(@pos == 0) end;
else if(@list == 1)
{
if(@job == 1) { setarray @limit_hp[0], 9999999, 9999999, 9999999, 9999999, 9999999, 9999999; }
else if(@job == 2) { setarray @limit_hp[0], 9999999, 9999999, 9999999, 9999999, 9999999, 9999999; }
else if(@job == 3) { setarray @limit_hp[0], 9999999, 9999999, 9999999, 9999999, 9999999, 9999999; }
else if(@job == 4) { setarray @limit_hp[0], 9999999, 9999999, 9999999, 9999999, 9999999, 9999999; }
else end;
if(@limit_hp[@joblv] < @purehp)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 1, "아직도 승급을 하지 않았다니..\\n\\n일단 승급을 한 뒤에 다시 오도록!");
end;
}
else
{
set @pos, input2(@var, 0, 2, "십억경 몇개를 교환하시겠어요?", "", "(최대99)");
if(@pos == 0 || @var< 0) { deletearray @limit_hp[0], getarraysize(@limit_hp); end; }
else if(get_joblevel(@sd) <= 3 && @var > 3)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 0, get_joblevel(@sd)+"차 승급자는 3개 미만으로만 교환이 가능합니다.");
end;
}
else if($saveexp_p < @var)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 0, "십억경이 부족하네.\\n\\n현재 십억경 : " + $saveexp_p + "");
end;
}
else
{
if(@job == 1 || @job == 2)
{
setarray @calc_hp[0], 1, 800000, 1000000, 1200000, 1500000, 3000000, 4500000, 6000000, 7500000, 9999999;
setarray @plus_hp[0], 5000, 2500, 1000, 500, 450, 400, 350, 300, 250;
}
else if(@job == 3 || @job == 4)
{
setarray @calc_hp[0], 1, 400000, 500000, 600000, 700000, 2000000, 3000000, 3750000,4500000,5000000;
setarray @plus_hp[0], 5000, 2500, 1000, 500, 450, 400, 350, 300, 250;
}
else { deletearray @limit_hp[0], getarraysize(@limit_hp); end; }
set @curhp, @purehp;
set @used_cnt, 0;
// 최대 @var 번까지 1개씩 적용 시도
for(set @cnt, 0; @cnt < @var; set @cnt, @cnt+1)
{
set @loop, 0;
set @found, 0;
// 현재 체력이 어느 구간(calc_hp)에 속하는지 다시 계산
for(set @loop, 0; @loop < (getarraysize(@calc_hp)-1); set @loop, @loop+1)
{
if(@curhp >= @calc_hp[@loop] && @curhp < @calc_hp[@loop+1])
{
set @found, 1;
set @delta_hp, @plus_hp[@loop];
set @next_hp, @curhp + @delta_hp;
// 상한(승급별 최대 체력, 절대 최대 체력) 체크
if(@next_hp > @limit_hp[@joblv] || @next_hp > @calc_hp[getarraysize(@calc_hp)-1])
{
// 더 이상 올릴 수 없으니 루프 종료
set @cnt, @var;
}
else
{
// 이번 십억경 1개 적용
set @curhp, @next_hp;
set @used_cnt, @used_cnt+1;
}
// 내부 for 탈출
set @loop, getarraysize(@calc_hp);
}
}
// 해당하는 구간을 못 찾으면 종료
if(@found == 0)
{
set @cnt, @var;
}
}
// 배열 정리
deletearray @limit_hp[0], getarraysize(@limit_hp);
deletearray @calc_hp[0], getarraysize(@calc_hp);
deletearray @plus_hp[0], getarraysize(@plus_hp);
if(@used_cnt == 0)
{
set @pos, dialog(0, 0, 0, "십억경 교환 갯수를 조금 줄여주게나.");
end;
}
else
{
set $saveexp_p, $saveexp_p-@used_cnt;
set_purehp @sd, @curhp;
set_hp @sd, get_maxhp(@sd);
if(@used_cnt < @var)
{
set @pos, dialog(0, 0, 1, "요청한 " + @var + "개 중 " + @used_cnt + "개만 체력으로 교환되었네.");
}
else
{
set @pos, dialog(0, 0, 1, "능력치를 정상적으로 올려주었네.\\n\\n"+ @beforestatsHP+" -> "+ @curhp+"\\n\\n사용한 십억경 : "+@used_cnt+"\\n\\n10억당 : "+@delta_hp);
}
end;
}
deletearray @limit_hp[0], getarraysize(@limit_hp);
deletearray @calc_hp[0], getarraysize(@calc_hp);
deletearray @plus_hp[0], getarraysize(@plus_hp);
set @pos, dialog(0, 0, 0, "자네는 이미 최고의 경지에 이르렀네.");
end;
}
}
}
else if(@list == 2)
{
if(@job == 1 || @job == 2) { setarray @limit_mp[0], 9999999, 9999999, 9999999, 9999999, 9999999, 9999999; }
else if(@job == 3) { setarray @limit_mp[0], 9999999, 9999999, 9999999, 9999999, 9999999, 9999999; }
else if(@job == 4) { setarray @limit_mp[0], 9999999, 9999999, 9999999, 9999999, 9999999, 9999999; }
else end;
if(@limit_mp[@joblv] < @puremp)
{
deletearray @limit_mp[0], getarraysize(@limit_mp);
set @pos, dialog(0, 0, 1, "아직도 승급을 하지 않았다니..\\n\\n일단 승급을 한 뒤에 다시 오도록!");
end;
}
else
{
set @pos, input2(@var, 0, 2, "십억경 몇개를 교환하시겠어요?", "", "(최대99)");
if(@pos == 0 || @var < 0) { deletearray @limit_mp[0], getarraysize(@limit_mp); end; }
else if(get_joblevel(@sd) <= 3 && @var > 3)
{
deletearray @limit_hp[0], getarraysize(@limit_hp);
set @pos, dialog(0, 0, 0, get_joblevel(@sd)+"차 승급자는 3개 미만으로만 교환이 가능합니다.");
end;
}
else if($saveexp_p < @var)
{
deletearray @limit_mp[0], getarraysize(@limit_mp);
set @pos, dialog(0, 0, 0, "십억경이 부족하네.\\n\\n현재 십억경 : " + $saveexp_p + "");
end;
}
else
{
if(@job == 1 || @job == 2)
{
setarray @calc_mp[0], 1, 100000, 150000, 200000, 250000,625000,1000000,1375000,1750000,2125000,2500000,2875000,3250000,3625000,4000000,4375000, 5000000;
setarray @plus_mp[0], 250,225,200,175,150,125,100,75,50,25,25,25,25;
}
else if(@job == 3 || @job == 4)
{
setarray @calc_mp[0], 1, 600000, 700000, 800000, 900000,1650000,2400000,3150000,3900000,4650000,5400000,6150000,6900000,7650000,8400000,9999999;
setarray @plus_mp[0], 2500, 1250, 500, 250,225,200,175,150,125,100,75,50,25,25,25;
}
else { deletearray @limit_mp[0], getarraysize(@limit_mp); end; }
// ★ 여기부터 원래 for(@loop) ~ if(@plus_puremp ...) 블럭 전체를 삭제하고 교체 ★
set @curmp, @puremp;
set @used_cnt, 0;
for(set @cnt, 0; @cnt < @var; set @cnt, @cnt+1)
{
set @loop, 0;
set @found, 0;
// 현재 마력이 어느 구간(calc_mp)에 속하는지 다시 계산
for(set @loop, 0; @loop < (getarraysize(@calc_mp)-1); set @loop, @loop+1)
{
if(@curmp >= @calc_mp[@loop] && @curmp < @calc_mp[@loop+1])
{
set @found, 1;
set @delta_mp, @plus_mp[@loop];
// 마지막 구간에서 @delta_mp 가 0 이하(감소구간)라면 여기서 더 이상 올리지 않음
if(@delta_mp <= 0)
{
set @cnt, @var;
}
else
{
set @next_mp, @curmp + @delta_mp;
if(@next_mp > @limit_mp[@joblv] || @next_mp > @calc_mp[getarraysize(@calc_mp)-1])
{
set @cnt, @var;
}
else
{
set @curmp, @next_mp;
set @used_cnt, @used_cnt+1;
}
}
set @loop, getarraysize(@calc_mp);
}
}
if(@found == 0)
{
set @cnt, @var;
}
}
deletearray @limit_mp[0], getarraysize(@limit_mp);
deletearray @calc_mp[0], getarraysize(@calc_mp);
deletearray @plus_mp[0], getarraysize(@plus_mp);
if(@used_cnt == 0)
{
set @pos, dialog(0, 0, 0, "십억경 교환 갯수를 조금 줄여주게나.");
end;
}
else
{
set $saveexp_p, $saveexp_p-@used_cnt;
set_puremp @sd, @curmp;
set_mp @sd, get_maxmp(@sd);
if(@used_cnt < @var)
{
set @pos, dialog(0, 0, 1, "요청한 " + @var + "개 중 " + @used_cnt + "개만 마력으로 교환되었네.");
}
else
{
set @pos, dialog(0, 0, 1, "능력치를 정상적으로 올려주었네.\\n\\n"+ @beforestatsMP+" -> "+ @curmp+"\\n\\n사용한 십억경 : "+@used_cnt+"\\n\\n10억당 : "+@delta_mp);
}
end;
}
deletearray @limit_mp[0], getarraysize(@limit_mp);
deletearray @calc_mp[0], getarraysize(@calc_mp);
deletearray @plus_mp[0], getarraysize(@plus_mp);
set @pos, dialog(0, 0, 0, "자네는 이미 최고의 경지에 이르렀네.");
end;
}
}
}
}
}

젠장할 님의 최근 댓글
에구,... 잘못올렸네요 2026 04.04 ㄳㄳ 2017 06.19