Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
help.php
Go to the documentation of this file.
1 <?php
2 
3 define('CURSCRIPT', 'help');
4 
5 require './include/common.inc.php';
6 
7 $mixfile = config('mixitem',$gamecfg);
8 $shopfile = config('shopitem',$gamecfg);
10 $synfile = config('synitem',$gamecfg);
11 $ovlfile = config('overlay',$gamecfg);
14 include_once $mixfile;
15 $writefile = GAME_ROOT.TPLDIR.'/mixhelp.htm';
16 
17 include_once config('npc',$gamecfg);
18 for ($i=0; $i<=20; $i++) $p[$i]=$i;
19 for ($i=1; $i<=6; $i++) $itemlst[$i]=$i;
20 $ty1[1]=6; $ty1[2]=5; $ty1[3]=1; $ty1[4]=9; $ty1[5]=88;
21 $ty2[1]=11;
22 $ty3[1]=2; $ty3[2]=90;
23 $ty4[1]=14;
24 
25 if(filemtime($mixfile) > filemtime($writefile) || filemtime($shopfile) > filemtime($writefile) || filemtime($mapitemfile) > filemtime($writefile) || filemtime($synfile) > filemtime($writefile) || filemtime($ovlfile) > filemtime($writefile) || filemtime($presentfile) > filemtime($writefile) || filemtime($boxfile) > filemtime($writefile)){
26  $mixitem = array();
27  foreach($mixinfo as $mix){
28  if($mix['class'] !== 'hidden'){
29  foreach($iteminfo as $info_key => $info_value){
30  if(strpos($mix['result'][1],$info_key)===0){
31  $mixitmk = $info_value;
32  break;
33  }
34  }
35  $mixitmsk = '';
36  if(!empty($mix['result'][4]) && !is_numeric($mix['result'][4])){
37  for ($j = 0; $j < strlen($mix['result'][4]); $j++) {
38  $sub = substr($mix['result'][4],$j,1);
39  if(!empty($sub)){
40  $mixitmsk .= $itemspkinfo[$sub].'+';
41  }
42  }
43  if(!empty($mixitmsk)){$mixitmsk = substr($mixitmsk,0,-1);}
44  }
45  $mixitem[$mix['class']][] = array('stuff' => $mix['stuff'], 'result' => array($mix['result'][0],$mixitmk,$mix['result'][2],$mix['result'][3],$mixitmsk));
46  }
47 
48  }
49 
50  $mixclass = array(
51  'wp'=> array('殴系武器','yellow'),
52  'wk'=> array('斩系武器','yellow'),
53  'wg'=> array('射系武器','yellow'),
54  'wc'=> array('投系武器','yellow'),
55  'wd'=> array('爆系武器','yellow'),
56  'wf'=> array('灵系武器','yellow'),
57  'w' => array('其他装备','yellow'),
58  'h' => array('补给品','lime'),
59  'pokemon'=> array('小黄系道具','yellow'),
60  'ocg'=> array('游戏王系道具','clan'),
61  'key'=> array('KEY系道具','lime'),
62  'cube'=> array('方块系道具','yellow'),
63  'item'=> array('其他道具','yellow'),
64  );
65  $mixhelpinfo = '';
66  foreach($mixitem as $class => $list){
67  $classname = $mixclass[$class][0];
68  $classcolor = $mixclass[$class][1];
69  $mixhelpinfo .= "<p><span class=\"$classcolor\">{$classname}合成表</span>:</p>\n";
70  $mixhelpinfo .=
71  "<table>
72  <tr>
73  <td class=\"b1\" height=20px><span>合成材料一</span></td>
74  <td class=\"b1\"><span>合成材料二</span></td>
75  <td class=\"b1\"><span>合成材料三</span></td>
76  <td class=\"b1\"><span>合成材料四</span></td>
77  <td class=\"b1\"><span>合成材料五</span></td>
78  <td class=\"b1\"></td>
79  <td class=\"b1\"><span>合成结果</span></td>
80  <td class=\"b1\"><span>用途</span></td>
81  </tr>
82  ";
83  foreach($list as $val){
84  if(!empty($val['result'][4])){$itmskword = '/'.$val['result'][4];}
85  else{$itmskword = '';}
86  if(!isset($val['stuff'][2])){$val['stuff'][2] = '-';}
87  if(!isset($val['stuff'][3])){$val['stuff'][3] = '-';}
88  if(!isset($val['stuff'][4])){$val['stuff'][4] = '-';}
89  $mixhelpinfo .= "<tr>";
90  for ($i=0; $i<=4; $i++)
91  {
92  $mixhelpinfo .= "<td class=\"b3\" ";
93  if ($i==0) $mixhelpinfo .= "height=20px ";
94  include_once GAME_ROOT.'./include/game/itemplace.func.php';
95  if ($val['stuff'][$i]!='-') $mixhelpinfo .= "title=\"".get_item_place($val['stuff'][$i])."\" ";
96  $mixhelpinfo .= "><span>{$val['stuff'][$i]}</span></td>";
97  }
98  $mixhelpinfo .= "<td class=\"b3\">→</td>
99  <td class=\"b3\" title=\"{$val['result'][1]}/{$val['result'][2]}/{$val['result'][3]}{$itmskword}\"><span>{$val['result'][0]}</span></td>
100  <td class=\"b3\"><span>{$val['result'][1]}/{$val['result'][2]}/{$val['result'][3]}{$itmskword}</span></td>
101  </tr>
102  ";
103  }
104  $mixhelpinfo .= "</table>\n";
105  }
106 
107  writeover($writefile,$mixhelpinfo);
108 }
109 
110 $extrahead = <<<EOT
111 <STYLE type=text/css>
112 BODY {
113  FONT-SIZE: 10pt;MARGIN: 0; color:#eee; FONT-FAMILY: "Trebuchet MS","Gill Sans","Microsoft Sans Serif",sans-serif;
114 }
115 A {
116  COLOR: #eee
117 }
118 A:visited {
119  COLOR: #eee
120 }
121 A:active {
122  color: #98fb98;text-decoration:underline
123 }
124 P{ line-height:16px
125 }
126 
127 DIV {
128  PADDING-LEFT: 1em;PADDING-right: 1em
129 }
130 
131 .subtitle2 {
132  font-family: "微软雅黑"; color: #98fb98; width: 100%;font-size: 16px;font-weight:900;
133 }
134 
135 DIV.FAQ {
136  PADDING-LEFT: 1em; line-height:16px
137 }
138 DIV.FAQ DT {
139  COLOR: #98fb98
140 }
141 DIV.FAQ DD {
142 
143 }
144 
145 </STYLE>
146 EOT;
147 
148 include template('help');
149 
150 
151 
152 ?>
$iteminfo
writeover($filename, $data, $method="rb+", $iflock=1, $check=1, $chmod=1)
$gamecfg
Definition: system.php:22
$mapitemfile
Definition: help.php:9
$ty2[1]
Definition: help.php:21
$boxfile
Definition: help.php:13
$i
Definition: botservice.php:267
$presentfile
Definition: help.php:12
$itemspkinfo
const GAME_ROOT
Definition: clear.php:6
$ty4[1]
Definition: help.php:23
$ty1[1]
Definition: help.php:20
$writefile
Definition: help.php:15
$ty3[1]
Definition: help.php:22
$synfile
Definition: help.php:10
config($file= '', $cfg=1)
$mixinfo
Definition: mixitem_1.php:4
$mixfile
Definition: help.php:7
$ovlfile
Definition: help.php:11
$shopfile
Definition: help.php:8
if(filemtime($mixfile) > filemtime($writefile)||filemtime($shopfile) > filemtime($writefile)||filemtime($mapitemfile) > filemtime($writefile)||filemtime($synfile) > filemtime($writefile)||filemtime($ovlfile) > filemtime($writefile)||filemtime($presentfile) > filemtime($writefile)||filemtime($boxfile) > filemtime($writefile)) $extrahead
Definition: help.php:110
$mixitem
Definition: getmix.php:8