Compare commits

9 Commits

Author SHA1 Message Date
44530c5edf Update README.md 2026-02-04 09:20:43 +01:00
Rares Bozga
3046a7dfa0 Fix NPC related bug 2026-01-30 22:09:33 +02:00
Rares Bozga
4ff52e4876 Fix guns_gun bug and custom gun and taser sounds 2026-01-28 22:54:34 +02:00
Rares Bozga
a672aee477 Fix guns_gun bug 2026-01-28 22:21:38 +02:00
Rares Bozga
8549d27f8a Fix LiteProfiles Utils whitelisting and fix intro interactions atomic sequence 2026-01-27 22:05:24 +02:00
Rares Bozga
06de5efa1a Fix Storyboard malloc once and for all 2026-01-25 14:16:17 +02:00
Rares Bozga
763eff2db4 Update README.md 2026-01-25 13:50:46 +02:00
Rares Bozga
291a035a47 Update README.md 2026-01-25 13:50:25 +02:00
ac204fe207 Merge pull request 'Various bugfixes' (#6) from lib-cutscene into main
Reviewed-on: #6
2026-01-25 12:07:41 +01:00
6 changed files with 29 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
# denizen-scripts # denizen-scripts
<img src="https://sakurafalls.net/data/assets/logo/logo-bg-new-rsc2.png" width="300"> <img src="https://sakurafalls.net/data/assets/logo/forumlogo4.png" width="180">
<img src="https://forum.denizenscript.com/data/assets/logo/logo.png" width="160"> <img src="https://forum.denizenscript.com/data/assets/logo/logo.png" width="160">
@@ -8,7 +8,7 @@
This repository contains the *Denizen* `scripts` and `data` folders of SakuraFalls. This repository contains the *Denizen* `scripts` and `data` folders of SakuraFalls.
It contains the actual code used on the server at this time. You are free to explore and to It contains the actual code used on the server at this time. You are free to explore and to
use the scripts that our server uses! We believe that gatekeeping roleplaying servers furhter use the scripts that our server uses! We believe that gatekeeping roleplaying servers further
only leads to less variety and creativity. We hope that the code here, although just given as only leads to less variety and creativity. We hope that the code here, although just given as
is without further instructions, will lead to a new generation of awesome roleplaying servers. is without further instructions, will lead to a new generation of awesome roleplaying servers.

View File

@@ -40,6 +40,9 @@ furniture_config:
iron_horse_armor,7: iron_horse_armor,7:
represents: Clipboard represents: Clipboard
collision: warped_trapdoor collision: warped_trapdoor
iron_horse_armor,8:
represents: Vending Machine
collision: barrier
# List of collision blocks - disables interaction without perms # List of collision blocks - disables interaction without perms
collision_blocks: collision_blocks:
#- skeleton_skull #- skeleton_skull

View File

@@ -20,17 +20,16 @@ guns_world_gun:
- if !<player.item_in_hand.has_flag[guns_gun]>: - if !<player.item_in_hand.has_flag[guns_gun]>:
- stop - stop
- ratelimit <player> 1s - ratelimit <player> 1s
# - playsound <player.location> custom sound:your_custom_sound - playsound <player.location> custom sound:item.anaconda
- playsound <player.location> sound:entity_arrow_shoot - define target <player.precise_target[25].if_null[null]>
- define target <player.precise_target[25]||null>
- if <[target]> == null: - if <[target]> == null:
- define location <player.cursor_on[25]||null> - define location <player.cursor_on[25].if_null[null]>
- if <[location]> == null: - if <[location]> == null:
- define location <player.location.forward[25]> - 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 - 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 - 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 - 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].type> != player: - if !<[target].is_player>:
- stop - stop
- if <[target].has_flag[guns_frozen]>: - if <[target].has_flag[guns_frozen]>:
- stop - stop
@@ -51,13 +50,12 @@ guns_world_taser:
- define target <player.precise_target[7]||null> - define target <player.precise_target[7]||null>
- if <[target]> == null: - if <[target]> == null:
- stop - stop
- if <[target].type> != player: - if !<[target].is_player>:
- stop - stop
- if <[target].has_flag[guns_frozen]>: - if <[target].has_flag[guns_frozen]>:
- stop - 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 - 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> custom sound:item.taser
- playsound <player.location> sound:entity_armor_stand_hit
- animate <[target]> animation:sit - animate <[target]> animation:sit
- flag <[target]> guns_frozen:true - flag <[target]> guns_frozen:true
- run guns_unfreeze path:script def:<[target]> - run guns_unfreeze path:script def:<[target]>

