summaryrefslogtreecommitdiff
path: root/npc/008-2-6/donald.txt
blob: 170059f44bf875d018cd2faf4db81cb54e5a8f5d (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
// The Mana World scripts.
// Author:
//    Micksha
// Description:
//    Alan's Apprentice.

008-2-6,29,27,0	script	Donald	NPC_YOUNG_MAN_APPRENTICE,{
    if (shopcount(TrainingArrow) <= 0 && shopcount(IronArrow) <= 0) {
        speech
            l("Good day."),
            l("Sorry, we are sold out for today."),
            lg("Come back later.");

    } else {
        speech
            l("Good day."),
            l("We got new supplies of arrows!");

        next;

        closeclientdialog;
        shop .name$;
    }

    close;

OnInit:
    .distance = 4;
    tradertype(NST_MARKET);

    sellitem TrainingArrow, -1, 20000+rand2(5000);
    sellitem IronArrow, -1, 20000+rand2(5000);
    end;

OnClock0002:
    restoreshopitem TrainingArrow, 20000+rand2(5000);
    restoreshopitem IronArrow, 20000+rand2(5000);
    end;
}