Initial commit
This commit is contained in:
29
scripts/guns/guns_commands.dsc
Normal file
29
scripts/guns/guns_commands.dsc
Normal 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]>
|
||||
10
scripts/guns/guns_tasks.dsc
Normal file
10
scripts/guns/guns_tasks.dsc
Normal 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:!
|
||||
65
scripts/guns/guns_world.dsc
Normal file
65
scripts/guns/guns_world.dsc
Normal 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]>
|
||||
Reference in New Issue
Block a user