scripting.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>rAthena | Scripting</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  6. <link rel="stylesheet" type="text/css" href="style.css">
  7. </head>
  8. <body>
  9. <div id="template">
  10. <div id="header">
  11. <div class="logo">rAthena<br><span class="subtitle">- RAGNAROK Online Server Emulator</span></div>
  12. <div class="title">Scripting</div>
  13. </div>
  14. <div id="navcontainer">
  15. <ul id="navlist">
  16. <li><a href="../readme.html">Intro</a></li>
  17. <li><a href="setup.html">Setup</a></li>
  18. <li><a href="faq.html">FAQ</a></li>
  19. <li><a href="scripting.html">Scripting</a></li>
  20. <li><a href="commands.html">GM Commands</a></li>
  21. <li><a href="resources.html">Resources</a></li>
  22. </ul>
  23. </div>
  24. <div class="body-container">
  25. How to create an NPC using rAthena's scripting:<br><br>
  26. <code><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>
  27. &nbsp;&nbsp;&nbsp;mes "[NPC Name]";<br>
  28. &nbsp;&nbsp;&nbsp;mes "Hello World";<br>
  29. &nbsp;&nbsp;&nbsp;close;<br>
  30. }</code><br><br>
  31. <strong>Common Script Commands:</strong>
  32. <ul>
  33. <li><strong>mes &quot;&lt;message&gt;&quot;;</strong><br>
  34. displays a line of text in an NPC's dialog window.</li>
  35. <li><strong>close;</strong><br>
  36. displays a &quot;Close&quot; button in an NPC's dialog window.
  37. </li>
  38. <li><strong>next;</strong><br>
  39. displays a &quot;Next&quot; button in an NPC's dialog window.
  40. </li>
  41. <li><strong>getitem &lt;item id&gt;,&lt;amount&gt;;</strong><br>
  42. gives the player an item.
  43. </li>
  44. <li><strong>delitem &lt;item id&gt;,&lt;amount&gt;;</strong><br>
  45. deletes an item from the player.
  46. </li>
  47. </ul>
  48. <strong>Script Command Documentation:</strong><br>
  49. All the script commands in rAthena can be found <a href="../doc/script_commands.txt" target="_new">here</a>.<br><br>
  50. <strong>How to enable your NPC:</strong>
  51. <ol>
  52. <li>Save it as a text file in your /npc/custom/ folder.</li>
  53. <li>Open /npc/scripts_custom.conf</li>
  54. <li>Add the following line:<br>
  55. <code>npc: npc/custom/name_of_your_text_file.txt</code></li>
  56. <li>Save and close.</li>
  57. </ol>
  58. </div>
  59. <div id="footer">"Read Me" Created &amp; Designed by <a href="http://www.kisuka.com" target="_new">Kisuka</a></div>
  60. </div>
  61. </body>
  62. </html>