summaryrefslogtreecommitdiff
path: root/npc/012-1/flowerpentagram2.txt
blob: 41fc2950a91269bb498cfe0471ecc0a1349fc2ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
012-1,143,70,0	script	#FlowerPentagram2	NPC400,{
    if (getq(MagicQuest_DarkMage) >= 31) goto L_PlacedFifthFlower;

    if (getq(MagicQuest_DarkMage) > 20) goto L_PlacedSecondFlower;
    if (getq(MagicQuest_DarkMage) == 20) goto L_SecondFlower;

    message strcharinfo(0), "There is something odd about this place.";
    end;

L_SecondFlower:
    mes "Orum described this place. You have to place the second magical flower here.";
    menu
        "Place the flower.", L_Next,
        "Leave.", L_close;

L_Next:
    if (isin("012-1", 142, 69, 144, 71))
        goto L_Place;

    mes "This isn't working, you're too far away.";
    goto L_close;

L_Place:
    set @localMonsterCount,
        mobcount("012-1", "#FlowerPentagram2::OnSquirrelDeath") +
        mobcount("012-1", "#FlowerPentagram2::OnMushroomDeath") +
        mobcount("012-1", "#FlowerPentagram2::OnScorpionDeath") +
        mobcount("012-1", "#FlowerPentagram2::OnRScorpionDeath");
    if (@localMonsterCount > 2)
        goto L_MonstersAlive;

    if (countitem("PurpleSummonFlower") < 1)
        goto L_NoFlower;
    delitem "PurpleSummonFlower", 1;
    mes "Remembering what happened the last time, you take a careful look around. Everything's calm. You proceed to place the second flower.";
    mes "Sensing a certain tension build up around you, you can't help but feel alarmed.";
    setq(MagicQuest_DarkMage, 21);
    close2;
    areamonster "012-1", 140, 64, 146, 73, "", 1105, 2, "#FlowerPentagram2::OnSquirrelDeath";
    areamonster "012-1", 140, 64, 146, 73, "", 1106, 2, "#FlowerPentagram2::OnMushroomDeath";
    areamonster "012-1", 140, 64, 146, 73, "", 1003, 2, "#FlowerPentagram2::OnScorpionDeath";
    areamonster "012-1", 140, 64, 146, 73, "", 1004, 2, "#FlowerPentagram2::OnRScorpionDeath";
    @value = 15;
    callfunc "QuestSagathaAnnoy";
    @value = 0;
    end;

OnSquirrelDeath:
    fix_mobkill(1105);
    end;

OnMushroomDeath:
    fix_mobkill(1106);
    end;

OnScorpionDeath:
    fix_mobkill(1003);
    end;

OnRScorpionDeath:
    fix_mobkill(1004);
    end;

L_MonstersAlive:
    mes "As you get closer to the place, you feel an unnerving presence.";
    mes "This place has recently been used to summon something! And the beings are still nearby!";
    next;
    mes "You should get rid of them before attempting the summoning yourself.";
    goto L_close;

L_NoFlower:
    mes "You look into your pocket, but the flower isn't there. Where did you put it?";
    mes "If you can't find it, you should talk to Orum again.";
    goto L_close;

L_PlacedSecondFlower:
    mes "You placed the second of Orum's magical flowers on this spot.";
    mes "You can still feel the magical power shimmering around this place, waiting to be unleashed.";
    goto L_close;

L_PlacedFifthFlower:
    mes "This is where you placed the second of Orum's magical flowers.";
    mes "However, now that the summoning spell has been cast, everything is back to normal here.";
    goto L_close;

L_close:
    @localMonsterCount = 0;
    close;
}