View File

@@ -99,3 +99,11 @@ liteprofilesutils_world:
- else if <[data].get[type]> == free: - else if <[data].get[type]> == free:
- execute as_player "profile add" - execute as_player "profile add"
- run liteprofilesutils_show_menu def.player:<player> - run liteprofilesutils_show_menu def.player:<player>
## patch whitelisting
on player prelogin:
- define uuid <context.uuid>
- define master <proc[liteprofilesutils_get_master_uuid].context[<player[<[uuid]>]>]>
- if <[master]> == <[uuid]>:
- stop
- adjust <player[<[uuid]>]> whitelisted:<player[<[master]>].is_whitelisted>

View File

@@ -69,6 +69,7 @@ intro_interact_laptop_task:
- ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:You should give your character$$nla cool name, right?" - ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:You should give your character$$nla cool name, right?"
- waituntil <player.has_flag[textbox_state].not> max:5s - waituntil <player.has_flag[textbox_state].not> max:5s
- ~run textbox_flush def.player:<player> - ~run textbox_flush def.player:<player>
- run storyboard_player_end_atomic_sequence def.queue:<queue> def.player:<player>
- run anvil_input def.player:<player> "def.prompt:Character Name" def.callback:intro_interact_laptop_task_name_callback - run anvil_input def.player:<player> "def.prompt:Character Name" def.callback:intro_interact_laptop_task_name_callback
intro_interact_laptop_task_name_callback: intro_interact_laptop_task_name_callback:
@@ -76,6 +77,7 @@ intro_interact_laptop_task_name_callback:
type: task type: task
definitions: player|input definitions: player|input
script: script:
- run storyboard_player_begin_atomic_sequence def.queue:<queue> def.player:<player>
- define __player <[player]> - define __player <[player]>
- define name <[input].substring[1,24]> - define name <[input].substring[1,24]>
- if <server.flag[character_rpnames].contains[<[name]>]>: - if <server.flag[character_rpnames].contains[<[name]>]>:
@@ -89,6 +91,7 @@ intro_interact_laptop_task_name_callback:
- ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:Let's give them a description.$$nlDescribe their physical attributes." - ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:Let's give them a description.$$nlDescribe their physical attributes."
- waituntil <player.has_flag[textbox_state].not> max:5s - waituntil <player.has_flag[textbox_state].not> max:5s
- ~run textbox_flush def.player:<player> - ~run textbox_flush def.player:<player>
- run storyboard_player_end_atomic_sequence def.queue:<queue> def.player:<player>
- run anvil_input def.player:<player> def.prompt:Description def.callback:intro_interact_laptop_task_description_callback - run anvil_input def.player:<player> def.prompt:Description def.callback:intro_interact_laptop_task_description_callback
intro_interact_laptop_task_description_callback: intro_interact_laptop_task_description_callback:
@@ -96,6 +99,7 @@ intro_interact_laptop_task_description_callback:
type: task type: task
definitions: player|input definitions: player|input
script: script:
- run storyboard_player_begin_atomic_sequence def.queue:<queue> def.player:<player>
- define __player <[player]> - define __player <[player]>
- execute as_player player:<[player]> "setdesc <[input]>" - execute as_player player:<[player]> "setdesc <[input]>"
- ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:Great, your character's almost ready." - ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:Great, your character's almost ready."
@@ -104,6 +108,7 @@ intro_interact_laptop_task_description_callback:
- ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:For complete beginners, we recommend$$nlstarting out as a student." - ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:For complete beginners, we recommend$$nlstarting out as a student."
- waituntil <player.has_flag[textbox_state].not> max:5s - waituntil <player.has_flag[textbox_state].not> max:5s
- ~run textbox_flush def.player:<player> - ~run textbox_flush def.player:<player>
- run storyboard_player_end_atomic_sequence def.queue:<queue> def.player:<player>
- run intro_interact_laptop_task_role_menu def.player:<player> - run intro_interact_laptop_task_role_menu def.player:<player>
intro_interact_laptop_task_role_menu: intro_interact_laptop_task_role_menu:
@@ -133,6 +138,7 @@ intro_interact_laptop_task_role_callback:
type: task type: task
definitions: player|input definitions: player|input
script: script:
- run storyboard_player_begin_atomic_sequence def.queue:<queue> def.player:<player>
- inventory close player:<[player]> - inventory close player:<[player]>
- define __player <[player]> - define __player <[player]>
- define adult <[input].to_lowercase.trim.equals[yes]> - define adult <[input].to_lowercase.trim.equals[yes]>

