From 30f469526c42a2e69655943a24cd92e3503282e6 Mon Sep 17 00:00:00 2001 From: cavesomething Date: Tue, 27 Apr 2010 17:13:03 +0000 Subject: [PATCH] Updates to the quest test map and a number of .msg files that demonstrate how to use include to source rules from different files. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13008 282e977c-c81d-0410-88c4-b93c2d0d6712 --- test/quest_handling/girl2.msg | 9 +++++++++ test/quest_handling/girl3.msg | 9 +++++++++ test/quest_handling/girl4.msg | 11 +++++++++++ test/quest_handling/girl5.msg | 9 +++++++++ test/quest_handling/girlmain.msg | 19 +++++++++++++++++++ test/quest_handling/quest_map | 20 +++++++++++++++++++- 6 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 test/quest_handling/girl2.msg create mode 100644 test/quest_handling/girl3.msg create mode 100644 test/quest_handling/girl4.msg create mode 100644 test/quest_handling/girl5.msg create mode 100644 test/quest_handling/girlmain.msg diff --git a/test/quest_handling/girl2.msg b/test/quest_handling/girl2.msg new file mode 100644 index 000000000..9964f2e55 --- /dev/null +++ b/test/quest_handling/girl2.msg @@ -0,0 +1,9 @@ +{ + "rules": [ + { + "match" : ["2", "two"], + "pre" : [], + "post" : [], + "msg" : ["You said 2."] + } +]} diff --git a/test/quest_handling/girl3.msg b/test/quest_handling/girl3.msg new file mode 100644 index 000000000..2b91a05e4 --- /dev/null +++ b/test/quest_handling/girl3.msg @@ -0,0 +1,9 @@ +{ + "rules": [ + { + "match" : ["3", "three"], + "pre" : [], + "post" : [], + "msg" : ["You said 3."] + } +]} diff --git a/test/quest_handling/girl4.msg b/test/quest_handling/girl4.msg new file mode 100644 index 000000000..532ee3fd9 --- /dev/null +++ b/test/quest_handling/girl4.msg @@ -0,0 +1,11 @@ +{ + "rules": [ + { + "match" : ["4", "four"], + "pre" : [], + "post" : [], + "msg" : ["You said 4."] + },{ + "include" : ["test/quest_handling/girl5.msg"] + } +]} diff --git a/test/quest_handling/girl5.msg b/test/quest_handling/girl5.msg new file mode 100644 index 000000000..f58e4f044 --- /dev/null +++ b/test/quest_handling/girl5.msg @@ -0,0 +1,9 @@ +{ + "rules": [ + { + "match" : ["5", "five"], + "pre" : [], + "post" : [], + "msg" : ["You said 5."] + } +]} \ No newline at end of file diff --git a/test/quest_handling/girlmain.msg b/test/quest_handling/girlmain.msg new file mode 100644 index 000000000..f809829d9 --- /dev/null +++ b/test/quest_handling/girlmain.msg @@ -0,0 +1,19 @@ +{ + "location" : "test/includegirl", + "rules": [ + { + "match" : ["1", "one"], + "pre" : [], + "post" : [], + "msg" : ["You said 1."] + },{ + "include" : ["test/quest_handling/girl2.msg"] + },{ + "include" : ["test/quest_handling/girl3.msg", "test/quest_handling/girl4.msg"] + },{ + "match" : ["*"], + "pre" : [], + "post" : [], + "msg" : ["You didn't say a number to me."] + } +]} diff --git a/test/quest_handling/quest_map b/test/quest_handling/quest_map index ffa24e406..ef050e0a2 100644 --- a/test/quest_handling/quest_map +++ b/test/quest_handling/quest_map @@ -5,7 +5,7 @@ width 20 height 10 msg Created: 2010-03-22 Cavesomething -Modified: 2010-03-30 Cavesomething +Modified: 2010-04-27 Cavesomething endmsg end arch graymarble @@ -1150,10 +1150,28 @@ end arch graymarble x 19 end +arch dancing_girl +x 19 +type 0 +stand_still 1 +arch event_say +name test/quest_handling/girlmain.msg +title Python +slaying /python/dialog/npc_dialog.py +end +end arch graymarble x 19 y 1 end +arch sign +msg +This dancing girl uses rules from multiple files that include each other. +say a number between 1 and 6, and you will get a response. +endmsg +x 19 +y 1 +end arch graymarble x 19 y 2