diff options
author | Trojal <trojal@gmail.com> | 2013-01-10 20:09:39 -0800 |
---|---|---|
committer | Trojal <trojal@gmail.com> | 2013-01-10 20:32:02 -0800 |
commit | 83e7a4954437c13aec639b0b512252cc20a8f36c (patch) | |
tree | b7f6d11b2058248d026f2d9944e8f4b6ac288d50 /doc/sample/npc_test_array.txt | |
parent | 51bfeb38eb139e97e0e1c096c85c15fba234f35b (diff) | |
parent | 38e583df21eccd9e4f31d38acaae32579c6f0d27 (diff) | |
download | hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.gz hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.bz2 hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.tar.xz hercules-83e7a4954437c13aec639b0b512252cc20a8f36c.zip |
Merge rathena repository to form Hercules initial commit.
Diffstat (limited to 'doc/sample/npc_test_array.txt')
-rw-r--r-- | doc/sample/npc_test_array.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/sample/npc_test_array.txt b/doc/sample/npc_test_array.txt new file mode 100644 index 000000000..97aa5baf0 --- /dev/null +++ b/doc/sample/npc_test_array.txt @@ -0,0 +1,43 @@ +//===== rAthena Script ======================================= +//= Sample: Array Test +//===== By: ================================================== +//= rAthena Dev Team +//===== Current Version: ===================================== +//= 20090206 +//===== Description: ========================================= +//= Demonstrates array commands. +//============================================================ + +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 |