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