rathena/doc/sample/npc_test_func.txt
thatakkarin 9b29b75390 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
2012-09-01 11:15:26 +00:00

28 lines
648 B
Plaintext

// Define the function func001
function script func001 {
mes "Hello there!";
next;
return; // continue script
}
// Define the function func002
function script func002 {
return "I'm a function";
}
// 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; // Calls the label L_SUB001 and displays "I'm a label"
close;
end;
L_SUB001:
mes "I'm a label";
return; // continue script
}