summaryrefslogtreecommitdiff
path: root/npc/034-3/gemini.txt
blob: ffbc19205cc1c367250d61d29862ec89e08088df (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
91
92
93
94
95
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Gemini Sisters Quest - Outside the Building

034-3,57,29,0	script	#GeminiDoor	NPC_HIDDEN,0,0,{
    end;

OnTouch:
    if (instance_id() < 0 || getcharid(1) < 1) end;
    GeminiCheck(8);
    slide 58, 34;
    percentheal -20, 0;
    dispbottom l("You are pushed back violently. There is probably some way to break this barrier.");
    end;
}

034-3,51,38,0	script	Engravings#Gemini	NPC_NO_SPRITE,{
    mes l("You can read some words engraved inside this rock, but some are erased by wind and time:");
    next;
    mes l("\".. can use this .. power..´. . .´. . . amplify a spell ..´.");
    mes l(" . ´´. Don't let .. spell power .´..´ . .. fade away ...");
    mes l("´ .Use lazurite stones ´..´. they will appear. ..´ .. drop them inside .. this circle.");
    mes l(". ´ power.. drains .. life..´. .´  focus . .not move at all´. .\"");
    next;
    mes l("Below this strange writing, you notice a word still deeply engraved in the stone:");
    next;
    mesq b("catalazuli");
    next;
    mes l("... that looks like an incantation or something.");
    if (strcharinfo(0) != getpartyleader(.@p)) {
        mes l("I probably should let %s chant it.", getpartyleader(.@p));
        close;
    }
    next;
    mes l("I think this blue circle right here can be helpful to break the enchantment that blocks the door of the Inn.");
    next;
    mes l("Let's see how I can activate it...");
    mes l("But I should probably get inside it, first.");
    close;

OnChannel:
    if (instance_id() < 0 || getcharid(1) < 1) end;
    GeminiCheck(8);

    // Check location
    getmapxy(.@m$, .@x, .@y, 0);
    if (.@x < 52 ||
        .@x > 54 ||
        .@y < 37 ||
        .@y > 38) end;

    // Only party leader may proceed
    if (strcharinfo(0) != getpartyleader(.@p)) {
        percentheal 0, -25;
        specialeffect(312, AREA, getcharid(3));
        dispbottom l("Argh! I assume I can't do this chant!");
        end;
    }

    // Bonus is based on int
    .@bonus = readparam2(bInt) / 25;
    // Unlike TMW's, all Lazurites show up at same place
    // ...
    // amount of initial magic power
    .@magic_power = 1811 + readparam2(bInt)*2;
    // Channelling required power depends on the base Int of the character
    .@magic_power_required = 5707 - 2*readparam2(bInt);
    // magic power loss depends also on Int
    .@magic_power_loss = 53 - ((readparam2(bInt)+1)*2)/10;

    dispbottom l("Ok, let's stay focused now!");
    // TODO: Loop
    end;

OnTalkNearby:
    // not very obvious stuff by gumi
    .@no_nick$ = strip(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1));
    .@message$ = strtoupper(.@no_nick$);
    if (.@message$ == "catalazuli") {
        goto OnChannel;
    }
    end;

OnInit:
    .distance=3;
    .pid=getnpcid();
    debugmes "Pattern %d", .pid;
    //defpattern(.pid, "^([Kk][Aa][Tt][Aa][Zz][Uu][Ll][Ii])$", "OnTalkNearby");
    defpattern(.pid, "^(.*)$", "OnTalkNearby");
    activatepset(.pid);
    end;
}