⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kumite.cgi

📁 挖矿游戏源代码 很好的哦 可以研究
💻 CGI
📖 第 1 页 / 共 3 页
字号:
	@rankernew = @rankernew[sort {$tmp[$b] <=> $tmp[$a]} 0 .. $#tmp];


	$taikai_max = @rankernew;

	if($taikai_max > 10) { pop(@rankernew); }


	open(OUT,">$taikai_file") or &error('ファイルを开けませんでした。');
	print OUT @rankernew;
	close(OUT);

	# ロック解除
	if (-e $lockfile) { unlink($lockfile); }
		}


		$comment = "<b><font size=5>$knameは、战斗に胜利した!!</font></b><p>";
	}else{
		$kkumite = 0;
		$ktotal += 1;
		$exp = int($kulv * (rand($klp) + 1));
		$kex = $kex + $exp;
		$gold = int(rand($klp));		
		$comment = "<b><font size=5>$knameは、战斗に负けた···。</font></b><p>";

	# ファイルロック
	if ($lockkey == 1) { &lock1; }
	elsif ($lockkey == 2) { &lock2; }

	open(IN,"$taikai_file") or &error('ファイルを开けませんでした。');
	@ranker = <IN>;
	close(IN);

	$hit=0;@rankernew=();
	foreach(@ranker){
		($rnumb,$pname,$pid,$ename) = split(/<>/);
		if($pid eq "$in{'id'}"){
			$hit=1;
			if($numb > $rnumb){
				unshift(@rankernew,"$numb<>$kname<>$kid<>$kuname<>\n");
			}
		}else{
			push(@rankernew,"$_");
		}
	}

	if(!$hit){
		unshift(@rankernew,"$numb<>$kname<>$kid<>$kuname<>\n");
	}

	@tmp = map {(split /<>/)[0]} @rankernew;
	@rankernew = @rankernew[sort {$tmp[$b] <=> $tmp[$a]} 0 .. $#tmp];


	$taikai_max = @rankernew;

	if($taikai_max > 10) { pop(@rankernew); }


	open(OUT,">$taikai_file") or &error('ファイルを开けませんでした。');
	print OUT @rankernew;
	close(OUT);

	# ロック解除
	if (-e $lockfile) { unlink($lockfile); }
		}


	if($kex > ($klv * $lv_up)) {
		$comment .= "$knameは、レベルが上がった!!<p>";
		$hpup = int(rand($kn_3)) + 1;
		$kmaxhp = $kmaxhp + $hpup;
		$comment .= "HPが<b>$hpup</b>上がった!!<p>";
		$kex = 0;
		$klv += 1;
		if(int(rand(5)) == 0) { $kn_0 += 1; $ku1 = 1;}
		if(int(rand(5)) == 0) { $kn_1 += 1; $ku2 = 1;}
		if(int(rand(5)) == 0) { $kn_2 += 1; $ku3 = 1;}
		if(int(rand(5)) == 0) { $kn_3 += 1; $ku4 = 1;}
		if(int(rand(5)) == 0) { $kn_4 += 1; $ku5 = 1;}
		if(int(rand(5)) == 0) { $kn_5 += 1; $ku6 = 1;}
		if(int(rand(5)) == 0) { $kn_6 += 1; $ku7 = 1;}
		if($ku1) { $comment .= "力が上がった。"; }
		if($ku2) { $comment .= "知\能\が上がった。"; }
		if($ku3) { $comment .= "信仰心が上がった。"; }
		if($ku4) { $comment .= "生命力が上がった。"; }
		if($ku5) { $comment .= "器用さが上がった。"; }
		if($ku6) { $comment .= "速さが上がった。"; }
		if($ku7) { $comment .= "魅力が上がった。"; }
	}


	

	$khp = $khp_flg;
	if($khp > $kmaxhp) { $khp = $kmaxhp; }
	$kuhp = $kuhp_flg;
	if($kuhp > $kumaxhp) { $kuhp = $kumaxhp; }
	if($khp <= 0) { $khp = $kmaxhp; }
	if($kuhp <= 0) { $kuhp = $kumaxhp; }
	$kgold = $kgold + $gold;

	&regist;


	if($refresh and !$win) { &header2; } else { &header; }

	print "<center><font size=7 color=#0000ff>$numb人目</font></center><p>\n";
	print "<h1>$knameは、<font color=#0000ff>$kuname</font>に战いを挑んだ!!</h1><hr size=0><p>\n";

	$i=0;
	foreach(@battle_date){
		print "$battle_date[$i]";
		$i++;
	}
	
	print "$comment<p>$knameは、<b>$exp</b>の经验值を手に入れた。<b>$gold</b>G手に入れた。<p>\n";

	&footer;

	$battle_flag=0;

	exit;
}
__SUB__

	read_hima => <<'__SUB__',
#--------------------#
#  对战相手读み??み  #
#--------------------#
sub read_hima {

	
	open(IN,"$chara_file1") or &error('ファイルを开けませんでした。');
	@KUMI = <IN>;
	close(IN);

	$hajime = @KUMI;
	if($hajime <= 0) { &error("参加者が少なく开催できません。"); }
	$start = ($hajime - 1);
	if($start <= 0) { &error("参加者が少なく开催できません。"); }
	if($kkumite == 10000) { $kkumite = $start; }
	if($kkumite == 0) { &error("现在斗えません。"); }

	($kuid,$kupass,$kusite,$kuurl,$kuname,$kusex,$kuchara,$kun_0,$kun_1,$kun_2,$kun_3,$kun_4,$kun_5,$kun_6,$kusyoku,$kuhp,$kumaxhp,$kuex,$kulv,$kugold,$kulp,$kutotal,$kukati,$kuwaza,$kuitem,$kumons,$kuhost,$kudate,$kumori,$kudef,$kutac,$kukumite) = split(/<>/,$KUMI[$kkumite]);

}
__SUB__

	read_winner => <<'__SUB__',
