I am trying to make it so if a player is in a specific region, they will get 3% of their balance every 15minutes.
I've got the code here, however, I am getting the error: I'm really, really new to skripting, never done it in my life up until about a week ago. So I'm trying to learn. I've tried changing a few things around to debug the code at the bottom of this post, but i'm having no luck.
I've got the code here, however, I am getting the error: I'm really, really new to skripting, never done it in my life up until about a week ago. So I'm trying to learn. I've tried changing a few things around to debug the code at the bottom of this post, but i'm having no luck.
Code:
on load:
every 15 minutes:
loop all players:
set {_player} to loop-player
set {_region} to region at location of {_player}
if {_region} is "AFKTEST":
execute console command "essentials:balance %{_player}%"
set {_balance} to last executed command
set {_balance} to {_balance} as number
set {_balanceIncrease} to {_balance} * 0.03
execute console command "essentials:give %{_player}% %{_balanceIncrease}%"
Last edited: