Is there any possible way I can make moving blocks?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Stefqnutz

Active Member
Sep 23, 2019
67
1
8
Okay so im currently trying to code an aircraft skript.
Everything went smoothly until I realized that I don't know how to make the aircraft move to the direction
the player executed the command to move.
Here is what im trying to explain:

command /aircraftmovement [<text>]:
permission: aircraft.movement
trigger:
if arg 1 is not set:
send "&cUsage: /aircraftmovement <up/down/forward/stop/right/left> <aircraftname>"


Also, I made a "worldedit" system where you can select the aircraft, execute the command /aircraft create <aircraftname>

So yeah if you guys could help me out it would be great!
What I want is something that would replicate this event (this event dosent exist its just something that i would like)
on block movement:
 
You can set the aircraft to air, then paste the aircraft a block further in the wanted direction.
Do you have Skematic? Can you also give us your code?
 
I do not have a schematic for the Aircraft and yes here is the code

command aircraft [<string>] [<string>] [<string>]:
permission: aircraft.admin
trigger:
if arg-1 is not set:
message "&aAll commands:%nl% /aircraft create <name>%nl% /aircraft delete <name>%nl% /aircraft cd <amount>%nl% /aircraft location <1/2> <name>%nl% /aircraft save <name>%nl% /aircraft reset <name>"
if arg-1 is "cd":
if arg-2 is not set:
message "Usage /aircraft cd <amount>"
stop
set {resetarena::cd} to arg-2 parsed as integer
message "Speed has been set to %arg-2% blocks each tick"
if arg-1 is "create":
if arg-2 is not set:
message "Usage /aircraft create <name>"
stop
if {resetarena::arenas::%arg-2%} is set:
message "Aircraft with that name already exists"
stop
set {resetarena::arenas::%arg-2%} to true
message "Created aircraft %arg-1%%nl%Continue by setting corner location with command%nl%/aircraft location"
if arg-1 is "delete":
if arg-2 is not set:
message "Usage /aircraft delete <name>"
stop
if {resetarena::arenas::%arg-2%} is not set:
message "Aircraft with that name doesn't exist"
stop
delete {resetarena::arenas::%arg-2%}
delete {resetarena::arenas::%arg-2%::blocks::*}
delete {resetarena::arenas::%arg-2%::*}
message "Aircraft succesfuly deleted!"
if arg-1 is "location":
if arg-2 is not "1" or "2":
message "Usage /aircraft location <1/2> <name>"
stop
if arg-2 is not set:
message "Usage /aircraft location <1/2> <name>"
stop
if arg-3 is not set:
message "Usage /aircraft location <1/2> <name>"
stop
if {resetarena::arenas::%arg-3%} is not true:
message "Aircraft with that name doesn't exist"
stop
set {resetarena::arenas::%arg-3%::%arg-2%} to location of player
message "Location %arg-2% of %arg-3% has been set to your location"
if arg-1 is "reset":
if arg-2 is not set:
message "Usage /aircraft reset <name>"
stop
if {resetarena::arenas::%arg-2%} is not set:
message "Aircraft with that name doesn't exist"
stop
if {resetarena::arenas::%arg-2%::scan} is not set:
message "Aircraft must be scanned first with command %nl%/aircraft scan"
stop
set {_m} to {resetarena::cd} * 20
message "&cTo recude lag the skript processes %{resetarena::cd}% blocks each tick which is %{_m}% each second.%nl%This can be changed with command /aircraft cd <amount>%nl%%nl%The actual processing speed may vary depending on the processing power of the server."
loop blocks within {resetarena::arenas::%arg-2%::1} to {resetarena::arenas::%arg-2%::2}:
add 1 to {_cd}
set loop-block to {resetarena::arenas::%arg-2%::blocks::%location of loop-block%} parsed as item types
{_cd} is {resetarena::cd}
wait 1 tick
if arg-1 is "save":
if arg-2 is not set:
message "Usage /aircraft save <name>"
stop
if {resetarena::arenas::%arg-2%} is not set:
message "Aircraft with that name doesn't exist"
stop
if {resetarena::arenas::%arg-2%::1} is not set:
message "Both locations of the aircraft must be set first with command%nl%/aircraft location"
stop
if {resetarena::arenas::%arg-2%::2} is not set:
message "Both locations of the aircraft must be set first with command%nl%/aircraft location"
stop
delete {resetarena::arenas::%arg-2%::blocks::*}
set {_m} to {resetarena::cd} * 20
message "&cTo recude lag the skript processes %{resetarena::cd}% blocks each tick which is %{_m}% each second.%nl%This can be changed with command /aircraft cd <amount>%nl%%nl%The actual processing speed may vary depending on the processing power of the server."
loop blocks within {resetarena::arenas::%arg-2%::1} to {resetarena::arenas::%arg-2%::2}:
add 1 to {_cd}
set {resetarena::arenas::%arg-2%::blocks::%location of loop-block%} to "%loop-block%"
{_cd} is {resetarena::cd}
wait 1 tick
message "&aSave complete, aircraft has been succesfuly saved and can be used/reset."
set {resetarena::arenas::%arg-2%::scan} to true



command /aircraftmovement [<text>]:
permission: aircraft.movement
trigger:
if arg 1 is not set:
send "&cUsage: /aircraftmovement <up/down/forward/stop/right/left> <aircraftname>"
 
Status
Not open for further replies.