#--------------------#
#  チャンプ读み??み  #
#--------------------#
sub read_winner {
	open(IN,"$winner_file") or &error('ファイルを开けませんでした。');
	@winner = <IN>;
	close(IN);

	($wid,$wpass,$wsite,$wurl,$wname,$wsex,$wchara,$wn_0,$wn_1,$wn_2,$wn_3,$wn_4,$wn_5,$wn_6,$wsyoku,$whp,$wmaxhp,$wex,$wlv,$wgold,$wlp,$wtotal,$wkati,$wwaza,$witem,$wmons,$whost,$wdate,$wcount,$lsite,$lurl,$lname,$wmori,$wdef,$wtac,$lid,$wkumite) = split(/<>/,$winner[0]);
}
__SUB__

	footer => <<'__SUB__',
#------------------#
# HTMLのフッタ— #
#------------------#
sub footer {
	if($refresh and !$win and $mode eq 'kumite') {
	print "<form action=\"$script\" method=\"post\">\n";
	print "<INPUT TYPE=\"button\" VALUE=\"TOPペ—ジへ\" onClick=\"location=\'$scripto\'\">\n";
	print "<input type=hidden name=id value=$kid>\n";
	print "<input type=hidden name=pass value=$kpass>\n";
	print "<input type=hidden name=mode value=log_in>\n";
	print "<input type=submit value=\"ステ—タス画面へ\">\n";
	print "</form>\n";
	}else{
		if($mode eq 'kumite' and $kkumite > 0){	
	print "<form action=\"$scriptkumite\" method=\"post\">\n";
	print "<INPUT TYPE=\"button\" VALUE=\"TOPペ—ジへ\" onClick=\"location=\'$scripto\'\">\n";
	print "<input type=hidden name=id value=$kid>\n";
	print "<input type=hidden name=pass value=$kpass>\n";
	print "<input type=hidden name=mode value=kumite>\n";
	print "<input type=submit value=\"次の相手へ····\">\n";
	print "</form>\n";
		}else{ 
	print "<form action=\"$script\" method=\"post\">\n";
	print "<A HREF=\"$scripto\">TOPペ—ジへ</A>\n";
	print "<input type=hidden name=id value=$kid>\n";
	print "<input type=hidden name=pass value=$kpass>\n";
	print "<input type=hidden name=mode value=log_in>\n";
	print "<input type=submit value=\"ステ—タス画面へ\">\n";
	print "</form>\n";
		}
	}

	print "<HR SIZE=0 WIDTH=\"100%\"><DIV align=right>\n";
	print "$verkumiteg edit by <a href=\"http://www.gun-online.com/\" target=\"_top\">GUN</a><br>\n";
	print "$verg remodeling by <a href=\"http://www.gun-online.com/\" target=\"_top\">GUN</a><br>\n";
	print "$ver by <a href=\"http://www.interq.or.jp/sun/cumro/\">D.Takamiya(CUMRO)</a><br>\n";
	print "</DIV></body></html>\n";
}
__SUB__

	header => <<'__SUB__',
#------------------#
#  HTMLのヘッダ—  #
#------------------#
sub header {
	print "Content-Type: text/html\n\n";

	print <<"EOM";
<html>
<head>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Shift_JIS">
<STYLE type="text/css">
<!--
body,tr,td,th { font-size: 10pt }
a:hover { color: $alink }
.b1 {background: #9ac;border-color: #ccf #669 #669 #ccf;color:#fff; border-style: solid; border-width: 1px;}
.b2 {background: #669;border-color: #99c #336 #336 #99c;color:#fff; border-style: solid; border-width: 1px; text-align: center}
.b3 {background: #fff;border-color: #ccf #669 #669 #ccf;}
.dmg { color: #FF0000; font-size: 18pt }
.clit { color: #0000FF; font-size: 18pt }
-->
</STYLE>
EOM
	print "<title>$main_title</title></head>\n";
	print "<body background=\"$backgif\" bgcolor=\"$bgcolor\" text=\"$kuext\" link=\"$link\" vlink=\"$vlink\" alink=\"$alink\">\n";
}
__SUB__

	header2 => <<'__SUB__',
#--------------#
#  强制送还用  #
#--------------#
sub header2 {
	print "Content-Type: text/html\n\n";

	print <<"EOM";
<html>
<head>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=Shift_JIS">
<META http-equiv="refresh" content="$refresh;URL=http\:\/\/$wurl"> 
<STYLE type="text/css">
<!--
body,tr,td,th { font-size: 10pt }
a:hover { color: $alink }
.b1 {background: #9ac;border-color: #ccf #669 #669 #ccf;color:#fff; border-style: solid; border-width: 1px;}
.b2 {background: #669;border-color: #99c #336 #336 #99c;color:#fff; border-style: solid; border-width: 1px; text-align: center}
.b3 {background: #fff;border-color: #ccf #669 #669 #ccf;}
.dmg { color: #FF0000; font-size: 18pt }
.clit { color: #0000FF; font-size: 18pt }
-->
</STYLE>
EOM
	print "<title>$main_title</title></head>\n";
	print "<body background=\"$backgif\" bgcolor=\"$bgcolor\" text=\"$kuext\" link=\"$link\" vlink=\"$vlink\" alink=\"$alink\">\n";
}
__SUB__
);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -