scripting.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <html>
  2. <head>
  3. <title>eAthena | Scripting</title>
  4. <link rel="stylesheet" type="text/css" href="style.css">
  5. </head>
  6. <body>
  7. <div id="template">
  8. <div id="header">
  9. <div class="logo">eAthena<br /><span class="subtitle">- RAGNAROK Online Server Emulator</span></div>
  10. <div class="title">Scripting</div>
  11. </div>
  12. <div id="navcontainer">
  13. <ul id="navlist">
  14. <li><a href="../readme.html">Intro</a></li>
  15. <li><a href="setup.html">Setup</a></li>
  16. <li><a href="faq.html">FAQ</a></li>
  17. <li><a href="scripting.html">Scripting</a></li>
  18. <li><a href="commands.html">GM Commands</a></li>
  19. <li><a href="resources.html">Resources</a></li>
  20. </ul>
  21. </div>
  22. <div class="body-container">
  23. <p>
  24. How to create an NPC using eAthena's scripting:<br /><br />
  25. <font color="#0000FF">map_name</font>,<font color="#009900">x_cord</font>,<font color="#0CF305">y_cord</font>,<font color="#FF0000">npc_facing_direction</font> <strong>-TAB-</strong> script <strong>-TAB-</strong> <font color="#FF6600">NPC Name</font>#<font color="#FFCC00">HiddenName</font> <strong>-TAB-</strong> <font color="#CC3399">Sprite ID</font>,{<br />
  26. &nbsp;&nbsp;&nbsp;mes "[NPC Name]";<br>
  27. &nbsp;&nbsp;&nbsp;mes "Hello World";<br>
  28. &nbsp;&nbsp;&nbsp;close;<br>
  29. }
  30. </p>
  31. <p>
  32. <strong>Common Script Commands:</strong>
  33. <ul>
  34. <li><strong>mes</strong><br>
  35. usage: mes &quot;&lt;message&gt;&quot;;<br>
  36. info: displays a line of text in an NPC's dialog window.</li>
  37. <li><strong>close</strong><br>
  38. usage: close;<br>
  39. info: displays a &quot;Close&quot; button in an NPC's dialog window.
  40. </li>
  41. <li><strong>next</strong><br>
  42. usage: next;<br>
  43. info: displays a &quot;Next&quot; button in an NPC's dialog window.</li>
  44. <li><strong>getitem</strong><br>
  45. usage: getitem &lt;item id&gt;,&lt;amount&gt;;<br>
  46. info: gives the player an item.
  47. </li>
  48. <li><strong>delitem</strong><br>
  49. usage: delitem &lt;item id&gt;,&lt;amount&gt;;<br>
  50. info: deletes an item from the player.
  51. </li>
  52. </ul>
  53. <p><strong>Script Command Documentation:</strong><br>
  54. All the script commands in eAthena can be found <a href="../doc/script_commands.txt" target="_new">here</a>.</p>
  55. <p><strong>How to enable your NPC:</strong><br>
  56. 1. Save it as a text file in your /npc/custom/ folder.<br>
  57. 2. Open /npc/scripts_custom.conf<br>
  58. 3. Add the following line:<br>
  59. <em>npc: npc/custom/name_of_your_text_file.txt</em><br>
  60. 4. Save and close.</p>
  61. </p>
  62. </div>
  63. <div id="footer">"Read Me" Created & Designed by <a href="http://www.kisuka.com" target="_new">Kisuka</a></div>
  64. </div>
  65. </body>
  66. </html>