Initial commit

This commit is contained in:
Rares Bozga
2025-11-29 22:53:32 +02:00
parent e9fa13dbd3
commit 461e95114c
157 changed files with 7597 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
# denizen-scripts
DenizenScript scripts (and data) folders of SakuraFalls.
DenizenScript "scripts" folder of SakuraFalls
# How to use
You should just be able to drag & drop this into your
DenizenScript folder on your server. Enjoy!

BIN
data/.DS_Store vendored Normal file

Binary file not shown.

BIN
data/phones/.DS_Store vendored Normal file

Binary file not shown.

BIN
data/phones/songs/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
data/phones/songs/Ruins.nbs Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
data/phones/texts/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,7 @@
messages:
time&at2023&fs12&fs15_21&co43&co12&co0705_Z:
origin: sender
value: its me
time&at2023&fs12&fs15_21&co43&co29&co0255_Z:
origin: receiver
value: try loading the texts to see how fast they load :)

View File

@@ -0,0 +1,10 @@
messages:
time&at2023&fs12&fs15_21&co43&co52&co0505_Z:
origin: sender
value: meow
time&at2023&fs12&fs15_21&co44&co01&co0555_Z:
origin: sender
value: colosalty is ur contact name
time&at2023&fs12&fs15_21&co45&co08&co0454_Z:
origin: receiver
value: your Kyoi in my phone now

View File

@@ -0,0 +1,10 @@
messages:
time&at2024&fs12&fs19_04&co11&co47&co0702_Z:
origin: sender
value: HELLO
time&at2024&fs12&fs19_04&co12&co05&co0252_Z:
origin: receiver
value: sup
time&at2024&fs12&fs19_04&co12&co11&co0502_Z:
origin: receiver
value: can you open your phone and see how fast the messages load?

View File

@@ -0,0 +1,7 @@
messages:
time&at2024&fs12&fs28_22&co12&co40&co0482_Z:
origin: receiver
value: hello baby
time&at2024&fs12&fs28_22&co13&co23&co0732_Z:
origin: receiver
value: hi

View File

@@ -0,0 +1,7 @@
messages:
time&at2023&fs12&fs15_21&co43&co12&co0755_Z:
origin: receiver
value: its me
time&at2023&fs12&fs15_21&co43&co29&co0155_Z:
origin: sender
value: try loading the texts to see how fast they load :)

View File

@@ -0,0 +1,10 @@
messages:
time&at2024&fs12&fs19_04&co11&co47&co0802_Z:
origin: receiver
value: HELLO
time&at2024&fs12&fs19_04&co12&co05&co0153_Z:
origin: sender
value: sup
time&at2024&fs12&fs19_04&co12&co11&co0402_Z:
origin: sender
value: can you open your phone and see how fast the messages load?

View File

@@ -0,0 +1,7 @@
messages:
time&at2024&fs12&fs28_22&co12&co40&co0432_Z:
origin: sender
value: hello baby
time&at2024&fs12&fs28_22&co13&co23&co0682_Z:
origin: sender
value: hi

View File

@@ -0,0 +1,28 @@
messages:
time&at2023&fs05&fs23_05&co29&co47&co0781_+03&co00:
origin: sender
value: so anyway
time&at2023&fs05&fs23_05&co29&co47&co0840_+03&co00:
origin: receiver
value: yeah whats up
time&at2023&fs05&fs23_05&co29&co49&co0785_+03&co00:
origin: sender
value: hru bubba
time&at2023&fs05&fs23_05&co29&co49&co0881_+03&co00:
origin: receiver
value: im good hru? u seemed sad today
time&at2023&fs05&fs23_05&co32&co54&co0228_+03&co00:
origin: sender
value: yea but as you can imagine, it kinda sucked
time&at2023&fs05&fs23_05&co32&co54&co0328_+03&co00:
origin: receiver
value: ah i see
time&at2023&fs05&fs23_05&co33&co02&co0678_+03&co00:
origin: sender
value: i don't even wanna mention it.
time&at2023&fs05&fs23_05&co33&co02&co0778_+03&co00:
origin: receiver
value: mkay
time&at2023&fs05&fs23_05&co46&co07&co0279_+03&co00:
origin: receiver
value: why are u ignoring me...

View File

@@ -0,0 +1,4 @@
messages:
time&at2024&fs06&fs26_22&co03&co58&co0493_Z:
origin: sender
value: hello habibi <333

View File

@@ -0,0 +1,37 @@
messages:
time&at2023&fs12&fs16_18&co44&co32&co0949_Z:
origin: sender
value: '*cums in his ass 6 times* AWWW BABY YOUR ASS IS SO GOOD WTFFFF'
time&at2023&fs12&fs16_18&co46&co28&co0449_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co27&co0299_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co27&co0749_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co28&co0099_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co30&co0549_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co30&co0899_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co31&co0249_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co31&co0648_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co47&co31&co0999_Z:
origin: receiver
value: dicks
time&at2023&fs12&fs16_18&co50&co38&co0999_Z:
origin: sender
value: better?
time&at2023&fs12&fs16_18&co50&co47&co0549_Z:
origin: sender
value: test

View File

@@ -0,0 +1,31 @@
messages:
time&at2025&fs03&fs10_16&co06&co23&co0654_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co06&co24&co0004_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co06&co24&co0254_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co07&co22&co0003_Z:
origin: sender
value: hello
time&at2025&fs03&fs10_16&co07&co29&co0053_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co07&co29&co0254_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co07&co29&co0453_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co07&co29&co0653_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co07&co34&co0410_Z:
origin: receiver
value: Test
time&at2025&fs03&fs10_16&co07&co35&co0253_Z:
origin: receiver
value: Test

View File

@@ -0,0 +1,23 @@
messages:
time&at2023&fs12&fs02_02&co08&co02&co0017_Z:
origin: sender
value: Oh, really? Go load this conversation. See how fast it is.
time&at2023&fs12&fs02_02&co08&co16&co0267_Z:
origin: sender
value: It's in your phone - right click it.
time&at2023&fs12&fs02_02&co09&co03&co0316_Z:
origin: sender
value: oh hey, it's instant
time&at2023&fs12&fs02_02&co09&co14&co0067_Z:
origin: sender
value: /ac 3772221480 dar
time&at2023&fs12&fs02_02&co09&co16&co0567_Z:
origin: sender
value: or something..
time&at2023&fs12&fs02_02&co09&co28&co0817_Z:
origin: sender
value: maybe change your ringtone, too.
time&at2023&fs12&fs02_02&co16&co09&co0316_Z:
origin: sender
value: Hey, we have more text messages by now. Try loading them, they should surely
be slower to load now, right?????????

View File

@@ -0,0 +1,5 @@
messages:
time&at2024&fs12&fs12_01&co55&co59&co0229_Z:
origin: sender
value: Hey, this is a text message. This won't call you, it'll just send it as
is

View File

@@ -0,0 +1,16 @@
messages:
time&at2023&fs12&fs11_18&co11&co36&co0205_Z:
origin: sender
value: hi
time&at2023&fs12&fs15_21&co32&co32&co0155_Z:
origin: receiver
value: '>:)'
time&at2023&fs12&fs15_21&co34&co27&co0305_Z:
origin: receiver
value: chicken nugget
time&at2023&fs12&fs19_18&co46&co15&co0228_Z:
origin: sender
value: hallo kkrneger
time&at2024&fs07&fs01_17&co05&co11&co0246_Z:
origin: receiver
value: Potato

View File

@@ -0,0 +1,25 @@
messages:
time&at2024&fs04&fs21_23&co52&co29&co0273_Z:
origin: receiver
value: test
time&at2024&fs04&fs21_23&co53&co02&co0773_Z:
origin: sender
value: nice
time&at2024&fs12&fs17_00&co28&co45&co0662_Z:
origin: sender
value: Sup
time&at2024&fs12&fs17_00&co28&co48&co0712_Z:
origin: receiver
value: meow
time&at2024&fs12&fs17_00&co28&co51&co0562_Z:
origin: sender
value: so, check how fast the messages load
time&at2024&fs12&fs17_00&co28&co55&co0762_Z:
origin: receiver
value: rare
time&at2024&fs12&fs17_00&co29&co12&co0512_Z:
origin: sender
value: open the phone & click on our conversation
time&at2024&fs12&fs17_00&co29&co16&co0464_Z:
origin: sender
value: you'll see it's p much instant

View File

@@ -0,0 +1,13 @@
messages:
time&at2025&fs07&fs28_21&co23&co36&co0695_Z:
origin: sender
value: Hello
time&at2025&fs07&fs28_21&co23&co50&co0947_Z:
origin: sender
value: How are you
time&at2025&fs07&fs28_21&co57&co26&co0645_Z:
origin: sender
value: pupici
time&at2025&fs07&fs28_21&co58&co02&co0745_Z:
origin: receiver
value: pupicei

View File

@@ -0,0 +1,7 @@
messages:
time&at2024&fs04&fs21_02&co45&co39&co0245_Z:
origin: sender
value: sup
time&at2024&fs04&fs21_02&co45&co43&co0245_Z:
origin: receiver
value: sup

View File

@@ -0,0 +1,10 @@
messages:
time&at2024&fs09&fs07_14&co45&co32&co0035_Z:
origin: sender
value: hi girl
time&at2024&fs09&fs07_14&co48&co11&co0988_Z:
origin: sender
value: Hi
time&at2024&fs09&fs07_14&co48&co19&co0285_Z:
origin: sender
value: Hi

