[問題]水怪rpg的蘿莉帝國刑場的路人砍了不失血

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

Arisa520
星球公民
星球公民
文章: 206
註冊時間: 2003-10-27 00:26

文章 Arisa520 »

最近也迷上水怪...
也稍稍得瞧過function裡面的程式碼..
但是功力太淺了...抓不出訣竅...
連顯示血量進然都改不出來...
期盼 悲情小爸爸 分享修改經驗...
謝謝!! :oops:
悲情小爸爸
星球普通子民
星球普通子民
文章: 15
註冊時間: 2003-12-08 11:27

文章 悲情小爸爸 »

:oops:
和朋友去喝酒到現在才回到家~。
先把rpg/function_eol.php 整段碼貼上,明天睡飽了才補充說明,呵~。

代碼: 選擇全部

<?php

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
	exit;
}

function CheckMyDead($uid)
{
	global $db;

	$sql = "select rpg_cur_hp from phpbb_users where user_id = $uid";
	$result = $db->sql_query($sql);
	if ( $row2 = $db->sql_fetchrow($result) )
	{
		return ( $row2['rpg_cur_hp'] <= 0 );
	}
	else
	{
		return false;
	}
}

function GetButtonList($uid, $itemid = 0)
{
	global $db;

	$btn_list = '<input type="submit" name="go2move" class="liteoption" value="移動"> <input type="submit" name="go2attack" class="liteoption" value="攻擊">';
	$sql = "select x.setting_value2, i.item_id, i.item_name from phpbb_rpg_owns o, phpbb_rpg_items i, phpbb_rpg_medals m, phpbb_rpg_setting x
		where o.user_id = $uid and i.in_which_store = 3 and m.position_order = 0 and m.user_id = $uid and x.setting_id = 1 and
		i.item_id = o.item_id and i.need_class = m.position_class and m.position_class = x.setting_value1
		order by x.setting_value1, i.need_level";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		$btn_list .= ' <select name="sp_skill">';
		do
		{
			$btn_list .= '<option value="' . $row['item_id'] . '"' . ($row['item_id'] == $itemid ? ' selected' : '') . '>技能 : ' . $row['setting_value2'] . ' : ' . $row['item_name'] . '</option>';
		}
		while ( $row = $db->sql_fetchrow($result) );
		$btn_list .= '</select> <input type="submit" name="go2skill" class="liteoption" value="使用">';
	}
	$btn_list .= ' <input type="submit" name="go2position" class="liteoption" value="全員位置"> <input type="submit" name="go2disp" class="liteoption" value="陣亡列表"> <input type="submit" name="go2escape" class="liteoption" value="返回起點">';

	unset($uid);
	unset($itemid);
	unset($sql);
	unset($row);
	unset($result);
	return $btn_list;
}
function GetSkillName($itemid)
{
	global $db;

	$sql = "select item_name from phpbb_rpg_items where in_which_store = 3 and item_id = $itemid";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		return $row['item_name'];
	}
	else
	{
		return "";
	}
}

function CheckSkill($uid, $itemid)
{
	global $db;

	$sql = "select i.item_id from phpbb_rpg_owns o, phpbb_rpg_items i, phpbb_rpg_medals m
		where o.user_id = $uid and m.user_id = $uid and i.in_which_store = 3 and i.item_id = $itemid and
		o.item_id = $itemid and i.need_class = m.position_class and i.need_level = m.position_order + 1";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		if ($row['item_id'] > 0)
		{
			return "";
		}
		else
		{
			return "您沒有這項技能喲!!";
		}
	}
	else
	{
		return "您沒有這項技能喲!!";
	}
}

function GetMaxPoint($uid, $next_act)
{
	global $db;

	$max_point = 1;

	if ($next_act == 1 || $next_act == 2)
	{
		$sql = "select max(position_order) as max_point from phpbb_rpg_medals where user_id = $uid";
		$result = $db->sql_query($sql);
		if ( $row = $db->sql_fetchrow($result) )
			$max_point = $row['max_point'] + 1;
	}
	else
	{
		$sql = "select max(m.position_class) as now_class, max(m.position_order) as max_point from phpbb_rpg_medals m, phpbb_rpg_items i where i.item_id = $next_act and m.user_id = $uid and i.need_class = m.position_class";
		$result = $db->sql_query($sql);
		if ( $row = $db->sql_fetchrow($result) )
		{
			if ( $row['now_class'] != 1 ) // 戰士系範圍為 1
				$max_point = $row['max_point'] + 1;

		}
	}

	unset($row);
	unset($result);
	return $max_point;
}

function GenerateSamePlayer($pfile, $now_x, $now_y, $max_point)
{
	global $db;

	$sql = "select count(*) as scope_count from phpbb_rpg_eol
		where (abs(map_x - $now_x) + abs(map_y - $now_y)) <= $max_point and map_x <> $now_x and map_y <> $now_y and can_not_pass = 0";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		if ( $row['scope_count'] > 0 )
		{
			srand((double)microtime()*1000000);
			for ($i = 1; $i <= $max_point; $i++)
			{
				$sql = "insert into phpbb_rpg_npc
					(map_id, now_x, now_y, now_icon, now_dir, rpg_level, rpg_cur_hp, rpg_max_hp,
					rpg_attack, rpg_defense, rpg_magic, rpg_speed, generate_time, npc_name, rpg_cur_mp, rpg_max_mp) " .
					" select map_id, map_x, map_y, '" .
					substr($pfile['rpg_eol_data'], -11, 2) . "' as now_icon, " .
					rand(0, 3) . " as now_dir, " .
					$pfile['rpg_level'] . " as now_level, " .
					$pfile['rpg_cur_hp'] . " as rpg_cur_hp, " .
					$pfile['rpg_max_hp'] . " as rpg_max_hp, " .
					$pfile['rpg_attack'] . " as rpg_attack, " .
					$pfile['rpg_defense'] . " as rpg_defense, " .
					$pfile['rpg_magic'] . " as rpg_magic, " .
					$pfile['rpg_speed'] . " as rpg_speed, " .
					($pfile['rpg_cur_hp'] == $pfile['rpg_max_hp'] ? (time() - 21600 + 60 * $max_point) : (time() - 43200 + 60 * $max_point)) . " as generate_time, '" .
					$pfile['username'] . "' as npc_name, " .
					$pfile['rpg_cur_mp'] . " as rpg_cur_mp, " .
					$pfile['rpg_max_mp'] . " as rpg_max_mp from phpbb_rpg_eol " .
					" where (abs(map_x - $now_x) + abs(map_y - $now_y)) <= $max_point and map_x <> $now_x and map_y <> $now_y and can_not_pass = 0 limit " . rand(0, $row['scope_count'] - 1) . ", 1";
				$db->sql_query($sql);
			}
		}
	}
	unset($i);
	unset($sql);
	unset($row);
	unset($result);
}

