MerciFull Posted May 25, 2020 Share Posted May 25, 2020 I would like the delay between one block and another on place Link to comment Share on other sites More sharing options...
KJPAKA Posted May 25, 2020 Share Posted May 25, 2020 (edited) You would have to do this with Skript! Here's one I made for you! # you can change the delay of this to what ever you want like tick, second, minute, hour, etc. options: delay: 1 second on place: set {_wait} to the time diffrence between {@delay} and now if {_wait} >= {pt::%player's uuid%}: set {pt::%player's uuid%} to now else: set {_need} to n({_wait}, 2) cancel event play sound "entity.villager.no" with volume 5 to player send "&cYou must wait %{_need}%&c before placing a block again!" function format(n: number, type: integer) :: text: if {_type} is 1: set {_n} to "%{_n}%" set {_n} to regex replace "(?<=\d)(?=(\d{3})+(?!\d))" with "," in {_n} return {_n} if {_type} is 2: set {_data} to "No,30|Oc,27|Sep,24|Se,21|Qi,18|Qu,15|T,12|B,9|M,6|K,3" loop split {_data} at "|": set {_s::*} to split loop-value at "," {_n} >= 10 ^ {_s::2} parsed as number return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%" return "%{_n}%" This should work if it doesn't tell me what's wrong! Edited May 25, 2020 by KJPAKA Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
MerciFull Posted May 25, 2020 Author Share Posted May 25, 2020 Thank you! Link to comment Share on other sites More sharing options...
KJPAKA Posted May 25, 2020 Share Posted May 25, 2020 No problem! Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
MerciFull Posted May 25, 2020 Author Share Posted May 25, 2020 2 error Can't understand this expression: ('the time diffrence between 5 second' and now) (delay.sk, line 5: set {_wait} to the time diffrence between {@delay} and now') Functions cannot be used here (or there is a problem with your arguments). (delay.sk, line 9: set {_need} to n({_wait}, 2)') Link to comment Share on other sites More sharing options...
KJPAKA Posted May 26, 2020 Share Posted May 26, 2020 Replace the first error with set {_wait} to the time difference between {@delay} and now For the second one put this set {_need} to time("%difference between {@delay} and now%") This should work. Sorry about that I rushed the Skript from the top of my head. If theirs still problems or if you have more questions. Feel free to add me on discord @ KJPAKA#0001 and I can help you with them with no delay. Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
KJPAKA Posted May 26, 2020 Share Posted May 26, 2020 Hey, this is kinda funny but i accidentally pasted the wrong function, let me send the correct thing. # you can change the delay of this to what ever you want like tick, second, minute, hour, etc. options: delay: 1 second on place: set {_wait} to the time diffrence between {@delay} and now if {_wait} >= {pt::%player's uuid%}: set {pt::%player's uuid%} to now else: set {_need} to n({_wait}, 2) cancel event play sound "entity.villager.no" with volume 5 to player send "&cYou must wait %{_need}%&c before placing a block again!" function time(t: text) :: text: if {_t} contains "hours" or "minutes": set {_time::*} to {_t} split at " " set {_time2::*} to {_time::4} split at "." return "%{_time::1}% %{_time::2}% %{_time::3}% %{_time2::1}% %{_time::5}%" else if {_t} contains "seconds": set {_time::*} to {_t} split at " " set {_time2::*} to {_time::1} split at "." return "%{_time2::1}% %{_time::2}%" else: return {_t} This should work sorry about the errors my bad. Accidentally pasted a similar function. Active Minehut Player since 2016 Advanced at Skript - Know a lot about running a server If you need help with anything contact me @ KJPAKA#0001 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now