Compare commits

...

12 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
ed27d2c62d Merge branch 'main' into lib-cutscene 2026-01-25 12:07:33 +01:00
Rares Bozga
dcc7f81705 Various bugfixes 2026-01-25 13:06:21 +02:00
Rares Bozga
7771b9041b Fix oversight in storyboard 2026-01-16 23:27:37 +02:00
8 changed files with 55 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
# 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">
@@ -8,7 +8,7 @@
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
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
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:
represents: Clipboard
collision: warped_trapdoor
iron_horse_armor,8:
represents: Vending Machine
collision: barrier
# List of collision blocks - disables interaction without perms
collision_blocks:
#- skeleton_skull

View File

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

View File

@@ -20,6 +20,13 @@ ball_create:
- define size <[ball_collision].bounding_box.get[1].sub[<[ball_collision].location>].x.abs.add[0.01]>
- spawn zombie[silent=true;has_ai=false;gravity=false;visible=false] <[location].with_pitch[0].with_yaw[0].below[<[size].add[1]>]> save:ball_display
- define ball_display <entry[ball_display].spawned_entity>
- if <[ball_display].is_baby>:
- age <[ball_display]> adult lock
- if <[ball_display].is_inside_vehicle>:
# CHICKEN JOCKEEEEEEEEEEEEEEEEEEEEEEEEEY
- define chicken <[ball_display].vehicle>
- adjust <[chicken]> passengers:<list[]>
- remove <[chicken]>
- adjust <[ball_display]> equipment:<map[].with[helmet].as[<[display_item]>]>
- flag <[ball_collision]> ball:<[id]>
- flag <[ball_collision]> ball_display:<[ball_display]>

View File

@@ -66,6 +66,10 @@ liteprofilesutils_world:
- narrate <[joinleavedata].get[join].parsed> targets:<[setting_enabled_players]>
## prevent /profile remove
on command:
- if <context.source_type> != player:
- stop
- if <player.is_op>:
- stop
- if <context.command.to_lowercase> == profile || <context.command.to_lowercase> == account || <context.command.to_lowercase> == pf:
- if <context.args.get[1].to_lowercase.if_null[null]> == remove:
- determine cancelled passively
@@ -95,3 +99,11 @@ liteprofilesutils_world:
- else if <[data].get[type]> == free:
- execute as_player "profile add"
- 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

@@ -2,9 +2,11 @@ ch1_1_preassign:
debug: false
type: world
events:
on player joins:
after player joins:
- wait 1s
- if <proc[storyboard_player_state_get].context[<player>|preassign]> == null:
- run storyboard_npc_memalloc "def:<player>|marie|player|<location[-4,2,-15,world]>|Marie Ayashibayomi|true|<script[storyboard_skin_dump].data_key[marie].get[a]>"
- if !<proc[storyboard_npc_exists].context[<player>|marie]>:
- run storyboard_npc_memalloc "def:<player>|marie|player|<location[-4,2,-15,world]>|Marie Ayashibayomi|true|<script[storyboard_skin_dump].data_key[marie].get[a]>"
- run storyboard_npc_set_assignment def.player:<player> def.name:marie def.assignment:ch1_1_marie_assign
- run storyboard_player_state_set def.player:<player> def.key:preassign def.value:true
@@ -131,6 +133,7 @@ ch1_1_marie_interact:
- ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:* Mkay." def.avatar_unicode:<script[storyboard_avatar_dump].data_key[marie].get[upset]>
- wait 1s
- disengage player
- run storyboard_player_end_atomic_sequence def.queue:<queue> def.player:<player>
- stop
- ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:* Hm. Are you now?" def.avatar_unicode:<script[storyboard_avatar_dump].data_key[marie].get[upset]>
- ~run textbox_write def.player:<player> def.queue:<queue> "def.line3s:* You know, that was kind of$$nlmean of you." def.avatar_unicode:<script[storyboard_avatar_dump].data_key[marie].get[upset]>

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?"
- waituntil <player.has_flag[textbox_state].not> max:5s
- ~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
intro_interact_laptop_task_name_callback:
@@ -76,6 +77,7 @@ intro_interact_laptop_task_name_callback:
type: task
definitions: player|input
script:
- run storyboard_player_begin_atomic_sequence def.queue:<queue> def.player:<player>
- define __player <[player]>
- define name <[input].substring[1,24]>
- 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."
- waituntil <player.has_flag[textbox_state].not> max:5s
- ~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
intro_interact_laptop_task_description_callback:
@@ -96,6 +99,7 @@ intro_interact_laptop_task_description_callback:
type: task
definitions: player|input
script:
- run storyboard_player_begin_atomic_sequence def.queue:<queue> def.player:<player>
- define __player <[player]>
- execute as_player player:<[player]> "setdesc <[input]>"
- ~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."
- waituntil <player.has_flag[textbox_state].not> max:5s
- ~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>
intro_interact_laptop_task_role_menu:
@@ -133,6 +138,7 @@ intro_interact_laptop_task_role_callback:
type: task
definitions: player|input
script:
- run storyboard_player_begin_atomic_sequence def.queue:<queue> def.player:<player>
- inventory close player:<[player]>
- define __player <[player]>
- define adult <[input].to_lowercase.trim.equals[yes]>

View File

@@ -39,8 +39,10 @@ storyboard_npc_memalloc:
- define npc_id npc_<[player].uuid>_<[name]>
- if !<server.npcs[<[registry]>].if_null[<list[]>].contains[<[npc_id]>]>:
- 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
- define npc <entry[npc].created_npc>
- playeffect at:<[npc].location.above[1]> offset:0.35,1,0.35 effect:SOUL_FIRE_FLAME quantity:20
- define npc_state <map[]>
- define assignment null
- if <[npcs].contains[<[name]>]>:
@@ -83,7 +85,7 @@ storyboard_npc_memalloc:
- adjust <[npc]> skin_blob:<[skin_blob]>
- if <[assignment]> != null:
- assignment set script:<[assignment]> to:<[npc]>
- wait 2t
- wait 1t
- run storyboard_npc_internal_show_to_player def.player:<[player]> def.npc:<[npc]>
- else:
- define index <server.npcs[<[registry]>].find[<[npc_id]>]>
@@ -98,7 +100,7 @@ storyboard_npc_by_name:
script:
- define registry registry_<[player].uuid>
- 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.
#
@@ -137,6 +139,14 @@ storyboard_npc_memdestroy:
- define npc <proc[storyboard_npc_by_name].context[<[player]>|<[name]>]>
- remove <[npc]>
# Checks if an NPC exists for the given player.
storyboard_npc_exists:
debug: false
type: procedure
definitions: player|name
script:
- determine <proc[storyboard_npc_by_name].context[<[player]>|<[name]>].if_null[null].equals[null].not>
# Flags the NPC by name, mapping the given key to the given value.
storyboard_npc_state_set:
debug: false
@@ -215,6 +225,7 @@ storyboard_npc_internal_auto_memory_management:
type: world
events:
after player joins:
- wait 1s
- define npcs <player.flag[storyboard_state].get[npcs].if_null[<map[]>]>
- foreach <[npcs]> key:name as:data:
- define allocated <[data].get[allocated].if_null[null]>
@@ -254,4 +265,4 @@ storyboard_npc_internal_auto_display_entities:
- foreach <[npcs]> as:npc:
- adjust <player> hide_entity:<[npc]>
- foreach <[npc].hologram_npcs.if_null[<list[]>]> as:hologram:
- adjust <player> hide_entity:<[hologram]>
- adjust <player> hide_entity:<[hologram]>