summaryrefslogtreecommitdiff
path: root/doc/sample/npc_test_func.txt
diff options
context:
space:
mode:
authorthatakkarin <thatakkarin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-09-01 11:15:26 +0000
committerthatakkarin <thatakkarin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-09-01 11:15:26 +0000
commitbffeea2b80bb28a8e5687d56f75d738121176c4e (patch)
tree619ad47e112e6441cd3f6b68e76fd4f6304fdd4e /doc/sample/npc_test_func.txt
parent6de70cf88cbd8413f6a691524cf60f7f5b337281 (diff)
downloadhercules-bffeea2b80bb28a8e5687d56f75d738121176c4e.tar.gz
hercules-bffeea2b80bb28a8e5687d56f75d738121176c4e.tar.bz2
hercules-bffeea2b80bb28a8e5687d56f75d738121176c4e.tar.xz
hercules-bffeea2b80bb28a8e5687d56f75d738121176c4e.zip
Converted sample Function and Skill scripts into plain English. More to follow.
Also, Akkarin's first commit! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16730 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'doc/sample/npc_test_func.txt')
-rw-r--r--doc/sample/npc_test_func.txt25
1 files changed, 13 insertions, 12 deletions
diff --git a/doc/sample/npc_test_func.txt b/doc/sample/npc_test_func.txt
index 2e613404f..1f50afb46 100644
--- a/doc/sample/npc_test_func.txt
+++ b/doc/sample/npc_test_func.txt
@@ -1,26 +1,27 @@
-// 値を返さない関数
+// Define the function func001
function script func001 {
- mes "ユーザー定義関数";
+ mes "Hello there!";
next;
- return; // 省略できない
+ return; // continue script
}
-// 値を返す関数
+// Define the function func002
function script func002 {
- return "ユーザー定義関数2";
+ return "I'm a function";
}
-// 関数の呼び出しとサブルーティンのテスト
-prontera,168,189,1 script 関数テスト 112,{
- callfunc "func001"; // ユーザー定義関数は文字列で指定
- mes callfunc("func002");
+// An NPC using 3 different methods of displaying npc dialog from both internal
+// and external sources.
+prontera,168,189,1 script Functions 112,{
+ callfunc "func001"; // Calls func001 and displays "Hello there!"
+ mes callfunc("func002"); // Calls func002 and displays "I'm a function"
next;
- callsub L_SUB001; // サブルーティンはラベルを直接指定
+ callsub L_SUB001; // Calls the label L_SUB001 and displays "I'm a label"
close;
end;
L_SUB001:
- mes "サブルーティン";
- return; // 省略できない
+ mes "I'm a label";
+ return; // continue script
}