From f41710a2b9a10fc8f5ffb89a9ef01526e3d2d7fc Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 3 May 2011 00:06:47 +0000 Subject: [PATCH] The Eidolon can now send you back to the worldmap is desired (and if possible) git-svn-id: http://svn.net-core.org/repos/t-engine4@3303 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/chats/eidolon-plane.lua | 3 ++- game/modules/tome/data/zones/eidolon-plane/zone.lua | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/game/modules/tome/data/chats/eidolon-plane.lua b/game/modules/tome/data/chats/eidolon-plane.lua index 4bc5d5977a..5cd7818035 100644 --- a/game/modules/tome/data/chats/eidolon-plane.lua +++ b/game/modules/tome/data/chats/eidolon-plane.lua @@ -26,7 +26,8 @@ But do not abuse my help. I am not your servant, and someday I might just let yo As for your probable many questions, they will stay unanswered. I may help, but I am not here to explain why.]], answers = { {"Thank you. I will rest for a while."}, - {"Thank you. I am ready to go back!", action=function() game.level.data.eidolon_exit() end}, + {"Thank you. I am ready to go back!", action=function() game.level.data.eidolon_exit(false) end}, + {"Thank you, but I fear I will not survive anyway, can you send me back somewhere else please?", action=function() game.level.data.eidolon_exit(true) end}, } } diff --git a/game/modules/tome/data/zones/eidolon-plane/zone.lua b/game/modules/tome/data/zones/eidolon-plane/zone.lua index b810f1d888..af16cf665d 100644 --- a/game/modules/tome/data/zones/eidolon-plane/zone.lua +++ b/game/modules/tome/data/zones/eidolon-plane/zone.lua @@ -75,7 +75,7 @@ return { who:addObject(who.INVEN_INVEN, o) end, - eidolon_exit = function() + eidolon_exit = function(to_worldmap) game:onTickEnd(function() local oldzone = game.zone local oldlevel = game.level @@ -119,6 +119,10 @@ return { act.last_act_turn = math.floor(game.turn / (game.zone.wilderness and 1000 or 10)) end + if to_worldmap then + game:changeLevel(1, game.player.last_wilderness or "wilderness") + end + game.logPlayer(game.player, "#LIGHT_RED#You are sent back to the material plane!") game.player:updateMainShader() end) -- GitLab