function GenerateNPC()
{
	global $db;

	// 自爆
	$sql = "delete from phpbb_rpg_npc where (rpg_cur_hp = rpg_max_hp and generate_time <= " . (time() - 21600) .
		") or generate_time is null or generate_time <= " . (time() - 43200);
	$db->sql_query($sql);

	$rpg_lv = array();
	$npc_lv = array();
	$sql = "select distinct rpg_level from phpbb_rpg_npc where npc_name is null";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		do
		{
			$npc_lv[] = $row['rpg_level'] - 5;
		}
		while ( $row = $db->sql_fetchrow($result) );
	}
	$sql = "select rpg_level from phpbb_users where rpg_eol_data is not null and right(rpg_eol_data, 6) <> '000086' and rpg_level not in (" .
		implode(', ', $npc_lv) . ")";

	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		do
		{
			$rpg_lv[] = $row['rpg_level'] + 5;
		}
		while ( $row = $db->sql_fetchrow($result) );
	}
	$npc_count = 25;
	$npc_level = 1;

	// 普通路人
	$sql = "select avg(rpg_level) as eol_level from phpbb_users where rpg_level > 10 and rpg_eol_data is not null";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		$npc_level = $row['eol_level'];
	}

	$sql = "select count(*) as now_count from phpbb_rpg_npc where (npc_name is null or npc_name = '') and now_x < 24 and now_y > 47";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		if ( $row['now_count'] < $npc_count )
		{
			for ($i = $row['now_count']; $i < $npc_count; $i++)
			{
				$rpg_lv[] = rand(($npc_level - 10 > 0 ? $npc_level - 10 : 1), $npc_level + 15);
			}
		}
	}

	if ( count($rpg_lv) > 0 )
	{
		srand((double)microtime()*1000000);
		$sql = "select count(*) as map_count from phpbb_rpg_eol where map_id = 0 and can_not_pass = 0 and map_x < 24 and map_y > 47";
		$result = $db->sql_query($sql);
		$row = $db->sql_fetchrow($result);
		$map_count = $row['map_count'] - 1;
		for ($i = 0; $i < count($rpg_lv); $i++)
		{
			$now_level = $rpg_lv[$i];
			$rpg_max_hp = floor( $now_level * (100 + $now_level));
			$rpg_attack = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) *2);
			$rpg_defense = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) / 10);
			$rpg_magic = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) / 10);
			$rpg_speed = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) / 10);
			$sql = "insert into phpbb_rpg_npc (map_id, now_x, now_y, now_icon, now_dir, rpg_level,
				rpg_cur_hp, rpg_max_hp, rpg_attack, rpg_defense, rpg_magic, rpg_speed, generate_time)
				select map_id, map_x as now_x, map_y as now_y, '" . sprintf("%02d", rand(1, 22)) . "' as now_icon, " .
				rand(0, 3) . " as now_dir, $now_level as now_level, $rpg_max_hp as rpg_cur_hp, $rpg_max_hp as rpg_max_hp,
				$rpg_attack as rpg_attack, $rpg_defense as rpg_defense, $rpg_magic as rpg_magic, $rpg_speed as rpg_speed, " . time() .
				" as generate_time from phpbb_rpg_eol where map_id = 0 and can_not_pass = 0 and map_x < 24 and map_y > 47 limit " . rand(0, $map_count) . ", 1";
			$db->sql_query($sql);
		}
	}

	// 進階路人
	$npc_level = 0;
	$sql = "select rpg_level from phpbb_users order by rpg_level desc limit 0, 20";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		do
		{
			$npc_level += $row['rpg_level'];
		}
		while ( $row = $db->sql_fetchrow($result) );
	}
	$npc_level = floor($npc_level / 20);

	$sql = "select count(*) as eol_count from phpbb_users
		where rpg_eol_data is not null and right(rpg_eol_data, 6) <> '000086'";
	$result = $db->sql_query($sql);
	$npc_count = 35;
	if ( $row = $db->sql_fetchrow($result) )
	{
		$npc_count = ($row['eol_count'] * 2 > 10 ? $row['eol_count'] * 2 : 10);
	}

	$sql = "select count(*) as now_count from phpbb_rpg_npc where (npc_name is null or npc_name = '') and rpg_level >= $npc_level";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		if ( $row['now_count'] < $npc_count )
		{
			$now_count = $row['now_count'];
			srand((double)microtime()*1000000);
			$sql = "select count(*) as map_count from phpbb_rpg_eol where map_id = 0 and can_not_pass = 0";
			$result = $db->sql_query($sql);
			$row = $db->sql_fetchrow($result);
			$map_count = $row['map_count'] - 1;
			for ($i = $now_count; $i < $npc_count; $i++)
			{
				$now_level = rand($npc_level, $npc_level + 150);
				$rpg_max_hp = floor( $now_level * (100 + $now_level));
				$rpg_attack = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) *2);
				$rpg_defense = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) / 10);
				$rpg_magic = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) / 10);
				$rpg_speed = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) / 10);
				$sql = "insert into phpbb_rpg_npc (map_id, now_x, now_y, now_icon, now_dir, rpg_level,
					rpg_cur_hp, rpg_max_hp, rpg_attack, rpg_defense, rpg_magic, rpg_speed, generate_time)
					select map_id, map_x as now_x, map_y as now_y, '" . sprintf("%02d", rand(1, 22)) . "' as now_icon, " .
					rand(0, 3) . " as now_dir, $now_level as now_level, $rpg_max_hp as rpg_cur_hp, $rpg_max_hp as rpg_max_hp,
					$rpg_attack as rpg_attack, $rpg_defense as rpg_defense, $rpg_magic as rpg_magic, $rpg_speed as rpg_speed, " . time() .
					" as generate_time from phpbb_rpg_eol where map_id = 0 and can_not_pass = 0 limit " . rand(0, $map_count) . ", 1";
				$db->sql_query($sql);
			}
		}
	}
	
	unset($i);
	unset($npc_count);
	unset($npc_level);
	unset($now_level);
	unset($rpg_max_hp);
	unset($rpg_attack);
	unset($rpg_defense);
	unset($rpg_magic);
	unset($rpg_speed);
	unset($map_count);
	unset($now_count);
	unset($sql);
	unset($row);
	unset($result);
	unset($rpg_lv);
	unset($npc_lv);
}

function UserIsDead($wsql, $wsql2, $uid, $uname, $ulv, $deadtype, $is_npc = false)
{
	global $db;

	$ret_msg = '';
	if ( $is_npc )
	{
		$sql = "select count(*) as dead_count, sum(rpg_level) as dead_level, sum(rpg_max_hp) as dead_money from phpbb_rpg_npc where rpg_cur_hp <= 0 and $wsql";
		$result = $db->sql_query($sql);
		if ( $row = $db->sql_fetchrow($result) )
		{
			if ( $row['dead_count'] > 0 )
			{
				$sql = "select npc_id from phpbb_rpg_npc where rpg_cur_hp <= 0 and $wsql";
				$result = $db->sql_query($sql);
				if ( $row2 = $db->sql_fetchrow($result) )
				{
					$ret_msg = ' <br />砍死: ';
					do
					{
						$ret_msg .= ($row2['npc_name'] == '' ? '路人' . $row2['npc_id'] : $row2['npc_name']) . ' ';
					}
					while ( $row2 = $db->sql_fetchrow($result) );
					$ret_msg .= "<br />死因: $deadtype 並獲得若干道具: ";
				}
				$sql = "select count(*) as item_count from phpbb_rpg_items where in_which_store < 1 and need_level <= $ulv";
				$result = $db->sql_query($sql);
				$row2 = $db->sql_fetchrow($result);
				$item_count = $row2['item_count'] - 1;
				srand((double)microtime()*1000000);
				for ($i = 1; $i <= $row['dead_count']; $i++)
				{
					$sql = "select item_id, item_name from phpbb_rpg_items where in_which_store < 1 and need_level <= $ulv order by item_id limit " . rand(0, $item_count) . " , 1";
					$result = $db->sql_query($sql);
					$row2 = $db->sql_fetchrow($result);
					$ret_msg .= $row2['item_name'] . ' ';
					$sql = "insert into phpbb_rpg_owns (user_id, item_id) values ($uid, " . $row2['item_id'] . ")";
					$db->sql_query($sql);
				}

				// 超出 50 項,砍掉
				$sql = "select own_id from phpbb_rpg_owns where user_id = $uid order by own_id desc limit 50, 1";
				$result = $db->sql_query($sql);
				if ( $row2 = $db->sql_fetchrow($result) )
				{
					$sql = "delete from phpbb_rpg_owns where user_id = $uid and own_id <= " . $row2['own_id'];
					$db->sql_query($sql);
				}
								
				// 寫入砍殺記錄
				$sql = "insert into phpbb_rpg_event (user_id, event_time, event_class, event_type, event_monty, event_note)
					values ($uid, " . time() . ", 5, 0, " . $row['dead_money'] . ", '$deadtype: 路人 " . $row['dead_count'] . " 隻')";
				$db->sql_query($sql);
				// 砍死人嘉獎
				$sql = "update phpbb_users set user_money = user_money + " . $row['dead_money'] * 0.2 .
					", rpg_cur_exp = rpg_cur_exp + " . $row['dead_level'] * 2 . " where user_id = $uid";
				$db->sql_query($sql);

				$sql = "delete from phpbb_rpg_npc where rpg_cur_hp <= 0";
				$db->sql_query($sql);

				GenerateNPC(); // 補充生力軍
				LevelUp($uid, true); // 升級
			}
		}
	}
	else
	{
		$sql = "select count(*) as dead_count, sum(floor((user_money + user_bank) * 0.2)) as dead_money, sum(rpg_level) as dead_level from phpbb_users
			where rpg_cur_hp <= 0 and $wsql";
		$result = $db->sql_query($sql);
		if ( $row = $db->sql_fetchrow($result) )
		{
			if ( $row['dead_count'] > 0 )
			{
				// 取得被害者的道具\r
				$sql = "select u.user_id, u.username, min(o.own_id) as own_id from phpbb_users u, phpbb_rpg_owns o
					where u.user_id = o.user_id and u.rpg_cur_hp <= 0 and $wsql2 group by u.user_id, u.username";
				$result = $db->sql_query($sql);
				if ( $row2 = $db->sql_fetchrow($result) )
				{
					$ownlist = array();
					$ret_msg = ' <br />砍死: ';
					do
					{
						$ownlist[] = $row2['own_id'];
						$ret_msg .= $row2['username'] . ' ';
					}
					while ( $row2 = $db->sql_fetchrow($result) );
					$ret_msg .= "<br />死因: $deadtype ";
					
					unset($ownlist);
				}

				// 寫入砍殺記錄
				$sql = "insert into phpbb_rpg_event select $uid as user_id, " . time() .
					" as event_time, 5 as event_class, 0 as event_type, floor(user_money * 0.2) as event_money, " .
					"concat('$deadtype: ', username) as event_note from phpbb_users where rpg_cur_hp <= 0 and $wsql";
				$db->sql_query($sql);
				// 寫入被砍記錄
				$sql = "insert into phpbb_rpg_event select user_id, " . time() .
					" as event_time, 5 as event_class, 1 as event_type, floor(user_money * -0.2) as event_money, " .
					"concat('被$deadtype: $uname($ulv) LV: ', rpg_level) as event_note from phpbb_users where rpg_cur_hp <= 0 and $wsql";
				$db->sql_query($sql);
				// 被砍死處罰\r
				$sql = "update phpbb_users set user_money = floor(user_money * 0.9), user_bank = floor(user_bank * 0.95), rpg_eol_killed = rpg_eol_killed + 1,
					rpg_cur_hp = rpg_max_hp, rpg_eol_data = concat('0', substring(rpg_eol_data, 2, 2), '000000086'),
					rpg_cur_mp = rpg_max_mp where rpg_cur_hp <= 0 and $wsql";
				$db->sql_query($sql);
				// 砍死人嘉獎
				$sql = "update phpbb_users set rpg_eol_kill = rpg_eol_kill + 1, user_money = user_money + " . $row['dead_money'] * 0.2.
					", rpg_cur_exp = rpg_cur_exp + " . $row['dead_level'] * 2 . " where user_id = $uid";
				$db->sql_query($sql);
				// 升級
				LevelUp($uid, true);
			}
		}
		$sql = "update phpbb_users set rpg_cur_hp = rpg_max_hp, rpg_eol_data = concat('0', substring(rpg_eol_data, 2, 2), '000000086'),
			rpg_cur_mp = rpg_max_mp where rpg_cur_hp <= 0";
		$db->sql_query($sql);
	}

	unset($sql);
	unset($row);
	unset($row2);
	unset($result);
	return $ret_msg;
}

