summaryrefslogtreecommitdiff
path: root/npc/001-2-9/janus.txt
blob: f97f0be8f6c07e286df0077fb213a958e598527e (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// Evol scripts.
// Authors:
//    Reid
// Description:
//    Party NPC
// Variable:
//    General_Janus
// Values:
//    0    Default.
//    1    Basic information given.
//    2    Party creation enabled.
//    3    Guild certificate given.

001-2-9,30,28,0	script	Janus	NPC_JANUS,{

    function create_party {
        .@party_price = 1000;

        speech 5,
            l("Creating a party has some advantages, it's a pretty good choice!"),
            l("I remember when I created my first party, we were amazed to share some experience with a small group of adventurer..."),
            l("Oh! And our party chat was really entertaining, I do highly recommend you to share this fun as well."),
            l("The cost to create a party is of @@ E, are you interested?", .@party_price);

        if (askyesno () == 1)
        {
            if (Zeny < .@party_price)
            {
                speech 5, l("You don't have enough money, bring @@ E.", .@party_price);
            }
            else
            {
                Zeny = Zeny - .@party_price;
                setq General_Janus, 2;
                skill NV_BASIC, 7, 0;

                speech 5, l("Awesome, come back if you ever want to create a larger group!");
            }
        }
    }

    function create_guild {
        .@guild_price = 35000;

        speech 5,
            l("Oh oh... I see, your party became so big that you want to create an even larger structure?"),
            l("Or, do you want to keep your friendship and your adventure in different groups?"),
            l("Anyway, the guild creation is perfect for both case! You can keep your current party as is while having a guild to talk and share different items with all of your friends!"),
            l("The @@ is a one time item, you can use it as many time as you want, but you can only have one!", getitemlink (GuildCertification)),
            l("The cost to create a guild is of @@ E, are you interested?", .@guild_price);

        if (askyesno () == 1)
        {
            if (Zeny < .@guild_price)
            {
                speech 5, l("You don't have enough money, bring @@ E.", .@guild_price);
            }
            else
            {
                inventoryplace GuildCertification, 1;
                Zeny = Zeny - .@guild_price;
                setq General_Janus, 3;
                getitem GuildCertification, 1;

                speech 5, l("Enjoy the fraternity and excitement of your future guild!");
            }
        }
    }

    function explain_service {
        speech 5,
            l("You are on the human ressource wing of the Town Hall."),
            l("We offer party and guild certifications and we can also teach you how to use some basic communication skills."),
            l("Do you know how to speak with people around you?");

        if (askyesno () == 2)
        {
            speech 5,
                l("You lack some very basic skills...");

            if (compareandsetq (General_Janus, 0, 1))
            {
                speech 12,
                    l("This book resumes everything you should know about it, take it!");

                inventoryplace CommunicationTheory, 1;
                getitem CommunicationTheory, 1;
            }
            else
            {
                speech 12,
                    l("You can read the book that I gave you earlier at the library if you lost it.");
            }
        }
        else
        {
            if (compareandsetq (General_Janus, 0, 1))
            {
                speech 12,
                    l("Anyway."),
                    l("This book resumes everything you should know about it, take it!");

                inventoryplace CommunicationTheory, 1;
                getitem CommunicationTheory, 1;
            }

        }

        return;
    }

    function janus_is_not_ianus {
        speech 1,
            l("Janus!");
        emotion E_UPSET;
        next;

        speech 12,
            l("Ianus is from the legion of Aemil, don't compare me to this brigand.");

        return;
    }

    speech 4,
        lg("Welcome miss.", "Good day sir.");

    do
    {
        // Beta users by-pass check.
        if (getskilllv(NV_BASIC) > 6 && getq (General_Janus) == 1)
        {
            setq General_Janus, 2;
        }

        menuint rif (getq (General_Janus) == 1, l("I would like to create a party.")), 1,
                rif (getq (General_Janus) == 2, l("I would like to create a guild.")), 2,
                l("What service do you offer?"), 3,
                l("Your name is Ianus or Janus?"), 4,
                menuaction(l("Quit")), 5;

        switch (@menuret)
        {
            case 1:
                create_party;
                break;
            case 2:
                create_guild;
                break;
            case 3:
                explain_service;
                break;
            case 4:
                janus_is_not_ianus;
                break;
            case 5:
                break;
        }
    } while (@menuret != 5);

    closedialog;
    goodbye;
    close;

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