#Hi! I need help.
1 messages · Page 1 of 1 (latest)
then you can also set {robbedAtms::%player's uuid%::robbedtime} when you rob it to now and when you rob again and {robbedAtms::%player's uuid%::*} contains that atm, you check if the difference between {robbedAtms::%player's uuid%::robbedtime} and now is > 15 minutes, and you allow the robbing again, otherwise you give the delay message
if you want the cooldown to be global, just remove the %player's uuid%
so:
{robbedAtms::*}
and
{robbedAtms::robbedTime}
Do you have sample code?
Any chance you get a shortcode when you get home? I can learn from there and apply it to my own code.
Okay, thanks you
imma make the sample rn
Okay
Sorry, didn’t get to it. I said that, went to the toilet, then i forgot :|
It's okay, I'm waiting
command /registeratm:
permission: atm.register
trigger:
set {actions::%player's uuid%::registeringAtm?} to true
command /unregisteratm:
permission: atm.unregister
trigger:
set {actions::%player's uuid%::unregisteringAtm?} to true
on right click on sign:
if {actions::%player's uuid%::registeringAtm?} is true:
if {registeredAtms::*} contains location of event-block:
# ATM ALREADY REGISTERED
set {actions::%player's uuid%::registeringAtm?} to false
stop
set {actions::%player's uuid%::registeringAtm?} to false
add location of event-block to {registeredAtms::*}
# ATM REGISTERED
stop
if {actions::%player's uuid%::unregisteringAtm?} is true:
if {registeredAtms::*} contains location of event-block:
# ATM UNREGISTERED
set {actions::%player's uuid%::unregisteringAtm?} to false
remove location of event-block from {registeredAtms::*}
stop
# ATM NOT REGISTERED
if {registeredAtms::*} contains location of event-block:
if {robbedAtms::%player's uuid%::*} contains location of event-block:
if difference between {robbedAtms::%player's uuid%::%location of event-block%::robbedTime} and now < 15 minutes:
# ATM NOT READY
stop
remove location of event-block from {robbedAtms::%player's uuid%::*}
# ATM ROBBED
@frank sun
i didn't test for errors btw
so there could be some
no errors
but imma test it rq
ok so testing rn, its broken af
fixing rn
Can you explain the logic of this skript? If you are available
Okay
sorry i didn't see it, is there ping in this code
Wdym?
@frank sun
So, will this skript cause ping within my server?
Wdym ‘ping’
lag
@frank sun
Okay, very very thanks you so much
np :)
@frank sun did you get it working?