Converted sample Function and Skill scripts into plain English. More to follow.

Also, Akkarin's first commit!

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16730 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
thatakkarin 2012-09-01 11:15:26 +00:00
parent 369a65f7da
commit 9b29b75390
2 changed files with 29 additions and 23 deletions

View File

@ -1,26 +1,27 @@
// 値を返さない関数 // Define the function func001
function script func001 { function script func001 {
mes "ユーザー定義関数"; mes "Hello there!";
next; next;
return; // 省略できない return; // continue script
} }
// 値を返す関数 // Define the function func002
function script func002 { function script func002 {
return "ユーザー定義関数2"; return "I'm a function";
} }
// 関数の呼び出しとサブルーティンのテスト // An NPC using 3 different methods of displaying npc dialog from both internal
prontera,168,189,1 script 関数テスト 112,{ // and external sources.
callfunc "func001"; // ユーザー定義関数は文字列で指定 prontera,168,189,1 script Functions 112,{
mes callfunc("func002"); callfunc "func001"; // Calls func001 and displays "Hello there!"
mes callfunc("func002"); // Calls func002 and displays "I'm a function"
next; next;
callsub L_SUB001; // サブルーティンはラベルを直接指定 callsub L_SUB001; // Calls the label L_SUB001 and displays "I'm a label"
close; close;
end; end;
L_SUB001: L_SUB001:
mes "サブルーティン"; mes "I'm a label";
return; // 省略できない return; // continue script
} }

View File

@ -1,18 +1,23 @@
// スキル所得テスト // Giving skills to characters via an NPC
// skill スキルID ,スキルLV [,フラグ]; // skill <skill id>,<level>{,<flag>};
// フラグは省略可能、省略時は1。 // flag=0 Grants the skill permanently
// フラグ=1でカードなどの一時的な所得、 // flag=1 Grants the skill temporarily
// フラグ=2でクエストなどによる恒久的な所得(skill_tree.txtに依存) // flag=2 Level bonus, stackable
// If flag is undefined, it defaults to 1
// View db/(pre-)re/skill_db.txt for skill IDs
prontera,157,182,0 script スキル所得テスト 116,{ prontera,157,182,0 script Skills 116,{
mes "スキル所得テスト"; mes "What skill would you like?";
menu "応急処置所得",L_GETSKILL142,"死んだ振り所得",L_GETSKILL143,"やめる",L_YAME; menu "First Aid",L_GETSKILL142,"Play Dead",L_GETSKILL143,"Heal",L_GETSKILL28,"None",L_YAME;
L_GETSKILL142: L_GETSKILL142:
skill 142,1,0; skill 142,1,0; // Permanently gives player level 1 First Aid
close; close;
L_GETSKILL143: L_GETSKILL143:
skill 143,1,0; skill 143,1,0; // Permanently gives player level 1 Play Dead
close;
L_GETSKILL28:
skill 28,3,1; // Temporarily gives player level 3 Heal
close; close;
L_YAME: L_YAME:
close; close;