153 lines
3.8 KiB
Perl
Executable File
153 lines
3.8 KiB
Perl
Executable File
#-----------------------------------------------------------#
|
|
# 죄와 벌++ 이율배반 #
|
|
# Copyright(C) 2001-2002 by Vivid Studio. BLANK BOARD #
|
|
# Vivid Studio.[ http://www17.big.or.jp/~obochan/vivid/ ] #
|
|
# BLANK BOARD [ http://pom.to/ ] #
|
|
#-----------------------------------------------------------#
|
|
# 메인 Version 1.1
|
|
#--- [주의사항] --------------------------------------------#
|
|
# 1.이 스크립트는 이하의 이용규정에 따라 배포되고 있습니다. #
|
|
# http://www24.big.or.jp/~obo/game/ore_/gild/ #
|
|
#-----------------------------------------------------------#
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# 메인 메뉴
|
|
sub main_st { # 메인
|
|
|
|
# 회복
|
|
|
|
$hrg=int($time-$la);
|
|
$hrg=int($hrg/$hrg_time);
|
|
$hrg=0 if($hrg<1);
|
|
$d=$time;
|
|
$d=$d-$roku;
|
|
|
|
if($ck!=1){
|
|
for($x=0;$x<$hrg;++$x){
|
|
$hp++;
|
|
$mp++;
|
|
}
|
|
}
|
|
|
|
$hp=$max_hp if($hp>$max_hp);
|
|
$mp=$max_mp if($mp>$max_mp);
|
|
|
|
# 급여
|
|
|
|
if($camp>0&&$d>21600){
|
|
$v=$g_p[$rank];
|
|
$v=int($v/5);
|
|
$v=int($my_cn*0.8)+$v;
|
|
$gold+=$v;
|
|
$log .= " $v 골드의 급여가 지급되었습니다.<br>";
|
|
$d-=21600;
|
|
$roku=$time;
|
|
}
|
|
|
|
# 데이터 초기화
|
|
|
|
if( $cn1>=$data_reset||
|
|
$cn2>=$data_reset||
|
|
$cn3>=$data_reset||
|
|
$cn4>=$data_reset||
|
|
$cn5>=$data_reset){
|
|
$log .="천하통일이 달성되었다!<br>국력이 초기화됩니다.<br>\n";
|
|
require './inc/ore_sub-main_reset.cgi';&reset_cdat;
|
|
}
|
|
if($set<$time){
|
|
require './inc/ore_sub-main_reset.cgi';&reset_time_limit;
|
|
}
|
|
|
|
# 경험
|
|
|
|
$next_rank=int(($rank*$rank)*3);
|
|
|
|
if($rank_exe>=$next_rank){
|
|
if($camp!=0&&$rank<14){
|
|
$log .="평소의 공로가 인정되어 계급이 올랐다.<br>\n";
|
|
$rank++;
|
|
$rank_exe-=$next_rank;
|
|
}
|
|
}
|
|
|
|
if($exe>$next_lv){
|
|
$log .="경험을 쌓아 더욱 강하게 성장했다.<br>\n";
|
|
$lv++;
|
|
$a =int(rand(2));
|
|
$max_hp +=int($a);
|
|
$b =int(rand(2));
|
|
$max_mp +=int($b);
|
|
$w =int(rand(2));
|
|
$ua +=int($w);
|
|
$d =int(rand(2));
|
|
$ud +=int($d);
|
|
$l =int(rand(2));
|
|
$lr +=int($l);
|
|
|
|
if($lv<=5){$gg=2;}
|
|
if($lv<=10){$gg=1;}
|
|
$g =int(rand(2)+$gg);
|
|
$ag +=int($g);
|
|
|
|
$exe-=$next_lv;
|
|
$log .="체력이 $a 올랐다<br>정신력이 $b 올랐다<br>공격력이 $w 올랐다<br>방어력이 $d 올랐다<br>지휘력이 $l 올랐다<br>민첩성이 $g 올랐다<br>\n";
|
|
}
|
|
|
|
# 안내
|
|
|
|
if($mes && $pr<1){
|
|
$log .="$mes<br>\n";
|
|
$mes='';
|
|
}
|
|
|
|
# 내정 의무제
|
|
if($act_cnt>=$act_cnt_limit && $camp){
|
|
$log .= "행동 세션이 한계에 도달했습니다. 내정을 한번 수행해 주십시오.<br>\n";
|
|
$tm=0;
|
|
}elsif($act_cnt>=$act_cnt_limit && !$camp){
|
|
$log .= "행동 세션이 한계에 도달했습니다. 휴식해 주십시오.<br>\n";
|
|
$pr=int($GMT/2);
|
|
$tm=0;
|
|
# 행동 카운트 초기화(무조건)
|
|
$act_cnt=0;
|
|
}
|
|
|
|
# 메인 커맨드
|
|
my @c = ('현상유지','수행','내정','전쟁','능력','사관','정보','토벌','군사');
|
|
|
|
$log2 .=qq|<form action="$script" method="$method" name="ore_">\n|;
|
|
$log2 .=qq|<td align="center" valign="middle">\n| if($mv_mode eq 'pc');
|
|
$log2 .=qq|<input type="hidden" name="id" value="$id">\n<input type="hidden" name="pw" value="$pw">\n|;
|
|
|
|
$log2 .=qq|<select name="cmd" size="1">\n|;
|
|
foreach(0 .. $#c){ $log2 .=qq|<option value="$_">$c[$_]</option>\n|;}
|
|
$log2 .=qq|</select><br>\n|;
|
|
$log2 .=qq|<input type="submit" $button1 value="NEXT">$td_end</form>\n|;
|
|
|
|
&write_data;
|
|
|
|
}
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# 구속 시간
|
|
sub wt_st {
|
|
$whour = int($pr/3600);
|
|
$wmin = int(($pr%3600)/60);
|
|
$wsec = $pr%60;
|
|
if($whour>0){
|
|
$wmin = "0$wmin" if($wmin<10);
|
|
$log .="행동 중… 남은 시간: $whour시간 $wmin분\n";
|
|
}elsif($wmin>0){
|
|
$wsec = "0$wsec" if($wsec<10);
|
|
$log .="행동 중… 남은 시간: $wmin분\n";
|
|
}else{
|
|
$log .="행동 중… 남은 시간: $wsec초\n";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
1;
|