function AttackPercent($self, $target)
{
	if ( $self == 0 ) return 95;
	if ( $target == $self ) return 80;
	if ( $target > $self )
	{
		if ( ($target - $self) / $self * 8 > 75 )
		{
			return 5;
		}
		else
		{
			return 80 - floor( ($target - $self) / $self * 8 );
		}
	}
	else
	{
		if ( ($self - $target) / $target * 2 > 15 )
		{
			return 95;
		}
		else
		{
			return 80 + floor( ($self - $target) / $target * 2 );
		}
	}
}

function GetNeedMP($itemid, $ulv, $plv, $max_mp)
{
	global $db;

	$sql = "select need_mp1, need_mp2 from phpbb_rpg_items where in_which_store = 3 and item_id = $itemid";
	$result = $db->sql_query($sql);
	if ( $row = $db->sql_fetchrow($result) )
	{
		if ( $row['need_mp1'] == $row['need_mp2'] && intval($row['need_mp1']) != 0 && intval($row['need_mp2']) != 0 )
		{
			if ( $row['need_mp1'] * $row['need_mp2'] > $max_mp )
			{
				return $row['need_mp1'] * $row['need_mp2'];
			}
			else
			{
				return $max_mp;
			}
		}
		else if ( $row['need_mp1'] == '0' || $row['need_mp2'] == '0' )
		{
			return $max_mp;
		}
		else
		{
			return ($row['need_mp1'] == 'LV' ? $ulv : ($row['need_mp1'] == 'PL' ? $plv : intval($row['need_mp1']))) *
				($row['need_mp2'] == 'LV' ? $ulv : ($row['need_mp2'] == 'PL' ? $plv : intval($row['need_mp2'])));
		}
	}
	else
	{
		return 0;
	}
}

function CounterAttack(&$am_i_dead, $pfile, $row, $is_npc)
{
	global $db;

	if ( $row['rpg_cur_hp'] <= 0 ) return '';

	srand((double)microtime()*1000000);
	$ret_msg = '';
	if ( rand(1, 100) <= AttackPercent($row['rpg_speed'], $pfile['rpg_speed']) )
	{
		if ( $row['rpg_attack'] > $pfile['rpg_defense'] + 10 )
		{
			$hp_deduct = rand(10, $row['rpg_attack'] - $pfile['rpg_defense']);
		}
		else
		{
			$hp_deduct = 10;
		}
		$hp_deduct = floor($hp_deduct / rand(2, 10));
		$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp - $hp_deduct where user_id = " . $pfile['user_id'];
		$db->sql_query($sql);

		$ret_msg = " <br /><br />對手 " . ($is_npc ? ($row['npc_name'] == '' ? '路人' . $row['npc_id'] : $row['npc_name']) : $row['username']) . " 反擊,<br />損傷: $hp_deduct 點。";
		$am_i_dead = CheckMyDead($pfile['user_id']);
		if ( $am_i_dead )
		{
			if ( $is_npc )
			{
				$sql = "update phpbb_users set user_money = floor(user_money * 0.8), user_bank = floor(user_bank * 0.8), rpg_eol_killed = rpg_eol_killed + 1,
					rpg_cur_hp = rpg_max_hp, rpg_eol_data = concat('0', substring(rpg_eol_data, 2, 2), '000000086'), rpg_cur_mp = rpg_max_mp
					where rpg_cur_hp <= 0 and user_id = " . $pfile['user_id'];
				$db->sql_query($sql);
				$sql = "select min(own_id) as own_id from phpbb_rpg_owns where user_id = " . $pfile['user_id'];
				$result = $db->sql_query($sql);
				$row2 = $db->sql_fetchrow($result);
				$sql = "delete from phpbb_rpg_owns where own_id = " . $row2['own_id'];
				$db->sql_query($sql);
				unset($result);
				unset($row2);
			}
			else
			{
				UserIsDead("user_id = " . $pfile['user_id'], "u.user_id = " . $pfile['user_id'], $row['user_id'], $row['username'], $row['rpg_level'], "反擊($hp_deduct)");
			}
		}
		unset($hp_deduct);
		unset($sql);
	}
	return $ret_msg;
}

