diff --git a/game/modules/tome/data/chats/tarelion-start-archmage.lua b/game/modules/tome/data/chats/tarelion-start-archmage.lua new file mode 100644 index 0000000000000000000000000000000000000000..3e9d78c8f8d9aae70c2b7703a615b1e23f755f72 --- /dev/null +++ b/game/modules/tome/data/chats/tarelion-start-archmage.lua @@ -0,0 +1,63 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +newChat{ id="welcome", + text = [[Wait a minute!]], + answers = { + {"Archmage Tarelion?", jump="next1"}, + } +} + +newChat{ id="next1", + text = [[Yes @playername@, I have heard you plan on going into the wild world, looking for some adventures of your own. +This is good, more of us should get out of here once in a while and actually help people out there. +Say, maybe you might want to get an adventure and help Angolwen?]], + answers = { + {"Perhaps, what do you need?", jump="next2"}, + } +} + +newChat{ id="next2", + text = [[During the Spellblaze the world was torn apart - literally. A part of it, that we now call the Abashed Expanse, was ripped from the world and throw into the void between the stars. +We managed to stabilize it and it is now orbiting Eyal. Recently we have noticed a disturbance there, if we do nothing it will crash onto Eyal, bringing much destruction in its wake. +Because it was once part of a land we know well we can teleport you there. You will need to stabilize three wormholes by firing any attack spells at them. +The instability is also to your advantage there, your simple phase door spell will be fully controllable. + +So, you think you can help us ?]], + answers = { + {"Yes Archmage, send me there!", jump="teleport"}, + {"No sorry, I need to go.", jump="refuse"}, + } +} + +newChat{ id="teleport", + text = [[Good luck!]], + answers = { + {"[teleport]", action=function(npc, player) game:changeLevel(1, "abashed-expanse") end}, + } +} + +newChat{ id="refuse", + text = [[Oh well, farewell on your trips. Now I need to find somebody else to go up there.]], + answers = { + {"Bye.", action=function(npc, player) player:setQuestStatus("start-archmage", engine.Quest.FAILED) end}, + } +} + +return "welcome" diff --git a/game/modules/tome/data/quests/start-archmage.lua b/game/modules/tome/data/quests/start-archmage.lua index afb4ea7f12f68e66a15731bbfc5b53ee9d42f59d..41aa5e10fedd39973660b0b3cea24e3c9c584e41 100644 --- a/game/modules/tome/data/quests/start-archmage.lua +++ b/game/modules/tome/data/quests/start-archmage.lua @@ -40,6 +40,9 @@ on_status_change = function(self, who, status, sub) who:grantQuest(who.archmage_race_start_quest) end end + if status == self.FAILED then + who:grantQuest(who.archmage_race_start_quest) + end end on_grant = function(self, who) @@ -48,7 +51,7 @@ on_grant = function(self, who) if e.define_as and e.define_as == "TARELION" then npc = e break end end if not npc then return end - local x, y = util.findFreeGrid(npc.x, npc.y, 10, true, {[Map.ACTOR]=true}) + local x, y = util.findFreeGrid(npc.x, npc.y, 10, true, {[engine.Map.ACTOR]=true}) if not x or not y then return end who:move(x, y, true)