summaryrefslogtreecommitdiff
path: root/npc/025-1/salohcin.txt
blob: 6063eaaf360d7da6ed6e42c4ee2d47eeb46e992d (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
// TMW-2 Script
// Author:
//    Jesusalva
// Description:
//    Nicholas the Blacksmith, spelled backwards

025-1,108,67,0	script	Salohnic	NPC_NICHOLAS,{
    // Define variables
    if ($GAME_STORYLINE >= 5) {
        .@tx$=l("thrice");
        .@txn=4;
        .@prc=150000;
    } else if ($GAME_STORYLINE >= 4) {
        .@tx$=l("twice");
        .@txn=3;
        .@prc=90000;
    } else {
        .@tx$=l("once");
        .@txn=2;
        .@prc=60000;
    }

    // World Hero bonuses
    if (reputation("Candor") >= 100 &&
        reputation("Tulim") >= 100 &&
        reputation("Halin") >= 100 &&
        reputation("Hurns") >= 100 &&
        reputation("LoF") >= 100 &&
        reputation("Nival") >= 100 &&
        reputation("Frostia") >= 100)
            .@prc-=20000;

    if (strcharinfo(0) == $MOST_HEROIC$)
        .@prc-=20000;

    // NPC body
    mesn;
    mesq l("Hello there, I am %s and I change item options, can I help you today?", .name$);
    mes "";
    mesn;
    mesq l("You'll be charged even if you fail, be warned. You can re-roll the same item %s, free of charge, but it may break and there will be no refunds!", .@tx$);
    next;

    if (!SmithTweakSystem(.@prc, .@txn)) {
        mes "";
        mesn;
        mesq l("You can always try again another day!");
    }
    close;

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