summaryrefslogtreecommitdiff
path: root/world/map/npc/functions/soul_menhir.txt
blob: e5ec9f4ac75adaa55e9d0d6c3e31d9642be390c7 (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
function|script|SoulMenhir|,
{
    mes "[Soul Menhir]";
    mes "(A mystical aura surrounds this stone. You feel mysteriously attracted to it. Something tells you to touch it. What do you do?)";
    next;

    menu
        "Touch it.", L_Bind,
        "Leave it alone.", L_Return,
        "I lost my towel...", L_Towel;

L_Towel:
    callfunc "MultiWarpTowel";
    getitem "HitchhikersTowel", 1;
    goto L_Return;

L_Bind:
    if (Menhir_Activated == 1)
        goto L_Shortversion;

    mes "[Soul Menhir]";
    mes "(You touch the mysterious stone. Somehow it feels warm and cold at the same time.)";
    next;

    mes "[Soul Menhir]";
    mes "(Suddenly a strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone.)";
    next;

    mes "[Soul Menhir]";
    mes "(As suddenly as the feeling started it stops. The strange attraction is away from one moment to the next and the menhir feels like just an ordinary stone.)";
    next;

    set Menhir_Activated, 1;
    goto L_Save;

L_Shortversion:
    mes "[Soul Menhir]";
    mes "(A strange sensation flows through you. It feels like your soul leaves your body and becomes one with the stone. As suddenly as the feeling started it stops.)";
    next;
    goto L_Save;

L_Save:
    if (@x == 0 && @y == 0)
        goto L_FindPoint;
    goto L_Do_Save;

L_Do_Save:
    savepoint @map$, @x, @y;
    goto L_Return;

L_FindPoint:
    set @n, rand(getarraysize(@Xs));
    set @x, @Xs[@n];
    set @y, @Ys[@n];
    goto L_Do_Save;

L_Return:
    return;
}