Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
itemplace.func.php
Go to the documentation of this file.
1 <?php
2 if (! defined ( 'IN_GAME' )) {
3  exit ( 'Access Denied' );
4 }
5 
6 function get_item_place($which)
7 {
8  global $plsinfo,$gamecfg;
9  //获取某物品的获取方式,如刷新地点或商店是否有卖等
10  $result="";
11  $file = config('mapitem',$gamecfg);
12  $itemlist = openfile($file);
13  $in = sizeof($itemlist);
14  for($i = 1; $i < $in; $i++)
15  if(!empty($itemlist[$i]) && strpos($itemlist[$i],',')!==false)
16  {
17  list($iarea,$imap,$inum,$iname,$ikind,$ieff,$ista,$iskind) = explode(',',$itemlist[$i]);
18  if ($iname==$which)
19  {
20  if ($iarea==99) $result.="每禁"; else $result.="{$iarea}禁";
21  if ($imap==99) $result.="全图随机"; else $result.="于{$plsinfo[$imap]}";
22  $result.="刷新{$inum}个&#13;";
23  }
24  }
25  $file = config('shopitem',$gamecfg);
26  $shoplist = openfile($file);
27  foreach($shoplist as $lst)
28  if(!empty($lst) && strpos($lst,',')!==false)
29  {
30  list($kind,$num,$price,$area,$item)=explode(',',$lst);
31  if ($item==$which)
32  {
33  $result.="{$area}禁起在商店中出售({$price}元)&#13;";
34  }
35  }
36  include_once config('mixitem',$gamecfg);
37  global $mixinfo;
38  foreach($mixinfo as $lst)
39  {
40  if ($lst['result'][0]==$which || $lst['result'][0]==$which.' ')
41  {
42  $result.="通过合成获取&#13;";
43  break;
44  }
45  }
46  $file=config('synitem',$gamecfg);
47  $synlist = openfile($file);
48  foreach($synlist as $lst)
49  if(!empty($lst) && strpos($lst,',')!==false)
50  {
51  list($item,$kind)=explode(',',$lst);
52  if ($item==$which)
53  {
54  $result.="通过同调合成获取&#13;";
55  break;
56  }
57  }
58  $file=config('overlay',$gamecfg);
59  $ovllist = openfile($file);
60  foreach($ovllist as $lst)
61  if(!empty($lst) && strpos($lst,',')!==false)
62  {
63  list($item,$kind)=explode(',',$lst);
64  if ($item==$which)
65  {
66  $result.="通过超量合成获取&#13;";
67  break;
68  }
69  }
70  $file=config('present',$gamecfg);
71  $prslist = openfile($file);
72  foreach($prslist as $lst)
73  if(!empty($lst) && strpos($lst,',')!==false)
74  {
75  list($item,$kind)=explode(',',$lst);
76  if ($item==$which)
77  {
78  $result.="打开礼品盒时有概率获得&#13;";
79  break;
80  }
81  }
82  $file=config('box',$gamecfg);
83  $boxlist = openfile($file);
84  foreach($boxlist as $lst)
85  if(!empty($lst) && strpos($lst,',')!==false)
86  {
87  list($item,$kind)=explode(',',$lst);
88  if ($item==$which)
89  {
90  $result.="打开游戏王卡包时有概率获得&#13;";
91  break;
92  }
93  }
94  if ($which=="悲叹之种") $result.="通过使用『灵魂宝石』强化物品失败获得&#13;";
95  return $result;
96 }
97 ?>
$gamecfg
Definition: system.php:22
if(!defined( 'IN_GAME')) get_item_place($which)
$plsinfo
$i
Definition: botservice.php:267
openfile($filename)
config($file= '', $cfg=1)
$mixinfo
Definition: mixitem_1.php:4
if(!$cuser||!$cpass) $result
Definition: admin.php:25