From b1010cfaed049d94ff1e9394bc6766d58b6bfd5b Mon Sep 17 00:00:00 2001 From: Vincent Petithory Date: Wed, 7 Nov 2012 19:34:11 +0100 Subject: Add seasonal after-halloween quest: * Oscar (011-1) is not a shop anymore. * special pumpkins added in 055-1 * add a special handler for the #kaflosh spell (requires running ./build-magic.sh) * add a player variable for use with seasonal quests (each quest using one byte) --- world/map/npc/055-1/_import.txt | 1 + world/map/npc/055-1/pumpkins.txt | 65 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 world/map/npc/055-1/pumpkins.txt (limited to 'world/map/npc/055-1') diff --git a/world/map/npc/055-1/_import.txt b/world/map/npc/055-1/_import.txt index 1fc666e6..383525f5 100644 --- a/world/map/npc/055-1/_import.txt +++ b/world/map/npc/055-1/_import.txt @@ -3,3 +3,4 @@ map: 055-1.gat npc: npc/055-1/_mobs.txt npc: npc/055-1/_warps.txt +npc: npc/055-1/pumpkins.txt diff --git a/world/map/npc/055-1/pumpkins.txt b/world/map/npc/055-1/pumpkins.txt new file mode 100644 index 00000000..42864cff --- /dev/null +++ b/world/map/npc/055-1/pumpkins.txt @@ -0,0 +1,65 @@ +// Pumpkin mobs for the seasonal halloween event with Oscar +055-1.gat,48,25,16,8|monster|Spawn Pumpkin|1063,12,10000,5000,PumpkinMob055-1::On1063 +055-1.gat,139,29,5,7|monster|Spawn Pumpkin|1063,7,10000,5000,PumpkinMob055-1::On1063 +055-1.gat,132,24,6,4|monster|Spawn Pumpkin|1063,4,10000,5000,PumpkinMob055-1::On1063 + + +055-1.gat,0,0,0|script|PumpkinMob055-1|-1,{ +On1063: + if (Quest_Halloween != 1) + goto L_HeavyPoison; + if (@discover_poisonous_pumpkin == 0) + message strcharinfo(0), "Yuke, this pumpkin released some ugly poison gas!"; + set @discover_poisonous_pumpkin, 1; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -15, 0; + sc_start sc_poison, 1, 4; + if (rand(0,100) < 10) + getitem "PumpkinSeeds", 1; + + if (countitem("PumpkinSeeds") >= $@halloween_num_seeds) + goto L_EnoughSeeds; + + set @mobID, 1063; + callfunc "MobPoints"; + end; + +L_EnoughSeeds: + message strcharinfo(0), $@halloween_num_seeds + " should be enough seeds for Oscar. And this pumpkin gas gets too bad to stand it any longer..."; + set Quest_Halloween, 2; + // Reset this to get the message for the "heavy" poison + set @discover_poisonous_pumpkin, 0; + end; + +L_HeavyPoison: + if (@discover_poisonous_pumpkin == 0) + goto L_HeavyPoison0; + if (@discover_poisonous_pumpkin == 1) + goto L_HeavyPoison1; + if (@discover_poisonous_pumpkin > 1) + goto L_HeavyPoison2; + end; + +L_HeavyPoison0: + set @discover_poisonous_pumpkin, @discover_poisonous_pumpkin + 1; + message strcharinfo(0), "Ouch, this pumpkin is totally poisonous! Let's get away from them!"; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -150,0; + sc_start sc_poison, 1, 60; + end; + +L_HeavyPoison1: + set @discover_poisonous_pumpkin, @discover_poisonous_pumpkin + 1; + message strcharinfo(0), "This is really awful! I should not touch them!"; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + heal -350,0; + sc_start sc_poison, 1, 120; + end; + +L_HeavyPoison2: + set @discover_poisonous_pumpkin, @discover_poisonous_pumpkin + 1; + misceffect FX_PUMPKIN_EXPLOSION, strcharinfo(0); + percentheal -100,0; + end; + +} -- cgit v1.2.3-60-g2f50