Kankalar selam. Skript ile mjolnir hazırlıyorum fakat fırlatabilir kısmını yapamadım. Skbee kullanarak armor stand yaptığımda nbtler düzgün çalışmıyor. yardımcı olur musunuz
on right click:
if name of player's tool is "&8Mjolnir":
cancel event
set {_p} to player
set {_slot} to held tool slot of {_p}
set {_id} to "%uuid of {_p}%%now%"
remove player's tool from {_p}
set {_loc} to location of {_p}
add 1 to y-coordinate of {_loc}
execute console command "summon armor_stand %{_loc}% {Invisible:1b,NoGravity:0b,ShowArms:1b,Small:1b,Marker:0b,Tags:[\"mjolnir_proj\",\"%{_id}%\"]}"
wait 1 tick
set {_as} to last spawned armor stand
give {_mj} netherite axe named "&8Mjolnir"
set custom model data of {_mj} to 10009
equip {_as} with {_mj} in main hand
set {_vec} to direction of {_p}
multiply {_vec} by 1.6
set velocity of {_as} to {_vec}
set {mjolnir.%{_id}%.entity} to {_as}
set {mjolnir.%{_id}%.owner} to {_p}
set {mjolnir.%{_id}%.slot} to {_slot}
set {mjolnir.%{_id}%.state} to "flying"
set {mjolnir.%{_id}%.tick} to 0
play sound "item.trident.throw" at {_loc}
every 1 tick:
loop {mjolnir::*}:
set {_id} to loop-index
set {_as} to {mjolnir.%{_id}%.entity}
set {_p} to {mjolnir.%{_id}%.owner}
set {_state} to {mjolnir.%{_id}%.state}
add 1 to {mjolnir.%{_id}%.tick}
if {_as} is not set or {_p} is not set:
delete {mjolnir.%{_id}%::*}
stop
if {_state} is "flying":
loop blocks in radius 1 around {_as}:
if loop-block is solid:
set velocity of {_as} to vector(0, 0, 0)
set {mjolnir.%{_id}%.state} to "landed"
play sound "block.anvil.land" at location of {_as}
play particle cloud at location of {_as}
stop
if {mjolnir.%{_id}%.tick} is 200:
set {mjolnir.%{_id}%.state} to "returning"
play sound "item.trident.return" at location of {_as}
stop
if {_state} is "returning":
set {_vec} to vector from location of {_as} to location of {_p}
multiply {_vec} by 0.5
set velocity of {_as} to {_vec}
play particle sweep_attack at location of {_as}
play sound "entity.enderman.teleport" at location of {_as}
if distance between {_as} and {_p} < 1.5:
remove {_as}
give netherite axe named "&8Mjolnir" with custom model data 10009 to {_p}
play sound "item.shield.break" at {_p}
delete {mjolnir.%{_id}%::*}
if {_state} is "landed":
play particle smoke at location of {_as}
on sneak toggle:
if player is sneaking:
if name of player is "yefeblgn":
loop all armor stands:
if "mjolnir_proj" is in nbt tags of loop-entity:
if distance between player and loop-entity < 1.5:
remove loop-entity
give netherite axe named "&8Mjolnir" with custom model data 10009 to player
play sound "item.shield.break" at player
loop {mjolnir::*}:
if {mjolnir.%loop-index%.entity} is loop-entity:
delete {mjolnir.%loop-index%::*}
on script unload:
loop all armor stands:
if "mjolnir_proj" is in nbt tags of loop-entity:
kill loop-entity
on right click:
if name of player's tool is "&8Mjolnir":
cancel event
set {_p} to player
set {_slot} to held tool slot of {_p}
set {_id} to "%uuid of {_p}%%now%"
remove player's tool from {_p}
set {_loc} to location of {_p}
add 1 to y-coordinate of {_loc}
execute console command "summon armor_stand %{_loc}% {Invisible:1b,NoGravity:0b,ShowArms:1b,Small:1b,Marker:0b,Tags:[\"mjolnir_proj\",\"%{_id}%\"]}"
wait 1 tick
set {_as} to last spawned armor stand
give {_mj} netherite axe named "&8Mjolnir"
set custom model data of {_mj} to 10009
equip {_as} with {_mj} in main hand
set {_vec} to direction of {_p}
multiply {_vec} by 1.6
set velocity of {_as} to {_vec}
set {mjolnir.%{_id}%.entity} to {_as}
set {mjolnir.%{_id}%.owner} to {_p}
set {mjolnir.%{_id}%.slot} to {_slot}
set {mjolnir.%{_id}%.state} to "flying"
set {mjolnir.%{_id}%.tick} to 0
play sound "item.trident.throw" at {_loc}
every 1 tick:
loop {mjolnir::*}:
set {_id} to loop-index
set {_as} to {mjolnir.%{_id}%.entity}
set {_p} to {mjolnir.%{_id}%.owner}
set {_state} to {mjolnir.%{_id}%.state}
add 1 to {mjolnir.%{_id}%.tick}
if {_as} is not set or {_p} is not set:
delete {mjolnir.%{_id}%::*}
stop
if {_state} is "flying":
loop blocks in radius 1 around {_as}:
if loop-block is solid:
set velocity of {_as} to vector(0, 0, 0)
set {mjolnir.%{_id}%.state} to "landed"
play sound "block.anvil.land" at location of {_as}
play particle cloud at location of {_as}
stop
if {mjolnir.%{_id}%.tick} is 200:
set {mjolnir.%{_id}%.state} to "returning"
play sound "item.trident.return" at location of {_as}
stop
if {_state} is "returning":
set {_vec} to vector from location of {_as} to location of {_p}
multiply {_vec} by 0.5
set velocity of {_as} to {_vec}
play particle sweep_attack at location of {_as}
play sound "entity.enderman.teleport" at location of {_as}
if distance between {_as} and {_p} < 1.5:
remove {_as}
give netherite axe named "&8Mjolnir" with custom model data 10009 to {_p}
play sound "item.shield.break" at {_p}
delete {mjolnir.%{_id}%::*}
if {_state} is "landed":
play particle smoke at location of {_as}
on sneak toggle:
if player is sneaking:
if name of player is "yefeblgn":
loop all armor stands:
if "mjolnir_proj" is in nbt tags of loop-entity:
if distance between player and loop-entity < 1.5:
remove loop-entity
give netherite axe named "&8Mjolnir" with custom model data 10009 to player
play sound "item.shield.break" at player
loop {mjolnir::*}:
if {mjolnir.%loop-index%.entity} is loop-entity:
delete {mjolnir.%loop-index%::*}
on script unload:
loop all armor stands:
if "mjolnir_proj" is in nbt tags of loop-entity:
kill loop-entity