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

📄 wars.cgi

📁 WEBGAME 机器人大战EBS(无尽的战争) 架設方法 WIN2K系列主機
💻 CGI
📖 第 1 页 / 共 5 页
字号:
<center>
<font color=#787986><b>争霸指令</b></font><br>
<select name=\"seiatu\" $STYLE_L>
<option value='11'>请选择地点
-----END-----
if($cname[0] ne $FORM{'pname'} and $PL_VALUES[5] eq $c_5[1] and $PL_VALUES[5] eq $c_5[2] and $PL_VALUES[5] eq $c_5[3] and $PL_VALUES[5] eq $c_5[4] and $PL_VALUES[5] eq $c_5[5] and $PL_VALUES[5] eq $c_5[6] and $PL_VALUES[5] eq $c_5[7] and $PL_VALUES[5] eq $c_5[8] and $PL_VALUES[5] eq $c_5[9] and $PL_VALUES[5] eq $c_5[10]){print"<option value='0'>格兰纳达薄呢";}
if($c_5[1] ne $PL_VALUES[5]){print"<option value='1'>纽约";}
if($c_5[2] ne $PL_VALUES[5]){print"<option value='2'>加里福尼亚";}
if($c_5[3] ne $PL_VALUES[5]){print"<option value='3'>扎布罗";}
if($c_5[4] ne $PL_VALUES[5]){print"<option value='4'>夏威夷";}
if($c_5[5] ne $PL_VALUES[5]){print"<option value='5'>托灵顿";}
if($c_5[6] ne $PL_VALUES[5]){print"<option value='6'>北京";}
if($c_5[7] ne $PL_VALUES[5]){print"<option value='7'>马得拉斯";}
if($c_5[8] ne $PL_VALUES[5]){print"<option value='8'>奥德萨";}
if($c_5[9] ne $PL_VALUES[5]){print"<option value='9'>乞力马扎罗";}
if($c_5[10] ne $PL_VALUES[5]){print"<option value='10'>贝尔法斯特";}
print << "-----END-----";
</select><br>
<input type=submit name="b_mode" value="开始征服" $STYLE_B1 onClick="document.FM.cmd.value='BATTLE_2';Move();"><br>
<input type=button value="擂台" $STYLE_B1 onClick="parent.top.location.replace('champ.cgi')">
<input type=button value="集训" $STYLE_B1 onClick="parent.top.location.replace('mission.cgi')">
<input type=button value="结束" $STYLE_B1 onClick="parent.top.location.replace('$YOUR_HOME')"></form>
<form action=$SCRIPTNM method=POST target=_self>
<input type=hidden name=cmd value=MAIN_FRAME>
<input type=hidden name=pname value=$FORM{'pname'}>
<input type=hidden name=pass value=$FORM{'pass'}>
<input type=submit value="刷新" class=button2 onMouseOver=\"style.color='#000000';style.background='#adff2f';\" onMouseOut=\"this.style.color='#adff2f';style.background='#00550c';\" onClick=\"parent.Sub.location.replace(\'$MAIN_SCRIPT?LOGO\');\">
</form>
</center></td></tr></table></div></td></tr></table></td></tr></table>
-----END-----
	print "<script language=\"JavaScript\">location.href='#top';\n</script>\n" if $BANNER_DISPLAY;
print << "	-----END-----"if $ENV{'HTTP_USER_AGENT'} =~ m/MSIE/i;
	<script language="JavaScript">
	var h=$PL_VALUES[15];var e=$PL_VALUES[17];var timerID;
	myDate1 = new Date();
	var m_time=myDate1.getTime();
	HERepair();
	function HERepair(){
	myDate2 = new Date();
		n_time=myDate2.getTime();
		sasi = (m_time - n_time)/-1000;

		if (h < $PL_VALUES[16]){h = $PL_VALUES[15] + sasi*$HP_REPAIR;}else{h = $PL_VALUES[16];}
		if (e < $PL_VALUES[18]){e = $PL_VALUES[17] + sasi*$EN_REPAIR;}else{e = $PL_VALUES[18];}
		if (h >= $PL_VALUES[16] && cond.innerText=='机体修理中'){
			cond.innerText='可以战斗';cond.style.color='#143dc1';
		}
		j_hp.innerText=Math.round (h);
		j_en.innerText=Math.round (e);
		clearTimeout(timerID);
		timerID = setTimeout(\"HERepair()\",5000);
		}
		</script>
	-----END-----
	exit;
}

