罪と罰++二律背反
罪罰/外交の設置
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
] [
リンク元
]
開始行:
[[罪罰外交]]
*外交 [#jf1ced5e]
**パラメータの追加 ./inc/ore_sub-system.cgi [#gdc7c840]
-sub cdata_openの最後に以下を追加
sub cdata_open{
.... ( 省略 ) ....
# 友好度 ----------------------------------------...
for ($self=1; $self<6;$self++){
for ($other=1; $other<6;$other++){
$cfs[$self.$other] = $CP{'cfs'.$self.$other};
if ($other<$self){
# 友好度
$cfs[$self.$other] = int(rand(30)+40) if ($cf...
} elsif ($other>$self) {
# 条約
# $cfs[$self.$other] = 0;
}
# 設定値をクリア
# $cfs[$self.$other] = "";
}
}
# -----------------------------------------------...
}
# ログデータ読み込み
sub read_data{
# キャラデータ読み込み
&usr_file_open;
**データの書き込み部分 [#vd49f6ed]
# 国データ書き込み
sub cdat_write{
$cdat = "cn1;$cn1,cg1;$cg1,cf1;$cf1,cs1;$cs1,ce1...
# ---------------------------------------------...
$cfs_temp = "";
for ($self=1;$self<6;$self++){
for ($other=1;$other<6;$other++){
$cfs_temp .= "cfs$self$other;$cfs[$self.$other],";
}}
$cdat = $cfs_temp . $cdat;
# ---------------------------------------------こ...
open (OUT,">>$cdatfile") || &error("open error:$cdatfil...
print OUT $cdat;
close(OUT) or die "Can't close : $!";
}
**各国の状況を表示する ./inc/ore_sub-base_p1_pc.cgi [#r7c...
国データ表示テーブルに表示
my @metu=('','(亡)');
my $reset_time_out = int(($set-$time)/(3600*24));
の下あたりに以下を追加
# 友好度
$table_fs = "";
$ce[1] = $ce1;
$ce[2] = $ce2;
$ce[3] = $ce3;
$ce[4] = $ce4;
$ce[5] = $ce5;
$table_fs .= "<tr><td bgcolor=#CCCCFF align=center colsp...
@cfs_str = ('-','同盟','交戦');
for ($a=1;$a<6;$a++){
$table_fs .= "<tr>";
$table_fs .= "<td bgcolor=#CCCCFF style=size:8px;white...
$metu[$ce[$a]]</td>";
for ($b=1;$b<6;$b++){
if ($a>$b) {
# 友好度
$table_fs .= "<td bgcolor=$color[$b] align=center ...
} elsif ($a<$b) {
# 条約
$table_fs .= "<td bgcolor=$color[$b] align=center ...
} else {
$table_fs .= "<td bgcolor=$color[$b] ></td>";
}
}
$table_fs .= "</tr>";
}
さらに表示部分を
<td bgcolor=#CCCCFF>所属人数</td>
<td bgcolor=$color[1] align=center>$c1/$c1a</td>
<td bgcolor=$color[2] align=center>$c2/$c2a</td>
<td bgcolor=$color[3] align=center>$c3/$c3a</td>
<td bgcolor=$color[4] align=center>$c4/$c4a</td>
<td bgcolor=$color[5] align=center>$c5/$c5a</td>
</tr>
の下あたりに
$table_fs
を追加する
----
-2007/4/7 cdat_writeの追加方法を変更
終了行:
[[罪罰外交]]
*外交 [#jf1ced5e]
**パラメータの追加 ./inc/ore_sub-system.cgi [#gdc7c840]
-sub cdata_openの最後に以下を追加
sub cdata_open{
.... ( 省略 ) ....
# 友好度 ----------------------------------------...
for ($self=1; $self<6;$self++){
for ($other=1; $other<6;$other++){
$cfs[$self.$other] = $CP{'cfs'.$self.$other};
if ($other<$self){
# 友好度
$cfs[$self.$other] = int(rand(30)+40) if ($cf...
} elsif ($other>$self) {
# 条約
# $cfs[$self.$other] = 0;
}
# 設定値をクリア
# $cfs[$self.$other] = "";
}
}
# -----------------------------------------------...
}
# ログデータ読み込み
sub read_data{
# キャラデータ読み込み
&usr_file_open;
**データの書き込み部分 [#vd49f6ed]
# 国データ書き込み
sub cdat_write{
$cdat = "cn1;$cn1,cg1;$cg1,cf1;$cf1,cs1;$cs1,ce1...
# ---------------------------------------------...
$cfs_temp = "";
for ($self=1;$self<6;$self++){
for ($other=1;$other<6;$other++){
$cfs_temp .= "cfs$self$other;$cfs[$self.$other],";
}}
$cdat = $cfs_temp . $cdat;
# ---------------------------------------------こ...
open (OUT,">>$cdatfile") || &error("open error:$cdatfil...
print OUT $cdat;
close(OUT) or die "Can't close : $!";
}
**各国の状況を表示する ./inc/ore_sub-base_p1_pc.cgi [#r7c...
国データ表示テーブルに表示
my @metu=('','(亡)');
my $reset_time_out = int(($set-$time)/(3600*24));
の下あたりに以下を追加
# 友好度
$table_fs = "";
$ce[1] = $ce1;
$ce[2] = $ce2;
$ce[3] = $ce3;
$ce[4] = $ce4;
$ce[5] = $ce5;
$table_fs .= "<tr><td bgcolor=#CCCCFF align=center colsp...
@cfs_str = ('-','同盟','交戦');
for ($a=1;$a<6;$a++){
$table_fs .= "<tr>";
$table_fs .= "<td bgcolor=#CCCCFF style=size:8px;white...
$metu[$ce[$a]]</td>";
for ($b=1;$b<6;$b++){
if ($a>$b) {
# 友好度
$table_fs .= "<td bgcolor=$color[$b] align=center ...
} elsif ($a<$b) {
# 条約
$table_fs .= "<td bgcolor=$color[$b] align=center ...
} else {
$table_fs .= "<td bgcolor=$color[$b] ></td>";
}
}
$table_fs .= "</tr>";
}
さらに表示部分を
<td bgcolor=#CCCCFF>所属人数</td>
<td bgcolor=$color[1] align=center>$c1/$c1a</td>
<td bgcolor=$color[2] align=center>$c2/$c2a</td>
<td bgcolor=$color[3] align=center>$c3/$c3a</td>
<td bgcolor=$color[4] align=center>$c4/$c4a</td>
<td bgcolor=$color[5] align=center>$c5/$c5a</td>
</tr>
の下あたりに
$table_fs
を追加する
----
-2007/4/7 cdat_writeの追加方法を変更
ページ名: