summaryrefslogtreecommitdiff
path: root/npc/006-2-5/pouf.txt
blob: 6b42846c41a99468c36c4e7a9a012b1819f5e1c9 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// TMW-2 scripts.
// Original Authors: Hal9000 & Qwerty Dragon
// TMW-2 Authors:
//    dangerDuck
//	  +seeds
// Description:
//    Piou royal who asks players to prove themselves against piou knights.

function	script	PoufMobCount	{
    .@q=getq(LilitQuest_Pouf);
    .@t=getq2(LilitQuest_Pouf);
    if (.@q == 1 && killedrid == PiouKnight)
    {
        setq2(LilitQuest_Pouf, .@t+1);
    }
    if (.@t+1 >= 10)
    {
        setq(LilitQuest_Pouf, 2);
    }
    
    // Report progress
    dispbottom l("@@/@@", .@t+1, 10);
    
    return;
}

006-2-5,38,23,0	script	Princess Pouf	NPC_PIOU_QUEEN,{
    function poufChallenge;
    function poufQuest;
    function poufQuestReport;
    function poufQuestReward;
    function poufQuestFinished;
    if (BaseLevel < 60)
    {
        mesn;
        mesq l("You are too weak to pass my test.");
        next;
        mesn;
        mesc l("Return when you are stronger.");
    }
    else
    {
        poufChallenge();
    }
    closedialog;
    close;

function poufChallenge {
    .@q=getq(LilitQuest_Pouf);
    if (.@q == 0)
    {
        mesn;
        mesq l("Welcome to my Isles, traveller.");
        next;
        mesc l("To show you are worthy of remaining here, you must prove yourself to me! Do you accept my challenge?"), 1;
        if (askyesno() == ASK_NO)
            return;
        poufQuest();
    }
    else if (.@q == 1)
    {
        poufQuestReport();
    }
    else if (.@q == 2)
    {
        poufQuestReward();
    }
    else
    {
        poufQuestFinished();
    }
    return;
}

function poufQuest {
    mes "";
    mesn;
    mesq l("Defeat 10 of my bravest @@ to prove yourself a warrior, brave of heart and strong of arm!", getmonsterlink(PiouKnight));
    next;
    select
        l("Point the way! Little yellow birds can't be that hard."),
	    l("Scary pious with armor? No thank you!");
    mes "";
    switch (@menu) {
		case 1:
			mesn;
			mesq l("Excellent. You will find them in the training room beneath this chamber.");
			next;
			setq(LilitQuest_Pouf, 1, 0);
			break;
		case 2:
			next;
			mesq l("You are clearly not brave enough for this test. Leave my sight at once, chicken.");
			break;
    }
    return;
}

function poufQuestReport {
    mesn;
    mesq l("You've only killed @@/10 @@! You must defeat more to win my favor.", getq2(LilitQuest_Pouf),getmonsterlink(PiouKnight));
    next;
    return;
}

function poufQuestReward {
    mesn;
    mesq l("You've defeated 10 of my knights without flinching! You are truly a brave warrior.");
    next;
    mesn;
    mesc l("The princess flies off her perch and alights upon your right and left shoulder in succession.");
    next;
    mesn;
    mesq l("I dub thee Honorary Piou Knight @@, with all the rewards and duties of the position.", strcharinfo(0));
    next;
    mesn;
    mesc l("The princess produces a small, shiny bronze feather and pins it to your lapel, then returns to her perch.");
    next;
    mesn;
    mesq l("Make me proud, knight!");
    inventoryplace BronzePin, 1;
    getitem BronzePin, 1;
    getexp(91479, 24989);
    setq(LilitQuest_Pouf, 3);
    next;
    return;
}

function poufQuestFinished {
    mesn;
	.@r = rand2(3);
    if (.@r == 0)
    {
        npctalk3 l("I bid you a good %s, brave knight.", (is_night() ? l("evening") : l("day")));
    }
    else if (.@r == 1)
    {
        npctalk3 l("Fight bravely for Queen +seeds and our isles, honorable knight!");
    }
    else
    {
        npctalk3 l("I wish you success on your ventures, Knight @@.", strcharinfo(0));
    }
    return;
}

OnInit:
    .sex = G_OTHER;
    .distance = 3;
    end;
}