<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aummua Blog &#187; ragnarok</title>
	<atom:link href="http://www.aummua.com/tag/ragnarok/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aummua.com</link>
	<description>บล๊อกของนายอุ้มสุดหล่อ</description>
	<lastBuildDate>Mon, 17 Jan 2011 19:14:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>วิธีการดึงข้อมูลจากการบันทึกค่า value ของ Special Ranking</title>
		<link>http://www.aummua.com/how-to-use-query-from-special-ranking/</link>
		<comments>http://www.aummua.com/how-to-use-query-from-special-ranking/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 05:53:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Tip&Trick]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[eathena]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[ragnarok]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.aummua.com/?p=190</guid>
		<description><![CDATA[script PHP ตัวนี้จะเป็นการดึงค่าใน value ที่อยู่ในตาราง global_reg_value ของ Ragnarok ออกมาโดยไม่ต้องทำการติดตั้ง NPC การเก็บค่าต่างๆเพิ่มเลยนอกจาก ต้องติดตั้ง Special Ranking เพียง NPC ตัวเดียว การทำงานของ Special Ranking จะอยู่ในตัวเกมส์ทำหน้าที่เก็บค่า value ลงฐานข้อมูล การเก็บค่าของ NPC ตัวนี้มี 3 ตัวแปร 1. PKPoint คือ PVP คะแนน PVP เมื่อฆ่า 2. MKPoint คือ MVP แต้มที่ได้จากการ ฆ่าบอส 3. EKPoint คือ EMP แต้มที่ได้จากการตีหิน ปกติแล้วถ้าเราสร้าง Query SQL ขึ้นมาแล้วดึง value ออกมาแสดงในรูปแบบ DESC(เรียงมากไปน้อย) จะทำให้ข้อมูลไม่เรียงกัน(สลับมั่วไปหมด) เพราะว่าฟิลด์ [...]]]></description>
			<content:encoded><![CDATA[<div align="center"><img src="http://www.aummua.com/wp-content/uploads/2010/03/demomkpoint.gif" alt="" title="demomkpoint" width="406" height="143" class="alignnone size-full wp-image-194" /></div>
<p>script PHP ตัวนี้จะเป็นการดึงค่าใน value ที่อยู่ในตาราง global_reg_value ของ Ragnarok ออกมาโดยไม่ต้องทำการติดตั้ง NPC การเก็บค่าต่างๆเพิ่มเลยนอกจาก ต้องติดตั้ง <a href="http://www.eathena.in.th/forum/index.php?showtopic=1014">Special Ranking</a> เพียง NPC ตัวเดียว</p>
<p>การทำงานของ <a href="http://www.eathena.in.th/forum/index.php?showtopic=1014">Special Ranking</a> จะอยู่ในตัวเกมส์ทำหน้าที่เก็บค่า value ลงฐานข้อมูล</p>
<p><strong>การเก็บค่าของ NPC ตัวนี้มี 3 ตัวแปร</strong><br />
1. PKPoint คือ PVP คะแนน PVP เมื่อฆ่า<br />
2. MKPoint คือ MVP แต้มที่ได้จากการ ฆ่าบอส<br />
3. EKPoint คือ EMP แต้มที่ได้จากการตีหิน</p>
<p>ปกติแล้วถ้าเราสร้าง Query SQL ขึ้นมาแล้วดึง value ออกมาแสดงในรูปแบบ DESC<em>(เรียงมากไปน้อย)</em> จะทำให้ข้อมูลไม่เรียงกัน<em>(สลับมั่วไปหมด)</em> เพราะว่าฟิลด์ value อยู่ในรูปแบบของ varchar ไม่ใช่ int</p>
<p>มีวิธีแก้ก็คือทำให้ฟิลด์ value กลายเป็นให้ค่าเป็นค่าสัมบูรณ์ด้วย abs()<br />
วิธีใช้ ORDER BY abs(`value`) DESC</p>
<p><strong>การเรียกข้อมูลออกมาแสดงบนเว็บ</strong> <em>ตัวอย่าง PKPoint</em><br />
<code>$result = mysql_query("SELECT * FROM `".$db_game."`.`global_reg_value` WHERE `str` LIKE 'PKPoint' ORDER BY abs(`value`) DESC LIMIT 0 , 10");<br />
	while ( $rd = mysql_fetch_array( $result ) )<br />
	{<br />
		echo "ชื่อ ".cid2namechar($rd['char_id'])." ฆ่าได้ ".number_format($rd['value'])." คน<br />";<br />
	};</code><br />
สังเกตุการแสดงชื่อ จะใช้ฟังชั่น cid2namechar() &#8230; ก็คือการเปลี่ยนจาก char_id เป็น name ในตาราง char</p>
<p>มาดูการสร้างฟังชั่น cid2namechar() ของผมบ้าง.. (ไม่รู้คนอื่นเขียนแบบนี้ป่าวนะ อิอิ)<br />
<code>function cid2namechar($cid) {<br />
global $sql_game;<br />
	$namecid = mysql_fetch_array(mysql_query("SELECT * FROM `".$sql_game."`.`char` WHERE `char_id`=". $cid));<br />
	if( $namecid ) {<br />
		return $namecid['name'];<br />
	} else {<br />
		return 'N/A';<br />
	}<br />
}</code></p>
<p>จบแระ หวังว่าจะมีประโยชน์ อ่ะนะ</p>
<div style='display:none' id="post-refEl-190"></div>]]></content:encoded>
			<wfw:commentRss>http://www.aummua.com/how-to-use-query-from-special-ranking/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Zian AdminCP เวอชั่น 1.1 แล้วดาวโหลดฟรี</title>
		<link>http://www.aummua.com/zian-admincp-1-1-lastest-2010/</link>
		<comments>http://www.aummua.com/zian-admincp-1-1-lastest-2010/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 04:47:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tip&Trick]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Control Panel]]></category>
		<category><![CDATA[CP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ragnarok]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.aummua.com/?p=179</guid>
		<description><![CDATA[:: รายละเอียดโปรแกรม :: เป็น Control Panel Ragnarok Online สำหรับ GM ที่จะอำนวยความสะดวกภายในเซิฟเวอร์ได้ง่าย ง่ายมากๆ !และก็น่าจะมีประโยชน์ต่อหลายๆ เซิฟเวอร์ :: ความสามารถสำหรับ 1.1 :: 19/03/52 - แก้ไข Query SQL ของระบบ แบน/ปลดแบน (ขอบคุณ NeCrOW1Z ที่แจ้งมา) - เพิ่มระบบ รายการแสดง UserID ทั้งหมด - จัดระเบียบ Source Code ใหม่เกือบหมด DOWNLOAD v1.1 / WEBSITE enjoy.. อิ อิ]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="http://www.aummua.com/zian-acp/demo1.gif" alt="DEMO PIC" /></p>
<p><strong>:: รายละเอียดโปรแกรม ::</strong><br />
เป็น Control Panel <em>Ragnarok Online</em> สำหรับ GM ที่จะอำนวยความสะดวกภายในเซิฟเวอร์ได้ง่าย ง่ายมากๆ !และก็น่าจะมีประโยชน์ต่อหลายๆ เซิฟเวอร์</p>
<p><strong>:: ความสามารถสำหรับ 1.1 :: 19/03/52</strong><br />
- แก้ไข Query SQL ของระบบ แบน/ปลดแบน (ขอบคุณ NeCrOW1Z ที่แจ้งมา)<br />
- เพิ่มระบบ รายการแสดง UserID ทั้งหมด<br />
- จัดระเบียบ Source Code ใหม่เกือบหมด</p>
<p style="text-align: right;"><a href="http://www.aummua.com/zian-acp/?zacp=dl&amp;v=lastest"><strong>DOWNLOAD v1.1</strong></a> / <a href="http://www.aummua.com/zian-acp/">WEBSITE</a></p>
<p>enjoy.. อิ อิ</p>
<div style='display:none' id="post-refEl-179"></div>]]></content:encoded>
			<wfw:commentRss>http://www.aummua.com/zian-admincp-1-1-lastest-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[eAthena] สอนวิธีการทำ PVP Ranking หน้าเว็บสำหรับ RO</title>
		<link>http://www.aummua.com/eathena-howto-make-pvpranking/</link>
		<comments>http://www.aummua.com/eathena-howto-make-pvpranking/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 03:02:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[My Life]]></category>
		<category><![CDATA[Tip&Trick]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[eathena]]></category>
		<category><![CDATA[npc]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ragnarok]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Tip]]></category>

		<guid isPermaLink="false">http://www.aummua.com/?p=125</guid>
		<description><![CDATA[สอนการทำ ระบบ PVP Ranking ที่หน้าเว็บครับ อันนี้ผมดัดแปลง script npc มาจาก ระบบ Reputation ของ ZeesClub แล้วเขียนการแสดงผลจากฐานข้อมูลเอง คงโพสไม่ซ้ำนะคับ เพราะอันนี้เขียนเอง = =&#8221; ขอแค่คำขอบคุณนะครับ ผมเห็นคนต้องการเยอะอยู่เหอ ๆ เลยแจกให้เลย ประยุกต์ได้หลายแบบนะ แล้วแต่จะลองทำกันครับ 1. นำโค้ดนี้ใส่ใน sql นะ ALTER TABLE `char` ADD `pvp_point` INT( 11 ) NOT NULL; 2.สำหรับตัว NPC Script (ใช้ script npc เป็นตัวเก็บคะแนนเพื่อ อัพเดทกับฐานข้อมูล) morocc,0,0,0 script PVP_rankpoint -1,{ OnPCKillEvent: set @char_id,getcharid(0); query_sql "SELECT [...]]]></description>
			<content:encoded><![CDATA[<p>สอนการทำ <strong>ระบบ PVP Ranking ที่หน้าเว็บ</strong>ครับ<br />
อันนี้ผมดัดแปลง script npc มาจาก ระบบ Reputation ของ ZeesClub<br />
แล้วเขียนการแสดงผลจากฐานข้อมูลเอง คงโพสไม่ซ้ำนะคับ เพราะอันนี้เขียนเอง = =&#8221;</p>
<p>ขอแค่คำขอบคุณนะครับ ผมเห็นคนต้องการเยอะอยู่เหอ ๆ เลยแจกให้เลย<br />
ประยุกต์ได้หลายแบบนะ แล้วแต่จะลองทำกันครับ</p>
<hr size="1" />
<blockquote><p><strong>1. นำโค้ดนี้ใส่ใน sql นะ</strong><br />
<code>ALTER TABLE `char` ADD `pvp_point` INT( 11 ) NOT NULL;</code></p>
<p><strong>2.สำหรับตัว NPC Script</strong> (ใช้ script npc เป็นตัวเก็บคะแนนเพื่อ อัพเดทกับฐานข้อมูล)<br />
<code>morocc,0,0,0    script    PVP_rankpoint    -1,{<br />
OnPCKillEvent:<br />
set @char_id,getcharid(0);<br />
query_sql "SELECT `pvp_point` FROM `char` WHERE `char_id`='"+@char_id+"'",@CharPVPPoint;<br />
set @pointup,(@CharPVPPoint+1);<br />
query_sql "UPDATE `char` SET `pvp_point`='"+@pointup+"' WHERE `char_id`='"+@char_id+"'";<br />
end;<br />
}</code></p>
<p><strong>3.สำหรับเว็บ (PHP)</strong><br />
<code> //by aummua<br />
$hostdb = "localhost";<br />
$userdb = "";<br />
$passdb = "";<br />
$db_game = "";</code></p>
<p>mysql_connect($hostdb, $userdb, $passdb) or die(&#8220;ติดต่อฐานข้อมูลไม่ได้&#8221;);<br />
mysql_select_db($db_game) or die(&#8220;เลือกฐานข้อมูลไม่ได้&#8221;);<br />
$SQL = mysql_query(&#8220;SELECT * FROM `char` ORDER BY `char`.`pvp_point` DESC LIMIT 0 , 10&#8243;);<br />
while( $fetch = mysql_fetch_array( $SQL )){<br />
$name = $fetch [name];<br />
$pvp_point = $fetch [pvp_point];<br />
echo &#8220;$name [Point: $pvp_point]<br />
\n&#8221;;<br />
}<br />
?></code></p></blockquote>
<p><strong>ถ้าเอาไปแจกต่อ ก็เครดิตกลับเว็บผมด้วย</strong></p>
<div style='display:none' id="post-refEl-125"></div>]]></content:encoded>
			<wfw:commentRss>http://www.aummua.com/eathena-howto-make-pvpranking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ZianRO Ragnarok Server เซิฟเวอร์ที่เจ๋งที่สุด !!</title>
		<link>http://www.aummua.com/zianro-ragnarok-server/</link>
		<comments>http://www.aummua.com/zianro-ragnarok-server/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 17:31:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Aummua]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[My Life]]></category>
		<category><![CDATA[ragnarok]]></category>
		<category><![CDATA[zianro]]></category>

		<guid isPermaLink="false">http://www.aummua.com/?p=52</guid>
		<description><![CDATA[โปรโมทซะหน่อย กับ เซิฟเวอร์ Ragnarok Online แบบเล่นฟรีๆ ง่ายๆ และเปิดนานๆ ที่สุด ก็ต้องเป็นเว็บนี้เลย เจ๋งมากเซิฟที่ ผมดูแลอยู่ด้วย !! ก็คือเซิฟเวอร์ Zian-RO Online ถึงคนน้อยแต่ก็เสถียรพอสมควร Website : http://www.zianro.com]]></description>
			<content:encoded><![CDATA[<p>โปรโมทซะหน่อย กับ เซิฟเวอร์ <strong>Ragnarok Online</strong> แบบเล่นฟรีๆ ง่ายๆ และเปิดนานๆ ที่สุด ก็ต้องเป็นเว็บนี้เลย เจ๋งมากเซิฟที่ ผมดูแลอยู่ด้วย !! ก็คือเซิฟเวอร์ <strong><a title="ZianRO Ragnarok Server Online 24hr" href="http://www.zianro.com" target="_blank">Zian-RO Online</a></strong> ถึงคนน้อยแต่ก็เสถียรพอสมควร</p>
<p>Website : http://www.zianro.com</p>
<div style='display:none' id="post-refEl-52"></div>]]></content:encoded>
			<wfw:commentRss>http://www.aummua.com/zianro-ragnarok-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
