但是對於範圍內的路人資料卻抓不到,不知道是那邊有錯誤是需要改正的
謝謝!
我有做部分修改,把原本只能攻擊低於10級內的限制解除,這部分應該沒有改錯
其他我找不太出來到底是哪裡出了問題
代碼: 選擇全部
case 171: // 萬物歸零究級無限血火紅
case 119: // 亂飛矢
if ( $next_act == 171 )
{
$sql = "select min(own_id) as wing_id, count(*) as wing_count from phpbb_rpg_owns where item_id = 104 and user_id = " . $profiledata['user_id'];
$result = $db->sql_query($sql);
if ( $row2 = $db->sql_fetchrow($result) )
{
if ( $row2['wing_count'] == 0 )
{
$ret_msg = "您沒有 <b>翼翼的羽毛</b> 可以輔助施展這個技巧!!";
}
else
{
$sql = "delete from phpbb_rpg_owns where user_id = " . $profiledata['user_id'] . " and own_id = " . $row2['wing_id'];
$db->sql_query($sql);
}
}
}
if ( $ret_msg == '' )
{
$dead_cause = '';
$sql1 = "rpg_eol_data is not null and right(rpg_eol_data, 6) <> '000086' and (abs(left(right(rpg_eol_data, 6), 3) - $now_x) + abs(right(rpg_eol_data, 3) - $now_y)) <= 9 " .
($next_act == 171 ? "" : " and user_id <> " . $profiledata['user_id']);
$sql2 = (abs(now_x - $now_x) + abs(now_y - $now_y)) <= 9 ;
$sql3 = "u.rpg_eol_data is not null and right(u.rpg_eol_data, 6) <> '000086' and (abs(left(right(u.rpg_eol_data, 6), 3) - $now_x) + abs(right(u.rpg_eol_data, 3) - $now_y)) <= 9 " .
($next_act == 171 ? "" : " and u.user_id <> " . $profiledata['user_id']);
$sql = "delete from phpbb_rpg_npc where npc_name is not null and npc_name <> '' and $sql2";
$db->sql_query($sql);
$sql = "select username from phpbb_users where $sql1";
$result = $db->sql_query($sql);
if ( $row2 = $db->sql_fetchrow($result) )
{
do
{
$dead_cause .= $row2['username'] . ' ';
}
while ( $row2 = $db->sql_fetchrow($result) );
}
$sql = "select npc_id, npc_name from phpbb_rpg_npc where $sql2";
$result = $db->sql_query($sql);
if ( $row2 = $db->sql_fetchrow($result) )
{
do
{
$dead_cause .= ($row2['npc_name'] == '' ? "路人" . $row2['npc_id'] : $row2['npc_name']) . ' ';
}
while ( $row2 = $db->sql_fetchrow($result) );
}
if ( $next_act == 171 )
{
$hp_deduct = floor($profiledata['rpg_max_mp'] / 3);
$skill_name = "萬物歸零究級無限血火紅";
}
else
{
$hp_deduct = rand(floor($profiledata['rpg_attack'] / 10), floor($profiledata['rpg_attack'] / 2));
$skill_name = "亂飛矢";
}
$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp - $hp_deduct where $sql1";
$db->sql_query($sql);
$sql = "update phpbb_rpg_npc set rpg_cur_hp = rpg_cur_hp - $hp_deduct where $sql2";
$db->sql_query($sql);
$ret_msg = $profiledata['username'] . "使出 $skill_name ,擊中: $dead_cause ,受傷點數: $hp_deduct ";
$ret_msg .= UserIsDead($sql1, $sql3, $profiledata['user_id'], $profiledata['username'], $profiledata['rpg_level'], "$skill_name($hp_deduct)");
$ret_msg .= UserIsDead($sql2, "", $profiledata['user_id'], $profiledata['username'], $profiledata['rpg_level'], "$skill_name($hp_deduct)", true);
unset($skill_name);
}
break;
安裝的程式:Apache 1.3.37+ php 4.4.2+ MySql 4.1.21+ Linux OS
phpBB2 版本:phpBB 2.0.22
domain(網域名稱) :phpbb2.tsaiit.100megs32.com
phpBB2 連結網址: http://phpbb2.tsaiit.100megs32.com/