function SubmitNext($next_x, $next_y, $next_act, $item_id)
{
	global $db, $now_x, $now_y, $now_dir, $now_act, $profiledata;

	$am_i_dead = false;
	$ret_msg = '';
	$max_point = GetMaxPoint($profiledata['user_id'], ($next_act == 1 || $next_act == 2 ? $next_act : $item_id) );
	if ( $next_act >= 3 )
	{
		$need_mp = GetNeedMP($item_id, $profiledata['rpg_level'], $max_point, $profiledata['rpg_max_mp']);
	}
	else
	{
		$need_mp = 0;
	}

	if (( (abs($next_x - $now_x) + abs($next_y - $now_y) > $max_point) || $next_x < 0 || $next_y < 0 || $next_x > 47 || $next_y > 95 ) &&
		$next_act != 4 ) // 去除隱身,分身,補血
	{
		$ret_msg = '媽媽說作弊是不行的喲!!或者....您已經陣亡了。';
	}
	else if ( $profiledata['rpg_cur_mp'] < $need_mp )
	{
		$ret_msg = " MP 不足,所需 MP : $need_mp";
	}
	else if ( $next_act == 1 ) // 移動
	{
		// 決定面對的方向
		if ($next_y == $now_y)
		{
			if ($next_x < $now_x)
			{
				$now_dir = 1;
			}
			else if ($next_x > $now_x)
			{
				$now_dir = 3;
			}
		}
		else if ($next_x == $now_x)
		{
			if ($next_y < $now_y)
			{
				$now_dir = 2;
			}
			else
			{
				$now_dir = 0;
			}
		}
		else if ($next_y <= $now_y + $max_point / 3 && $next_y >= $now_y - $max_point / 3)
		{
			if ($next_x < $now_x)
			{
				$now_dir = 1;
			}
			else if ($next_x > $now_x)
			{
				$now_dir = 3;
			}
		}
		else if ($next_y < $now_y)
		{
			$now_dir = 2;
		}
		else
		{
			$now_dir = 0;
		}
		$sql = "select count(*) as already_in from phpbb_users where right(rpg_eol_data, 6) = '" . sprintf("%03d%03d", $next_x, $next_y) . "'";
		$result = $db->sql_query($sql);
		if ( $row = $db->sql_fetchrow($result) )
		{
			if ( $row['already_in'] > 0 )
			{
				$ret_msg = '這個位置已經有人佔了喲!!';
			}
			else
			{
				$sql = "select count(*) as already_in from phpbb_rpg_npc where now_x = $next_x and now_y = $next_y";
				$result = $db->sql_query($sql);
				if ( $row = $db->sql_fetchrow($result) )
				{
					if ( $row['already_in'] > 0 )
					{
						$ret_msg = '這個位置已經有人佔了喲!!';
					}
					else
					{
						$now_x = $next_x;
						$now_y = $next_y;
					}
				}
			}
		}
	}
	else
	{
		if ( $need_mp > 0 )
		{
			$sql = "update phpbb_users set rpg_cur_mp = rpg_cur_mp - $need_mp where user_id = " . $profiledata['user_id'];
			$db->sql_query($sql);
		}

		if ( $next_act == 2 || $next_act == 3 )
		{
			$is_npc = false;
			$sql = "select user_id, username, rpg_cur_hp, rpg_level, rpg_attack, rpg_defense, rpg_magic, rpg_speed from phpbb_users where right(rpg_eol_data, 6) = '" . sprintf("%03d%03d", $next_x, $next_y) . "'";
			$result = $db->sql_query($sql);
			if ( !( $row = $db->sql_fetchrow($result) ) )
			{
				$is_npc = true;
				$sql = "select * from phpbb_rpg_npc where now_x = $next_x and now_y = $next_y";
				$result = $db->sql_query($sql);
				if ( $row = $db->sql_fetchrow($result) )
				{
					if ( $profiledata['rpg_level'] - 50 >= $row['rpg_level'] )
						$ret_msg = "媽媽說不能欺負弱小,尤其是無辜的路人....";
					$npc_id = $row['npc_id'];
					$npc_scope = floor(($row['rpg_level'] - 1) / 10) + 1;
					if ($npc_scope > 9) $npc_scope = 9;
					$is_normal_npc = $row['npc_name'] == '';
				}
				else
				{
					$npc_id = 0;
					$ret_msg = "目標人物溜了....";
				}
			}
			else
			{
				if ( $profiledata['rpg_level'] - 100 >= $row['rpg_level'] )
					$ret_msg = "媽媽說不能欺負弱小....";
			}
		}

		if ( $ret_msg == '' )
		{
			$sql = "select count(*) as weapon_count, max(need_level) as weapon_level from phpbb_rpg_items i, phpbb_rpg_owns o where o.user_id = " . $profiledata['user_id'] .
				" and i.in_which_store = 1 and i.item_id = o.item_id";
			$result = $db->sql_query($sql);
			if ( $row2 = $db->sql_fetchrow($result) )
			{
				if ( $row2['weapon_count'] > 2 )
				{
					$ret_msg = "您沒有多出來的手可以拿其它武器了!!";
				}
				else if ( $row2['weapon_level'] > $profiledata['rpg_level'] )
				{
					$ret_msg = "您現在的等級無法使用這支武器喲!!";
				}
			}
		}

		if ( $ret_msg == '' && $next_act >= 3 ) $ret_msg = CheckSkill($profiledata['user_id'], $item_id);

		if ( $ret_msg == '' )
		{
			srand((double)microtime()*1000000);
			if ( $next_act >= 3 ) $next_act = $item_id;
			switch ( $next_act )
			{
				case 2: // 攻擊
					$rid = rand(1, 100);
					switch ( $rid )
					{
						case 1:
							$double = 5;
							$ret_msg = $profiledata['username'] . ' 放下兩手武器,掏出藏在袋裡的黑星手槍 ';
							$dead_cause = '槍擊';
							break;
						case $rid <= 3:
							$double = 4;
							$ret_msg = $profiledata['username'] . ' 打個暗號,事先埋伏的兄弟一湧而上 ';
							$dead_cause = '被人暗算';
							break;
						case $rid <= 8:
							$double = 3;
							$ret_msg = $profiledata['username'] . ' 忽然從背後撲上,抄起路邊一條木棍 ';
							$dead_cause = '街頭械鬥';
							break;
						case $rid <= 18:
							$double = 2;
							$ret_msg = $profiledata['username'] . ' 氣聚丹田,然後兜心口一拳 ';
							$dead_cause = '兜心口的一拳';
							break;
						default:
							$double = 1;
							$ret_msg = $profiledata['username'] . ' 反手一巴 ';
							$dead_cause = '兜巴星';
							break;
					}
					if ( $profiledata['rpg_attack'] > $row['rpg_defense'] )
					{
						$hp_deduct = rand( ( ($profiledata['rpg_attack'] / 2 - $row['rpg_defense']) > 0 ? floor($profiledata['rpg_attack'] / 2 - $row['rpg_defense']) : 1) , $profiledata['rpg_attack'] - $row['rpg_defense']);
					}
					else
					{
						$hp_deduct = 10;
					}
					if ( $hp_deduct < $max_point * 10 )
						$hp_deduct = rand($max_point * 10, $max_point * 20);
					$hp_deduct *= $double;

					if ( rand(1, 100) > AttackPercent($profiledata['rpg_speed'], $row['rpg_speed']) )
					{
						$ret_msg .= '....遜,沒打中!!';
					}
					else
					{
						$sql = "update " . ($is_npc ? "phpbb_rpg_npc" : "phpbb_users") .
							" set rpg_cur_hp = rpg_cur_hp - $hp_deduct where " . ($is_npc ? "npc_id = " . $row['npc_id'] : "user_id = " . $row['user_id']);
						$db->sql_query($sql);
						$dead_cause .= "($hp_deduct)";
						$ret_msg .= "擊中 " . ($is_npc ? ($row['npc_name'] == '' ? "路人" . $row['npc_id'] : $row['npc_name']) : $row['username']) . " <br />損傷: $hp_deduct 點 ";
					}
					// 對手反擊
					$row['rpg_cur_hp']  -= $hp_deduct;
					$ret_msg .= CounterAttack($am_i_dead, $profiledata, $row, $is_npc);
					if ( $is_npc )
					{
						if ( $is_normal_npc )
						$ret_msg .= UserIsDead("npc_id = " . $row['npc_id'], '', $profiledata['user_id'], '', 0, $dead_cause, true);
					}
					else
					{
						$ret_msg .= UserIsDead("user_id = " . $row['user_id'], "u.user_id = " . $row['user_id'], $profiledata['user_id'], $profiledata['username'], $profiledata['rpg_level'], $dead_cause);
					}
					break;
				case 109: // HP 10%
					$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp + floor(rpg_max_hp * 0.1) where user_id = " . $profiledata['user_id'];
					$db->sql_query($sql);
					$sql = "update phpbb_users set rpg_cur_hp = rpg_max_hp where rpg_cur_hp > rpg_max_hp and user_id = " . $profiledata['user_id'];
					$db->sql_query($sql);
					$ret_msg = "施咒完成, HP 恢復 10% :: " . floor($profiledata['rpg_max_hp'] * 0.1) . "點";
					break;
				case 110: // HP 20%
					$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp + floor(rpg_max_hp * 0.2) where user_id = " . $profiledata['user_id'];
					$db->sql_query($sql);
					$sql = "update phpbb_users set rpg_cur_hp = rpg_max_hp where rpg_cur_hp > rpg_max_hp and user_id = " . $profiledata['user_id'];
					$db->sql_query($sql);
					$ret_msg = "施咒完成, HP 恢復 20% :: " . floor($profiledata['rpg_max_hp'] * 0.2) . "點";
					break;
				case 111: // HP 100%
					$sql = "update phpbb_users set rpg_cur_hp = rpg_max_hp where user_id = " . $profiledata['user_id'];
					$db->sql_query($sql);
					$ret_msg = "施咒完成, HP 完全恢復";
					break;
				case 112: // 蘿莉吸血式
					$hp_deduct = floor($row['rpg_cur_hp'] * 0.05);
					if ( $hp_deduct > 0 || rand(1, 100) <= AttackPercent($row['rpg_magic'], $profiledata['rpg_magic']) )
					{
						if ( $is_npc )
						{
							$sql = "update phpbb_rpg_npc set rpg_cur_hp = rpg_cur_hp - $hp_deduct where npc_id = " . $row['npc_id'];
							$db->sql_query($sql);
							$ret_msg = "吸血完成,增加 $hp_deduct 點 HP ,受害者: 路人" . $row['npc_id'];
						}
						else
						{
							$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp - $hp_deduct where user_id = " . $row['user_id'];
							$db->sql_query($sql);
							$ret_msg = "吸血完成,增加 $hp_deduct 點 HP ,受害者: " . $row['username'];
						}
						$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp + $hp_deduct where user_id = " . $profiledata['user_id'];
						$db->sql_query($sql);
						$sql = "update phpbb_users set rpg_cur_hp = rpg_max_hp where rpg_cur_hp > rpg_max_hp and user_id = " . $profiledata['user_id'];
						$db->sql_query($sql);
					}
					else
					{
						$ret_msg = "遜....什麼也沒吸到!!";
					}
					break;
				case 113: // 歐巴吸血式
				case 114: // 美夕吸血式
					$hp_deduct = 0;
					if ( rand(1, 100) <= AttackPercent($row['rpg_magic'], $profiledata['rpg_magic']) )
					{
						$ret_msg = "";
						$sql = "select username, rpg_cur_hp from phpbb_users where left(right(rpg_eol_data, 6), 3) >= $next_x - ($next_act - 112) and
							left(right(rpg_eol_data, 6), 3) <= $next_x + ($next_act - 112) and right(rpg_eol_data, 3) >= $next_y - ($next_act - 112) and
							right(rpg_eol_data, 3) <= $next_y + ($next_act - 112) and rpg_eol_data is not null and right(rpg_eol_data, 6) <> '000086' and user_id <> " . $profiledata['user_id'];
						$result = $db->sql_query($sql);
						if ( $row2 = $db->sql_fetchrow($result) )
						{
							do
							{
								$hp_deduct += floor($row2['rpg_cur_hp'] * 0.05 * ($next_act - 111));
								$ret_msg .= " " . $row2['username'] . "(" . floor($row2['rpg_cur_hp'] * 0.05 * ($next_act - 111)) . ")";
							}
							while ( $row2 = $db->sql_fetchrow($result) );
						}
						$sql = "select npc_id, npc_name, rpg_cur_hp from phpbb_rpg_npc where now_x >= $next_x - ($next_act - 112) and
							now_x <= $next_x + ($next_act - 112) and now_y >= $next_y - ($next_act - 112) and
							now_y <= $next_y + ($next_act - 112) and (npc_name <> '" . $profiledata['username'] . "' or npc_name is null)";
						$result = $db->sql_query($sql);
						if ( $row2 = $db->sql_fetchrow($result) )
						{
							do
							{
								$hp_deduct += floor($row2['rpg_cur_hp'] * 0.05 * ($next_act - 111));
								$ret_msg .= " " . ($row2['npc_name'] == "" ? "路人" . $row2['npc_id'] : $row2['npc_name']) . "(" . floor($row2['rpg_cur_hp'] * 0.05 * ($next_act - 111)) . ")";
							}
							while ( $row2 = $db->sql_fetchrow($result) );
						}
						$sql = "update phpbb_users set rpg_cur_hp = floor(rpg_cur_hp * (1 - 0.05 * ($next_act - 111)))
							where left(right(rpg_eol_data, 6), 3) >= $next_x - ($next_act - 112) and
							left(right(rpg_eol_data, 6), 3) <= $next_x + ($next_act - 112) and right(rpg_eol_data, 3) >= $next_y - ($next_act - 112) and
							right(rpg_eol_data, 3) <= $next_y + ($next_act - 112) and rpg_eol_data is not null and right(rpg_eol_data, 6) <> '000086' and user_id <> " . $profiledata['user_id'];
						$db->sql_query($sql);
						$sql = "update phpbb_rpg_npc set rpg_cur_hp = floor(rpg_cur_hp * (1 - 0.05 * ($next_act - 111)))
							where now_x >= $next_x - ($next_act - 112) and now_x <= $next_x + ($next_act - 112) and now_y >= $next_y - ($next_act - 112) and
							now_y <= $next_y + ($next_act - 112) and (npc_name <> '" . $profiledata['npc_name'] . "' or npc_name is null)";
						$db->sql_query($sql);
						$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp + $hp_deduct where user_id = " . $profiledata['user_id'];
						$db->sql_query($sql);
						$sql = "update phpbb_users set rpg_cur_hp = rpg_max_hp where rpg_cur_hp > rpg_max_hp and user_id = " . $profiledata['user_id'];
\n						$db->sql_query($sql);
						$ret_msg = "吸血完成,增加 $hp_deduct 點 HP 。受害者:" . $ret_msg;
					}
					else
					{
						$ret_msg = "遜....什麼也沒吸到!!";
					}
					break;
				case 115: // 心眼\r
					$sql = "delete from phpbb_rpg_npc where (abs(now_x - $now_x) + abs(now_y - $now_y)) <= $max_point and npc_name is not null";
					$db->sql_query($sql);
					$ret_msg = "心眼打開,分身消失";
					break;
				case 116: // 天眼\r
					$sql = "update phpbb_users set rpg_eol_data = concat('0', right(rpg_eol_data, 11))
						where (abs(left(right(rpg_eol_data, 6), 3) - $now_x) + abs(right(rpg_eol_data, 3) - $now_y)) <= $max_point";
					$db->sql_query($sql);
					$ret_msg = "天眼打開,隱身忍者現身。";
					break;
				case 117: // 笙美夕
					$sql = "select min(own_id) as tima_id, count(*) as tima_count from phpbb_rpg_owns where item_id = 105 and user_id = " . $profiledata['user_id'];
					$result = $db->sql_query($sql);
					if ( $row2 = $db->sql_fetchrow($result) )
					{
						if ( $row2['tima_count'] > 0 )
						{
							$sql = "delete from phpbb_rpg_owns where own_id = " . $row2['tima_id'];
							$db->sql_query($sql);
							$sql = "update phpbb_users set rpg_cur_hp = floor(rpg_max_hp * 0.2), rpg_cur_mp = floor(rpg_max_mp * 0.2)
								where rpg_eol_data is not null and right(rpg_eol_data, 6) <> '000086' and user_id <> " . $profiledata['user_id'];
							$db->sql_query($sql);
							$sql = "update phpbb_rpg_npc set rpg_cur_hp = floor(rpg_max_hp * 0.2), rpg_cur_mp = floor(rpg_max_mp * 0.2)";
							$db->sql_query($sql);
							$ret_msg = "呼.... <b>奧義 - 笙美夕</b> 施展完畢!!";
						}
						else
						{
							$ret_msg = "您沒有 <b>大王的祝福精選CD</b> 可以輔助施展這個技巧!!";
						}
					}
					else
					{
						$ret_msg = "您沒有 <b>大王的祝福精選CD</b> 可以輔助施展這個技巧!!";
					}
					break;
				case 164: // 隱身術
					$now_act = $max_point;
					$ret_msg = "隱身完成,共可隱身 $now_act 回合。";
					break;
				case 165: // 影分身術
					GenerateSamePlayer($profiledata, $now_x, $now_y, $max_point);
					$ret_msg = "分身完成,共產生 $max_point 隻分身。";
					break;
				case 166: // 射擊
				case 172: // 弩弓
					$sql1 = '';
					$sql2 = '';
					$sql3 = '';
					if ( $next_x == $now_x ) // 直線射擊
					{
						if ($next_y > $now_y + 1)
						{
							$sql1 = "left(right(rpg_eol_data, 6), 3) = $now_x and right(rpg_eol_data, 3) > $now_y and right(rpg_eol_data, 3) < $next_y and right(rpg_eol_data, 6) <> '000086'";
\n							$sql2 = "now_x = $now_x and now_y > $now_y and now_y < $next_y and (now_x <> 0 or now_y <> 86)";
							$sql3 = "left(right(u.rpg_eol_data, 6), 3) = $now_x and right(u.rpg_eol_data, 3) > $now_y and right(u.rpg_eol_data, 3) < $next_y and right(u.rpg_eol_data, 6) <> '000086'";
						}
						else if ($next_y < $now_y - 1)
						{
							$sql1 = "left(right(rpg_eol_data, 6), 3) = $now_x and right(rpg_eol_data, 3) > $next_y and right(rpg_eol_data, 3) < $now_y and right(rpg_eol_data, 6) <> '000086'";
							$sql2 = "now_x = $now_x and now_y > $next_y and now_y < $now_y and (now_x <> 0 or now_y <> 86)";
							$sql3 = "left(right(u.rpg_eol_data, 6), 3) = $now_x and right(u.rpg_eol_data, 3) > $next_y and right(u.rpg_eol_data, 3) < $now_y and right(u.rpg_eol_data, 6) <> '000086'";
						}
						}
							else if ( $next_y == $now_y )
						{
						if ($next_x > $now_x + 1)
						{
							$sql1 = "right(rpg_eol_data, 3) = $now_y and left(right(rpg_eol_data, 6), 3) > $now_x and left(right(rpg_eol_data, 6), 3) < $next_x and right(rpg_eol_data, 6) <> '000086'";
							$sql2 = "now_y = $now_y and now_x > $now_x and now_x < $next_x and (now_x <> 0 or now_y <> 86)";
							$sql3 = "right(u.rpg_eol_data, 3) = $now_y and left(right(u.rpg_eol_data, 6), 3) > $now_x and left(right(u.rpg_eol_data, 6), 3) < $next_x and right(u.rpg_eol_data, 6) <> '000086'";
						}
						else if ($next_x < $now_x - 1)
						{
							$sql1 = "right(rpg_eol_data, 3) = $now_y and left(right(rpg_eol_data, 6), 3) > $next_x and left(right(rpg_eol_data, 6), 3) < $now_x and right(rpg_eol_data, 6) <> '000086'";
							$sql2 = "now_y = $now_y and now_x > $next_x and now_x < $now_x and (now_x <> 0 or now_y <> 86)";
							$sql3 = "right(u.rpg_eol_data, 3) = $now_y and left(right(u.rpg_eol_data, 6), 3) > $now_x and left(right(u.rpg_eol_data, 6), 3) < $next_x and right(u.rpg_eol_data, 6) <> '000086'";
						}
					}

					if ( $sql1 != '' )
					{
						$dead_cause = '';
						$hp_deduct = rand(10, 50) * $max_point;
						if ($next_act == 172) $hp_deduct *= 3;
						$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) );
						}
						$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);
						if ( $dead_cause != '' )
						{
							$ret_msg .= " 流彈受傷點數: $hp_deduct 流彈受傷人員: " . $dead_cause;
							$ret_msg .= UserIsDead($sql1, $sql3, $profiledata['user_id'], $profiledata['username'], $profiledata['rpg_level'], ($next_act == 172 ? "弩" : "射" ) . "擊流彈($hp_deduct)");
							if ( $is_normal_npc && $is_npc )
							$ret_msg .= UserIsDead($sql2, "", $profiledata['user_id'], $profiledata['username'], $profiledata['rpg_level'], ($next_act == 172 ? "弩" : "射" ) . "擊流彈($hp_deduct)", true);
						}
					}
					unset($sql1);
					unset($sql2);
					unset($sql3);

					if ( rand(1, 100) > AttackPercent($profiledata['rpg_speed'] * 2, $row['rpg_speed']) )
					{
						$ret_msg = "太遜了,沒射中目標人物...." . $ret_msg;
					}
					else
					{
						if ( $profiledata['rpg_attack'] > $row['rpg_defense'] )
						{
							$hp_deduct = rand( ( ($profiledata['rpg_attack'] / 2 - $row['rpg_defense']) > 0 ? floor($profiledata['rpg_attack'] / 2 - $row['rpg_defense']) : 1) , $profiledata['rpg_attack'] - $row['rpg_defense']);
						}
						else
						{
							$hp_deduct = 10;
						}
						if ( $hp_deduct < $max_point * 10 )
							$hp_deduct = rand($max_point * 10, $max_point * 20);
						if ($next_act == 172) $hp_deduct *= 3;

						$sql = "update " . ($is_npc ? "phpbb_rpg_npc" : "phpbb_users") .
							" set rpg_cur_hp = rpg_cur_hp - $hp_deduct where " .
							($is_npc ? "npc_id = " . $row['npc_id'] : "user_id = " . $row['user_id']);
						$db->sql_query($sql);

						$ret_msg = "射中 " . ($is_npc ? ($row['npc_name'] == '' ? "路人" . $row['npc_id'] : $row['npc_name']) : $row['username']) . " <br />損傷: $hp_deduct 點 " . $ret_msg;
						$dead_cause = ($next_act == 172 ? "弩" : "射" ) . "擊($hp_deduct)";
					}
					// 反擊
					$row['rpg_cur_hp'] -= $hp_deduct;
					if ( $row['rpg_cur_hp'] > 0 )
					{
						if ( $is_npc )
						{
							if ( rand(1, 100) <= 40 )
							{
								if ( $row['rpg_attack'] - $profiledata['rpg_defense'] > 100 )
								{
									$hp_deduct = rand(100, $row['rpg_attack'] - $profiledata['rpg_defense']);
								}
								else
								{
									$hp_deduct = 100;
								}
								$hp_deduct = floor($hp_deduct / rand(2, 10));
								$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp - $hp_deduct where user_id = " . $profiledata['user_id'];
								$db->sql_query($sql);
								$ret_msg .= " <br /><br />對手 " . ($row['npc_name'] == '' ? "路人" . $row['npc_id'] : $row['npc_name']) . " 反擊,<br />損傷: $hp_deduct 點。";
								$am_i_dead = CheckMyDead($profiledata['user_id']);
							}
						}
						else
						{
							$sql = "select max(position_order) as max_point from phpbb_rpg_medals where position_class = 2 and user_id = " . $row['user_id'];
							$result = $db->sql_query($sql);
							if ( $row2 = $db->sql_fetchrow($result) )
							{
								if ( (abs($next_x - $now_x) + abs($next_y - $now_y) <= $row2['max_point'] + 1) && (rand(1, 100) <= 50) )
								{
									if ( $row['rpg_attack'] - $profiledata['rpg_defense'] > 10 * ($row2['max_point'] + 1) )
									{
										$hp_deduct = rand(10 * ($row2['max_point'] + 1), $row['rpg_attack'] - $profiledata['rpg_defense']);
									}
									else
									{
										$hp_deduct = 10 * ($row2['max_point'] + 1);
									}
									$hp_deduct = floor($hp_deduct / rand(2, 10));
									$sql = "update phpbb_users set rpg_cur_hp = rpg_cur_hp - $hp_deduct where user_id = " . $profiledata['user_id'];
									$db->sql_query($sql);
									$ret_msg .= " <br /><br />對手 " . $row['username'] . " 反擊,<br />損傷: $hp_deduct 點。";
									$am_i_dead = CheckMyDead($profiledata['user_id']);
									UserIsDead("user_id = " . $profiledata['user_id'], "u.user_id = " . $profiledata['user_id'], $row['user_id'], $row['username'], $profiledata['rpg_level'], "射擊反擊($hp_deduct)");
								}
							}
						}
					}