View File

@@ -39,6 +39,7 @@ storyboard_npc_memalloc:
- define npc_id npc_<[player].uuid>_<[name]> - define npc_id npc_<[player].uuid>_<[name]>
- if !<server.npcs[<[registry]>].if_null[<list[]>].contains[<[npc_id]>]>: - if !<server.npcs[<[registry]>].if_null[<list[]>].contains[<[npc_id]>]>:
- define npcs <[player].flag[storyboard_state].get[npcs].if_null[<map[]>]> - define npcs <[player].flag[storyboard_state].get[npcs].if_null[<map[]>]>
- chunkload <[at].chunk> duration:10s
- create <[type]> <[npc_id]> <[at]> registry:<[registry]> save:npc - create <[type]> <[npc_id]> <[at]> registry:<[registry]> save:npc
- define npc <entry[npc].created_npc> - define npc <entry[npc].created_npc>
- playeffect at:<[npc].location.above[1]> offset:0.35,1,0.35 effect:SOUL_FIRE_FLAME quantity:20 - playeffect at:<[npc].location.above[1]> offset:0.35,1,0.35 effect:SOUL_FIRE_FLAME quantity:20
@@ -84,7 +85,7 @@ storyboard_npc_memalloc:
- adjust <[npc]> skin_blob:<[skin_blob]> - adjust <[npc]> skin_blob:<[skin_blob]>
- if <[assignment]> != null: - if <[assignment]> != null:
- assignment set script:<[assignment]> to:<[npc]> - assignment set script:<[assignment]> to:<[npc]>
- wait 2t - wait 1t
- run storyboard_npc_internal_show_to_player def.player:<[player]> def.npc:<[npc]> - run storyboard_npc_internal_show_to_player def.player:<[player]> def.npc:<[npc]>
- else: - else:
- define index <server.npcs[<[registry]>].find[<[npc_id]>]> - define index <server.npcs[<[registry]>].find[<[npc_id]>]>
@@ -99,7 +100,7 @@ storyboard_npc_by_name:
script: script:
- define registry registry_<[player].uuid> - define registry registry_<[player].uuid>
- define npc_id npc_<[player].uuid>_<[name]> - define npc_id npc_<[player].uuid>_<[name]>
- determine <server.npcs[<[registry]>].filter_tag[<[filter_value].name.equals[<[npc_id]>]>].get[1]> - determine <server.npcs[<[registry]>].filter_tag[<[filter_value].name.equals[<[npc_id]>]>].get[1].if_null[null]>
# Frees an NPC from memory, but does not destroy its state. # Frees an NPC from memory, but does not destroy its state.
# #
@@ -264,4 +265,4 @@ storyboard_npc_internal_auto_display_entities:
- foreach <[npcs]> as:npc: - foreach <[npcs]> as:npc:
- adjust <player> hide_entity:<[npc]> - adjust <player> hide_entity:<[npc]>
- foreach <[npc].hologram_npcs.if_null[<list[]>]> as:hologram: - foreach <[npc].hologram_npcs.if_null[<list[]>]> as:hologram:
- adjust <player> hide_entity:<[hologram]> - adjust <player> hide_entity:<[hologram]>