View File

@@ -0,0 +1,4 @@
messages:
time&at2024&fs06&fs26_22&co03&co58&co0593_Z:
origin: receiver
value: hello habibi <333

View File

@@ -0,0 +1,37 @@
messages:
time&at2023&fs12&fs16_18&co44&co32&co0999_Z:
origin: receiver
value: '*cums in his ass 6 times* AWWW BABY YOUR ASS IS SO GOOD WTFFFF'
time&at2023&fs12&fs16_18&co46&co28&co0349_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co27&co0199_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co27&co0649_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co27&co0999_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co30&co0449_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co30&co0799_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co31&co0148_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co31&co0549_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co47&co31&co0903_Z:
origin: sender
value: dicks
time&at2023&fs12&fs16_18&co50&co39&co0098_Z:
origin: receiver
value: better?
time&at2023&fs12&fs16_18&co50&co47&co0648_Z:
origin: receiver
value: test

View File

@@ -0,0 +1,31 @@
messages:
time&at2025&fs03&fs10_16&co06&co23&co0603_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co06&co23&co0953_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co06&co24&co0204_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co07&co22&co0053_Z:
origin: receiver
value: hello
time&at2025&fs03&fs10_16&co07&co28&co0954_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co07&co29&co0153_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co07&co29&co0353_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co07&co29&co0603_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co07&co34&co0398_Z:
origin: sender
value: Test
time&at2025&fs03&fs10_16&co07&co35&co0153_Z:
origin: sender
value: Test

View File

@@ -0,0 +1,23 @@
messages:
time&at2023&fs12&fs02_02&co08&co02&co0117_Z:
origin: receiver
value: Oh, really? Go load this conversation. See how fast it is.
time&at2023&fs12&fs02_02&co08&co16&co0367_Z:
origin: receiver
value: It's in your phone - right click it.
time&at2023&fs12&fs02_02&co09&co03&co0417_Z:
origin: receiver
value: oh hey, it's instant
time&at2023&fs12&fs02_02&co09&co14&co0167_Z:
origin: receiver
value: /ac 3772221480 dar
time&at2023&fs12&fs02_02&co09&co16&co0667_Z:
origin: receiver
value: or something..
time&at2023&fs12&fs02_02&co09&co28&co0917_Z:
origin: receiver
value: maybe change your ringtone, too.
time&at2023&fs12&fs02_02&co16&co09&co0417_Z:
origin: receiver
value: Hey, we have more text messages by now. Try loading them, they should surely
be slower to load now, right?????????

View File

@@ -0,0 +1,5 @@
messages:
time&at2024&fs12&fs12_01&co55&co59&co0329_Z:
origin: receiver
value: Hey, this is a text message. This won't call you, it'll just send it as
is

View File

@@ -0,0 +1,10 @@
messages:
time&at2023&fs12&fs15_21&co43&co52&co0555_Z:
origin: receiver
value: meow
time&at2023&fs12&fs15_21&co44&co01&co0655_Z:
origin: receiver
value: colosalty is ur contact name
time&at2023&fs12&fs15_21&co45&co08&co0355_Z:
origin: sender
value: your Kyoi in my phone now

View File

@@ -0,0 +1,16 @@
messages:
time&at2023&fs12&fs11_18&co11&co36&co0255_Z:
origin: receiver
value: hi
time&at2023&fs12&fs15_21&co32&co32&co0055_Z:
origin: sender
value: '>:)'
time&at2023&fs12&fs15_21&co34&co27&co0205_Z:
origin: sender
value: chicken nugget
time&at2023&fs12&fs19_18&co46&co15&co0327_Z:
origin: receiver
value: hallo kkrneger
time&at2024&fs07&fs01_17&co05&co11&co0147_Z:
origin: sender
value: Potato

View File

@@ -0,0 +1,25 @@
messages:
time&at2024&fs04&fs21_23&co52&co29&co0223_Z:
origin: sender
value: test
time&at2024&fs04&fs21_23&co53&co02&co0873_Z:
origin: receiver
value: nice
time&at2024&fs12&fs17_00&co28&co45&co0762_Z:
origin: receiver
value: Sup
time&at2024&fs12&fs17_00&co28&co48&co0613_Z:
origin: sender
value: meow
time&at2024&fs12&fs17_00&co28&co51&co0662_Z:
origin: receiver
value: so, check how fast the messages load
time&at2024&fs12&fs17_00&co28&co55&co0662_Z:
origin: sender
value: rare
time&at2024&fs12&fs17_00&co29&co12&co0612_Z:
origin: receiver
value: open the phone & click on our conversation
time&at2024&fs12&fs17_00&co29&co16&co0512_Z:
origin: receiver
value: you'll see it's p much instant

View File

@@ -0,0 +1,13 @@
messages:
time&at2025&fs07&fs28_21&co23&co36&co0745_Z:
origin: receiver
value: Hello
time&at2025&fs07&fs28_21&co23&co51&co0045_Z:
origin: receiver
value: How are you
time&at2025&fs07&fs28_21&co57&co26&co0745_Z:
origin: receiver
value: pupici
time&at2025&fs07&fs28_21&co58&co02&co0645_Z:
origin: sender
value: pupicei

View File

@@ -0,0 +1,7 @@
messages:
time&at2024&fs04&fs21_02&co45&co39&co0295_Z:
origin: receiver
value: sup
time&at2024&fs04&fs21_02&co45&co43&co0145_Z:
origin: sender
value: sup

View File

@@ -0,0 +1,4 @@
messages:
time&at2024&fs04&fs21_03&co21&co08&co0895_Z:
origin: receiver
value: What the flip flop

View File

@@ -0,0 +1,4 @@
messages:
time&at2024&fs04&fs21_03&co21&co08&co0845_Z:
origin: sender
value: What the flip flop

View File

@@ -0,0 +1,10 @@
messages:
time&at2024&fs09&fs07_14&co45&co32&co0085_Z:
origin: receiver
value: hi girl
time&at2024&fs09&fs07_14&co48&co12&co0085_Z:
origin: receiver
value: Hi
time&at2024&fs09&fs07_14&co48&co19&co0385_Z:
origin: receiver
value: Hi

BIN
scripts/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,80 @@
animations_command_animationmode:
debug: false
type: command
name: animationmode
description: Animate your hands in a certain direction.
usage: /animationmode
aliases:
- am
permission: animations.command.animationmode
tab completions:
1: <empty>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <player.item_in_hand.material.name> != air:
- narrate "<&c>You must run this command with an empty hand."
- stop
- define arrow <item[arrow]>
- adjust def:arrow custom_model_data:1
- adjust def:arrow display:<&f>
- flag <[arrow]> animations:true
- if !<player.inventory.can_fit[<[arrow]>]>:
- narrate "<&c>Your inventory is too full. You must have one empty slot in your inventory!"
- stop
- define bow <item[bow]>
- adjust def:bow "display:<&f>Hold right-click to Animate"
- adjust def:bow custom_model_data:1
- flag <[bow]> animations:true
- inventory set slot:hand origin:<[bow]>
- give <[arrow]>
- narrate format:formats_prefix "Hold right-click to animate your hands!"
animations_command_raisehand:
debug: false
type: command
name: raisehand
description: Animate your hand so it looks like you're raising it.
usage: /raisehand
aliases:
- rh
permission: animations.command.raisehand
tab completions:
1: <empty>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <player.item_in_hand.material.name> != air:
- narrate "<&c>You must run this command with an empty hand."
- stop
- define trident <item[trident]>
- adjust def:trident custom_model_data:1
- adjust def:trident "display:<&f>Hold right-click to Raise Hand"
- flag <[trident]> animations:true
- inventory set slot:hand origin:<[trident]>
- narrate format:formats_prefix "Hold right-click to raise your hand!"
animations_command_handshake:
debug: false
type: command
name: handshake
description: Animate your hand so it looks like you're handshaking.
usage: /handshake
permission: animations.command.handshake
tab completions:
1: <empty>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <player.item_in_hand.material.name> != air:
- narrate "<&c>You must run this command with an empty hand."
- stop
- define shield <item[shield]>
- adjust def:shield custom_model_data:1
- adjust def:shield "display:<&f>Hold right-click to Handshake"
- flag <[shield]> animations:true
- inventory set slot:hand origin:<[shield]>
- narrate format:formats_prefix "Hold right-click to handshake!"

View File

@@ -0,0 +1,34 @@
animations_world:
debug: false
type: world
events:
# common
on player joins:
- foreach <player.inventory.map_slots> key:slot as:item:
- if <[item].has_flag[animations]>:
- inventory set slot:<[slot]> origin:air
on player scrolls their hotbar:
- if <player.item_in_hand.has_flag[animations]>:
- take flagged:animations quantity:255
on player clicks item in inventory:
- if <context.item.has_flag[animations]>:
- determine cancelled passively
- inventory set slot:hand origin:air
- inventory update
on player drops item:
- if <context.item.has_flag[animations]>:
- remove <context.entity>
# animationmode
on player shoots bow:
- if <context.bow.has_flag[animations]>:
- determine cancelled passively
- take flagged:animations quantity:255
# raisehand
on trident launched:
- if <context.entity.item.has_flag[animations]>:
- determine cancelled passively
- take flagged:animations quantity:255 player:<context.entity.shooter>
# shield
on player lowers item:
- if <context.item.has_flag[animations]>:
- take flagged:animations quantity:255

View File