\n					if ( $is_npc )
					{
						if ( $is_normal_npc )
						$ret_msg .= UserIsDead("npc_id = " . $row['npc_id'], '', $profiledata['user_id'], '', 0, $dead_cause, true);
					}
					else
					{
						$ret_msg .= UserIsDead("user_id = " . $row['user_id'], "u.user_id = " . $row['user_id'], $profiledata['user_id'], $profiledata['username'], $profiledata['rpg_level'], $dead_cause);
					}
					break;
				case 167: // 疾風斬\r
				case 168: // 龍擊破\r
				case 169: // 霸皇神擊
				case 170: // 爆炸鐵金剛
					switch ( $next_act )
					{
						case 167:
							$hp_deduct = $profiledata['rpg_attack'] - $row['rpg_defense'];
							$ret_msg = $profiledata['username'] . '使出 疾風斬 ';
							$dead_cause = '疾風斬';
							break;
						case 168:
							$hp_deduct = $profiledata['rpg_attack'] * 2 - $row['rpg_defense'];
							$ret_msg = $profiledata['username'] . '使出 龍擊破 ';
							$dead_cause = '龍擊破';
							break;
						case 169:
							$hp_deduct = $profiledata['rpg_attack'] * 3 - $row['rpg_defense'];
							$ret_msg = $profiledata['username'] . '使出 霸皇神擊 ';
							$dead_cause = '霸皇神擊';
							break;
						case 170:
							$hp_deduct = $profiledata['rpg_cur_hp'] - 1;
							$ret_msg = $profiledata['username'] . '使出 爆炸鐵金剛(淚) ';
							$dead_cause = '爆炸鐵金剛(淚\\)';
							$sql = "update phpbb_users set rpg_cur_hp = 1 where user_id = " . $profiledata['user_id'];
							$db->sql_query($sql);
							$profiledata['rpg_cur_hp'] = 1;
							break;
					}
					if ( $hp_deduct < 0 ) $hp_deduct = 0;
					$sql = "update " . ($is_npc ? "phpbb_rpg_npc" : "phpbb_users") .
						" set rpg_cur_hp = rpg_cur_hp - $hp_deduct where " . ($is_npc ? "npc_id = " . $row['npc_id'] : "user_id = " . $row['user_id']);
					$db->sql_query($sql);
					$dead_cause .= "($hp_deduct)";
					$ret_msg .= "擊中 " . ($is_npc ? ($row['npc_name'] == '' ? "路人" . $row['npc_id'] : $row['npc_name']) : $row['username']) . " <br />損傷: $hp_deduct 點。";
					// 對手反擊
					// $row['rpg_cur_hp'] -= $hp_deduct;
					$ret_msg .= CounterAttack($am_i_dead, $profiledata, $row, $is_npc);
					if ( $is_npc )
					{
						if ( $is_normal_npc )
						$ret_msg .= UserIsDead("npc_id = " . $row['npc_id'], '', $profiledata['user_id'], '', 0, $dead_cause, true);
					}
					else
					{
						$ret_msg .= UserIsDead("user_id = " . $row['user_id'], "u.user_id = " . $row['user_id'], $profiledata['user_id'], $profiledata['username'], $profiledata['rpg_level'], $dead_cause);
					}
					break;
				case 171: // 萬物歸零究級無限血火紅
				case 173: // 亂飛矢\r
					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 rpg_level >= " . ($profiledata['rpg_level'] - 10) .
							" 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 and rpg_level >= " . ($profiledata['rpg_level'] - 10);
						$sql3 = "u.rpg_eol_data is not null and right(u.rpg_eol_data, 6) <> '000086' and u.rpg_level >= " . ($profiledata['rpg_level'] - 10) .
							" 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;
			}

			// 路人逃跑機制\r
			if ( $is_npc && $npc_id > 0 )
			{
				if (! $is_normal_npc )
				{
					$sql = "delete from phpbb_rpg_npc where npc_id = $npc_id";
					$db->sql_query($sql);
				}
				else if ( rand(1, 100) <= 10 )
				{
					$scope = rand(1, $npc_scope);
					$sql = "select count(*) as scope_count from phpbb_rpg_eol
						where (abs(map_x - $next_x) + abs(map_y - $next_y)) <= $scope and
						map_x <> $next_x and map_y <> $next_y and can_not_pass = 0";
					$result = $db->sql_query($sql);
					if ( $row2 = $db->sql_fetchrow($result) )
					{
						$rand_next = rand(0, $row2['scope_count'] - 1);
						if ( $rand_next >= 0 )
						{
							$sql = "select * from phpbb_rpg_eol
								where (abs(map_x - $next_x) + abs(map_y - $next_y)) <= $scope and
								map_x <> $next_x and map_y <> $next_y and can_not_pass = 0 limit $rand_next, 1";
							$result = $db->sql_query($sql);
							if ( $row2 = $db->sql_fetchrow($result) )
							{
								$sql = "update phpbb_rpg_npc set now_x = " . $row2['map_x'] . ", now_y = " .
									$row2['map_y'] . " where npc_id = $npc_id";
								$db->sql_query($sql);
							}
						}
					}
				}
			}
		}
	}

	unset($sql);
	unset($row);
	unset($row2);
	unset($result);
	unset($hp_deduct);
	unset($rand_next);
	unset($scope);
	unset($is_npc);
	unset($dead_cause);
	unset($npc_id);
	unset($npc_scope);
	unset($is_normal_npc);

	if ( $am_i_dead )
	{
		return 'xxxxx';
	}
	else
	{
		return $ret_msg;
	}
}
?>
最後由 悲情小爸爸 於 2003-12-31 02:36 編輯,總共編輯了 1 次。
悲情小爸爸
星球普通子民
星球普通子民
文章: 15
註冊時間: 2003-12-08 11:27

