From 76e7068cb6bdf0d106bdd04d376c7098674f026f Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Sat, 13 Aug 2011 17:11:36 +0000 Subject: [PATCH] Use the quest system for the Rhyzian amulet quest. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@14980 282e977c-c81d-0410-88c4-b93c2d0d6712 --- navar_city/misc/city1mermaid | 7 +++- navar_city/misc/navarwiz | 42 +++++++++---------- navar_city/misc/wizard.msg | 46 +++++++++++++++++++++ scorn/misc/rhyz.msg | 78 ++++++++++++++++++++++++++++++++++++ scorn/misc/rhyz.quests | 28 +++++++++++++ scorn/misc/wizhide | 77 +++++++++++++++-------------------- scorn/scorn.quests | 2 +- 7 files changed, 211 insertions(+), 69 deletions(-) create mode 100644 navar_city/misc/wizard.msg create mode 100644 scorn/misc/rhyz.msg create mode 100644 scorn/misc/rhyz.quests diff --git a/navar_city/misc/city1mermaid b/navar_city/misc/city1mermaid index 9320babd9..7d0acbb30 100644 --- a/navar_city/misc/city1mermaid +++ b/navar_city/misc/city1mermaid @@ -8,7 +8,7 @@ enter_x 10 enter_y 12 msg Created: 1993-10-27 -Modified: 2011-08-12 Nicolas Weeger +Modified: 2011-08-13 Nicolas Weeger endmsg end arch woodfloor @@ -1722,6 +1722,11 @@ hp 5 sp 5 x 18 y 11 +arch event_apply +name scorn/Rhyz 10>20 +title Python +slaying /python/quests/QuestAdvance.py +end end arch woodfloor x 18 diff --git a/navar_city/misc/navarwiz b/navar_city/misc/navarwiz index c6a664612..8794dc9b4 100644 --- a/navar_city/misc/navarwiz +++ b/navar_city/misc/navarwiz @@ -9,7 +9,7 @@ enter_x 5 enter_y 5 msg Created: 2006-08-11 Alex Schultz -Modified: 2009-11-07 Andreas Kirschbaum +Modified: 2011-08-13 Nicolas Weeger endmsg end arch dungeon_magic @@ -170,27 +170,6 @@ arch dungeon_magic x 2 y 1 end -arch altar_trigger -slaying potion_empty -food 1 -x 2 -y 1 -invisible 1 -last_sp 1 -connected 1 -end -arch creator -x 2 -y 1 -connected 1 -lifesave 1 -arch potion_shielding -name potion of gem essence -name_pl potions of gem essence -resist_physical 0 -value 0 -end -end arch woodfloor x 2 y 1 @@ -362,6 +341,25 @@ endmsg x 4 y 1 stand_still 1 +arch event_say +name /navar_city/misc/wizard.msg +title Python +slaying /python/dialog/npc_dialog.py +end +arch NPCGift +arch potion_shielding +name potion of gem essence +name_pl potions of gem essence +resist_physical 0 +value 0 +identified 1 +arch event_drop +name scorn/Rhyz 40 +title Python +slaying /python/quests/QuestEssentialUntil.py +end +end +end end arch dungeon_magic x 4 diff --git a/navar_city/misc/wizard.msg b/navar_city/misc/wizard.msg new file mode 100644 index 000000000..24257a19e --- /dev/null +++ b/navar_city/misc/wizard.msg @@ -0,0 +1,46 @@ +{ + "rules": [ + { + "match" : ["*"], + "pre" : [["quest", "scorn/Rhyz", "30"]], + "post" : [], + "msg" : ["Hello $you, nice to see you again."] + }, { + "match" : ["sure"], + "pre" : [["npctoken", "state", "2"], ["item", "empty bottle"]], + "post" : [["takeitem", "empty bottle", "1"], ["quest", "scorn/Rhyz", "30"], ["giveitem", "potion of gem essence"]], + "msg" : ["Here you go, take this gem essence."] + }, { + "match" : ["sure"], + "pre" : [["npctoken", "state", "2"]], + "post" : [["setnpctoken", "state", "0"]], + "msg" : ["Hum, where is that empty bottle of yours?"] + }, { + "match" : ["*"], + "pre" : [["npctoken", "state", "2"]], + "post" : [["setnpctoken", "state", "0"]], + "msg" : ["Well, come back later then."] + }, { + "match" : ["gem"], + "pre" : [["npctoken", "state", "1"]], + "post" : [["setnpctoken", "state", "2"]], + "msg" : ["Ha, glad to see he's making progress.\n\nWell, it's easy, give me a bottle, and I'll fill it for you."], + "replies" : [["sure", "Sure, here is an empty bottle.", "0"], ["later", "Sorry I don't have any empty bottle for now.", "0"]] + }, { + "match" : ["hi", "hello"], + "pre" : [["quest", "scorn/Rhyz", "10-20"]], + "post" : [["setnpctoken", "state", "1"]], + "msg" : ["Hello there."], + "replies" : [["gem", "Rhyz sent me to get some gem essence for his amulet.", "0"]] + }, { + "match" : ["hi", "hello"], + "pre" : [], + "post" : [], + "msg" : ["Hello there."] + }, { + "match" : ["*"], + "pre" : [], + "post" : [], + "msg" : ["Leave me alone!"] + } +]} diff --git a/scorn/misc/rhyz.msg b/scorn/misc/rhyz.msg new file mode 100644 index 000000000..d162a1a5f --- /dev/null +++ b/scorn/misc/rhyz.msg @@ -0,0 +1,78 @@ +{ + "rules": [ + { + "match" : ["*"], + "pre" : [["quest", "scorn/Rhyz", "=40"]], + "post" : [], + "msg" : ["Hello $you, nice to see you again."] + }, { + "match" : ["yes"], + "pre" : [["quest", "scorn/Rhyz", "10"], ["npctoken", "state", "1"], ["item", "potion of gem essence"]], + "post" : [["setnpctoken", "state", "0"], ["giveitem", "rhyzian amulet"], ["quest", "scorn/Rhyz", "40"], ["takeitem", "potion of gem essence"]], + "msg" : ["Great! Now I can continue with my experiments!\n\nHere, take this amulet as a token of my gratitude."] + }, { + "match" : ["yes"], + "pre" : [["quest", "scorn/Rhyz", "10"], ["npctoken", "state", "1"]], + "post" : [["setnpctoken", "state", "0"]], + "msg" : ["Hum, where is it then?"] + }, { + "match" : ["*"], + "pre" : [["npctoken", "state", "1"]], + "post" : [["setnpctoken", "state", "0"]], + "msg" : ["Well, come back when you'll have it, then, please."] + }, { + "match" : ["hi", "hello"], + "pre" : [["quest", "scorn/Rhyz", "10"]], + "post" : [["setnpctoken", "state", "1"]], + "msg" : ["Welcome back $you, did you get the potion from my friend?"], + "replies" : [["yes", "Yes, I got it.", "1"], ["no", "No, not yet, sorry.", "0"]] + }, { + "match" : ["*"], + "pre" : [["quest", "scorn/Rhyz", "10"]], + "post" : [], + "msg" : ["*grumble*"] + }, { + "match" : ["yes"], + "pre" : [["npctoken", "gem", "2"]], + "post" : [["setnpctoken", "gem", "0"], ["giveitem", "empty bottle"], ["quest", "scorn/Rhyz", "10"]], + "msg" : ["Thank you so much. I think he is somewhere in The Frolicing Mermaid in Navar. Bring this bottle to him, tell him that Terrance send you, and ask him to fill it for me. As a reward I'll let you try out one of the amulets."] + }, { + "match" : ["*"], + "pre" : [["npctoken", "gem", "2"]], + "post" : [["setnpctoken", "gem", "0"]], + "msg" : ["Ha well, maybe another time then. Take care."] + }, { + "match" : ["amulet"], + "pre" : [["npctoken", "gem", "1"]], + "post" : [["setnpctoken", "gem", "2"]], + "msg" : ["I am currently working with a fellow mage in Navar who has a similar gem, to make an amulet which can indicate the distance and direction to each gem, and hence to Scorn and Navar. Right now I need a special golden potion delivered from him, containing the essence of the magical energies of his gem. Can you help get some from him?"], + "replies" : [["yes", "Sure, what do you want me to do?", "1"], ["no", "I'm sorry, I'm quite busy for now.", "1"]] + }, { + "match" : ["gem", "purple", "desk"], + "pre" : [], + "post" : [["setnpctoken", "gem", "1"]], + "msg" : ["The gem in my desk was a work started by my father. It was made to have a strong and distinct magical energy which can be detected from a long way away. I am currently working on amulets to work with the gem."], + "replies" : [["amulet", "What kind of amulets?", "2"]] + }, { + "match" : ["rhyz"], + "pre" : [], + "post" : [], + "msg" : ["I am a descendent of the great Entorinaas Durdennis Rhyz. A long time ago, he set out to create the perfect \"warriard\", one highly adept with both combat and magic, however he failed. Recently I have come to believe that modern adventurers are becoming much like the \"warriards\" that my ancestor believed in, so I have been trying to continue his vision by encouraging adventurers."] + }, { + "match" : ["hide"], + "pre" : [], + "post" : [], + "msg" : ["I am hiding by instructions from the king of Scorn, he fears what may happen if his enemies get some of my works."] + }, { + "match" : ["hello"], + "pre" : [], + "post" : [], + "msg" : ["Hello. I am Terrance Rhyz. How may I help you?"], + "replies" : [["hide", "Why are you hiding in this place?", "2"], ["rhyz", "I'm sorry, but I'm not familiar with your name...", "0"]] + }, { + "match" : ["*"], + "pre" : [], + "post" : [], + "msg" : ["*grumble*"] + } +]} diff --git a/scorn/misc/rhyz.quests b/scorn/misc/rhyz.quests new file mode 100644 index 000000000..69320bb99 --- /dev/null +++ b/scorn/misc/rhyz.quests @@ -0,0 +1,28 @@ +quest scorn/Rhyz +title The rhyzian amulet +description +I'm helping Terrance Rhyz, a wizard, get a potion containing some magical essence. +end_description +step 10 +description +Terrance Rhyz told me to go find his friend, who should be in The Frolicing Mermaid in Navar. +end_description +end_step +step 20 +description +I have found the friend's hideout, now I should talk to him. +end_description +end_step +step 30 +description +I have the potion of gem essence, I should bring it back to Terrance Rhyz. +end_description +end_step +step 40 +finishes_quest +description +I have given the potion of gem essence to Terrance, who gave me a rhyzian amulet in exchange. +end_description +end_step +end_quest + diff --git a/scorn/misc/wizhide b/scorn/misc/wizhide index 284859c2f..5d2ced343 100644 --- a/scorn/misc/wizhide +++ b/scorn/misc/wizhide @@ -9,7 +9,7 @@ enter_x 10 enter_y 12 msg Created: 2006-08-05 Alex Schultz -Modified: 2009-11-07 Andreas Kirschbaum +Modified: 2011-08-13 Nicolas Weeger endmsg end arch dungeon_magic @@ -281,13 +281,6 @@ end arch wall_2_1_2 x 2 end -arch creator -other_arch potion_empty -hp 25 -x 2 -y 1 -connected 2 -end arch woodfloor2 x 2 y 1 @@ -425,20 +418,12 @@ arch light2 x 3 y 1 end -arch magic_ear -msg -@match yes|sure -endmsg -x 3 -y 1 -connected 2 -end arch woodfloor2 x 3 y 1 end arch c_sage -name old mage +name Terrance Rhyz msg @match yes|sure Thank you so much. I think he is somewhere in The Frolicing Mermaid in Navar. Bring this bottle to him, tell him that Terrance send you, and ask him to fill it for me. As a reward I'll let you try out one of the amulets. When you get back, place the filled bottle on that table in the corner. @@ -455,8 +440,37 @@ I am Terrance Rhyz. How may I help you? endmsg x 3 y 1 +direction 4 randomitems mage stand_still 1 +arch event_say +name /scorn/misc/rhyz.msg +title Python +slaying /python/dialog/npc_dialog.py +end +arch NPCGift +arch clock +name rhyzian amulet +name_pl rhyzian amulets +msg +For every flash there are 8 furlongs; Scorn is red while Navar is blue. +endmsg +face amulet_gray.111 +animation NONE +value 0 +weight 700 +anim_speed 0 +client_anim_random 0 +arch event_apply +name event_apply +title Python +slaying /python/items/rhyzian_amulet.py +end +end +arch potion_empty +identified 1 +end +end end arch woodfloor2 x 3 @@ -681,40 +695,13 @@ arch woodfloor2 x 5 y 4 end -arch altar_trigger -slaying potion of gem essence -food 1 -x 5 -y 5 -last_sp 1 -connected 1 -end arch woodfloor2 x 5 y 5 end -arch creator -name table -face table_3.111 -hp 0 +arch table_3 x 5 y 5 -invisible 0 -connected 1 -lifesave 1 -arch amulet_gray -name rhyzian amulet -name_pl rhyzian amulets -msg -For every flash there are 8 furlongs; Scorn is red while navar is blue. -endmsg -type 9 -arch event_apply -name event_apply -title Python -slaying /python/items/rhyzian_amulet.py -end -end end arch dungeon_magic x 5 diff --git a/scorn/scorn.quests b/scorn/scorn.quests index 86b704912..214c558ec 100644 --- a/scorn/scorn.quests +++ b/scorn/scorn.quests @@ -3,7 +3,7 @@ include houses/farm.quests include aristocracy.quests include citygate.quests include kar/gork.quests - +include misc/rhyz.quests quest scorn/smith/customarmour title Custom Armour