@@ -0,0 +1,57 @@
announcers_command_intercom:
debug: false
type: command
name: intercom
description: Broadcast a message through the intercom.
usage: /intercom (message)
permission: announcers.command.intercom
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- define message <context.args.space_separated>
- announce "<&6>[<&c><&l>INTERCOM<&6>] <&7><&o>(<player.name>) <&f><proc[character_get_name].context[<player>]> says <&dq><[message]><&dq>"
announcers_command_collegeintercom:
debug: false
type: command
name: collegeintercom
description: Broadcast a message through the college intercom.
usage: /collegeintercom (message)
permission: announcers.command.collegeintercom
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- define message <context.args.space_separated>
- define recipients <server.online_players.filter_tag[<[filter_value].has_permission[announcers.see.collegeintercom]>]>
- narrate targets:<[recipients]> "<&6>[<&c><&l>COLLEGE INTERCOM<&6>] <&7><&o>(<player.name>) <&f><proc[character_get_name].context[<player>]> says <&dq><[message]><&dq>"
announcers_command_advert:
debug: false
type: command
name: advert
description: Broadcast a message for your shop.
usage: /advert (message)
permission: announcers.command.advert
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- define message <context.args.space_separated>
- announce "<&6>[<&2>Advert<&6>]<&f>: <&7><&o>(<player.name>) <&f><proc[character_get_name].context[<player>]> - <[message]>"

View File

@@ -0,0 +1,147 @@
apartments_command_apartmentaddmember:
debug: false
type: command
name: apartmentaddmember
description: Add a member to the apartment you are currently in.
usage: /apartmentaddmember (player)
aliases:
- aptaddmember
- aptam
permission: apartments.command.apartmentaddmember
tab completions:
1: <server.online_players.parse[name]>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- define apartment <proc[apartments_at].context[<player.location>]>
- if <[apartment]> == null:
- narrate "<&c>You can only use this command inside apartments."
- stop
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <player> != <[owner]>:
- narrate "<&c>You do not own this apartment!"
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Invalid use. Please try /<context.alias> (player)"
- stop
- define target <server.match_offline_player[<context.args.get[1]>].if_null[null]>
- if <[target]> == null:
- narrate "<&c>A player with the username <context.args.get[1]> could not be found."
- stop
- if <[target]> == <player>:
- narrate "<&c>You cannot add yourself as a member!"
- stop
- run apartments_add_member def.apartment:<[apartment]> def.member:<[target]>
- narrate format:formats_prefix "<&a>Added <&7><[target].name> to your apartment (<&b>member<&7>)."
apartments_command_apartmentaddmoderator:
debug: false
type: command
name: apartmentaddmoderator
description: Adds a moderator to the apartment you are currently in.
usage: /apartmentaddmoderator (player)
aliases:
- aptaddmod
permission: apartments.command.apartmentaddmod
tab completions:
1: <server.online_players.parse[name]>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- define apartment <proc[apartments_at].context[<player.location>]>
- if <[apartment]> == null:
- narrate "<&c>You can only use this command inside apartments."
- stop
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <player> != <[owner]>:
- narrate "<&c>You do not own this apartment!"
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Invalid use. Please try /<context.alias> (player)"
- stop
- define target <server.match_offline_player[<context.args.get[1]>].if_null[null]>
- if <[target]> == null:
- narrate "<&c>A player with the username <context.args.get[1]> could not be found."
- stop
- if <[target]> == <player>:
- narrate "<&c>You cannot add yourself as a moderator!"
- stop
- run apartments_add_moderator def.apartment:<[apartment]> def.moderator:<[target]>
- narrate format:formats_prefix "<&a>Added <&7><[target].name> to your apartment (<&6>moderator<&7>)."
apartments_command_apartmentremoveaccess:
debug: false
type: command
name: apartmentremoveaccess
description: Removes all access for a player from the apartment you are currently in.
usage: /apartmentremoveaccess (player)
aliases:
- aptremoveaccess
- aptrm
permission: apartments.command.apartmentremoveaccess
tab completions:
# TODO: use the procedural tab-complete to handle this correctly!
1: <server.online_players.parse[name]>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- define apartment <proc[apartments_at].context[<player.location>]>
- if <[apartment]> == null:
- narrate "<&c>You can only use this command inside apartments."
- stop
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <player> != <[owner]>:
- narrate "<&c>You do not own this apartment!"
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Invalid use. Please try /<context.alias> (player)"
- stop
- define target <server.match_offline_player[<context.args.get[1]>].if_null[null]>
- if <[target]> == null:
- narrate "<&c>A player with the username <context.args.get[1]> could not be found."
- stop
- if <[target]> == <player>:
- narrate "<&c>You cannot remove your own access!"
- stop
- if <[target].location.in_region[<[apartment].id>]>:
- run apartments_end_edit def.player:<[target]>
- run apartments_remove_access def.apartment:<[apartment]> def.member:<[target]>
- narrate format:formats_prefix "<&c>Removed <&7>member <[target].name> from your apartment."
apartments_command_apartmenteditmode:
debug: false
type: command
name: apartmenteditmode
description: Toggle edit mode for the apartment you are currently in.
usage: /apartmenteditmode
aliases:
- apteditmode
- editmode
permission: apartments.command.apartmenteditmode
tab completions:
1: <server.online_players.parse[name]>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
# toggle off
- if <player.has_flag[apartments_edit]>:
- run apartments_end_edit def.player:<player>
- narrate format:formats_prefix "<&e>Exiting <&6>Edit Mode..."
- stop
# toggle on
- define apartment <proc[apartments_at].context[<player.location>]>
- if <[apartment]> == null:
- narrate "<&c>You can only use this command inside apartments."
- stop
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <player> != <[owner]>:
- define access_level <proc[apartments_access_level].context[<player>|<player.location>]>
- if <[access_level]> != moderator:
- narrate "<&c>You must own this apartment or be an apartment moderator to enable editing here!"
- stop
- run apartments_begin_edit def.apartment:<[apartment]> def.player:<player>
- narrate format:formats_prefix "<&a>Entering <&6>Edit Mode..."

View File

@@ -0,0 +1,111 @@
apartments_at:
debug: false
type: procedure
definitions: location
script:
- determine <[location].regions.filter_tag[<[filter_value].id.starts_with[apt-]>].get[1].if_null[null]>
apartments_owner:
debug: false
type: procedure
definitions: apartment
script:
- determine <[apartment].owners.get[1].if_null[null]>
apartments_access:
debug: false
type: procedure
definitions: player|location
script:
- define apartment <proc[apartments_at].context[<[location]>]>
- if <[apartment]> == null:
- determine true
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <[owner]> == null:
- determine false
- if <[owner]> == <[player]>:
- determine true
- define access <[owner].flag[apartments_access].get[<[apartment]>].get[<[player]>].if_null[null]>
- if <[access]> == null:
- determine false
- determine true
apartments_access_level:
debug: false
type: procedure
definitions: player|location
script:
- define apartment <proc[apartments_at].context[<[location]>]>
- if <[apartment]> == null:
- determine null
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <[owner]> == null:
- determine none
- if <[owner]> == <[player]>:
- determine owner
- define access <[owner].flag[apartments_access].get[<[apartment]>].get[<[player]>].if_null[null]>
- if <[access]> == null:
- determine none
- determine <[access]>
apartments_add_member:
debug: false
type: task
definitions: apartment|member
script:
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <[owner]> == null:
- stop
- define access_all <[owner].flag[apartments_access].get[<[apartment]>].if_null[<map[]>].with[<[member]>].as[member]>
- flag <[owner]> apartments_access:<[owner].flag[apartments_access].if_null[<map[]>].with[<[apartment]>].as[<[access_all]>]>
- execute as_server "as addfriend <[member].name> <[apartment].id>"
apartments_add_moderator:
debug: false
type: task
definitions: apartment|moderator
script:
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <[owner]> == null:
- stop
- execute as_server "rg addmember <[apartment].id> <[moderator].name> -w <[apartment].world.name>"
- define access_all <[owner].flag[apartments_access].get[<[apartment]>].if_null[<map[]>].with[<[moderator]>].as[moderator]>
- flag <[owner]> apartments_access:<[owner].flag[apartments_access].if_null[<map[]>].with[<[apartment]>].as[<[access_all]>]>
- execute as_server "as addfriend <[moderator].name> <[apartment].id>"
apartments_remove_access:
debug: false
type: task
definitions: apartment|member
script:
- define owner <proc[apartments_owner].context[<[apartment]>]>
- if <[owner]> == null:
- stop
- execute as_server "rg removemember <[apartment].id> <[member].name> -w <[apartment].world.name>"
- define access_all <[owner].flag[apartments_access].get[<[apartment]>].if_null[<map[]>].exclude[<[member]>]>
- flag <[owner]> apartments_access:<[owner].flag[apartments_access].if_null[<map[]>].with[<[apartment]>].as[<[access_all]>]>
- execute as_server "as delfriend <[member].name> <[apartment].id>"
apartments_begin_edit:
debug: false
type: task
definitions: apartment|player
script:
- definemap apartments_edit_data:
apartment: <[apartment]>
inventory: <[player].inventory.map_slots>
- flag <[player]> apartments_edit:<[apartments_edit_data]>
- inventory clear player:<[player]>
- adjust <[player]> gamemode:creative
apartments_end_edit:
debug: false
type: task
definitions: player
script:
- define apartments_edit_data <[player].flag[apartments_edit]>
- inventory clear player:<[player]>
- foreach <[apartments_edit_data].get[inventory]> key:slot as:item:
- inventory set origin:<[item]> slot:<[slot]> player:<[player]>
- adjust <[player]> gamemode:survival
- flag <[player]> apartments_edit:!

View File

@@ -0,0 +1,156 @@
apartments_world:
debug: false
type: world
events:
## session safety
on player joins:
- if <player.has_flag[apartments_edit]>:
- run apartments_end_edit def.player:<player>
## extra details
on delta time secondly every:2:
- actionbar "<&6>Editing apartment <&7>[<player.flag[apartments_edit].get[apartment].id>]" targets:<server.players_flagged[apartments_edit]> per_player
## invalid access
on player right clicks block:
- if <player.is_op>:
- stop
- if <context.location.if_null[null]> == null:
- stop
- if !<proc[apartments_access].context[<player>|<context.location>]>:
- determine cancelled
##
## complex creative safety cases
##
# do not allow leaving actual apartment region
on player walks:
- if !<player.has_flag[apartments_edit]>:
- stop
- define apartment <player.flag[apartments_edit].get[apartment]>
- if !<context.new_location.in_region[<[apartment].id>]>:
- determine cancelled
# forbid trying to touch non-blocks in creative inventory
on player clicks item in inventory:
- if !<player.has_flag[apartments_edit]>:
- stop
- if <context.click> != CREATIVE:
- determine cancelled
- if <player.open_inventory.inventory_type.if_null[CRAFTING]> != CRAFTING:
- determine cancelled
- if <context.item.material.is_block> && <context.cursor_item.material.is_block>:
- stop
- determine cancelled passively
- wait 1t
- inventory update destination:<player.inventory>
- adjust <player> item_on_cursor:<item[air]>
# handle container drops & illegal block breaks
on player breaks block bukkit_priority:monitor:
- if <player.is_op>:
- stop
# // careful: == null here; everywhere else it's != null
- if <proc[apartments_at].context[<context.location>]> == null:
- stop
- if <context.location.has_inventory>:
- if <player.gamemode> == creative:
- if <context.location.inventory.map_slots.size> > 0:
- narrate "<&c>This container has items inside. You must clear it first before you can break it."
- determine cancelled
- ratelimit <player> 1t
- define contents <context.location.inventory.map_slots.values>
- if <[contents].is_empty>:
- stop
- define half <context.location.material.half.if_null[null]>
- if <[half]> == right:
- define contents <[contents].get[1].to[27]>
- else if <[half]> == left:
- define contents <[contents].get[28].to[54]>
- foreach <[contents]> as:item:
- drop <[item]> <context.location> delay:10t
# forbid block update and physics inside apartments
on block physics:
- if <context.location.material.half.if_null[null]> != null:
- stop
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled passively
- foreach <context.location.find_entities[dropped_item].within[1]> as:entity:
- remove <[entity]>
# forbid block update and physics for half blocks
on player breaks block:
# // careful: == null here; everywhere else it's != null
- if <proc[apartments_at].context[<context.location>]> == null:
- stop
- define half <context.location.material.half.if_null[null]>
- if <[half]> != null && !<context.location.material.advanced_matches[*trapdoor|*stairs]>:
- if <context.new_material.name.if_null[air]> == air:
- if <[half]> != left && <[half]> != right:
- modifyblock <context.location.add[<context.location.material.relative_vector>]> air no_physics
# forbid blocks that have NBT data - such as prefilled chests
on player places block:
# // careful: == null here; everywhere else it's != null
- if <proc[apartments_at].context[<context.location>]> == null:
- stop
- if <player.is_op>:
- stop
- if <context.item_in_hand.material.advanced_matches[*banner]>:
- stop
- if <context.item_in_hand.all_raw_nbt.exclude[display].exclude[SkullOwner].filter_tag[<[filter_value].size.is_more_than[0]>].size.if_null[0]> > 0:
- determine cancelled
##
## simple creative safety cases
##
# forbid picking up and dropping items
on player drops item:
- if <player.is_op>:
- stop
- if <player.has_flag[apartments_edit]>:
- determine cancelled
on player picks up item:
- if <player.is_op>:
- stop
- if <player.has_flag[apartments_edit]>:
- determine cancelled
# forbid water flow in apartment regions
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled
# forbid sapling/other growing things in apartment regions
on structure grows:
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled
on plant grows:
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled
# forbid any items dropping even if broken in apartment regions
on block drops item from breaking:
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled
# forbid any tnt in apartment regions
on tnt primes:
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled
# forbid gravity on blocks inside apartments
on block falls:
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled
# forbid shulker box usage inside apartments
on player places *shulker_box:
- if <proc[apartments_at].context[<context.location>]> != null:
- if !<player.is_op>:
- determine cancelled
# forbid mob spawner usage inside apartments
on player places *spawner:
- if <player.is_op>:
- stop
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled
# prevent lectern grab
on player takes item from lectern:
- if <player.is_op>:
- stop
- if !<proc[apartments_access].context[<player>|<context.location>]>:
- determine cancelled
# prevent redstone in apartments
after redstone recalculated:
- if <proc[apartments_at].context[<context.location>]> != null:
- adjustblock <context.location> power:0 no_physics
# prevent piston use in apartments
on piston extends:
- if <proc[apartments_at].context[<context.location>]> != null:
- determine cancelled

View File

@@ -0,0 +1,12 @@
automoney_world:
debug: false
type: world
events:
on delta time minutely every:1:
- foreach <server.online_players> as:player:
- define last_payment <[player].flag[automoney_last].if_null[<time[2000/01/01_12:00:00:00]>]>
- define time_passed <util.time_now.duration_since[<[last_payment]>]>
- if <[time_passed].is_more_than[<duration[30m]>]>:
- flag <[player]> automoney_last:<util.time_now>
- money give players:<[player]> quantity:500
- narrate format:formats_prefix targets:<[player]> "Thanks for being online! You have received ¥500."

View File

@@ -0,0 +1,66 @@
carry_command_carry:
debug: false
type: command
name: carry
description: Carry another player on your shoulders!
usage: /carry [who?]
permission: carry.command.carry
tab completions:
1: <player.location.find_players_within[5].exclude[<player>].parse[name]>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if !<player.is_empty>:
- narrate "<&c>You're already carrying someone!"
- stop
- define target <player.target[player].within[5].if_null[null]>
- if <[target]> == null:
- define target <server.match_player[<context.args.get[1]>].if_null[null]>
- if <[target]> == null:
- narrate "<&c>Please look at the player to carry or specify their username."
- stop
- else:
- if <[target].location.distance[<player>]> > 5:
- narrate "<&c>That player is too far away!"
- stop
- if <[target].is_npc>:
- narrate "<&c>Please look at the player to carry or specify their username."
- stop
- if <[target]> == <player>:
- narrate "<&c>You cannot carry yourself!"
- stop
- if <[target].is_inside_vehicle>:
- narrate "<&c>This player is already being carried!"
- stop
- define player <player>
- clickable usages:1 until:10s save:carry:
- if !<player.is_empty>:
- narrate "<&c>That player is already carrying someone!"
- stop
- if <[target].is_inside_vehicle>:
- narrate targets:<[target]> "<&c>You're already being carried!"
- stop
- adjust <[player]> passengers:<[player].passengers.include[<[target]>]>
- narrate format:formats_prefix "Sent a carry request to <&e><proc[character_get_name].context[<[target]>]>"
#
- narrate format:formats_prefix targets:<[target]> "<&e><proc[character_get_name].context[<player>]> <&7> would like to carry you."
- narrate targets:<[target]> "<element[<&a><&l>[ACCEPT]].on_click[<entry[carry].command>]>"
carry_command_uncarry:
debug: false
type: command
name: uncarry
description: Stop carrying someone.
usage: /uncarry
permission: carry.command.uncarry
tab completions:
1: <empty>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <player.is_empty>:
- narrate "<&c>You're not carrying anyone!"
- stop
- adjust <player> passengers:<list[]>

View File

@@ -0,0 +1,102 @@
character_command_rpname:
debug: false
type: command
name: rpname
description: Sets your roleplay name.
usage: /rpname (name)
permission: character.command.rpname
tab completions:
1: <&lt>name<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a RP name!"
- stop
- define name <context.args.space_separated.parse_color.strip_color>
- if <[name].length> > 24:
- narrate "<&c>Your RP name must not be longer than 24 characters."
- stop
- if !<[name].regex_matches[^[a-zA-Z0-9\-. <&sq>]+$]>:
- narrate "<&c>Your RP name must only contain alphanumeric characters, spaces, dots, dashes, and single quotes."
- stop
- define used_already <server.flag[character_rpnames].get[<[name]>].if_null[null]>
- if <[used_already]> != null:
- if <[used_already]> != <player.uuid>:
- narrate "<&c>This RP name is already taken!"
- stop
- define new_rpnames <server.flag[character_rpnames].if_null[<map[]>]>
- if <player.has_flag[character_rpname]>:
- define new_rpnames <[new_rpnames].exclude[<player.flag[character_rpname]>]>
- define new_rpnames <[new_rpnames].with[<[name]>].as[<player.uuid>]>
- flag <player> character_rpname:<[name]>
- flag server character_rpnames:<[new_rpnames]>
- narrate format:formats_prefix "Set your RP Name to <&e><[name]><&7>."
character_command_setdescription:
debug: false
type: command
name: setdescription
aliases:
- setdesc
description: Sets your roleplay description.
usage: /setdescription (description)
permission: character.command.setdescription
tab completions:
1: <&lt>description<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a description!"
- stop
- define description <context.args.space_separated.parse_color.strip_color>
- flag <player> character_description:<[description]>
- narrate format:formats_prefix "Changed your description! View it with /viewdescription."
character_command_viewdescription:
debug: false
type: command
name: viewdescription
aliases:
- viewdesc
description: Sets your roleplay description.
usage: /viewdescription
permission: character.command.viewdescription
tab completions:
1: <empty>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- define name <proc[character_get_name].context[<player>]>
- define description <proc[character_get_description].context[<player>]>
- narrate format:formats_prefix "<&e><player.name> <&7>Character Info"
- narrate "<&7>Your name<&c>: <&f><[name]>"
- narrate "<&7>Your description<&c>: <&f><[description]>"
character_command_findname:
debug: false
type: command
name: findname
aliases:
- fn
description: Find name of player based on RP name.
usage: /findname (rpname)
permission: character.command.findname
tab completions:
1: <&lt>rpname<&gt>
script:
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a RP name!"
- stop
- define query <context.args.space_separated.parse_color.strip_color>
- define found_player <server.flag[character_rpnames].if_null[<map[]>].get[<[query]>].if_null[null]>
- if <[found_player]> == null:
- narrate format:formats_prefix "No player with this RP name could be found."
- stop
- else:
- define found_player <player[<[found_player]>]>
- narrate format:formats_prefix "The actual name of <[query]> is <&e><[found_player].name>"