文章 悲情小爸爸 »

1) 有猴子說NPC就像沙包一樣,所以提高了NPC反擊傷害值。上圖可見反擊傷害是574點~。

以下是修改方法。

代碼: 選擇全部

# 
#-----[ OPEN ]--------------------------------------------- 
# 
rpg/function_eol.php 
# 
#-----[ 找尋 ]--------------------------------------------- 
# 
$rpg_attack = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) / 10);

ps. 有兩個,兩個都要改~。
# 
#-----[更改為 ]--------------------------------------------- 
# 
$rpg_attack = floor($now_level * rand((floor($now_level / 10) + 1) * 10, (floor($now_level / 10) * 2 + 5) * 10) *2);

ps. 即是將反擊的力度乘2倍~。
2) 又有猴子說NPC掉了武器一定要先賣掉才能打,所以設定只會掉道具。

以下是修改方法。

代碼: 選擇全部

# 
#-----[ 找尋 ]--------------------------------------------- 
# 
phpbb_rpg_items where in_which_store <= 2

ps. 有兩個,兩個都要改~。
# 
#-----[更改為 ]--------------------------------------------- 
# 
phpbb_rpg_items where in_which_store < 1

ps. 1就是道具店~。當然亦可以改做只掉武器或只掉防具~。
3) 為鼓勵玩家自相殘殺(!?),取消PK掉item制

