summaryrefslogtreecommitdiff
path: root/npc/024-1/guard.txt
blob: cefc16a86a884635e180fbc7bd0e298c89e03ffc (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
// TMW2 Script
// Author:
//  Jesusalva
// Description:
//  Controls access to Frostia.

024-1,93,73,0	script	Frostia Guard	NPC_ELF,{
    // Main Quest Have Precedence
    if (getq(General_Narrator) == 11)
        goto L_MainQuest;
    if (getq(General_Narrator) == 12)
        goto L_MainQuest2;

L_MainLogic:
    if (BaseLevel < 40)
        goto L_Unallowed;
    if (Class == Elven)
    {
        slide 93, 69;
        npctalk3 l("Elves are always allowed inside.");
        end;
    }
    // You have a house inside
    if (ESTATE_RENTTIME >= gettimetick(2)) {
        slide 93, 69;
        npctalk3 l("I don't trust @@s.", get_race());
        end;
    }

    //.@tax=1001-min(1000, reputation("Frostia")*10);
    .@tax=501-min(500, reputation("Frostia")*5);
    mesn;
    mesc l("The guard eyes you with suspcion.");
    mesq l("You should not be here. Get moving.");
    if (Zeny < .@tax)
        close;
    next;
    mesc l("Bribe the guard for @@ GP?", .@tax);
    if (askyesno() == ASK_YES) {
        Zeny-=.@tax;
        closeclientdialog;
        slide 93, 69;
        npctalk3 l("Behave yourself.");
    }
    close;

L_Unallowed:
    mesn;
    mesq l("You're not welcome here. Get moving.");
    close;


L_MainQuest:
    mesc b(l(".:: Main Quest 6-1 ::.")), 3;
    msObjective(BaseLevel >= 40, l("* @@/@@ Base Level", BaseLevel, 40));
    mesc l("* Deliver Nikolai's Letter to Frostia Mayor"), 9;
    if (BaseLevel < 40)
        close;
    next;
    mesn strcharinfo(0);
    select
        l("I have a letter for the Mayor.");
    mes "";
    mesn;
    mesq l("We don't have a mayor. The independent city-state of Frostia is ruled by a King.");
    next;
    mesn;
    mesq l("King Gelid Frozenheart II rules over all elves and dwarves who live here peacefully, and he also presides the city council.");
    next;
    mesn;
    mesq l("I hate foreigners. They know nothing about us and want to impose their \"ideals\" about democracy and whatever.");
    next;
    mesn;
    mesq l("Anyway, you had a letter to our @@, you meant? Sure thing, I'll let him know at once.", b(l("king")));
    setq General_Narrator, 12;
    close;

L_MainQuest2:
    mesn;
    mesq l("King Gelid Frozenheart II will have you.");
    next;
    mesn;
    mesq l("His policy is to never read a letter without the sender being present. Of course we checked for poison and traps.");
    next;
    mesn;
    mesq l("Behave yourself, or you'll be executed in the town square mercilessly. You have been warned.");
    next;
    closeclientdialog;
    // Maybe an instance instead?
    warp "024-16", 30, 52;
    end;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, WarlordHelmet);
    setunitdata(.@npcId, UDT_HEADMIDDLE, WarlordPlate);
    setunitdata(.@npcId, UDT_HEADBOTTOM, NPCEyes);
    setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 2);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 4);

    .sex = G_MALE;
    .distance = 5;
    end;
}

// This small script controls if you can visit King Gelid II or not
024-1,97,20,0	script	#FrostiaCastle	NPC_HIDDEN,1,0,{
end;
OnTouch:
    if (getq(General_Narrator) >= 12)
        warp "024-16", 30, 52;
    end;
}