From 6f88f2409f1853ae205573257865462540f935fc Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Wed, 31 Mar 2010 18:57:22 +0000 Subject: Moved /npc/sample/ to /doc/sample. These are examples, not actual npcs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14277 54d463be-8e91-2dee-dedb-b68131a5f0ec --- doc/sample/npc_test_array.txt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/sample/npc_test_array.txt (limited to 'doc/sample/npc_test_array.txt') diff --git a/doc/sample/npc_test_array.txt b/doc/sample/npc_test_array.txt new file mode 100644 index 000000000..de0a80ef2 --- /dev/null +++ b/doc/sample/npc_test_array.txt @@ -0,0 +1,35 @@ +// Array Test +prontera,164,190,1 script Array Test 112,{ + set @hoge[0],1; + set @hoge[1],5; + mes "Please enter a value for hoge[2]."; + next; + input @hoge[2]; + mes "hoge => " + @hoge; + mes "hoge[0]=> " + @hoge[0]; + mes "hoge[1]=> " + @hoge[1]; + mes "hoge[2]=> " + @hoge[2]; + next; + setarray @hoge[1],2,3,4,5; + mes "true: 5,1,2,3,4"; + mes "hoge size = "+ getarraysize(@hoge); + mes "hoge[0]=> " + @hoge[0]; + mes "hoge[1]=> " + @hoge[1]; + mes "hoge[2]=> " + @hoge[2]; + mes "hoge[3]=> " + @hoge[3]; + next; + copyarray @fuga[0],@hoge[2],2; + mes "true: 3,4,0"; + mes "fuga[0]=> " + @fuga[0]; + mes "fuga[1]=> " + @fuga[1]; + mes "fuga[2]=> " + @fuga[2]; + next; + deletearray @hoge[1],2; + mes "true: 1,4,5,0"; + mes "hoge[0]=> " + @hoge[0]; + mes "hoge[1]=> " + @hoge[1]; + mes "hoge[2]=> " + @hoge[2]; + mes "hoge[3]=> " + @hoge[3]; + + close; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2