以下是修改方法。

代碼: 選擇全部

# 
#-----[ 找尋 ]--------------------------------------------- 
# 
// 取得被害者的道具\r

\n下面的
$ret_msg .= "死因: $deadtype 並獲得若干道具: ";
					$sql = "select i.item_name from phpbb_rpg_owns o, phpbb_rpg_items i where o.own_id in (" .
						implode(', ', $ownlist) . ") and o.item_id = i.item_id";
					$result = $db->sql_query($sql);
					if ( $row2 = $db->sql_fetchrow($result) )
					{
						do
						{
							$ret_msg .= $row2['item_name'] . ' ';
						}
						while ( $row2 = $db->sql_fetchrow($result) );
					}
					$sql = "update phpbb_rpg_owns set user_id = $uid where own_id in (" . implode(', ', $ownlist) . ")";
					$db->sql_query($sql);
					// 超出 50 項,砍掉
					$sql = "select own_id from phpbb_rpg_owns where user_id = $uid order by own_id desc limit 50, 1";
					$result = $db->sql_query($sql);
					if ( $row2 = $db->sql_fetchrow($result) )
					{
						$sql = "delete from phpbb_rpg_owns where user_id = $uid and own_id <= " . $row2['own_id'];
						$db->sql_query($sql);
					}
# 
#-----[整段更改為 ]--------------------------------------------- 
# 
$ret_msg .= "<br />死因: $deadtype ";

即是將掉道具設定刪掉~。
4) 發現原來PK會大幅增加金錢…呵呵,現在當然減掉了~。 努力灌水存錢吧~!

以下是修改方法。

代碼: 選擇全部

# 
#-----[ 找尋 ]--------------------------------------------- 
# 
// 砍死人嘉獎
				$sql = "update phpbb_users set user_money = user_money + " . $row['dead_money'] .
					", rpg_cur_exp = rpg_cur_exp + " . $row['dead_level'] . " where user_id = $uid";

ps. 有兩個,兩個都要改。
# 
#-----[更改為 ]--------------------------------------------- 
# 
// 砍死人嘉獎
				$sql = "update phpbb_users set rpg_eol_kill = rpg_eol_kill + 1, user_money = user_money + " . $row['dead_money'] * 0.2.
					", rpg_cur_exp = rpg_cur_exp + " . $row['dead_level'] * 2 . " where user_id = $uid";
\r
ps. 即是所得金錢打兩折、所得經驗 = 被砍者等級的兩倍
至於文字上的修改,其實只要直接搜尋便可以找到~。
改成想要的就可以了~。

排版方面,搜尋「損傷」、「砍死」、「死因」、「對手」,
在之前加上<br />分行碼就成了~。

關於items 的轉頭再打~。
吉川拓也
竹貓忠實會員
竹貓忠實會員
文章: 1215
註冊時間: 2003-02-09 18:24
來自: [ G.I.T ]
聯繫:

文章 吉川拓也 »

補充一下 :
如果你不想身上50樣東西一滿就不見 ~
改這裡 :

代碼: 選擇全部

            // 超出 50 項,砍掉 
            $sql = "select own_id from phpbb_rpg_owns where user_id = $uid order by own_id desc limit 50, 1";
你也可以改成 :

代碼: 選擇全部

            // 超出 200 項,砍掉 
            $sql = "select own_id from phpbb_rpg_owns where user_id = $uid order by own_id desc limit 200, 1"; 
也就是200樣砍1樣 ~
善用 搜尋 可以解決您 90% 的問題
頭腦清晰,選擇正確。 (╯▔︹▔)╯~╘═╛
悲情小爸爸
星球普通子民
星球普通子民
文章: 15
註冊時間: 2003-12-08 11:27

文章 悲情小爸爸 »

美化武器店 / 防具店排版。
其實所有排版的修改方法都是大同少異。
因為明天要早起(加上現時只修改了7項 :oops: ),
先貼這段 (將本來的templates/subSilver/rpg_defend.tpl or rpg_weapons.tpl 整段replace),各位試試合眼的我明天再post 其他~。

