Files
firstjoin.sk
Code
1 50
firstjoin.sk
# First Join Reward System
# Gives new players 1000 money on their first join
# Credit: real senpro
options:
prefix: &6[FirstJoin]&r
reward-amount: 1000
welcome-message: &aWelcome to the server! You received &2$1000 &aas a starter bonus!
on join:
if {firstjoin::%player's uuid%} is not set:
wait 5 ticks
make console execute command "/eco give %player% {@reward-amount}"
send "{@prefix} {@welcome-message}" to player
set {firstjoin::%player's uuid%} to true
send "{@prefix} &e%player% &7joined for the first time and received $&a{@reward-amount}" to console
command /firstjoin [<text>] [<offline player>]:
permission: firstjoin.admin
permission message: &cYou don't have permission to use this command!
trigger:
if arg-1 is not set:
send "&6=== FirstJoin Commands ==="
send "&e/firstjoin reset <player> &7- Reset player's first join status"
send "&e/firstjoin check <player> &7- Check if player has received bonus"
stop
if arg-1 is "reset":
if arg-2 is not set:
send "{@prefix} &cUsage: /firstjoin reset <player>"
stop
delete {firstjoin::%arg-2's uuid%}
send "{@prefix} &aReset first join status for &e%arg-2%"
stop
if arg-1 is "check":
if arg-2 is not set:
send "{@prefix} &cUsage: /firstjoin check <player>"
stop
if {firstjoin::%arg-2's uuid%} is set:
send "{@prefix} &e%arg-2% &7has already received the first join bonus"
else:
send "{@prefix} &e%arg-2% &7has NOT received the first join bonus yet"
stop
send "{@prefix} &cUnknown argument! Use /firstjoin for help"
on script load:
send "{@prefix} &aFirst Join Reward System loaded! Reward: $&2{@reward-amount}" to console
send "{@prefix} &7Credit: real senpro" to console