From 1462af22e353a075ad283c899c6e4aa9004b9bc4 Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Sun, 24 Mar 2013 11:00:37 +0100 Subject: WIP: Punish players who don't move from their position during Candor. When a new round starts, the position of the player is compared with the position from the last round. If it's the same, the player is poisoned and damage is dealt based on how often the player didn't change their position. --- world/map/npc/029-3/parua.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'world/map/npc/029-3/parua.txt') diff --git a/world/map/npc/029-3/parua.txt b/world/map/npc/029-3/parua.txt index 78014e98..c4b258f2 100644 --- a/world/map/npc/029-3/parua.txt +++ b/world/map/npc/029-3/parua.txt @@ -166,6 +166,8 @@ L_NextRound: goto L_CleanUp; set $@FIGHT_CAVE_POINTS, $@FIGHT_CAVE_LEVEL; + areatimer "029-3.gat", 20, 20, 70, 60, 10, "Parua::onNewRound"; + mapannounce "029-1.gat", "Parua: The next round (level " + $@FIGHT_CAVE_LEVEL + ") is starting with " + $@FIGHT_CAVE_PLAYER_COUNT + " player(s) left alive." , 0; mapannounce "029-3.gat", "Parua: The next round (level " + $@FIGHT_CAVE_LEVEL + ") is starting with " + $@FIGHT_CAVE_PLAYER_COUNT + " player(s) left alive." , 0; @@ -269,6 +271,23 @@ onTick: set $@FIGHT_CAVE_PLAYER_COUNT, $@FIGHT_CAVE_PLAYER_COUNT + 1; end; +// called on each player when a new round begins +onNewRound: + // TODO initialization and clean-up of the variables + if (isdead()) + end; + set @candor_oldx, @candor_x; + set @candor_oldy, @candor_y; + set @candor_x, getx(); + set @candor_y, gety(); + if (!(@candor_oldx == @candor_x && @candor_oldy == @candor_y)) + end; + @candor_poscounter, @candor_poscounter + 1; + sc_start sc_poison, 1, 20; + heal -20 * @candor_poscounter, 0; + message strcharinfo(0), "The evil energy of this place hurts you. You should keep moving!"; + end; + onPetDeath: end; -- cgit v1.2.3-60-g2f50