summaryrefslogtreecommitdiff
path: root/npc/010-2/sawis.txt
blob: 314e0774fa8fa18855528602e0f47e4a69237a50 (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// TMW2 Script
// Author:
//      Saulc
// Reviewer:
//    Jesusalva
// Description:
//    craft desert shirt refert to player msawis
// id:193  HalinarzoQuest_Sawis

010-2,138,122,0	script	Sawis	NPC_PLAYER,{
    .@Miner = getq(HalinarzoQuest_Sawis);
    if (BaseLevel < 37) goto L_TooWeak;
    if (.@Miner == 1) goto L_Check;
    if (.@Miner == 2) goto L_Complete;

L_GiveTask:
    mesn;
    mesq lg("Hello, wanderer!");
    next;
    mesq l("No one visit me, im in peace there.");
    next;

    menu
        l("What are you doing alone in this desert?"), L_Quest,
        l("Don't speak to me crazy guy!"), L_Quit;

L_Quest:
    mes "";
    mesn;
    mesq l("I do some research about evolution of snake skin subject to hard sunlight.");
    next;
    mesn;
    mesq l("Then i craft some new typê of stronge desert shirt, to protect user from snake and sunlight.");
    next;
    mesn;
    mesq l("If you bring me some items, I can craft one for you and you will be my test subject.");
    next;

    menu
        l("Yeah sure? What do you need?"), L_Start,
        l("Nah, sorry everythings good for me."), L_Quit;

L_Start:
    setq HalinarzoQuest_Sawis, 1;
    mes "";
    mesn;
    mesq l("Ok, what I need is:");
    goto L_List;

L_Quit:
    mes "";
    mesn;
    mesq l("Alright.");
    close;

L_List:
    mes "";
    mesn;
    mes l("Here's what I need:");
    mes l("@@/1 @@", countitem(LeatherShirt), getitemlink(LeatherShirt));
    mes l("@@/1 @@", countitem(CottonCloth), getitemlink(CottonCloth));
    mes l("@@/1 @@", countitem(CaveSnakeSkin), getitemlink(CaveSnakeSkin));
    mes l("@@/3 @@", countitem(SnakeSkin), getitemlink(SnakeSkin));
    close;

L_Check:
    mesn;
    mesq l("Did you brought me everything I asked for?");
    next;
    menu
        l("Yes!"), L_Give,
        l("Sorry, I forgot what you need!"), L_List,
        l("No!"), L_Quit;

L_Give:
    if (
        countitem(LeatherShirt)         < 1  ||
        countitem(CottonCloth)          < 1  ||
        countitem(CaveSnakeSkin)        < 1  ||
        countitem(SnakeSkin)            < 3
        ) goto L_Lying;

    inventoryplace DesertShirt, 1;

    delitem(LeatherShirt, 1);
    delitem(CottonCloth, 1);
    delitem(CaveSnakeSkin, 1);
    delitem(SnakeSkin, 3);

    getitem(DesertShirt, 1);
    getexp(5000, 30);
    setq(HalinarzoQuest_Sawis, 2);

    mes "";
    mesn;
    mesq l("I hope this is your size.");
    close;

L_Complete:
    mesn;
    mesq l("As i see, you stay alive!.");
    close;

// Funnier to write than to read, but the player lied. :angel:
L_Lying:
    mesn;
    mesq l("No no no, that's wrong.");
    next;
    mesc l("You dont have all item required.");
    next;
    goto L_List;

L_TooWeak:
    mesn;
    mesq l("What are you doing here this place is too dangerous for you!");
    close;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADMIDDLE, DesertShirt);
    setunitdata(.@npcId, UDT_HEADBOTTOM, BromenalPants);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 7);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 7);

    .sex = G_MALE;
    .distance = 4;

    end;
}