:-D
一起將水怪變得更完美吧~!

代碼: 選擇全部

<tr>
<td colspan="2"><font color="red"><b>{RPG_ITEM_ERROR}</b></font></td>
</tr>
<tr>
<td width="100%"><span class="gen"><b>所持現金:</b> <font color=#FF8000>{RPG_MONEY}</font> <b>元</b></span></td>
</tr>
<tr>
<td width="100%"><span class="gen"><b>職業等級:</b> <br><font color=#FF8000>{RPG_TYPE_LEVEL}</font></span></td>
</tr>
<td width="100%"><center><span class="gen">--------------------------------------------------------------------------------------</span></center></td>
</tr>
<tr>
<td width="100%"><span class="gen"><b>工作機會:</b> {RPG_JOBS_LIST}</span></td>
</tr>
<td width="100%"><center><span class="gen">--------------------------------------------------------------------------------------</span></center></td>
</tr>
<tr>
<td width="100%"><span class="gen"><b>商品列表:</b> {RPG_ITEM_LIST}</td>
</tr>
<tr>
<td width="100%"><span class="gen"><b>所持物品:</b> {RPG_OWN_LIST}</span></td>
</tr>
</table>
</td>
</tr>
</table>

<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="right"><span class="nav"><br />{JUMPBOX}</span></td>
</tr>
</table>
LEE
星球普通子民
星球普通子民
文章: 20
註冊時間: 2003-06-17 18:22

文章 LEE »

依夢兒 寫:
diber 寫:但我是砍了人家,結果有損傷點數,但路人血都沒變
你意思是,你砍路人的時候,畫面會顯示路人遭到 x 點傷害,但是路人的血沒降嗎?
如果是這樣,就是有問題了,可能是你沒裝好,或是不小心改到什麼地方啦~
我也發生一樣的情形了,上面有顯示路人失血,但實際上並沒有失血
我是使用依夢兒所整理的水怪RPG,試過吉川拓也說的重設NPC資料庫的方法,但無效
也有到下面這個網址抓function_eol.php檔作覆蓋動作,也是沒有解決
http://www.watermonster.org/phpBB/download/rpg_src/

請問有人知道解決的方法嗎?

謝謝
Using Free Time Well !!

忍一時...風平浪靜
退一步...海闊天空
~~~共勉之~~~
依夢兒
竹貓忠實會員
竹貓忠實會員
文章: 2013
註冊時間: 2002-11-20 00:07

文章 依夢兒 »

LEE 寫:也有到下面這個網址抓function_eol.php檔作覆蓋動作,也是沒有解決
http://www.watermonster.org/phpBB/download/rpg_src/
基本上你不需要這麼作,因為水怪 RPG 自去年五月以後就沒有繼續更新了。
我整理發佈的水怪 RPG 完整安裝版是在去年十一月發佈的,所以裡面的檔案都已經是最新的....
其中幾個檔案因為有另外去除 BUG ,所以比作者網站上面提供的還要新喲!

所以只能說,可能是你哪裡沒有安裝好吧?
不然就是你搞錯了,因為路人會重疊在一起,所以你砍到的路人和你看到的路人並不是同一隻。

又,我在發佈前,只有在 2.0.6 上測試無誤。
如果要安裝到 Plus 或是其它網友自行開發的整合型 phpbb 論壇(如藍天),就不保證其相容性了,請自己想辦法解決。
有任何關於 phpBB 或是架站的問題,請在論壇上公開發表出來,大家一起討論。
請不要丟私人訊息問我,因為私訊是用來聊私事的。
這樣作對於解決您的問題一點幫助也沒有,也很沒有效率,小弟我一概謝絕。



搜尋是一種美德,在發問之前,請多加利用頂端的文章搜尋功能,搜尋可能的關鍵字。
確定您想問的問題找不到答案後,再發問。
diber
星球普通子民
星球普通子民
文章: 6
註冊時間: 2003-12-25 09:41

文章 diber »

你的是xoops的模組的嗎,如果是,請參考這篇http://forum.rdi.com.tw/xoops/modules/pbboard/viewtopic.php?t=43,這裏有修正的方式,感謝那位大大找出來。
LEE
星球普通子民
星球普通子民
文章: 20
註冊時間: 2003-06-17 18:22

文章 LEE »

依夢兒 寫:
LEE 寫:也有到下面這個網址抓function_eol.php檔作覆蓋動作,也是沒有解決
http://www.watermonster.org/phpBB/download/rpg_src/
基本上你不需要這麼作,因為水怪 RPG 自去年五月以後就沒有繼續更新了。
我整理發佈的水怪 RPG 完整安裝版是在去年十一月發佈的,所以裡面的檔案都已經是最新的....
其中幾個檔案因為有另外去除 BUG ,所以比作者網站上面提供的還要新喲!
這點我有考慮到,不過因為一直找不到原因,所以只好將各種可能解決的方法都嘗試看看 ;-)
依夢兒 寫:所以只能說,可能是你哪裡沒有安裝好吧?
不然就是你搞錯了,因為路人會重疊在一起,所以你砍到的路人和你看到的路人並不是同一隻。
我測試過幾次,都是攻擊不同角色,資料庫重建後,產生新的NPC也是沒解決,真是傷腦筋 ;-)

謝謝你的回答
繼續找問題去囉 :-)
Using Free Time Well !!

忍一時...風平浪靜
退一步...海闊天空
~~~共勉之~~~
LEE
星球普通子民
星球普通子民
文章: 20
註冊時間: 2003-06-17 18:22

文章 LEE »

diber 寫:你的是xoops的模組的嗎,如果是,請參考這篇http://forum.rdi.com.tw/xoops/modules/pbboard/viewtopic.php?t=43,這裏有修正的方式,感謝那位大大找出來。
不好意思,沒說出我的版本,我的是phpbb 2.0.5
謝謝你的幫忙
Using Free Time Well !!

忍一時...風平浪靜
退一步...海闊天空
~~~共勉之~~~
LEE
星球普通子民
星球普通子民
文章: 20
註冊時間: 2003-06-17 18:22

文章 LEE »

找到問題了!

剛剛在我的電腦裡作測試,結果可以正常扣血,我就在想八成又是資料庫名稱惹的禍
所以就在function_eol.php仔細的一個一個找,終於找到漏掉沒修改到的地方\r

代碼: 選擇全部

$sql = "update " . ($is_npc ? "phpbb_rpg_npc" : "phpbb_users") .
以我來說,我的資料庫是lee_phpbb,所以裡面要改成lee_phpbb_rpg_npc跟lee_phpbb_users
我昨天是以搜尋「 phpbb_」的方式來修改(phpbb前有個空白碼)
而上面那段前面是個雙引號,所以我才會沒有改到...真是烏龍

寫出來讓往後跟我一樣疏忽的人能夠找到這個問題的所在 ;-)

最後還是要謝謝依夢兒跟diber的幫忙!
Using Free Time Well !!

忍一時...風平浪靜
退一步...海闊天空
~~~共勉之~~~
s80022
星球普通子民
星球普通子民
文章: 19
註冊時間: 2003-02-14 07:31

文章 s80022 »

我來建議一下..不如改成
點選角色右鍵..會出現 "攻擊" "移動"2個選項
頭像
Xanthe
星球普通子民
星球普通子民
文章: 4
註冊時間: 2003-12-05 04:14
聯繫:

文章 Xanthe »

如果是指將 "攻擊" 和 "移動" 兩個按鈕移到 "變換角色" 旁邊的話:

代碼: 選擇全部

# 
#-----[ 打開]--------------------------------------------- 
# 
rpg/function_eol.php 
# 
#-----[ 找尋 ]--------------------------------------------- 
#
$btn_list = '<input type="submit" name="go2move" class="liteoption" value="移動"> <input type="submit" name="go2attack" class="liteoption" value="攻擊">';
# 
#-----[更改為 ]--------------------------------------------- 
# 
$btn_list = '';
# 
#-----[存檔 ]--------------------------------------------- 
# 
# 
#-----[ 打開]--------------------------------------------- 
# 
templates/subSilver/rpg_eol.tpl
# 
#-----[ 找尋 ]--------------------------------------------- 
#
<input type="submit" name="change_char" class="liteoption" value="確定">
# 
#-----[ 之後, 加入 ]--------------------------------------------- 
#
  <input type="submit" name="go2move" class="liteoption" value="移動"> <input type="submit" name="go2attack" class="liteoption" value="攻擊">
# 
#-----[存檔 ]--------------------------------------------- 
# 
#-----[EOM ]--------------------------------------------- 
# 
圖檔
主題已鎖定

回到「外掛問題討論」