summaryrefslogtreecommitdiff
path: root/npc/042-0/arthur.txt
blob: fefdf434bbcc533f989c7e4dcc2379af12c8647f (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
// TMW 2 Script
// Author:
//  Jesusalva
//  Micksha
// Description:
//  Part of Kamelot Guild Dungeon
// TODO: Random guard (Tezer) on the cursed soldier statues (easter egg)

042-0,58,28,0	script	King Arthur	NPC_KING_ARTHUR,{
    .@g=getcharid(2);
    .@pos=getguildrole(.@g, getcharid(3));
    if (.@pos > GPOS_VICELEADER) goto L_Refusal;
    if (!$KAMELOT_COOLDOWN[.@g]) goto L_Tutorial;
    if ($KAMELOT_QUEST[.@g] & 1) goto L_Progress;
    goto L_Prologue;

L_Prologue:
    npctalk l("Don't bore me.");
    end;

L_Progress:
    // TODO: Victory
    // TODO: Cooldown | if ($KAMELOT_COOLDOWN[.@g] = gettimeparam(GETTIME_WEEKDAY))
    npctalk l("What are you still doing here?! GO!!");
    mes l("Read tutorial again?");
    next;
    if (askyesno() == ASK_YES) goto L_Tutorial;
    close;

L_Refusal:
    mesc l("This man is THE LEGENDARY KING ARTHUR!");
    mes "";
    mesc l("I better leave talking to him to the guild Vice Leaders and Master.");
    close;

L_Tutorial:
    // Update variable
    if ($KAMELOT_COOLDOWN[.@g] != gettimeparam(GETTIME_WEEKDAY))
        $KAMELOT_COOLDOWN[.@g]=gettimeparam(GETTIME_WEEKDAY)-1;
    mes b(".:: KAMELOT CASTLE ::.");
    mes "The Guild Dungeon of Kamelot Castle";
    mes "";
    mes l("Kamelot Castle is a GUILD DUNGEON which refreshes WEEKLY.");
    mes l("Only the Guild Master and the Vice Leaders are capable of starting this quest.");
    next;
    mes l("An unlimited number of members can join.");
    mes l("Once the quest is started, entrance will be closed.");
    mes l("No one can go out during the quest, so ensure every guild member has proper equipment, potions, and time for this dungeon.");
    next;
    mes l("Additionaly, for the optimal experience, ensure your party has at least the following members:");
    mes "";
    mes l("* Thief");
    mes l("* Mage");
    next;
    mes b(".:: VICTORY REWARDS ::.");
    mes l("Victory prizes include guild experience, guild money, and guild bound items.");
    mes "";
    mes b(".:: DEFEAT PENALTIES ::.");
    mes l("If your guild is defeat during the quest, you'll need to wait the weekly cooldown to expire.");
    mes "";
    mes "----------------- by Lancelot";
    next;
    clear;
    if ($KAMELOT_QUEST[.@g] & 1) goto L_Progress;
    goto L_Prologue;

OnInit:
    .distance=4;
    .sex=G_MALE;
    npcsit;
    end;

OnInstanceInit:
    .distance=4;
    .sex=G_MALE;
    npcsit;
    end;
}