summaryrefslogtreecommitdiff
path: root/npc/re/merchants/catalog.txt
blob: f508014a176203fa616db7f1b606ecea7b8917f3 (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
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015  Hercules Dev Team
//= Copyright (C)  Euphy
//= Copyright (C)  Scriptor
//= Copyright (C)  skyiing
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program.  If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= Catalog Magician
//================= Description ===========================================
//= Catalogs allow players to easily search for items in-game, and to
//= buy/sell directly from the catalog interface.
//================= Current Version =======================================
//= 1.1
//=========================================================================

moc_para01,22,16,5	script	Catalog Magician#catal01	4_M_BIBI,{
	if (!checkweight(Axe,3)) {
		mes "- You have too many items. Please make space. -";
		close;
	}
	.@ticket_cost = 200;
	mes "[Catalog Magician]";
	mes "Look... the Magic Academy";
	mes "in Geffen is now directly";
	mes "selling the brand new";
	mes "^007777Universal Catalog Silver^000000!";
	next;
	mes "He is looking at the words";
	mes "written on his hand.";
	mes "He seems too busy";
	mes "to look at you.";
	next;
	mes "[Catalog Magician]";
	mes "A brand new catalog";
	mes "has just come out!";
	mes "You can check";
	mes "what items you can trade";
	mes "and what items are on sale";
	mes "from the vendor.";
	next;
	mes "[Catalog Magician]";
	mes "The ^007777Universal Catalog Silver^000000";
	mes "costs only 200z!";
	mes "You can buy up to 50 pieces at once!";
	next;
	switch(select("Buy a ^007777Universal Catalog Silver^000000", "I don't need it!", "You don't look like a vendor!")) {
	case 1:
		mes "[Catalog Magician]";
		mes "You... want all 50 pieces?";
		mes "Or how many do you need?";
		next;
		while (1) {
			input .@input;
			mes "[Catalog Magician]";
			if (.@input == 0) {
				mes "The trade has been stopped!";
				mes "I don't know what to do next...";
				mes "What should I do?";
				emotion e_swt2,1;
				close;
			} else if (.@input < 1 || .@input > 50) {
				mes "It should be less than 50 pieces.";
				next;
			} else
				break;
		}
		.@sell = .@ticket_cost * .@input;
		mes "The total number of catalog(s) that you're trying to purchase is " + .@input + " pieces.";
		mes "It costs " + .@sell + " z.";
		if (Zeny < .@sell) {
			mes "It seems you don't have enough money.";
			mes "You can sell your equipment";
			mes "to make more money... if you want.";
			close;
		}
		mes "Ok, here you go.";
		Zeny -= .@sell;
		getitem Vending_Search_Scroll,.@input;
		close;
	case 2:
		mes "[Catalog Magician]";
		mes "Argh... you really need this";
		mes "item... Do you want me to";
		mes "explain again? I don't know";
		mes "what to do next...";
		mes "What should I do?";
		emotion e_swt2,1;
		close;
	case 3:
		mes "[Catalog Magician]";
		mes "My real job is a magician.";
		mes "I was going to ask the merchant";
		mes "guild to sell them, but they were";
		mes "trying use them as an appendix";
		mes "into broom sales. That's why";
		mes "I'm selling these by myself.";
		next;
		mes "[Catalog Magician]";
		mes "There are many adventurers";
		mes "here who come and go.";
		mes "I'm pretty sure that I can sell to all of them soon.";
		mes "Don't you think so?";
		mes "So... let's start!! Buy more of them, please! PLEASE...!";
		close;
	}
}