View File

@@ -0,0 +1,13 @@
character_get_name:
debug: false
type: procedure
definitions: player
script:
- determine <[player].flag[character_rpname].if_null[<[player].name>]>
character_get_description:
debug: false
type: procedure
definitions: player
script:
- determine <[player].flag[character_description].if_null[No<&sp>description<&sp>set.]>

View File

@@ -0,0 +1,15 @@
character_world:
debug: false
type: world
events:
on player right clicks player:
- define target <context.entity>
- if <[target].is_npc>:
- stop
- determine cancelled passively
- ratelimit <player> 1s
- define name <proc[character_get_name].context[<[target]>]>
- define description <proc[character_get_description].context[<[target]>]>
- narrate format:formats_prefix "<&e><[target].name> <&7>Character Info"
- narrate "<&7>Name<&c>: <&f><[name]>"
- narrate "<&7>Description<&c>: <&f><[description]>"

View File

@@ -0,0 +1,418 @@
chat_command_ooc:
debug: false
type: command
name: ooc
usage: /ooc (message)
description: Sends a message in global OOC.
permission: chat.command.chat.ooc
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- if !<player.has_flag[chat_disableooc]>:
- if <player.flag[chat_channel].if_null[ic]> == ooc:
- narrate "<&c>You are currently switched to OOC chat, so you cannot disable it."
- stop
- flag <player> chat_disableooc:true
- narrate format:formats_prefix "Disabled OOC chat."
- else:
- flag <player> chat_disableooc:!
- narrate format:formats_prefix "Enabled OOC chat."
- stop
- else if <player.has_flag[chat_disableooc]>:
- narrate "<&c>You cannot use OOC chat while it is disabled. Please enable it first."
- stop
- run chat_channel_ooc def.player:<player> def.message:<context.raw_args.escaped.replace[&].with[&\]>
chat_command_looc:
debug: false
type: command
name: looc
usage: /looc (message)
description: Sends a message in local LOOC.
permission: chat.command.chat.looc
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_looc def.player:<player> def.message:<context.raw_args.escaped.replace[&].with[&\]>
chat_command_me:
debug: false
type: command
name: me
usage: /me (message)
description: Sends a message in IC, 1st person action.
permission: chat.command.chat.me
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_me def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_meclose:
debug: false
type: command
name: meclose
usage: /meclose (message)
aliases:
- mec
description: Sends a message in IC, 1st person action, close range.
permission: chat.command.chat.mec
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_mec def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_melong:
debug: false
type: command
name: melong
usage: /melong (message)
aliases:
- mel
description: Sends a message in IC, 1st person action, long range.
permission: chat.command.chat.mel
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_mel def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_whisper:
debug: false
type: command
name: whisper
usage: /whisper (message)
aliases:
- w
description: Sends a message in IC, whispering.
permission: chat.command.chat.whisper
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_whisper def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_yell:
debug: false
type: command
name: yell
usage: /yell (message)
aliases:
- y
description: Sends a message in IC, yelling.
permission: chat.command.chat.yell
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_yell def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_my:
debug: false
type: command
name: my
usage: /my (message)
description: Sends a message in IC, 1st person possessive.
permission: chat.command.chat.my
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_my def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_it:
debug: false
type: command
name: it
usage: /it (message)
description: Sends a message in IC, 3rd person action.
permission: chat.command.chat.it
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_it def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_itclose:
debug: false
type: command
name: itclose
usage: /itclose (message)
aliases:
- itc
description: Sends a message in IC, 3rd person action, close range.
permission: chat.command.chat.itc
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_itc def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_itl:
debug: false
type: command
name: itlong
usage: /itlong (message)
aliases:
- itl
description: Sends a message in IC, 3rd person action, long range.
permission: chat.command.chat.itl
tab completions:
1: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Please enter a message!"
- stop
- run chat_channel_ic_itl def.player:<player> def.message:<context.raw_args.parse_color.escaped.replace[&].with[&\]>
chat_command_languageadd:
debug: false
type: command
name: languageadd
usage: /languageadd (player) (language)
aliases:
- langadd
description: Allows a user to speak a new language.
permission: chat.command.admin.languageadd
tab completions:
1: <server.online_players.parse[name]>
2: <script[chat_data_languages].data_key[known]>
script:
- if <context.args.size> < 2:
- narrate "<&c>Invalid use. Please try /<context.alias> (player) (language)."
- stop
- define player <server.match_offline_player[<context.args.get[1]>].if_null[null]>
- if <[player]> == null:
- narrate "<&c>A player with name <context.args.get[1]> was not found."
- stop
- define language <context.args.get[2].to_sentence_case>
- define known <script[chat_data_languages].data_key[known]>
- if !<[known].contains[<[language]>]>:
- narrate "<&c>Language <[language]> is not a known language."
- stop
- flag <[player]> chat_languages:<[player].flag[chat_languages].if_null[<list[]>].include[<[language]>].deduplicate>
- narrate format:formats_prefix "Player <&e><[player].name> <&7>may now speak in <[language]>."
chat_command_languageremove:
debug: false
type: command
name: languageremove
usage: /languageremove (player) (language)
aliases:
- langremove
- langrem
description: Removes a language that a player knows.
permission: chat.command.admin.languageremove
tab completions:
1: <server.online_players.parse[name]>
2: <script[chat_data_languages].data_key[known]>
script:
- if <context.args.size> < 2:
- narrate "<&c>Invalid use. Please try /<context.alias> (player) (language)."
- stop
- define player <server.match_offline_player[<context.args.get[1]>].if_null[null]>
- if <[player]> == null:
- narrate "<&c>A player with name <context.args.get[1]> was not found."
- stop
- define language <context.args.get[2].to_sentence_case>
- define known <script[chat_data_languages].data_key[known]>
- if !<[known].contains[<[language]>]>:
- narrate "<&c>Language <[language]> is not a known language."
- stop
- flag <[player]> chat_languages:<[player].flag[chat_languages].if_null[<list[]>].exclude[<[language]>]>
- narrate format:formats_prefix "Player <&e><[player].name> <&7>cannot speak <[language]> any longer."
chat_command_language:
debug: false
type: command
name: language
usage: /language (language) (message)
aliases:
- lang
description: Sends a message in IC, in a language.
permission: chat.command.chat.language
tab completions:
1: <player.flag[chat_languages].if_null[<list[]>]>
2: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 1:
- narrate "<&c>Invalid use. Please use /<context.alias> (language) (message)."
- stop
- define language <context.args.get[1].to_sentence_case>
- if !<player.flag[chat_languages].contains[<[language]>].if_null[false]>:
- narrate "<&c>Your character cannot speak in <[language]>."
- stop
- run chat_channel_ic_language def.player:<player> def.message:<context.raw_args.split.get[2].to[last].space_separated.parse_color.escaped.replace[&].with[&\]> def.language:<[language]>
chat_command_languagewhisper:
debug: false
type: command
name: languagewhisper
usage: /languagewhisper (language) (message)
aliases:
- langwhisper
- langw
description: Sends a message in IC, in a language, whispering.
permission: chat.command.chat.languagewhisper
tab completions:
1: <player.flag[chat_languages].if_null[<list[]>]>
2: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 1:
- narrate "<&c>Invalid use. Please use /<context.alias> (language) (message)."
- stop
- define language <context.args.get[1].to_sentence_case>
- if !<player.flag[chat_languages].contains[<[language]>].if_null[false]>:
- narrate "<&c>Your character cannot speak in <[language]>."
- stop
- run chat_channel_ic_languagewhisper def.player:<player> def.message:<context.raw_args.split.get[2].to[last].space_separated.parse_color.escaped.replace[&].with[&\]> def.language:<[language]>
chat_command_languageyell:
debug: false
type: command
name: languageyell
usage: /languageyell (language) (message)
aliases:
- langyell
- langy
description: Sends a message in IC, in a language, yelling.
permission: chat.command.chat.languageyell
tab completions:
1: <player.flag[chat_languages].if_null[<list[]>]>
2: <&lt>message<&gt>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 1:
- narrate "<&c>Invalid use. Please use /<context.alias> (language) (message)."
- stop
- define language <context.args.get[1].to_sentence_case>
- if !<player.flag[chat_languages].contains[<[language]>].if_null[false]>:
- narrate "<&c>Your character cannot speak in <[language]>."
- stop
- run chat_channel_ic_languageyell def.player:<player> def.message:<context.raw_args.split.get[2].to[last].space_separated.parse_color.escaped.replace[&].with[&\]> def.language:<[language]>
##
## Channel switch
##
chat_command_channelswitch:
debug: false
type: command
name: channelswitch
usage: /channelswitch (channel)
aliases:
- chsw
description: Changes your main channel.
permission: chat.command.channelswitch
tab completions:
1: <list[ic|ooc]>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Invalid use. Please use /<context.alias> (channel)."
- stop
- define channel <context.args.get[1].to_lowercase>
- choose <[channel]>:
- case ic:
- flag <player> chat_channel:ic
- narrate format:formats_prefix "Changed channel to IC."
- stop
- case ooc:
- if <player.has_flag[chat_disableooc]>:
- narrate "<&c>You currently have OOC disabled. Use /ooc first to enable it."
- stop
- flag <player> chat_channel:ooc
- narrate format:formats_prefix "Changed channel to OOC."
- stop
- narrate "<&c>Unknown channel <[channel]>. Please try: ic, ooc."
##
## Chat Color
##
chat_command_chatcolor:
debug: false
type: command
name: chatcolor
usage: /chatcolor (color)
description: Changes the chat color for your actions.
permission: chat.command.chatcolor
tab completions:
1: <proc[chat_allowed_colors]>
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- if <context.args.size> <= 0:
- narrate "<&c>Invalid use. Please use /<context.alias> (color)."
- stop
- define color <context.args.get[1].to_lowercase>
- if !<proc[chat_allowed_colors].contains[<[color]>]>:
- narrate "<&c>You must choose a color from this list: <proc[chat_allowed_colors].comma_separated>"
- stop
- flag <player> chat_color:<element[&<color[<[color]>].hex>].parse_color>
- narrate format:formats_prefix "Changed chat color to <element[&<color[<[color]>].hex>].parse_color><[color]>."

142
scripts/chat/chat_data.dsc Normal file
View File

@@ -0,0 +1,142 @@
chat_data_languages:
debug: false
type: data
# all languages allowed by Google Translate
known:
- Afrikaans
- Akan
- Albanian
- Amharic
- Arabic
- Armenian
- Assamese
- Aymara
- Azerbaijani
- Bambara
- Basque
- Belarusian
- Bengali
- Bhojpuri
- Bosnian
- Bulgarian
- Burmese
- Catalan
- Cebuano
- Chewa
- Chinese
- Corsican
- Croatian
- Czech
- Danish
- Dhivehi
- Dogri
- Dutch
#- English
- Esperanto
- Estonian
- Ewe
- Filipino
- Finnish
- French
- Galician
- Georgian
- German
- Goan Konkani
- Greek
- Guarani
- Gujarati
- Haitian Creole
- Hausa
- Hawaiian
- Hebrew
- Hindi
- Hmong
- Hungarian
- Icelandic
- Igbo
- Ilocano
- Indonesian
- Irish
- Italian
#- Japanese
- Javanese
- Kannada
- Kazakh
- Khmer
- Kinyarwanda
- Konkani
- Korean
- Krio
- Kurdish
- Kyrgyz
- Lao
- Latin
- Latvian
- Lingala
- Lithuanian
- Luganda
- Luxembourgish
- Macedonian
- Maithili
- Malagasy
- Malay
- Malayalam
- Maldivian
- Maltese
- Māori
- Marathi
- Meitei
- Mizo
- Mongolian
- Nepali
- Northern Sotho
- Norwegian
- Nyanja
- Odia
- Oromo
- Pashto
- Persian
- Polish
- Portuguese
- Punjabi
- Quechua
- Romanian
- Russian
- Samoan
- Sanskrit
- Scottish Gaelic
- Serbian
- Shona
- Sindhi
- Sinhala
- Slovak
- Slovene
- Somali
- Sotho
- Southern Quechua
- Spanish
- Sundanese
- Swahili
- Swedish
- Tagalog
- Tajik
- Tamil
- Tatar
- Telugu
- Thai
- Tigrinya
- Tsonga
- Turkish
- Turkmen
- Twi
- Ukrainian
- Urdu
- Uyghur
- Uzbek
- Vietnamese
- Welsh
- West Frisian
- Xhosa
- Yiddish
- Yoruba
- Zulu

266
scripts/chat/chat_tasks.dsc Normal file
View File

