summaryrefslogtreecommitdiff
path: root/npc/024-1/guard.txt
blob: 71ac1dc926aa76e449a7ec715022ddc9351424c5 (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
// 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 (BaseLevel < 40)
        goto L_Unallowed;
    if (Class == Elven)
    {
        slide 93, 69;
        npctalk3 l("Elves are always allowed inside.");
        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 4-1 ::.")), 3;
    msObjective(BaseLevel >= 40, l("* @@/@@ Base Level", BaseLevel, 40));
    mesc l("* Deliver Nikolai's Letter to Frostia Mayor"), 9;
    mes "";
    mesc l("@@ You need to wait further releases to continue this quest!", b(l("WARNING:"))), 1;
    close;

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;
}