#Hi! I need help.

1 messages · Page 1 of 1 (latest)

fallow river
#

make sure to check the location of the barrier and add it to for example {robbedAtms::%player's uuid%::*}, and then when you click an atm it adds the location of that atm to that variable

#

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

fallow river
#

if you want the cooldown to be global, just remove the %player's uuid%

#

so:
{robbedAtms::*}
and
{robbedAtms::robbedTime}

frank sun
#

Do you have sample code?

fallow river
#

no sorry, in school right now

#

and it's a little complicated

frank sun
#

Any chance you get a shortcode when you get home? I can learn from there and apply it to my own code.

fallow river
#

sure

#

ill be home in like 1 hour

frank sun
#

Okay, thanks you

fallow river
#

imma make the sample rn

frank sun
#

Okay

fallow river
#

Sorry, didn’t get to it. I said that, went to the toilet, then i forgot :|

frank sun
#

It's okay, I'm waiting

fallow river
#
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

fallow river
#

@frank sun

#

works fully for me

frank sun
#

Can you explain the logic of this skript? If you are available

fallow river
#

yes in a minute, ill add comments to it

#

gotta finish my schoolwork first

frank sun
#

Okay

fallow river
#

put it in vscode cuz this is really unreadable lmao

#

@frank sun

frank sun
fallow river
#

Wdym?

fallow river
#

@frank sun

frank sun
fallow river
#

Wdym ‘ping’

frank sun
#

lag

fallow river
#

not for me

#

1 player 2gb 20 tps

#

while running script

fallow river
#

@frank sun

frank sun
#

Okay, very very thanks you so much

fallow river
#

np :)

fallow river
#

@frank sun did you get it working?