summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2013-03-24 11:00:37 +0100
committerJessica Tölke <jtoelke@mail.upb.de>2013-03-24 11:00:37 +0100
commit1462af22e353a075ad283c899c6e4aa9004b9bc4 (patch)
tree39ab6fdfef1944f440c64cede12e57bacec3daf2
parentb44a71b7ac154557da4fa646eb0b2bd522542877 (diff)
downloadserverdata-1462af22e353a075ad283c899c6e4aa9004b9bc4.tar.gz
serverdata-1462af22e353a075ad283c899c6e4aa9004b9bc4.tar.bz2
serverdata-1462af22e353a075ad283c899c6e4aa9004b9bc4.tar.xz
serverdata-1462af22e353a075ad283c899c6e4aa9004b9bc4.zip
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.
-rw-r--r--world/map/npc/029-3/parua.txt19
1 files changed, 19 insertions, 0 deletions
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;