@@ -0,0 +1,266 @@
chat_name_ooc:
debug: false
type: procedure
definitions: player
script:
- determine <placeholder[luckperms_prefix_element_highest_on_track_color].player[<[player]>].if_null[<&7>].parse_color><[player].name>
chat_special_group:
debug: false
type: procedure
definitions: player
script:
- define result <placeholder[luckperms_prefix_element_highest_on_track_special].player[<[player]>].if_null[<&f>].parse_color>
- if <[result].strip_color.length> > 0:
- define result <[result]><&sp>
- determine <[result]>
chat_roles_group:
debug: false
type: procedure
definitions: player
script:
- determine <placeholder[luckperms_prefix_element_highest_on_track_roles].player[<[player]>].if_null[<&f>].parse_color><&f>
chat_channel_ooc:
debug: false
type: task
definitions: player|message
script:
- define message <[message].strip_color.replace[&\].with[&].unescaped>
- define final "<&8>[<&7><&l>OOC<&8>] <proc[chat_special_group].context[<[player]>]><proc[chat_name_ooc].context[<[player]>]><&7>: <&l><[message]>"
- narrate targets:<server.online_players.filter_tag[<[filter_value].has_flag[chat_disableooc].not>]> <[final]>
- announce to_console <[final]>
chat_channel_looc:
debug: false
type: task
definitions: player|message
script:
- define message <[message].strip_color.replace[&\].with[&].unescaped>
- define final "<&8>[<&7>LOOC<&8>] <proc[chat_special_group].context[<[player]>]><&7><proc[character_get_name].context[<[player]>]> <proc[chat_name_ooc].context[<[player]>]><&7>: <[message]>"
- narrate targets:<[player].location.find_players_within[10]> <[final]>
- announce to_console <[final]>
chat_allowed_colors:
debug: false
type: procedure
script:
- determine <util.color_names.exclude[black].exclude[transparent].exclude[white]>
chat_tokenize_actions:
debug: false
type: procedure
definitions: message|initializer|actioncolor|speechcolor|separator|forcecaps
script:
- define result <empty>
- define index 1
- if <[message].starts_with[*]>:
- define index 2
- else:
- define result <[actioncolor]><[initializer]>
- foreach <[message].split[*]> as:token:
- if <[token].trim.parse_color.strip_color.length> <= 0:
- foreach next
- if <[index].is_odd>:
- if <[forcecaps]>:
- define token <[token].replace[&\].with[&].unescaped.to_uppercase>
- define result "<[result]> <[separator]><[speechcolor]><[token].trim><[separator]>"
- else:
- define result "<[result]> <[actioncolor]><[token].trim>"
- define index <[index].add[1]>
- determine <[result].trim>
chat_channel_ic:
debug: false
type: task
definitions: player|message
script:
- if <[message].starts_with[*]> && <[message].split[*].size> == 2:
- if <[message].ends_with[*]>:
- run chat_channel_ic_me def.player:<[player]> def.message:<[message].substring[2,<[message].length.sub[1]>]>
- else:
- run chat_channel_ic_me def.player:<[player]> def.message:<[message].substring[2,<[message].length>]>
- stop
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define tokenized <proc[chat_tokenize_actions].context[<[message]>|<player.flag[chat_color].if_null[<&e>]>says<&7>:|<player.flag[chat_color].if_null[<&e>]>|<&f>|<&f><&dq><&f>|false].replace[&\].with[&].unescaped>
- define final "<&color[#b8b9ba]><placeholder[essentials_nickname].player[<[player]>]> <&f><proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <[tokenized]>"
- narrate targets:<[player].location.find_players_within[10]> <[final]>
- announce to_console <[final]>
chat_channel_ic_me:
debug: false
type: task
definitions: player|message
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final "<&e>*** <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <player.flag[chat_color].if_null[<&e>]><&o><[message]>"
- narrate targets:<[player].location.find_players_within[10]> <[final]>
- announce to_console <[final]>
chat_channel_ic_mec:
debug: false
type: task
definitions: player|message
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final "<&e>* <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <player.flag[chat_color].if_null[<&e>]><&o><[message]>"
- narrate targets:<[player].location.find_players_within[3]> <[final]>
- announce to_console <[final]>
chat_channel_ic_mel:
debug: false
type: task
definitions: player|message
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final "<&e>**** <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <player.flag[chat_color].if_null[<&e>]><&o><[message]>"
- narrate targets:<[player].location.find_players_within[25]> <[final]>
- announce to_console <[final]>
chat_channel_ic_whisper:
debug: false
type: task
definitions: player|message
script:
- if <[message].starts_with[*]> && <[message].split[*].size> == 2:
- if <[message].ends_with[*]>:
- run chat_channel_ic_mec def.player:<[player]> def.message:<[message].substring[2,<[message].length.sub[1]>]>
- else:
- run chat_channel_ic_mec def.player:<[player]> def.message:<[message].substring[2,<[message].length>]>
- stop
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define tokenized <proc[chat_tokenize_actions].context[<[message]>|whispers|<&8>|<&7>|<&6><&sq>|false].replace[&\].with[&].unescaped>
- define final "<&color[#d1d1d1]><placeholder[essentials_nickname].player[<[player]>]> <&f><proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <[tokenized]>"
- narrate targets:<[player].location.find_players_within[3]> <[final]>
- announce to_console <[final]>
chat_channel_ic_yell:
debug: false
type: task
definitions: player|message
script:
- if <[message].starts_with[*]> && <[message].split[*].size> == 2:
- if <[message].ends_with[*]>:
- run chat_channel_ic_mel def.player:<[player]> def.message:<[message].substring[2,<[message].length.sub[1]>]>
- else:
- run chat_channel_ic_mel def.player:<[player]> def.message:<[message].substring[2,<[message].length>]>
- stop
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define tokenized <proc[chat_tokenize_actions].context[<[message]>|yells|<&6>|<&f>|<&6><&sq>|true].replace[&\].with[&].unescaped>
- define final "<&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <[tokenized]>"
- narrate targets:<[player].location.find_players_within[25]> <[final]>
- announce to_console <[final]>
chat_channel_ic_my:
debug: false
type: task
definitions: player|message
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define possession_name <proc[character_get_name].context[<[player]>]>
- if <[possession_name].to_lowercase.ends_with[s]>:
- define possession_name <[possession_name]><&sq>
- else:
- define possession_name <[possession_name]><&sq>s
- define final "<&e>*** <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <[possession_name]> <&f><[message]>"
- narrate targets:<[player].location.find_players_within[10]> <[final]>
- announce to_console <[final]>
chat_channel_ic_it:
debug: false
type: task
definitions: player|message
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final "<&6>*** <&e><[message]> <&7>(<proc[character_get_name].context[<[player]>]>)"
- narrate targets:<[player].location.find_players_within[10]> <[final]>
- announce to_console <[final]>
chat_channel_ic_itc:
debug: false
type: task
definitions: player|message
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final "<&6>* <&e><[message]> <&7>(<proc[character_get_name].context[<[player]>]>)"
- narrate targets:<[player].location.find_players_within[3]> <[final]>
- announce to_console <[final]>
chat_channel_ic_itl:
debug: false
type: task
definitions: player|message
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final "<&6>**** <&e><[message]> <&7>(<proc[character_get_name].context[<[player]>]>)"
- narrate targets:<[player].location.find_players_within[25]> <[final]>
- announce to_console <[final]>
chat_channel_ic_language:
debug: false
type: task
definitions: player|message|language
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final_known "<&6>[<&7>L<&6>] <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <player.flag[chat_color].if_null[<&f>]>says <&f><&dq><&o><[message]><&f><&dq> in <[language]>"
- define final_unknown "<&6>[<&7>L<&6>] <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <player.flag[chat_color].if_null[<&f>]>says something in <[language]>"
- define all <[player].location.find_players_within[10]>
- define speakers <[all].filter_tag[<[filter_value].flag[chat_languages].contains[<[language]>].if_null[false]>]>
- define others <[all].exclude[<[speakers]>]>
- narrate targets:<[speakers]> <[final_known]>
- narrate targets:<[others]> <[final_unknown]>
- announce to_console <[final_known]>
chat_channel_ic_languagewhisper:
debug: false
type: task
definitions: player|message|language
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final_known "<&6>[<&7>L<&6>] <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <&f>whispers <&dq><&o><[message]><&f><&dq> in <[language]>"
- define final_unknown "<&6>[<&7>L<&6>] <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <&f>whispers something in <[language]>"
- define all <[player].location.find_players_within[3]>
- define speakers <[all].filter_tag[<[filter_value].flag[chat_languages].contains[<[language]>].if_null[false]>]>
- define others <[all].exclude[<[speakers]>]>
- narrate targets:<[speakers]> <[final_known]>
- narrate targets:<[others]> <[final_unknown]>
- announce to_console <[final_known]>
chat_channel_ic_languageyell:
debug: false
type: task
definitions: player|message|language
script:
- define message <[message].replace[&\].with[&].unescaped>
- if !<[player].has_permission[chat.colors]>:
- define message <[message].strip_color>
- define final_known "<&6>[<&7>L<&6>] <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <&f>yells <&dq><&o><[message].to_uppercase><&f><&dq> in <[language]>"
- define final_unknown "<&6>[<&7>L<&6>] <&f><placeholder[essentials_nickname].player[<[player]>]> <proc[chat_special_group].context[<[player]>]><proc[chat_roles_group].context[<[player]>]> <proc[character_get_name].context[<[player]>]> <&f>yells something in <[language]>"
- define all <[player].location.find_players_within[25]>
- define speakers <[all].filter_tag[<[filter_value].flag[chat_languages].contains[<[language]>].if_null[false]>]>
- define others <[all].exclude[<[speakers]>]>
- narrate targets:<[speakers]> <[final_known]>
- narrate targets:<[others]> <[final_unknown]>
- announce to_console <[final_known]>

View File

@@ -0,0 +1,11 @@
chat_world:
debug: false
type: world
events:
on player chats:
- determine cancelled passively
- define channel <player.flag[chat_channel].if_null[ic]>
- if <[channel]> == ic:
- run chat_channel_ic def.player:<player> def.message:<context.message.parse_color.escaped.replace[&].with[&\]>
- else if <[channel]> == ooc:
- run chat_channel_ooc def.player:<player> def.message:<context.message.escaped.replace[&].with[&\]>

View File

@@ -0,0 +1,14 @@
furniture_command_furniture:
debug: false
type: command
name: furniture
usage: /furniture
description: Opens the furniture menu.
permission: furniture.command.furniture
tab completions:
1: <list[]>
script:
- if <context.source_type> != player:
- narrate "<&c>You can only use this command as a player."
- stop
- run furniture_menu def.player:<player>

View File

@@ -0,0 +1,47 @@
furniture_config:
debug: false
type: data
# Furniture using note block states
noteblock:
# note_block, custom_model_data = 1 when held
1:
represents: Locker (East)
is: piano,1,false
2:
represents: Locker (South)
is: piano,2,false
3:
represents: Locker (West)
is: piano,3,false
4:
represents: Locker (North)
is: piano,4,false
# Furniture using custom_block.dsc library
custom_block:
# iron_horse_armor, custom_model_data = 1 when held
iron_horse_armor,1:
represents: School Chair
collision: skeleton_skull
iron_horse_armor,2:
represents: TV
collision: barrier
iron_horse_armor,3:
represents: Book (open)
collision: warped_trapdoor
iron_horse_armor,4:
represents: Book
collision: warped_trapdoor
iron_horse_armor,5:
represents: Book Stack
collision: skeleton_skull
iron_horse_armor,6:
represents: Desk Lamp
collision: red_sandstone_wall
iron_horse_armor,7:
represents: Clipboard
collision: warped_trapdoor
# List of collision blocks - disables interaction without perms
collision_blocks:
#- skeleton_skull
#- red_sandstone_Wall
- warped_trapdoor

View File

@@ -0,0 +1,92 @@
furniture_cmd_to_noteblock:
debug: false
type: procedure
definitions: cmd
script:
- define data <script[furniture_config].data_key[noteblock]>
- if !<[data].contains[<[cmd]>]>:
- determine null
- define noteblock_data <[data].get[<[cmd]>].get[is].split[,]>
- define instrument <[noteblock_data].get[1]>
- define note <[noteblock_data].get[2]>
- define switched <[noteblock_data].get[3]>
- determine <material[note_block[instrument=<[instrument]>;note=<[note]>;switched=<[switched]>]]>
furniture_custom_block_any:
debug: false
type: procedure
definitions: material|cmd
script:
- define data <script[furniture_config].data_key[custom_block]>
- determine <[data].contains[<[material].name>,<[cmd]>]>
furniture_cmd_to_custom_block_collision:
debug: false
type: procedure
definitions: material|cmd
script:
- define data <script[furniture_config].data_key[custom_block]>
- if !<[data].contains[<[material].name>,<[cmd]>]>:
- determine null
- determine <[data].get[<[material].name>,<[cmd]>].get[collision]>
furniture_all_items_sorted:
debug: false
type: procedure
script:
- define items <list[]>
- foreach <script[furniture_config].data_key[noteblock]> key:noteblock_cmd as:noteblock_data:
- define noteblock <item[note_block[display=<&f><[noteblock_data].get[represents]>;custom_model_data=<[noteblock_cmd]>]]>
- define items <[items].include[<[noteblock]>]>
- foreach <script[furniture_config].data_key[custom_block]> key:custom_block_item_details as:custom_block_data:
- define custom_block_type_cmd_split <[custom_block_item_details].split[,]>
- define custom_item <item[<[custom_block_type_cmd_split].get[1]>[display=<&f><[custom_block_data].get[represents]>;custom_model_data=<[custom_block_type_cmd_split].get[2]>;hides=all]]>
- define items <[items].include[<[custom_item]>]>
- define items <[items].sort_by_value[display]>
- determine <[items]>
furniture_menu:
debug: false
type: task
definitions: player|page
script:
- define page <[page].if_null[0]>
- define items <proc[furniture_all_items_sorted].get[<[page].mul[45].add[1]>].to[<[page].add[1].mul[45]>]>
- define contents <map[]>
- foreach <[items]> as:item:
- definemap item_entry:
item: <[item]>
script: furniture_menu_give
definitions:
player: <[player]>
item: <[item]>
- define contents <[contents].with[<[loop_index]>].as[<[item_entry]>]>
- if <[page]> > 0:
- define contents_extra:
49:
item: <item[ender_pearl[display=<&a><&lt><&lt>]]>
script: furniture_menu
definitions:
player: <[player]>
page: <[page].sub[1]>
- define contents <[contents].include[<[contents_extra]>]>
- if <[page].add[1].mul[27]> < <[contents].size>:
- define contents_extra:
51:
item: <item[ender_eye[display=<&a><&gt><&gt>]]>
script: furniture_menu
definitions:
player: <[player]>
page: <[page].add[1]>
- define contents <[contents].include[<[contents_extra]>]>
- run menu_open def.player:<[player]> "def.title:<&b> 邑邑<&f>邑邑邑邑鄊" def.size:54 def.contents:<[contents]>
furniture_menu_give:
debug: false
type: task
definitions: player|item
script:
- if !<[player].inventory.can_fit[<[item]>]>:
- narrate targets:<[player]> "<&c>You do not have enough space in your inventory!"
- stop
- give player:<[player]> <[item]> quantity:1

