| 1 |
--------------------------------------------------------------------- |
| 2 |
-- This file is part of Freedroid |
| 3 |
-- |
| 4 |
-- Freedroid is free software; you can redistribute it and/or modify |
| 5 |
-- it under the terms of the GNU General Public License as published by |
| 6 |
-- the Free Software Foundation; either version 2 of the License, or |
| 7 |
-- (at your option) any later version. |
| 8 |
-- |
| 9 |
-- Freedroid is distributed in the hope that it will be useful, |
| 10 |
-- but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
-- GNU General Public License for more details. |
| 13 |
-- |
| 14 |
-- You should have received a copy of the GNU General Public License |
| 15 |
-- along with Freedroid; see the file COPYING. If not, write to the |
| 16 |
-- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 17 |
-- MA 02111-1307 USA |
| 18 |
---------------------------------------------------------------------- |
| 19 |
|
| 20 |
local Npc = FDrpg.get_npc() |
| 21 |
|
| 22 |
return { |
| 23 |
EveryTime = function() |
| 24 |
if (not arena_current_level) then |
| 25 |
end_dialog() |
| 26 |
elseif (arena_won) then |
| 27 |
Npc:says(_"[b]Arena Terminated[/b]") |
| 28 |
end_dialog() |
| 29 |
elseif (not arena_remaining_bots) then |
| 30 |
Npc:says(_"[b]Click on the button to stop the arena[/b]") |
| 31 |
else |
| 32 |
Npc:says(_"[b]Wave ongoing...[/b]") |
| 33 |
end_dialog() |
| 34 |
end |
| 35 |
|
| 36 |
show("click", "not_click") |
| 37 |
end, |
| 38 |
{ |
| 39 |
id = "click", |
| 40 |
text = _"(Click)", |
| 41 |
echo_text = false, |
| 42 |
code = function() |
| 43 |
change_obstacle_state("Arena-RingEntrance", "opened") |
| 44 |
arena_next_wave = nil |
| 45 |
arena_withdraw = true |
| 46 |
end_dialog() |
| 47 |
end, |
| 48 |
}, |
| 49 |
{ |
| 50 |
id = "not_click", |
| 51 |
text = _"(Don't click)", |
| 52 |
echo_text = false, |
| 53 |
code = function() |
| 54 |
end_dialog() |
| 55 |
end, |
| 56 |
}, |
| 57 |
} |