Initial commit of original files
This commit is contained in:
@@ -0,0 +1,243 @@
|
||||
#-----------------------------------------------------------#
|
||||
# 罪と罰++ 二律背反 #
|
||||
# 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.0 #
|
||||
#--- [注意事項] --------------------------------------------#
|
||||
# 1.このスクリプトは以下の利用規程に従って配布しています。 #
|
||||
# http://www24.big.or.jp/~obo/game/ore_/gild/ #
|
||||
#-----------------------------------------------------------#
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#修行メニュー
|
||||
sub training{
|
||||
|
||||
if(!$type){
|
||||
|
||||
if($hp<4){
|
||||
$log .= "体力が少なすぎます<br>\n";
|
||||
$tm= $cmd = 0;
|
||||
$type='';
|
||||
&call_main_st;
|
||||
}else{
|
||||
$log .= "修行を行います<br>\n";
|
||||
$tm= $cmd = 0;
|
||||
$type = '修行';
|
||||
|
||||
$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|;
|
||||
$log2 .=qq|<option value="1">前回の対戦者</option>\n| if($tid);
|
||||
$log2 .=qq|<option value="2">一覧から選出</option>\n|;
|
||||
$log2 .=qq|<option value="0">やめる</option>\n|;
|
||||
$log2 .=qq|</select><br>\n|;
|
||||
$log2 .=qq|<input type="submit" $button1 value="NEXT">$td_end</form>\n|;
|
||||
}
|
||||
}
|
||||
&dat_write;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 修行処理1
|
||||
sub training_exe{
|
||||
|
||||
if($cmd==0){
|
||||
$log .= "修行を中止します<br>\n";
|
||||
$tm = $cmd = 0;
|
||||
$type='';
|
||||
&call_main_st;
|
||||
|
||||
}elsif($cmd==1){
|
||||
|
||||
open(IN,"$usrdata$tid\.cgi") || &error("Open Error : $usrdata$tid\.cgi",1);
|
||||
$tdat = <IN>;
|
||||
close(IN);
|
||||
|
||||
%VS = '';
|
||||
my @prats = split(/,/,$tdat);
|
||||
foreach $prats (@prats){
|
||||
my ($u,$q) = split(/;/,$prats);
|
||||
$VS{$u} = $q;
|
||||
}
|
||||
|
||||
$tid = $VS{'id'}; # ID
|
||||
$tnm = $VS{'nm'}; # 名前
|
||||
$tlv = $VS{'lv'}; # レベル
|
||||
$thp = $VS{'max_hp'}; # HP
|
||||
$thp_max= $VS{'max_hp'}; # MAX_HP
|
||||
$tmp = $VS{'max_mp'}; # MP
|
||||
$tua = $VS{'ua'}; # UA
|
||||
$tud = $VS{'ud'}; # UD
|
||||
$tag = $VS{'ag'}; # AG
|
||||
$tcp = $VS{'camp'}; # 所属
|
||||
$tsg = $VS{'sogo'}; # 称号
|
||||
|
||||
$tdf_a = $VS{'df_a'}; # 防具
|
||||
$tdg_a = $VS{'dg_a'}; # 武具
|
||||
|
||||
$log .="前回の対戦相手と修行を行います。<br>試合開始!<br>\n";
|
||||
$type = '修行中';
|
||||
$tm = 0;
|
||||
|
||||
$cmd =-1;
|
||||
# $log2 .=qq|<form action="$script" method="$method" name="ore_"><td align="center" valign="middle">\n|;
|
||||
# $log2 .=qq|<input type="hidden" name="id" value="$id">\n<input type="hidden" name="pw" value="$pw">\n|;
|
||||
# $log2 .=qq|<input type="hidden" name="cmd" value="-1">\n|;
|
||||
# $log2 .=qq|<input type="submit" $button1 value="対戦">$td_end</form>\n|;
|
||||
|
||||
# 行動セッション加算
|
||||
$act_cnt++;
|
||||
|
||||
# &dat_write;
|
||||
|
||||
require './inc/ore_sub-battle.cgi'; &bt_st;
|
||||
|
||||
}else{&sele_list;}
|
||||
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 修行リスト表示
|
||||
sub sele_list {
|
||||
|
||||
local(@usrfile,@BT_LIST,@tdat);
|
||||
|
||||
# 参加者データファイル一覧取得
|
||||
&usrdata_read;
|
||||
|
||||
# 表示参加者ランダム選出
|
||||
foreach(0 .. $bt_count){
|
||||
$bt_list = int(rand($#usrfile));
|
||||
|
||||
$flag = 0;
|
||||
foreach(0 .. $#BT_LIST){
|
||||
$flag = 1 if $bt_list eq $BT_LIST[$_];
|
||||
}
|
||||
push(@BT_LIST,$bt_list) if !$flag;
|
||||
}
|
||||
@BT_LIST = sort(@BT_LIST);
|
||||
|
||||
# ランダム選出参加者のデータ一括読み込み
|
||||
foreach (0 .. $#BT_LIST) {
|
||||
open(IN,"$usrdata$usrfile[$BT_LIST[$_]]") || &error("Can't open $usrfile[$BT_LIST[$_]].cgi",1);
|
||||
push(@tdat,<IN>);
|
||||
close(IN);
|
||||
}
|
||||
|
||||
# 参加者ステータス取得
|
||||
foreach(0 ..$#tdat){
|
||||
%R = '';
|
||||
my @prats = split(/,/,$tdat[$_]);
|
||||
foreach $prats (@prats){
|
||||
my($y,$x) = split(/;/,$prats);
|
||||
$R{$y} = $x;
|
||||
}
|
||||
|
||||
if($nm ne $R{'nm'}){
|
||||
$NM_V{$R{'nm'}} = $R{'nm'}; # 名前
|
||||
$HP_MAX_V{$R{'nm'}} = $R{'max_hp'}; # HP
|
||||
$MP_MAX_V{$R{'nm'}} = $R{'max_mp'}; # MP
|
||||
$LV_V{$R{'nm'}} = $R{'lv'}; # レベル
|
||||
$TM_V{$R{'nm'}} = $R{'tm'}; # 行動
|
||||
$UA_V{$R{'nm'}} = $R{'ua'}; # UA
|
||||
$UD_V{$R{'nm'}} = $R{'ud'}; # UD
|
||||
$LR_V{$R{'nm'}} = $R{'lr'}; # LR
|
||||
$AG_V{$R{'nm'}} = $R{'ag'}; # AG
|
||||
$CP_V{$R{'nm'}} = $R{'camp'}; # 所属
|
||||
$SG_V{$R{'nm'}} = $R{'sogo'}; # 称号
|
||||
$N_M{$R{'nm'}} = $R{'id'}; # ID
|
||||
}
|
||||
}
|
||||
|
||||
# 修行リスト表示
|
||||
if(!$tm){
|
||||
|
||||
$l = $rk = 1;
|
||||
foreach $nm (sort sclv keys(%LV_V)){
|
||||
$lv_v = $LV_V{$nm};
|
||||
next if($lv_v<=0);
|
||||
if($lv_v<$prv_lv){ $rk = $l; }
|
||||
|
||||
$log .=qq|<a href="$script?id=$id&pw=$pw&cmd=-1&com=$N_M{$nm}">$rk位 Lv$lv_v |;
|
||||
|
||||
# 称号
|
||||
$log .= ($SG_V{$nm} > 0) ? "$NM_V{$nm} [$sogo_p[$SG_V{$nm}]]" : "$NM_V{$nm}";
|
||||
|
||||
$log .=qq|</a> HP$HP_MAX_V{$nm}/MP$MP_MAX_V{$nm}/UA$UA_V{$nm}/UD$UD_V{$nm}/AG$AG_V{$nm}<br>\n|;
|
||||
|
||||
$prv_lv = $lv_v;
|
||||
$l++;
|
||||
}
|
||||
|
||||
$log .=qq|<a href="$script?id=$id&pw=$pw&cmd=-1">中止する</a> |;
|
||||
|
||||
$tm=1;
|
||||
|
||||
# 行動セッション加算
|
||||
$act_cnt++;
|
||||
|
||||
$layout_flag=1;
|
||||
&dat_write;
|
||||
}
|
||||
|
||||
# 対戦相手割り当て
|
||||
elsif($tm){
|
||||
|
||||
if($com){
|
||||
open(IN,"$usrdata$com\.cgi") || &error("Open Error : $usrdata$com\.cgi",1);
|
||||
$tdat = <IN>;
|
||||
close(IN);
|
||||
|
||||
%VS = '';
|
||||
my @prats = split(/,/,$tdat);
|
||||
foreach $prats (@prats){
|
||||
my ($u,$q) = split(/;/,$prats);
|
||||
$VS{$u} = $q;
|
||||
}
|
||||
|
||||
$tid = $VS{'id'}; # ID
|
||||
$tnm = $VS{'nm'}; # 名前
|
||||
$tlv = $VS{'lv'}; # レベル
|
||||
$thp = $VS{'max_hp'}; # HP
|
||||
$thp_max= $VS{'max_hp'}; # MAX_HP
|
||||
$tmp = $VS{'max_mp'}; # MP
|
||||
$tua = $VS{'ua'}; # UA
|
||||
$tud = $VS{'ud'}; # UD
|
||||
$tag = $VS{'ag'}; # AG
|
||||
$tcp = $VS{'camp'}; # 所属
|
||||
$tsg = $VS{'sogo'}; # 称号
|
||||
|
||||
$tdf_a = $VS{'df_a'}; # 防具
|
||||
$tdg_a = $VS{'dg_a'}; # 武具
|
||||
|
||||
$log .="試合開始!<br>\n";
|
||||
$type = '修行中';
|
||||
$tm = 0;
|
||||
|
||||
require './inc/ore_sub-battle.cgi'; &bt_st;
|
||||
}
|
||||
elsif(!$com){
|
||||
$log .="中止した…<br>\n";
|
||||
$type = '';
|
||||
$tm = 0;
|
||||
&call_main_st;
|
||||
}
|
||||
}
|
||||
|
||||
# &dat_write;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1;#削除不可
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1;#削除不可
|
||||
Reference in New Issue
Block a user