View File

@@ -0,0 +1,105 @@
# NOTE BLOCK HANDLERS
furniture_world_noteblock:
debug: false
type: world
events:
on player places note_block:
- if <player.item_in_hand.custom_model_data.if_null[0]> > 0:
- define noteblock <proc[furniture_cmd_to_noteblock].context[<context.item_in_hand.custom_model_data.if_null[null]>]>
- if <[noteblock]> != null:
- modifyblock <context.location> <[noteblock]> no_physics
- stop
- adjustblock <context.location> note:0
- adjustblock <context.location> instrument:piano
- adjustblock <context.location> switched:false
on player right clicks note_block:
- if !<player.is_sneaking>:
- determine cancelled
on player breaks block:
- if <context.location.below.material.advanced_matches[note_block]>:
- run furniture_world_note_block_undo_update def.at:<context.location.below>
- if <context.location.above.material.advanced_matches[note_block]>:
- run furniture_world_note_block_undo_update def.at:<context.location.above>
on player places block:
- if <context.location.below.material.advanced_matches[note_block]>:
- run furniture_world_note_block_undo_update def.at:<context.location.below>
- if <context.location.above.material.advanced_matches[note_block]>:
- run furniture_world_note_block_undo_update def.at:<context.location.above>
furniture_world_note_block_undo_update:
debug: false
type: task
definitions: at
script:
- define old_material <[at].material>
- modifyblock <[at]> <[old_material]> no_physics delayed
# CUSTOM BLOCK HANDLERS
furniture_world_custom_block:
debug: false
type: world
events:
on player right clicks block:
- if !<player.has_permission[furniture.customblock.place]> && !<player.is_op>:
- stop
- if <context.item.material.advanced_matches[air]>:
- stop
- if !<proc[furniture_custom_block_any].context[<context.item.material>|<context.item.custom_model_data.if_null[0]>]>:
- stop
- ratelimit <player> 5t
- determine cancelled passively
#
- define cursor_solid <player.cursor_on_solid[5].if_null[null]>
- if <[cursor_solid]> == null:
- stop
- define block_face_normal <player.eye_location.ray_trace[range=10;return=normal;ignore=<player>;fluids=false;nonsolids=false]>
- define target_block <[cursor_solid].add[<[block_face_normal]>]>
- if <[target_block].material.is_solid>:
- stop
#
- define material <context.item.material.name>[custom_model_data=<context.item.custom_model_data>]
#
- define pitch <tern[<player.eye_location.pitch.is_more_than_or_equal_to[0]>].pass[0].fail[180]>
- define yaw <player.eye_location.yaw.div_int[45].add[1].div_int[2]>
- if <[yaw]> == 1:
- define yaw 90
- if <[yaw]> == 2:
- define yaw 180
- if <[yaw]> == 3:
- define yaw -90
- if <[yaw]> == 4:
- define yaw 0
#
- define collision_block <proc[furniture_cmd_to_custom_block_collision].context[<context.item.material>|<context.item.custom_model_data>]>
- modifyblock <[target_block]> <[collision_block]> no_physics
#
- run custom_block_create def.at:<[target_block]> def.material:<[material]> def.pitch:<[pitch]> def.yaw:<[yaw]>
- animate <player> animation:ARM_SWING
- playsound sound:BLOCK_STONE_PLACE <player> sound_category:blocks pitch:0.7
on player breaks block:
- if <proc[custom_block_at].context[<context.location>]> == null:
- stop
- if !<player.has_permission[furniture.customblock.break]> && !<player.is_op>:
- determine cancelled passively
- stop
- run custom_block_destroy def.at:<context.location>
#
# WORLDEDIT COMPATIBILITY
#
on custom event id:worldedit_edit:
- announce to_ops "Actor: <context.actor>; Locations: <context.locations>"
# COLLISION BLOCK HANDLERS
furniture_world_collision_block:
debug: false
type: world
events:
on player right clicks block bukkit_priority:high:
- if <context.location.if_null[null]> == null:
- stop
- if !<player.has_permission[furniture.collisionblock.interact]> && !<player.is_op>:
- stop
- if <context.location.material.advanced_matches[air].if_null[false]>:
- stop
- if <script[furniture_config].data_key[collision_blocks].contains[<context.location.material.name>].if_null[false]>:
- determine cancelled

View File

@@ -0,0 +1,29 @@
guns_command_unstun:
debug: false
type: command
name: unstun
description: Unstun a shot or tased player.
usage: /unstun
aliases:
- untase
permission: guns.command.unstun
tab completions:
default: PressEnter
script:
- if <context.source_type> != player:
- narrate "<&c>Please run this command as a player."
- stop
- define target <player.target[player].within[5].if_null[null]>
- if <[target]> == null:
- narrate "<&c>Please look towards the player you want to unstun."
- stop
- if <[target].is_npc>:
- narrate "<&c>Please look towards the player you want to unstun."
- stop
- if !<[target].has_flag[guns_frozen]>:
- narrate "<&c>This player is not stunned!"
- stop
- animate <[target]> animation:stop_sitting
- flag <[target]> guns_frozen:!
- narrate format:formats_prefix "You have unstunned <proc[character_get_name].context[<[target]>]>."
- narrate format:formats_prefix "You have been unstunned." targets:<[target]>

View File

@@ -0,0 +1,10 @@
guns_unfreeze:
debug: false
definitions: player
type: task
script:
- waituntil max:60s <[player].is_online.not.or[<[player].has_flag[guns_frozen].not>]>
- if !<[player].has_flag[guns_frozen]>:
- stop
- animate <[player]> animation:stop_sitting
- flag <[player]> guns_frozen:!

View File

@@ -0,0 +1,65 @@
guns_world_common:
debug: false
type: world
events:
after player join:
- if !<player.has_flag[guns_frozen]>:
- stop
- animate <player> animation:sit
- run guns_unfreeze path:script def:<player>
- narrate format:formats_prefix "You logged off before you were unstunned. You will remain stunned for 60 seconds."
on player teleports:
- if <player.has_flag[guns_frozen]>:
- determine cancelled passively
guns_world_gun:
debug: false
type: world
events:
on player right clicks block:
- if !<player.item_in_hand.has_flag[guns_gun]>:
- stop
- ratelimit <player> 1s
# - playsound <player.location> custom sound:your_custom_sound
- playsound <player.location> sound:entity_arrow_shoot
- define target <player.precise_target[25]||null>
- if <[target]> == null:
- define location <player.cursor_on[25]||null>
- if <[location]> == null:
- define location <player.location.forward[25]>
- playeffect effect:redstone at:<player.location.above[1].points_between[<[location]>].distance[0.1]> special_data:0.5|white visibility:16 quantity:6 offset:0,0,0
- stop
- playeffect effect:redstone at:<player.location.above[1].points_between[<[target].location.above[1]>].distance[0.1]> special_data:0.5|white visibility:16 quantity:6 offset:0,0,0
- if <[target].entity_type> != player:
- stop
- if <[target].has_flag[guns_frozen]>:
- stop
- animate <[target]> animation:sit
- flag <[target]> guns_frozen:true
- run guns_unfreeze path:script def:<[target]>
- narrate format:formats_prefix "You shot <proc[character_get_name].context[<[target]>]>"
- narrate format:formats_prefix "You have been shot by <proc[character_get_name].context[<player>]>" targets:<[target]>
guns_world_taser:
debug: false
type: world
events:
on player right clicks block:
- if !<player.item_in_hand.has_flag[guns_taser]>:
- stop
- ratelimit <player> 1s
- define target <player.precise_target[7]||null>
- if <[target]> == null:
- stop
- if <[target].entity_type> != player:
- stop
- if <[target].has_flag[guns_frozen]>:
- stop
- playeffect effect:redstone at:<player.location.above[1].points_between[<[target].location.above[1]>].distance[0.1]> special_data:0.5|white visibility:16 quantity:6 offset:0,0,0
# - playsound <player.location> custom sound:your_custom_sound
- playsound <player.location> sound:entity_armor_stand_hit
- animate <[target]> animation:sit
- flag <[target]> guns_frozen:true
- run guns_unfreeze path:script def:<[target]>
- narrate format:formats_prefix "You tased <proc[character_get_name].context[<[target]>]>"
- narrate format:formats_prefix "You have been tased by <proc[character_get_name].context[<player>]>" targets:<[target]>

Some files were not shown because too many files have changed in this diff Show More