summaryrefslogtreecommitdiff
path: root/npc/custom/test.txt
AgeCommit message (Collapse)AuthorFilesLines
2014-03-18Created npc/dev/ folder for scripts with development or testing purposes.Haru1-726/+0
- Moved npc/custom/test.txt to npc/dev/test.txt - Special thanks to AnnieRuru for the idea. Signed-off-by: Haru <haru@dotalux.com>
2014-03-17Added regular expression matching script commands and operatorsHaru1-1/+16
- The script command pcre_match and the operator ~= will return the number of regular expression matches in a given string (roughly equivalent to the php function preg_match or the perl operator =~) - The operator ~! is the opposite of ~= (roughly equivalent to the perl operator !~) - See script_commands and npc/custom/test.txt for more information. Signed-off-by: Haru <haru@dotalux.com>
2014-03-10Fixed a crash caused by NPC variable references in callfuncHaru1-32/+152
- Fixes bugreport:8074, thanks to ahmadshidqi http://hercules.ws/board/tracker/issue-8074-help-crash/ - Also fixed some DBMap allocation mistakes introduced in 4f3156b. - Added testcases to the self-test script. - Made possible thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2014-03-05Added some callsub tests to the script testsuiteHaru1-2/+63
- Also includes testcases for the recent ref fixes/changes. Signed-off-by: Haru <haru@dotalux.com>
2014-01-13Improved overwriting priority of variables/constants/parametersHaru1-0/+26
- Fixes issue 7968, thanks to Moguri http://hercules.ws/board/tracker/issue-7968-trader-npc-not-working/ - Corrected sprite name for KO_KAGE to match latest kRO info (previouly KO_ZANZOU, conflicting with a Kagerou/Oboro skill identifier) - Updated self-test script to include checks for constants and for setd and getd. - Made possible thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2014-01-12Updated script engine self-test npc with array testsHaru1-7/+111
Signed-off-by: Haru <haru@dotalux.com>
2013-11-30Fixed an issue with assignment operators and expressionsHaru1-55/+25
- Assignment operators would not work correctly, or at all, when followed by an expression (as opposed as a value). - Fixes bugreport:7864, thanks to Lelouch, Ind. - Added associativity tests for those operators to the self-test script. - Added total error count to the self-test script (thanks to Lighta.) Signed-off-by: Haru <haru@dotalux.com>
2013-11-28Added support for automatic concatenation of adjacent string literalsHaru1-0/+14
- [ This commit is part of a larger script engine related update ] - Adjacent string literals are now automatically concatenated into one string upon parsing. - Adjacent string literals are string literals (i.e. "such as this", with only whitespace (including line breaks and/or comments) between them. For example, the lines: mes "this will be concatenated " /* skipping this comment */ " into one string"; // at parse time will produce an output of "this will be concatenated into one string". - The feature brings parity with other languages (i.e. C), and makes it easier to split long strings in multiple lines, without having to resort to a, slower, run-time string concatenation operator ('+') - Special thanks to Trojal for the idea. Signed-off-by: Haru <haru@dotalux.com>
2013-11-28Corrected operator precedence table.Haru1-0/+416
- [ This commit is part of a larger script engine related update ] - Operator precedence rules now closely follow those of languages such as C and derivates/related (C++, Java, PHP, etc.) - Please note that if you had custom scripts with non parenthesized expressions containing bitwise |, &, ^ operators, they may behave incorrectly now (or perhaps they were already behaving incorrectly, since the previous behavior was undocumented). - Added an up to date operator precedence/associativity table in the script documentation. - Added an operator/keyword self-test script in the npc/custom folder, in case if may be of some use for future regression-testing.