目前這個的原創作者是Lineage.Game.ROC版內會員 spawnqqq 製作 ~
我把部分內容修正過後作整理發佈 ..
好 . 開始了 :
下載附加檔案 :
safety.php -> rpg/safety.php
rpg_safety.tpl -> templates/你的風格/rpg_safety.tpl
#
#--- [ SQL ]---
#
請先執行附加檔案內的SQL語法 !!
#
#--- [ 開啟 ] ---
#
rpg.php
#
#--- [ 找到] ---
#
代碼: 選擇全部
if ( $mode == 'defend' )
{
if ( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx?redirect=rpg.$phpEx&action=defend", true));
exit;
}
include($phpbb_root_path . 'rpg/defend.'.$phpEx);
exit;
}
#
#--- [ 之後加入 ] ---
#
代碼: 選擇全部
if ( $mode == 'safety' )
{
if ( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx?redirect=rpg.$phpEx&action=safety", true));
exit;
}
include($phpbb_root_path . 'rpg/safety.'.$phpEx);
exit;
}
#
#--- [ 開啟 ] ---
#
rpg/menu.php
#
#--- [ 找到 ] ---
#
代碼: 選擇全部
$defend = '';
$sql = 'SELECT i.item_name, i.item_position FROM phpbb_rpg_items i, phpbb_rpg_owns o WHERE i.in_which_store = 2 AND i.item_id = o.item_id AND o.user_id = ' .
intval($userdata['user_id']) . ' ORDER BY i.item_position';
if ( $result = $db->sql_query($sql) )
{
if ( $row = $db->sql_fetchrow($result) )
{
if ($defend == '')
{
$defend = $row['item_name'];
}
}
}
#
#--- [ 下面加入 ] ---
#
代碼: 選擇全部
$safety = '';
$sql = 'SELECT i.item_name, i.item_position FROM phpbb_rpg_items i, phpbb_rpg_owns o WHERE i.in_which_store = 4 AND i.item_id = o.item_id AND o.user_id = ' .
intval($userdata['user_id']) . ' ORDER BY i.item_position';
if ( $result = $db->sql_query($sql) )
{
if ( $row = $db->sql_fetchrow($result) )
{
if ($safety == '')
{
$safety = $row['item_name'];
}
}
}
#
#--- [ 找到 ] ---
#
代碼: 選擇全部
'RPG_DEFEND' => $defend,
#--- [ 下面加入 ] ---
#
代碼: 選擇全部
'RPG_SAFETY' => $safety,
#--- [ 開啟 ] ---
#
templates/你的風格/rpg_menu.tpl
#
#--- [ 找到 ] ---
#
代碼: 選擇全部
<td><b><span class="gen">盔 甲:</span></b></td>
<td><span class="gen">{RPG_DEFEND}</span></td>
#--- [ 下面加入 ] ---
#
代碼: 選擇全部
<td><b><span class="gen">頭 盔:</span></b></td>
<td><span class="gen">{RPG_SAFETY}</span></td>
#--- [ 開啟 ] ---
#
templates/你的風格/rpg_header.tpl
#
#--- [ 找到 ] ---
#
代碼: 選擇全部
<a href="rpg.php?action=defend" class="gen">沒光的防具店</a><br><br>
#--- [ 下面加入 ] ---
#
代碼: 選擇全部
<a href="rpg.php?action=safety" class="gen">頭盔商店</a><br><br>
#--- [ 開啟 ] ---
#
rpg/joinjobs.php
#
#--- [ 找到 ] ---
#
代碼: 選擇全部
($which_store != 2 ? '<a href="rpg.php?action=joinjobs&store=2&start=0">沒光的防具店</a>' : '沒光的防具店') .
' ' .
#--- [ 下面加入 ] ---
#
代碼: 選擇全部
($which_store != 4 ? '<a href="rpg.php?action=joinjobs&store=4&start=0">頭盔商店</a>' : '頭盔商店') .
#--- [ 儲存關閉 ] ---
# EOM
感謝 GeniusKiKi 做了補充= =||
接下來請下載附加檔案執行SQL語法 ~
點我下載檔案