forked from Zamirathe/ZaupShop
-
Notifications
You must be signed in to change notification settings - Fork 18
/
ZaupShop.cs
183 lines (180 loc) · 5.85 KB
/
ZaupShop.cs
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
using System.Collections.Generic;
using Rocket.API.DependencyInjection;
using Rocket.Core.Plugins;
namespace ZaupShop
{
public class ZaupShop : Plugin<ZaupShopConfiguration>
{
public DatabaseMgr Database;
public override Dictionary<string, string> DefaultTranslations => new Dictionary<string, string>
{
{
"buy_command_usage",
"Usage: /buy [v.]<name or id> [amount] [quality of 25, 50, 75, or 100] (last 2 optional and only for items, default 1 amount, 100 quality)."
},
{
"cost_command_usage",
"Usage: /cost [v.]<name or id>."
},
{
"sell_command_usage",
"Usage: /sell <name or id> [amount] (optional)."
},
{
"shop_command_usage",
"Usage: /shop <add/rem/chng/buy> [v.]<itemid> <cost> <cost> is not required for rem, buy is only for items."
},
{
"error_giving_item",
"There was an error giving you {0}. You have not been charged."
},
{
"error_getting_cost",
"There was an error getting the cost of {0}!"
},
{
"item_cost_msg",
"The item {0} costs {1} {2} to buy and gives {3} {4} when you sell it."
},
{
"vehicle_cost_msg",
"The vehicle {0} costs {1} {2} to buy."
},
{
"item_buy_msg",
"You have bought {5} {0} for {1} {2}. You now have {3} {4}."
},
{
"vehicle_buy_msg",
"You have bought 1 {0} for {1} {2}. You now have {3} {4}."
},
{
"not_enough_currency_msg",
"You do not have enough {0} to buy {1} {2}."
},
{
"buy_items_off",
"I'm sorry, but the ability to buy items is turned off."
},
{
"buy_vehicles_off",
"I'm sorry, but the ability to buy vehicles is turned off."
},
{
"item_not_available",
"I'm sorry, but {0} is not available in the shop."
},
{
"vehicle_not_available",
"I'm sorry, but {0} is not available in the shop."
},
{
"could_not_find",
"I'm sorry, I couldn't find an id for {0}."
},
{
"sell_items_off",
"I'm sorry, but the ability to sell items is turned off."
},
{
"not_have_item_sell",
"I'm sorry, but you don't have any {0} to sell."
},
{
"not_enough_items_sell",
"I'm sorry, but you don't have {0} {1} to sell."
},
{
"not_enough_ammo_sell",
"I'm sorry, but you don't have enough ammo in {0} to sell."
},
{
"sold_items",
"You have sold {0} {1} to the shop and receive {2} {3} in return. Your balance is now {4} {5}."
},
{
"no_sell_price_set",
"The shop is not buying {0} right now"
},
{
"no_itemid_given",
"An itemid is required."
},
{
"no_cost_given",
"A cost is required."
},
{
"invalid_amt",
"You have entered in an invalid amount."
},
{
"v_not_provided",
"You must specify v for vehicle or just an item id. Ex. /shop rem/101"
},
{
"invalid_id_given",
"You need to provide a valid item or vehicle id."
},
{
"no_permission_shop_chng",
"You don't have permission to use the shop chng msg."
},
{
"no_permission_shop_add",
"You don't have permission to use the shop add msg."
},
{
"no_permission_shop_rem",
"You don't have permission to use the shop rem msg."
},
{
"no_permission_shop_buy",
"You don't have permission to use the shop buy msg."
},
{
"changed",
"changed"
},
{
"added",
"added"
},
{
"changed_or_added_to_shop",
"You have {0} the {1} with cost {2} to the shop."
},
{
"error_adding_or_changing",
"There was an error adding/changing {0}!"
},
{
"removed_from_shop",
"You have removed the {0} from the shop."
},
{
"not_in_shop_to_remove",
"{0} wasn't in the shop, so couldn't be removed."
},
{
"not_in_shop_to_set_buyback",
"{0} isn't in the shop so can't set a buyback price."
},
{
"set_buyback_price",
"You set the buyback price for {0} to {1} in the shop."
},
{
"invalid_shop_command",
"You entered an invalid shop command."
}
};
protected override void OnLoad(bool isReload)
{
Database = new DatabaseMgr(Logger, this);
}
public ZaupShop(IDependencyContainer container) : base("ZaupShop", container)
{
}
}
}