[補充]水怪RPG小遊戲防具店 ~

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
吉川拓也
竹貓忠實會員
竹貓忠實會員
文章: 1215
註冊時間: 2003-02-09 18:24
來自: [ G.I.T ]
聯繫:

[補充]水怪RPG小遊戲防具店 ~

文章 吉川拓也 »

相信大家都知道目前RPG沒有防具穿吧= =||
沒關係我現在把相關防具增加步驟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
抱歉已經更新完成囉 ..
最後由 吉川拓也 於 2004-04-04 20:27 編輯,總共編輯了 2 次。
善用 搜尋 可以解決您 90% 的問題
頭腦清晰,選擇正確。 (╯▔︹▔)╯~╘═╛
Mowd
竹貓忠實會員
竹貓忠實會員
文章: 326
註冊時間: 2002-06-26 01:17
來自: 台北
聯繫:

文章 Mowd »

另外補上

開啟 templates/{YOUR_THEME}/rpg_header.tpl

#
# --- [ 尋找 ] ---
#

代碼: 選擇全部

<a href="rpg.php?action=weapons" class="gen">黑暗的武器店</a><br /><br />
#
# --- [ 在後面加入 ] ---
#

代碼: 選擇全部

<a href="rpg.php?action=defend" class="gen">沒光的防具店</a><br /><br />
主題已鎖定

回到「非官方認證外掛」