Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
phpdts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
phpdts
Commits
8d0565f3
Commit
8d0565f3
authored
Feb 13, 2023
by
Nemo Ma
Committed by
GitHub
Feb 13, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #34 from hikawiier/waaagh
Update & Fix
parents
a49a09c5
4cf3ea00
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
92 additions
and
60 deletions
+92
-60
command.php
command.php
+1
-0
game.php
game.php
+1
-0
gamedata/cache/audio_1.php
gamedata/cache/audio_1.php
+8
-1
gamedata/cache/style_20190718.css
gamedata/cache/style_20190718.css
+4
-4
include/admin/npcmng.php
include/admin/npcmng.php
+2
-2
include/admin/pcmng.php
include/admin/pcmng.php
+1
-1
include/game.func.php
include/game.func.php
+40
-38
include/game/item.func.php
include/game/item.func.php
+13
-9
include/game/revcombat.func.php
include/game/revcombat.func.php
+6
-3
include/game/search.func.php
include/game/search.func.php
+14
-1
include/news.func.php
include/news.func.php
+2
-1
No files found.
command.php
View file @
8d0565f3
...
@@ -44,6 +44,7 @@ extract($pdata,EXTR_REFS);
...
@@ -44,6 +44,7 @@ extract($pdata,EXTR_REFS);
$log
=
$cmd
=
$main
=
''
;
$log
=
$cmd
=
$main
=
''
;
$gamedata
=
array
();
$gamedata
=
array
();
init_playerdata
();
init_playerdata
();
$clbpara
=
get_clbpara
(
$clbpara
);
//读取玩家互动信息
//读取玩家互动信息
$result
=
$db
->
query
(
"SELECT lid,time,log FROM
{
$tablepre
}
log WHERE toid = '
$pid
' AND prcsd = 0 ORDER BY time,lid"
);
$result
=
$db
->
query
(
"SELECT lid,time,log FROM
{
$tablepre
}
log WHERE toid = '
$pid
' AND prcsd = 0 ORDER BY time,lid"
);
...
...
game.php
View file @
8d0565f3
...
@@ -38,6 +38,7 @@ if($gamestate == 0) {
...
@@ -38,6 +38,7 @@ if($gamestate == 0) {
extract
(
$pdata
);
extract
(
$pdata
);
init_playerdata
();
init_playerdata
();
init_profile
();
init_profile
();
$clbpara
=
get_clbpara
(
$clbpara
);
$log
=
''
;
$log
=
''
;
//读取聊天信息
//读取聊天信息
...
...
gamedata/cache/audio_1.php
View file @
8d0565f3
...
@@ -6,7 +6,14 @@ if(!defined('IN_GAME')) exit('Access Denied');
...
@@ -6,7 +6,14 @@ if(!defined('IN_GAME')) exit('Access Denied');
# 未配置的默认播放音量(单位:百分比)
# 未配置的默认播放音量(单位:百分比)
$default_volume
=
20
;
$default_volume
=
20
;
# 会播放BGM的地图(优先级高)
# 会播放BGM的事件(优先级最高——会覆盖默认曲集)
# 具体触发时用不用这个数组都无所谓,可以直接调用: $clbpara['event_bgmbook'] = Array('指定事件曲集名');
$event_bgm
=
Array
(
'test'
=>
Array
(
'event'
),
);
# 会播放BGM的地图(优先级高——会覆盖默认曲集)
$pls_bgm
=
Array
$pls_bgm
=
Array
(
(
# 在英灵殿会播放对应曲集
# 在英灵殿会播放对应曲集
...
...
gamedata/cache/style_20190718.css
View file @
8d0565f3
...
@@ -28,10 +28,10 @@ input {cursor: crosshair;}
...
@@ -28,10 +28,10 @@ input {cursor: crosshair;}
.mapspanred
{
color
:
#f00
;
position
:
relative
;
font-size
:
9pt
;
line-height
:
16px
}
.mapspanred
{
color
:
#f00
;
position
:
relative
;
font-size
:
9pt
;
line-height
:
16px
}
.mapspanlime
{
color
:
#0f0
;
position
:
relative
;
font-size
:
9pt
;
line-height
:
16px
}
.mapspanlime
{
color
:
#0f0
;
position
:
relative
;
font-size
:
9pt
;
line-height
:
16px
}
.mapspanyellow
{
color
:
#ff0
;
position
:
relative
;
font-size
:
9pt
;
line-height
:
16px
}
.mapspanyellow
{
color
:
#ff0
;
position
:
relative
;
font-size
:
9pt
;
line-height
:
16px
}
.minimapspanclan
{
color
:
#00ffff
;
position
:
relative
;
font
:
7pt
"微软雅黑"
;
line-height
:
14px
}
.minimapspanclan
{
color
:
#00ffff
;
position
:
relative
;
font
:
bold
7pt
"微软雅黑"
;
line-height
:
14px
}
.minimapspanred
{
color
:
#f00
;
position
:
relative
;
font
:
7pt
"微软雅黑"
;
line-height
:
14px
}
.minimapspanred
{
color
:
#f00
;
position
:
relative
;
font
:
bold
7pt
"微软雅黑"
;
line-height
:
14px
}
.minimapspanlime
{
color
:
#0f0
;
position
:
relative
;
font
:
7pt
"微软雅黑"
;
line-height
:
14px
}
.minimapspanlime
{
color
:
#0f0
;
position
:
relative
;
font
:
bold
7pt
"微软雅黑"
;
line-height
:
14px
}
.minimapspanyellow
{
color
:
#ff0
;
position
:
relative
;
font
:
7pt
"微软雅黑"
;
line-height
:
14px
}
.minimapspanyellow
{
color
:
#ff0
;
position
:
relative
;
font
:
bold
7pt
"微软雅黑"
;
line-height
:
14px
}
.b1
span
{
position
:
relative
;}
.b1
span
{
position
:
relative
;}
.b2
span
{
position
:
relative
;}
.b2
span
{
position
:
relative
;}
...
...
include/admin/npcmng.php
View file @
8d0565f3
...
@@ -44,7 +44,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
...
@@ -44,7 +44,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
$operlist
[
$
{
'npc_'
.
$i
}]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
$operlist
[
$
{
'npc_'
.
$i
}]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
$npcdata
[
$i
][
'hp'
]
=
$npcdata
[
$i
][
'mhp'
];
$npcdata
[
$i
][
'hp'
]
=
$npcdata
[
$i
][
'mhp'
];
$npcdata
[
$i
][
'state'
]
=
0
;
$npcdata
[
$i
][
'state'
]
=
0
;
$deathnum
--
;
$alivenum
++
;
$deathnum
--
;
//
$alivenum++;
adminlog
(
'livenpc'
,
$npcdata
[
$i
][
'name'
]);
adminlog
(
'livenpc'
,
$npcdata
[
$i
][
'name'
]);
}
else
{
}
else
{
$gfaillist
[]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
$gfaillist
[]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
...
@@ -55,7 +55,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
...
@@ -55,7 +55,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
$operlist
[
$
{
'npc_'
.
$i
}]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
$operlist
[
$
{
'npc_'
.
$i
}]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
$npcdata
[
$i
][
'hp'
]
=
0
;
$npcdata
[
$i
][
'hp'
]
=
0
;
$npcdata
[
$i
][
'state'
]
=
16
;
$npcdata
[
$i
][
'state'
]
=
16
;
$deathnum
--
;
$alivenum
++
;
$deathnum
++
;
//
$alivenum++;
adminlog
(
'delnpc'
,
$npcdata
[
$i
][
'name'
]);
adminlog
(
'delnpc'
,
$npcdata
[
$i
][
'name'
]);
}
else
{
}
else
{
$operlist2
[
$
{
'npc_'
.
$i
}]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
$operlist2
[
$
{
'npc_'
.
$i
}]
=
$npcdata
[
$i
][
'name'
]
.
'(PID:'
.
$npcdata
[
$i
][
'pid'
]
.
')'
;
...
...
include/admin/pcmng.php
View file @
8d0565f3
...
@@ -57,7 +57,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
...
@@ -57,7 +57,7 @@ if($command == 'kill' || $command == 'live' || $command == 'del') {
$operlist
[
$
{
'pc_'
.
$i
}]
=
$pcdata
[
$i
][
'name'
];
$operlist
[
$
{
'pc_'
.
$i
}]
=
$pcdata
[
$i
][
'name'
];
$pcdata
[
$i
][
'hp'
]
=
0
;
$pcdata
[
$i
][
'hp'
]
=
0
;
$pcdata
[
$i
][
'state'
]
=
16
;
$pcdata
[
$i
][
'state'
]
=
16
;
$deathnum
--
;
$alivenum
++
;
$deathnum
++
;
$alivenum
--
;
adminlog
(
'delpc'
,
$pcdata
[
$i
][
'name'
]);
adminlog
(
'delpc'
,
$pcdata
[
$i
][
'name'
]);
addnews
(
$now
,
'death16'
,
$pcdata
[
$i
][
'name'
]);
addnews
(
$now
,
'death16'
,
$pcdata
[
$i
][
'name'
]);
}
else
{
}
else
{
...
...
include/game.func.php
View file @
8d0565f3
...
@@ -479,36 +479,43 @@ function init_bgm($force_update=0)
...
@@ -479,36 +479,43 @@ function init_bgm($force_update=0)
{
{
global
$volume
,
$bgmname
,
$bgmlink
,
$bgmtype
,
$gamecfg
;
global
$volume
,
$bgmname
,
$bgmlink
,
$bgmtype
,
$gamecfg
;
global
$pls
,
$command
,
$clbpara
;
global
$pls
,
$command
,
$clbpara
;
include_once
config
(
'audio'
,
$gamecfg
);
include
config
(
'audio'
,
$gamecfg
);
$clbpara
=
get_clbpara
(
$clbpara
);
# 初始化
# 初始化
$event_flag
=
0
;
$bgmname
=
$bgmlink
=
$bgmtype
=
$bgmplayer
=
$bgmnums
=
''
;
$bgmname
=
$bgmlink
=
$bgmtype
=
$bgmplayer
=
$bgmnums
=
''
;
#
移动时,检查是否需要更新播放列表
#
存在最优先的事件BGM队列
if
(
$command
==
'move'
&&
isset
(
$clbpara
[
'
bgmbook'
]))
if
(
isset
(
$clbpara
[
'event_
bgmbook'
]))
{
{
# 重置当前播放列表
# 检查是否需要更新播放列表
$oldbook
=
$clbpara
[
'bgmbook'
];
if
(
array_diff
(
$clbpara
[
'bgmbook'
],
$clbpara
[
'event_bgmbook'
]))
$clbpara
[
'bgmbook'
]
=
$clbpara
[
'valid_bgmbook'
];
# 检查当前地图是否存在BGM,如有,将其加入地图曲集
if
(
array_key_exists
(
$pls
,
$pls_bgm
))
{
{
shuffle
(
$pls_bgm
[
$pls
]);
# 重置当前播放列表
foreach
(
$pls_bgm
[
$pls
]
as
$pbook
)
$clbpara
[
'bgmbook'
]
=
$clbpara
[
'event_bgmbook'
];
{
$force_update
=
1
;
$clbpara
[
'bgmbook'
][]
=
$pbook
;
}
# 将播放列表的第一位设置为地图BGM
shuffle
(
$bgmbook
[
$pls_bgm
[
$pls
][
0
]]);
$bgmid
=
$bgmbook
[
$pls_bgm
[
$pls
][
0
]][
0
];
$nowbgmname
=
$bgmlist
[
$bgmid
][
'name'
];
$bgmlink
=
$bgmlist
[
$bgmid
][
'url'
];
$bgmtype
=
$bgmlist
[
$bgmid
][
'type'
];
}
}
# 如果移动后的生成播放列表与旧播放列表比较存在变化,则重新生成播放器
}
# 这个逻辑比较绕,因为存在【从没BGM的地图进入/离开没BGM地图】和【从没BGM的地图离开/进入有BGM的地图】等等好几种情况。当然还有优化空间,但是留给以后的我去想吧……
# 存在次优先的地图BGM队列
if
(
array_diff
(
$clbpara
[
'bgmbook'
],
$oldbook
)
||
array_diff
(
$oldbook
,
$clbpara
[
'bgmbook'
]))
elseif
(
isset
(
$clbpara
[
'pls_bgmbook'
]))
{
# 检查是否需要更新播放列表
if
(
array_diff
(
$clbpara
[
'bgmbook'
],
$clbpara
[
'pls_bgmbook'
]))
{
{
# 重置当前播放列表
$clbpara
[
'bgmbook'
]
=
$clbpara
[
'pls_bgmbook'
];
$force_update
=
1
;
}
}
# 检查是否需要更新默认BGM列表
else
{
if
(
empty
(
$clbpara
[
'bgmbook'
])
||
array_diff
(
$clbpara
[
'bgmbook'
],
$clbpara
[
'valid_bgmbook'
]))
{
# 重置当前播放列表
$clbpara
[
'bgmbook'
]
=
$clbpara
[
'valid_bgmbook'
];
$force_update
=
1
;
$force_update
=
1
;
}
}
}
}
...
@@ -532,16 +539,16 @@ function init_bgm($force_update=0)
...
@@ -532,16 +539,16 @@ function init_bgm($force_update=0)
$nowbgm
=
0
;
$nowbgm
=
0
;
# 初始化首位BGM
# 初始化首位BGM
shuffle
(
$bgmarr
);
shuffle
(
$bgmarr
);
if
(
empty
(
$bgmname
))
$bgmname
=
$bgmarr
[
0
][
'name'
];
$bgmname
=
$bgmarr
[
0
][
'name'
];
if
(
empty
(
$bgmlink
))
$bgmlink
=
$bgmarr
[
0
][
'url'
];
$bgmlink
=
$bgmarr
[
0
][
'url'
];
if
(
empty
(
$bgmtype
))
$bgmtype
=
$bgmarr
[
0
][
'type'
];
$bgmtype
=
$bgmarr
[
0
][
'type'
];
#初始化默认音量
#初始化默认音量
$volume
=
isset
(
$player_volume
)
?
$player_volume
:
$default_volume
;
$volume
=
isset
(
$player_volume
)
?
$player_volume
:
$default_volume
;
$volume_r
=
round
(
$volume
/
100
,
2
);
$volume_r
=
round
(
$volume
/
100
,
2
);
# 生成播放器与播放队列 太野蛮了……嘻嘻……
# 生成播放器与播放队列 太野蛮了……嘻嘻……
if
(
!
empty
(
$bgmlink
)
&&
!
empty
(
$bgmtype
))
if
(
!
empty
(
$bgmlink
)
&&
!
empty
(
$bgmtype
))
{
{
$bgmplayer
=
<<<EOT
$bgmplayer
=
<<<EOT
<audio id="gamebgm" autoplay controls onplay="$('gamebgm').volume=$volume_r;" onplaying="$('gamebgm').volume=$volume_r;">
<audio id="gamebgm" autoplay controls onplay="$('gamebgm').volume=$volume_r;" onplaying="$('gamebgm').volume=$volume_r;">
<source id="gbgm" src="$bgmlink" type="$bgmtype">
<source id="gbgm" src="$bgmlink" type="$bgmtype">
</audio>
</audio>
...
@@ -555,11 +562,9 @@ function init_bgm($force_update=0)
...
@@ -555,11 +562,9 @@ function init_bgm($force_update=0)
EOT;
EOT;
foreach
(
$bgmarr
as
$bgmid2
=>
$bgms
)
foreach
(
$bgmarr
as
$bgmid2
=>
$bgms
)
{
{
$bgmplayer
.=
<<<EOT
$bgmplayer
.=
"<div id=
\"
bnm
{
$bgmid2
}
\"
>
{
$bgms
[
'name'
]
}
</div>
<div id="bnm{$bgmid2}">{$bgms['name']}</div>
<div id=
\"
bgm
{
$bgmid2
}
\"
>
{
$bgms
[
'url'
]
}
</div>
<div id="bgm{$bgmid2}">{$bgms['url']}</div>
<div id=
\"
bt
{
$bgmid2
}
\"
>
{
$bgms
[
'type'
]
}
</div>"
;
<div id="bt{$bgmid2}">{$bgms['type']}</div>
EOT;
}
}
}
}
return
$bgmplayer
;
return
$bgmplayer
;
...
@@ -572,8 +577,8 @@ EOT;
...
@@ -572,8 +577,8 @@ EOT;
function
init_mapdata
(){
function
init_mapdata
(){
global
$pls
,
$plsinfo
,
$xyinfo
,
$hack
,
$arealist
,
$areanum
,
$areaadd
;
global
$pls
,
$plsinfo
,
$xyinfo
,
$hack
,
$arealist
,
$areanum
,
$areaadd
;
global
$mapcontent
;
$mpp
=
Array
();
$mapvcoordinate
=
Array
(
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
);
$mapvcoordinate
=
Array
(
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
,
'G'
,
'H'
,
'I'
,
'J'
);
for
(
$i
=
0
;
$i
<
count
(
$plsinfo
);
$i
++
)
for
(
$i
=
0
;
$i
<
count
(
$plsinfo
);
$i
++
)
{
{
...
@@ -587,9 +592,8 @@ function init_mapdata(){
...
@@ -587,9 +592,8 @@ function init_mapdata(){
$position
=
explode
(
'-'
,
$xyinfo
[
$i
]);
$position
=
explode
(
'-'
,
$xyinfo
[
$i
]);
$mpp
[
$position
[
0
]][
$position
[
1
]]
=
$i
;
$mpp
[
$position
[
0
]][
$position
[
1
]]
=
$i
;
}
}
$mapcontent
=
<<<EOT
<TABLE border="1" cellspacing="0" cellpadding="0" background="map/neomap.jpg" style="padding-left: 5px; float:left;background-size:478px 418px;position:relative;background-repeat:no-repeat;background-position:right bottom;">
$mapcontent
=
'<TABLE border="1" cellspacing="0" cellpadding="0" background="map/neomap.jpg" style="padding-left: 5px; float:left;background-size:478px 418px;position:relative;background-repeat:no-repeat;background-position:right bottom;">'
;
EOT;
$mapcontent
.=
'<TR align="center"><TD colspan="11" height="24" class=b1 align=center>战场地图</TD></TR>'
;
$mapcontent
.=
'<TR align="center"><TD colspan="11" height="24" class=b1 align=center>战场地图</TD></TR>'
;
$mapcontent
.=
'<TR align="center">
$mapcontent
.=
'<TR align="center">
<TD width="42" height="36" class=map align=center><div class=nttx>坐标</div></TD>'
;
<TD width="42" height="36" class=map align=center><div class=nttx>坐标</div></TD>'
;
...
@@ -603,9 +607,7 @@ EOT;
...
@@ -603,9 +607,7 @@ EOT;
for
(
$j
=
1
;
$j
<=
10
;
$j
++
){
for
(
$j
=
1
;
$j
<=
10
;
$j
++
){
if
(
isset
(
$mpp
[
$mapvcoordinate
[
$i
]][
$j
]))
if
(
isset
(
$mpp
[
$mapvcoordinate
[
$i
]][
$j
]))
{
{
$mapcontent
.=
<<<EOT
$mapcontent
.=
"<td width=
\"
42
\"
height=
\"
36
\"
class=
\"
map2
\"
align=
\"
middle
\"
><a onclick=
\"
closeDialog($('terminal'));$('mode').value='command';$('command').value='move';$('moveto').value='
{
$mpp
[
$mapvcoordinate
[
$i
]][
$j
]
}
';postCmd('gamecmd','command.php');this.disabled=true;
\"
><span class=
\"
{
$plscolor
[
$mpp
[
$mapvcoordinate
[
$i
]][
$j
]]
}
\"
>
{
$plsinfo
[
$mpp
[
$mapvcoordinate
[
$i
]][
$j
]]
}
</span></a></td>"
;
<td width="42" height="36" class="map2" align=middle><a onclick="closeDialog($('terminal'));$('mode').value='command';$('command').value='move';$('moveto').value='{$mpp[$mapvcoordinate[$i]][$j]}';postCmd('gamecmd','command.php');this.disabled=true;"><span class="{$plscolor[$mpp[$mapvcoordinate[$i]][$j]]}">{$plsinfo[$mpp[$mapvcoordinate[$i]][$j]]}</span></a></td>
EOT;
}
else
{
}
else
{
$mapcontent
.=
'<td width="42" height="36" class="map2" align=middle><IMG src="map/blank.gif" width="42" height="36" border=0></td>'
;
$mapcontent
.=
'<td width="42" height="36" class="map2" align=middle><IMG src="map/blank.gif" width="42" height="36" border=0></td>'
;
}
}
...
...
include/game/item.func.php
View file @
8d0565f3
...
@@ -1866,6 +1866,19 @@ function itemuse($itmn) {
...
@@ -1866,6 +1866,19 @@ function itemuse($itmn) {
//销毁物品
//销毁物品
$itm
=
$itmk
=
$itmsk
=
''
;
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
$itme
=
$itms
=
0
;
}
elseif
(
$itm
==
'事件BGM替换器'
){
// 这是一个触发事件BGM的案例,只要输入$clbpara['event_bgmbook'] = Array('事件曲集名'); 即可将当前曲集替换为特殊事件BGM
// 特殊事件曲集'event_bgmbook'的优先级高于地图曲集'pls_bgmbook',前者存在时后者不会生效
global
$clbpara
;
include_once
config
(
'audio'
,
$gamecfg
);
$log
.=
"【DEBUG】你目前的播放列表被替换为了
{
$event_bgm
[
'test'
][
0
]
}
!<br>特殊的事件曲集不会被其他曲集覆盖,除非你使用下面的道具。<br>"
;
$clbpara
[
'event_bgmbook'
]
=
$event_bgm
[
'test'
];
}
elseif
(
$itm
==
'事件BGM还原器'
){
// 这是一个取消事件BGM的案例,只要unset($clbpara['event_bgmbook']);就可以将当前曲集替换为地图曲集或默认曲集;
// 如果你想播放另一个事件曲集,也可以$clbpara['event_bgmbook'] = Array('另一个事件曲集名');
global
$clbpara
;
$log
.=
"【DEBUG】你目前的播放列表还原为了默认播放列表!<br>"
;
unset
(
$clbpara
[
'event_bgmbook'
]);
}
elseif
(
$itm
==
'测试用元素口袋'
){
}
elseif
(
$itm
==
'测试用元素口袋'
){
global
$elements_info
;
global
$elements_info
;
$log
.=
"【DEBUG】你不知道从哪里摸出来一大堆元素!<br>"
;
$log
.=
"【DEBUG】你不知道从哪里摸出来一大堆元素!<br>"
;
...
@@ -1922,15 +1935,6 @@ function itemuse($itmn) {
...
@@ -1922,15 +1935,6 @@ function itemuse($itmn) {
$itm
=
$itmk
=
$itmsk
=
''
;
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
$itme
=
$itms
=
0
;
//-----------------------//
//-----------------------//
}
elseif
(
$itm
==
'电子蛐蛐测试装置'
)
{
//这是一个测试用道具 设置好$nid(先手者pid)和$eid(挨打者pid)后可以看这两个人打架 把其中一个设置成自己的pid就可以亲自下场 //自己下场现在有BUG
//$nid:先手攻击者的pid;$eid:挨打者的pid
//如果$nid打死了$eid的话,尸体会由你来摸,这不是BUG,是一个暂时缺少条件判断的特性。
global
$pid
;
$nid
=
$pid
;
$eid
=
2
;
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$nid
,
$eid
);
return
;
}
elseif
(
$itm
==
'提示纸条A'
)
{
}
elseif
(
$itm
==
'提示纸条A'
)
{
$log
.=
'你读着纸条上的内容:<br>“执行官其实都是幻影,那个红暮的身上应该有召唤幻影的玩意。”<br>“用那个东西然后打倒幻影的话能用游戏解除钥匙出去吧。”<br>'
;
$log
.=
'你读着纸条上的内容:<br>“执行官其实都是幻影,那个红暮的身上应该有召唤幻影的玩意。”<br>“用那个东西然后打倒幻影的话能用游戏解除钥匙出去吧。”<br>'
;
}
elseif
(
$itm
==
'提示纸条B'
)
{
}
elseif
(
$itm
==
'提示纸条B'
)
{
...
...
include/game/revcombat.func.php
View file @
8d0565f3
...
@@ -600,9 +600,12 @@
...
@@ -600,9 +600,12 @@
get_killer_rp
(
$pa
,
$pd
,
$active
);
get_killer_rp
(
$pa
,
$pd
,
$active
);
# 执行死亡事件(灵魂绑定等)
# 执行死亡事件(灵魂绑定等)
check_death_events
(
$pa
,
$pd
,
$active
);
check_death_events
(
$pa
,
$pd
,
$active
);
# 检查成就
# 检查成就 大补丁:击杀者是玩家时才会检查成就
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
if
(
!
$pa
[
'type'
])
check_battle_achievement
(
$pa
[
'name'
],
$pd
[
'type'
],
$pd
[
'name'
],
$pa
[
'wep_name'
]);
{
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
check_battle_achievement
(
$pa
[
'name'
],
$pd
[
'type'
],
$pd
[
'name'
],
$pa
[
'wep_name'
]);
}
# 保存游戏进行状态
# 保存游戏进行状态
include_once
GAME_ROOT
.
'./include/system.func.php'
;
include_once
GAME_ROOT
.
'./include/system.func.php'
;
save_gameinfo
();
save_gameinfo
();
...
...
include/game/search.func.php
View file @
8d0565f3
...
@@ -382,6 +382,7 @@ function search(){
...
@@ -382,6 +382,7 @@ function search(){
function
discover
(
$schmode
=
0
)
{
function
discover
(
$schmode
=
0
)
{
global
$art
,
$pls
,
$now
,
$log
,
$mode
,
$command
,
$cmd
,
$event_obbs
,
$weather
,
$pls
,
$club
,
$pose
,
$tactic
,
$inf
,
$item_obbs
,
$enemy_obbs
,
$trap_min_obbs
,
$trap_max_obbs
,
$bid
,
$db
,
$tablepre
,
$gamestate
,
$corpseprotect
,
$action
,
$skills
,
$rp
,
$aidata
;
global
$art
,
$pls
,
$now
,
$log
,
$mode
,
$command
,
$cmd
,
$event_obbs
,
$weather
,
$pls
,
$club
,
$pose
,
$tactic
,
$inf
,
$item_obbs
,
$enemy_obbs
,
$trap_min_obbs
,
$trap_max_obbs
,
$bid
,
$db
,
$tablepre
,
$gamestate
,
$corpseprotect
,
$action
,
$skills
,
$rp
,
$aidata
;
global
$clbpara
;
$event_dice
=
rand
(
0
,
99
);
$event_dice
=
rand
(
0
,
99
);
if
((
$event_dice
<
$event_obbs
)
||
((
$art
!=
"Untainted Glory"
)
&&
(
$pls
==
34
)
&&
(
$gamestate
!=
50
))){
if
((
$event_dice
<
$event_obbs
)
||
((
$art
!=
"Untainted Glory"
)
&&
(
$pls
==
34
)
&&
(
$gamestate
!=
50
))){
//echo "进入事件判定<br>";
//echo "进入事件判定<br>";
...
@@ -394,6 +395,18 @@ function discover($schmode = 0) {
...
@@ -394,6 +395,18 @@ function discover($schmode = 0) {
return
;
return
;
}
}
}
}
# 判定移动、探索、事件后的BGM变化
include_once
config
(
'audio'
,
$gamecfg
);
if
(
array_key_exists
(
$pls
,
$pls_bgm
))
{
$clbpara
[
'pls_bgmbook'
]
=
$pls_bgm
[
$pls
];
}
else
{
if
(
isset
(
$clbpara
[
'pls_bgmbook'
]))
unset
(
$clbpara
[
'pls_bgmbook'
]);
}
include_once
GAME_ROOT
.
'./include/game/aievent.func.php'
;
//AI事件
include_once
GAME_ROOT
.
'./include/game/aievent.func.php'
;
//AI事件
$aidata
=
false
;
//用于判断天然呆AI(冴冴这样的)是否已经来到你身后并且很生气
$aidata
=
false
;
//用于判断天然呆AI(冴冴这样的)是否已经来到你身后并且很生气
...
@@ -520,7 +533,7 @@ function discover($schmode = 0) {
...
@@ -520,7 +533,7 @@ function discover($schmode = 0) {
{
{
//echo "进入遇敌判定<br>";
//echo "进入遇敌判定<br>";
global
$pid
,
$corpse_obbs
,
$teamID
,
$fog
,
$bid
,
$gamestate
;
global
$pid
,
$corpse_obbs
,
$teamID
,
$fog
,
$bid
,
$gamestate
;
global
$clb
para
,
$clb
statusa
,
$clbstatusb
,
$clbstatusc
,
$clbstatusd
,
$clbstatuse
;
global
$clbstatusa
,
$clbstatusb
,
$clbstatusc
,
$clbstatusd
,
$clbstatuse
;
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pls='
$pls
' AND pid!='
$pid
'"
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pls='
$pls
' AND pid!='
$pid
'"
);
if
(
!
$db
->
num_rows
(
$result
)){
if
(
!
$db
->
num_rows
(
$result
)){
...
...
include/news.func.php
View file @
8d0565f3
...
@@ -168,7 +168,8 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
...
@@ -168,7 +168,8 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
}
else
{
}
else
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因<span class=
\"
red
\"
>不明原因</span>死亡"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因<span class=
\"
red
\"
>不明原因</span>死亡"
;
}
}
$dname
=
$typeinfo
[
$b
]
.
' '
.
$a
;
if
(
$b
)
$dname
=
$typeinfo
[
$b
]
.
' '
.
$a
;
else
$dname
=
$typeinfo
[
0
]
.
' '
.
$a
;
// if($b == 0) {
// if($b == 0) {
// //$dname = $a;
// //$dname = $a;
// $lwresult = $db->query("SELECT lastword FROM {$tablepre}users WHERE username = '$a'");
// $lwresult = $db->query("SELECT lastword FROM {$tablepre}users WHERE username = '$a'");
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment