沒關係我現在把相關防具增加步驟PO出來分享 ~
但是注意一點喔 . 我不是原創 . 只是整理相關文章跟對應1.3~
#
#--- [ SQL ]---
#
執行附加檔案SQL語法 !!
#
#--- [ 開啟] ---
#
rpg.php
#
#--- [ 找到] ---
#
代碼: 選擇全部
if ( $mode == 'weapons' )
{
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=weapons", true));
exit;
}
include($phpbb_root_path . 'rpg/weapons.'.$phpEx);
exit;
} #--- [ 之後加入 ] ---
#
代碼: 選擇全部
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;
} #--- [ 開啟 ] ---
#
rpg/menu.php
#
#--- [ 找到 ] ---
#
代碼: 選擇全部
$righthand = '';
$lefthand = '';
$sql = 'SELECT i.item_name, i.item_position FROM phpbb_rpg_items i, phpbb_rpg_owns o WHERE i.in_which_store = 1 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) )
{
do
{
switch ($row['item_position'])
{
case 1:
if ($righthand == '')
{
$righthand = $row['item_name'];
}
else
{
$lefthand = $row['item_name'];
}
break;
}
}
while ( $row = $db->sql_fetchrow($result) );
}
}#
#--- [ 下面加入 ] ---
#
代碼: 選擇全部
$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'];
}
}
} #--- [ 找到 ] ---
#
代碼: 選擇全部
'RPG_RIGHT_HAND' => $righthand,#
#--- [ 下面加入 ] ---
#
代碼: 選擇全部
'RPG_DEFEND' => $defend,#
#--- [ 開啟 ] ---
#
templates/你的風格/rpg_menu.tpl
#
#--- [ 找到 ] ---
#
代碼: 選擇全部
<tr>
<td><b><span class="gen">頭 盔:</span></b></td>
<td><span class="gen">??????</span></td>
<td><b><span class="gen">盔 甲:</span></b></td>
<td><span class="gen">??????</span></td>
</tr>#
#--- [ 取代 ] ---
#
代碼: 選擇全部
<tr>
<td><b><span class="gen">盔 甲:</span></b></td>
\n<td><span class="gen">{RPG_DEFEND}</span></td>
</tr> #--- [ 儲存關閉 ] ---
# EOM
下載檔案 : http://my.so-net.net.tw/n5210/rpg_defend.rar
抱歉已經更新完成囉 ..
