Skip to content

Commit 21748c0

Browse files
author
GitHub Actions
committed
Updated Some Public Modules
1 parent 067e057 commit 21748c0

File tree

122 files changed

+14088
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+14088
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<h1 style="text-align:center; font-size:2rem; font-weight:bold;">About</h1>
2+
3+
**Name:**
4+
Advertisements
5+
6+
**Version:**
7+
1.25
8+
9+
**Description:**
10+
11+
Implements a paid /advert command for server-wide announcements. Messages are colored, logged, and throttled by a cooldown to curb spam.
12+
13+
<h2 style="text-align:center; font-size:1.5rem; font-weight:bold;">Features</h2>
14+
15+
- Adds a paid /advert command players can use
16+
- Adds a cooldown via AdvertCooldown to limit spam
17+
- Adds colored broadcast messages across the server
18+
- Adds price control via AdvertPrice configuration
19+
- Adds notifications when players lack funds
20+
21+
22+
23+
24+
25+
<p align="center"><a href="https://github.com/LiliaFramework/Modules/raw/refs/heads/gh-pages/advert.zip" style="display:inline-block;padding:12px 24px;font-size:1.5rem;font-weight:bold;text-decoration:none;color:#fff;background-color:var(--md-primary-fg-color,#007acc);border-radius:4px;">DOWNLOAD HERE</a></p>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Hooks
2+
3+
Module-specific events raised by the Advertisements module.
4+
5+
---
6+
7+
### `AdvertSent`
8+
9+
**Purpose**
10+
11+
`Fires after a player successfully sends an advertisement message.`
12+
13+
**Parameters**
14+
15+
* `client` (`Player`): `Player who posted the advert.`
16+
17+
* `message` (`string`): `Text that was advertised.`
18+
19+
**Realm**
20+
21+
`Server`
22+
23+
**Returns**
24+
25+
`nil``This hook does not return anything.`
26+
27+
**Example**
28+
29+
```lua
30+
hook.Add("AdvertSent", "LogAdvert", function(client, message)
31+
print(client:Nick() .. " advertised: " .. message)
32+
end)
33+
```
34+
35+
---
36+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<h1 style="text-align:center; font-size:2rem; font-weight:bold;">About</h1>
2+
3+
**Name:**
4+
Alcoholism
5+
6+
**Version:**
7+
1.27
8+
9+
**Description:**
10+
11+
Adds drinkable alcohol that increases a player's intoxication level. High BAC blurs vision and slows movement until the effect wears off.
12+
13+
<h2 style="text-align:center; font-size:1.5rem; font-weight:bold;">Features</h2>
14+
15+
- Adds alcohol items that raise BAC and gradually wear off
16+
- Adds screen blur and movement effects that scale with intoxication
17+
- Adds player notification when reaching DrunkNotifyThreshold
18+
- Adds configurable BAC settings like AlcoholTickTime
19+
- Adds multiple drink items with varying strength
20+
21+
22+
23+
24+
25+
<p align="center"><a href="https://github.com/LiliaFramework/Modules/raw/refs/heads/gh-pages/alcoholism.zip" style="display:inline-block;padding:12px 24px;font-size:1.5rem;font-weight:bold;text-decoration:none;color:#fff;background-color:var(--md-primary-fg-color,#007acc);border-radius:4px;">DOWNLOAD HERE</a></p>
Lines changed: 303 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
# Hooks
2+
3+
Module-specific events raised by the Alcoholism module.
4+
5+
---
6+
7+
### `BACChanged`
8+
9+
**Purpose**
10+
11+
`Called whenever a player's Blood Alcohol Content (BAC) value is updated.`
12+
13+
**Parameters**
14+
15+
* `client` (`Player`): `The player whose BAC changed.`
16+
17+
* `newBac` (`number`): `The player's new BAC value.`
18+
19+
**Realm**
20+
21+
`Server`
22+
23+
**Returns**
24+
25+
`nil``This hook does not return anything.`
26+
27+
**Example**
28+
29+
```lua
30+
hook.Add("BACChanged", "PrintBac", function(client, newBac)
31+
print(client:Name() .. " BAC is now " .. newBac .. "%")
32+
end)
33+
```
34+
35+
---
36+
37+
### `BACReset`
38+
39+
**Purpose**
40+
41+
`Runs when a player's BAC is reset to 0.`
42+
43+
**Parameters**
44+
45+
* `client` (`Player`): `The player whose BAC was reset.`
46+
47+
**Realm**
48+
49+
`Server`
50+
51+
**Returns**
52+
53+
`nil`
54+
55+
**Example**
56+
57+
```lua
58+
hook.Add("BACReset", "HandleBacReset", function(client)
59+
-- Additional logic when the player sobers up
60+
end)
61+
```
62+
63+
---
64+
65+
### `BACIncreased`
66+
67+
**Purpose**
68+
69+
`Fires when a player's BAC is increased through consuming alcohol.`
70+
71+
**Parameters**
72+
73+
* `client` (`Player`): `The affected player.`
74+
75+
* `amt` (`number`): `Amount added to the BAC.`
76+
77+
* `newBac` (`number`): `The resulting BAC value.`
78+
79+
**Realm**
80+
81+
`Server`
82+
83+
**Returns**
84+
85+
`nil`
86+
87+
**Example**
88+
89+
```lua
90+
hook.Add("BACIncreased", "NotifyBACIncrease", function(client, amt, newBac)
91+
client:ChatPrint("BAC increased by " .. amt .. " to " .. newBac .. "%")
92+
end)
93+
```
94+
95+
---
96+
97+
### `AlcoholConsumed`
98+
99+
**Purpose**
100+
101+
`Triggered when an alcohol item is used by a player.`
102+
103+
**Parameters**
104+
105+
* `client` (`Player`): `Player that consumed the item.`
106+
107+
* `item` (`Item`): `The alcohol item that was consumed.`
108+
109+
**Realm**
110+
111+
`Server`
112+
113+
**Returns**
114+
115+
`nil`
116+
117+
**Example**
118+
119+
```lua
120+
hook.Add("AlcoholConsumed", "LogDrink", function(client, item)
121+
print(client:Name() .. " drank " .. item.name)
122+
end)
123+
```
124+
125+
---
126+
127+
### `PreBACReset`
128+
129+
**Purpose**
130+
131+
`Runs right before a player's BAC value is cleared.`
132+
133+
**Parameters**
134+
135+
* `client` (`Player`): `The player about to be reset.`
136+
137+
**Realm**
138+
139+
`Server`
140+
141+
**Returns**
142+
143+
`nil`
144+
145+
**Example**
146+
147+
```lua
148+
hook.Add("PreBACReset", "LogBeforeReset", function(client)
149+
print(client:Name() .. " BAC resetting")
150+
end)
151+
```
152+
153+
---
154+
155+
### `PostBACReset`
156+
157+
**Purpose**
158+
159+
`Called after a player's BAC has been cleared.`
160+
161+
**Parameters**
162+
163+
* `client` (`Player`): `The player that was reset.`
164+
165+
**Realm**
166+
167+
`Server`
168+
169+
**Returns**
170+
171+
`nil`
172+
173+
**Example**
174+
175+
```lua
176+
hook.Add("PostBACReset", "AfterReset", function(client)
177+
-- cleanup
178+
end)
179+
```
180+
181+
---
182+
183+
### `PreBACIncrease`
184+
185+
**Purpose**
186+
187+
`Invoked before a player's BAC value increases.`
188+
189+
**Parameters**
190+
191+
* `client` (`Player`): `The affected player.`
192+
193+
* `amt` (`number`): `Amount being added.`
194+
195+
**Realm**
196+
197+
`Server`
198+
199+
**Returns**
200+
201+
`nil`
202+
203+
**Example**
204+
205+
```lua
206+
hook.Add("PreBACIncrease", "CheckIncrease", function(client, amt)
207+
print("BAC will increase by", amt)
208+
end)
209+
```
210+
211+
---
212+
213+
### `BACThresholdReached`
214+
215+
**Purpose**
216+
217+
`Fires when a player's BAC crosses the drunk threshold.`
218+
219+
**Parameters**
220+
221+
* `client` (`Player`): `The player who crossed the threshold.`
222+
223+
* `newBac` (`number`): `Their new BAC value.`
224+
225+
**Realm**
226+
227+
`Server`
228+
229+
**Returns**
230+
231+
`nil`
232+
233+
**Example**
234+
235+
```lua
236+
hook.Add("BACThresholdReached", "AlertAdmins", function(client, bac)
237+
print(client:Name() .. " is drunk at " .. bac .. "%")
238+
end)
239+
```
240+
241+
---
242+
243+
### `PreBACDecrease`
244+
245+
**Purpose**
246+
247+
`Runs before the server lowers a player's BAC over time.`
248+
249+
**Parameters**
250+
251+
* `client` (`Player`): `Player whose BAC will drop.`
252+
253+
* `bac` (`number`): `Their current BAC before drop.`
254+
255+
**Realm**
256+
257+
`Server`
258+
259+
**Returns**
260+
261+
`nil`
262+
263+
**Example**
264+
265+
```lua
266+
hook.Add("PreBACDecrease", "CheckDrop", function(client, bac)
267+
-- You could modify decay here
268+
end)
269+
```
270+
271+
---
272+
273+
### `PostBACDecrease`
274+
275+
**Purpose**
276+
277+
`Runs after a player's BAC has decayed for the tick.`
278+
279+
**Parameters**
280+
281+
* `client` (`Player`): `Affected player.`
282+
283+
* `newBac` (`number`): `Their BAC after decay.`
284+
285+
**Realm**
286+
287+
`Server`
288+
289+
**Returns**
290+
291+
`nil`
292+
293+
**Example**
294+
295+
```lua
296+
hook.Add("PostBACDecrease", "NotifyDrop", function(client, newBac)
297+
print("BAC now", newBac)
298+
end)
299+
```
300+
301+
---
302+
303+

0 commit comments

Comments
 (0)