sub BATTLE2{

if($FORM{'seiatu'} eq '11'){&ERROR('请选择要征服的地点')}

$winfile="$FORM{'seiatu'}\.cgi";
if($FORM{'seiatu'} eq '0'){$areaname="格兰纳达薄呢";}
elsif($FORM{'seiatu'} eq '1'){$areaname="纽约";}
elsif($FORM{'seiatu'} eq '2'){$areaname="加里福尼亚";}
elsif($FORM{'seiatu'} eq '3'){$areaname="扎布罗";}
elsif($FORM{'seiatu'} eq '4'){$areaname="夏威夷";}
elsif($FORM{'seiatu'} eq '5'){$areaname="托灵顿";}
elsif($FORM{'seiatu'} eq '6'){$areaname="北京";}
elsif($FORM{'seiatu'} eq '7'){$areaname="马得拉斯";}
elsif($FORM{'seiatu'} eq '8'){$areaname="奥德萨";}
elsif($FORM{'seiatu'} eq '9'){$areaname="乞力马扎罗";}
elsif($FORM{'seiatu'} eq '10'){$areaname="贝尔法斯特";}


		SET_COOKIE:{
		my @gmt = gmtime(time + $COOKIE_KEEP*24*60*60);
		$gmt[0] = sprintf("%02d", $gmt[0]);$gmt[1] = sprintf("%02d", $gmt[1]);$gmt[2] = sprintf("%02d", $gmt[2]);
		$gmt[3] = sprintf("%02d", $gmt[3]);$gmt[5] += 1900;
		$gmt[4] = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')[$gmt[4]];
		$gmt[6] = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday')[$gmt[6]];
		my $date_gmt = "$gmt[6], $gmt[3]\-$gmt[4]\-$gmt[5] $gmt[2]:$gmt[1]:$gmt[0] GMT";
		print "Set-Cookie:EBMISSON=$FORM{'mode'}; expires=$date_gmt\n";
	}

	&LOCK;
		&DBM_CONVERT('P',"$FORM{pname}",'VS',"$FORM{vsname}") if !$FORM{'yousai'};
		&DBM_CONVERT('C',"$PL_VALUES[5]",'VC',"$VS_VALUES[5]") if !$FORM{'yousai'};
		&DBM_CONVERT('C',"$PL_VALUES[5]",'VC',"$FORM{'vsname'}") if $FORM{'yousai'};

        open(IN,"$winforder$winfile");
        $cdat = <IN>;
        close(IN);
        ($cname,$c_0,$c_1,$c_2,$c_3,$c_4,$c_5,$c_6,$c_7,$c_8,$c_9,$c_10,$c_11,$c_12,$c_13,$c_14,$c_15,$c_16,$c_17,$c_18,$c_19,$c_20,$c_21,$c_22,$c_23,$c_24,$c_25,$c_26,$c_27,$c_28,$c_29,$c_30,$wcount,$wrecord,$recnum,$prize) = split(/<>/,$cdat);

	&UNLOCK;
###统治者能力设置


        $YOUSAINM = "$areaname司令官$cname";
        if($cname ne ''){
        @VS_VALUES=("$c_0","$c_1","$c_2","$c_3","$c_4","$c_5","$c_6","$c_7","$c_8","$c_9","$c_10","$c_11","$c_12","$c_13","$c_14","$c_15","$c_16","$c_17","$c_18","$c_19","$c_20","$c_21","$c_22","$c_23","$c_24","$c_25","$DATE","$c_27","$c_28","$c_29","$c_30");
        }else{
        @VS_VALUES=("$PL_VALUES[0]","$PL_VALUES[1]","$PL_VALUES[2]","$PL_VALUES[3]","AL","$PL_VALUES[5]","$PL_VALUES[6]","$PL_VALUES[7]","$PL_VALUES[8]","$PL_VALUES[9]","$PL_VALUES[10]","$PL_VALUES[11]","$PL_VALUES[12]","$PL_VALUES[13]","$PL_VALUES[14]","$PL_VALUES[15]","$PL_VALUES[16]","$PL_VALUES[17]","$PL_VALUES[18]","$PL_VALUES[19]","$PL_VALUES[20]","$PL_VALUES[21]","$PL_VALUES[22]","$PL_VALUES[23]","$PL_VALUES[24]","$PL_VALUES[25]","$DATE","$PL_VALUES[27]","$PL_VALUES[28]","$PL_VALUES[29]","$PL_VALUES[30]");
        }


	&REPAIR(PL);
        &REPAIR(VS);
	if (@CL_VALUES){$PL_Country="$PL_VALUES[5]";}else{$PL_Country=$NONE_NATIONALITY;$CL_VALUES[0]='#808080';}
	if (@VC_VALUES){$VS_Country="$VS_VALUES[5]";}else{$VS_Country=$NONE_NATIONALITY;$VC_VALUES[0]='#808080';}

if ( $PL_VALUES[26] >= time-$timer){&ERROR('不可以在短时间内连续作战')}
        &ERROR('您的国家是统治者') if ($FORM{'pname'} eq $cname);
        &ERROR('已在您的国家统治下') if ($PL_VALUES[5] eq $c_5);
        &ERROR('正在修理') if $PL_VALUES[25]==1;
	local($PL_WN,$PL_WLV) = split(/!/,$PL_VALUES[9]);
	local($VS_WN,$VS_WLV) = split(/!/,$VS_VALUES[9]);
	require "$LOG_FOLDER/$HASH_DATA";
	@Pl_W=split(/\,/,$WEAPON_LIST{"$PL_WN"});
	@Vs_W=split(/\,/,$WEAPON_LIST{"$VS_WN"});
	$plbs=int ($PL_VALUES[20]+7) if $Pl_W[7] =~ m/4/;
	$vsbs=int ($VS_VALUES[20]+7) if $Vs_W[7] =~ m/4/;
	$Pl_AttPoint=int($Pl_W[1]*(($PL_WLV*0.0001)+1));
	$Pl_SpPoint=$PL_VALUES[21];$Pl_DefPoint=($PL_VALUES[20]+$plbs)*2-int($VS_VALUES[19]/3);$Pl_MisPoint=$PL_VALUES[22];
	$Pl_Kaikyu=&RANK($PL_VALUES[0],$PL_VALUES[5],$PL_VALUES[6]);
	$pwl=int $PL_WLV/$WEAPON_LVUP;$Pl_WeaponNameA="$Pl_W[0](Level.$pwl)";
	&ERROR('noEnergy','EN不够。') if $PL_VALUES[17] < $Pl_W[4];
	$Vs_AttPoint=int($Vs_W[1]*(($VS_WLV*0.0001)+1));
	$Vs_SpPoint=$VS_VALUES[21];$Vs_DefPoint=($VS_VALUES[20]+$vsbs)*2-int($PL_VALUES[19]/3);$Vs_MisPoint=$VS_VALUES[22];
	$Vs_Kaikyu=&RANK($VS_VALUES[0],$VS_VALUES[5],$VS_VALUES[6]);
	$vwl=int $VS_WLV/$WEAPON_LVUP;$Vs_WeaponNameA="$Vs_W[0](Level.$vwl)";
	$Pl_SpPoint=int ($Pl_SpPoint*1.5) if $Pl_W[7] =~ m/3/;
	$Vs_SpPoint=int ($Vs_SpPoint*1.5) if $Vs_W[7] =~ m/3/;
	if ($PL_VALUES[16] > 50000){$Pl_SpPoint-=int(($PL_VALUES[16]-50000)/5000);}
	if ($VS_VALUES[16] > 50000){$Vs_SpPoint-=int(($VS_VALUES[16]-50000)/5000);}
	&SYUSEI('m',"$FORM{'mode'}",'Pl');
	$VsMsnNo=int(rand(8)+1);
	&SYUSEI('m',"$VsMsnNo",'Vs');
	&SYUSEI('s',"$PL_VALUES[12]",'Pl');
	&SYUSEI('s',"$VS_VALUES[12]",'Vs');
	$Pl_Times=$Vs_Times=0;	$Pl_Check=$Vs_Check=1;
	$hImg="<img src=\"$IMG_FOLDER1/hit.gif\">";
	$mImg="<img src=\"$IMG_FOLDER1/miss.gif\">";

	for ($Plt=1;$Plt < 100; $Plt++ ){
		$Pl_Initiative=$Pl_SpPoint+int(rand(30));$Vs_Initiative=$Vs_SpPoint+int(rand(30));
		if($Pl_Initiative >= $Vs_Initiative){$Initiative=1;}else{$Initiative=0;}
		if($VS_W >= $Vs_W[3] && $PL_W >= $Pl_W[3]){last;}
		if ($Vs_AtPoint < $PL_VALUES[15] && $PL_W < $Pl_W[3] && ($Initiative || $VS_W >= $Vs_W[3])){
			$Pl_Check=int(rand(100)+$Vs_SpPoint/2-$Pl_MisPoint/2);$PL_W++;
			if ($Pl_Check < $Pl_W[2]){$PlResult.="$hImg";$Pl_Times++;
				$Pl_AtPoint=$Pl_AtPoint+int($Pl_AttPoint-int($Vs_DefPoint*(int(rand(50)+90))/$Pl_W[3]));
			}elsif ($Pl_Check >= $Pl_W[2]) {$PlResult.="$mImg";}
		unless($PL_W % 10){$PlResult.="<br>\n";}
		next;
		}
		if ($Pl_AtPoint < $VS_VALUES[15] && $VS_W < $Vs_W[3] && (!$Initiative || $PL_W >= $Pl_W[3])){
			$Vs_Check=int(rand(100)+$Pl_SpPoint/2-$Vs_MisPoint/2);$VS_W++;
			if ($Vs_Check < $Vs_W[2]){$VsResult.="$hImg";$Vs_Times++;
				$Vs_AtPoint=$Vs_AtPoint+int($Vs_AttPoint-int($Pl_DefPoint*(int(rand(50)+90))/$Vs_W[3]));
			}elsif ($Vs_Check >= $Vs_W[2]){$VsResult.="$mImg";}
		unless($VS_W % 10){$VsResult.="<br>\n";}
		next;
		}
	}
	$Pl_AtPoint=0 if $Pl_AtPoint < 0;
	$Vs_AtPoint=0 if $Vs_AtPoint < 0;
	$dmgStyl="style=\"font-size:21px;color:#9acd32;\"";
	$chaStyl="style=\"font-size:12px;color:#dc143c;\"";
	$PlsumDmg="<b $dmgStyl>$Pl_W[3]</b> <b $chaStyl>次出击</b> <b $dmgStyl>$Pl_Times</b> <b $chaStyl>次击中</b>
		对方<b $dmgStyl>$Pl_AtPoint</b><b $chaStyl> 点损伤</b>" if $Pl_Times > 0;
	$PlsumDmg='<font color=#6a5acd>Miss</font>' if $Pl_Times == 0;
	$VssumDmg="<b $dmgStyl>$Vs_W[3]</b> <b $chaStyl>次出击</b> <b $dmgStyl>$Vs_Times</b> <b $chaStyl>次击中</b>
		对方<b $dmgStyl>$Vs_AtPoint</b><b $chaStyl> 点损伤</b>" if $Vs_Times > 0;
	$VssumDmg='<font color=#6a5acd>失败</font>' if $Vs_Times == 0;
	$Pl_BfrHP=$PL_VALUES[15];
	$Vs_AtPoint=$PL_VALUES[15] if $PL_VALUES[15] < $Vs_AtPoint;
	$PL_VALUES[15]=$PL_VALUES[15]-$Vs_AtPoint;

⌨️ 快捷键说明

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