Files
00_neon_core.sk
10_neon_armory.sk
20_neon_terminals.sk
30_neon_bounties.sk
40_neon_contracts.sk
Code
5 482
00_neon_core.sk
# Neon Frontier Core
# Install in plugins/Skript/scripts/ and run: /sk reload 00_neon_core
options:
prefix: &8[&bNeon Frontier&8] &r
starting-credits: 500
function neoSetup(p: player):
if {neo::credits::%uuid of {_p}%} is not set:
set {neo::credits::%uuid of {_p}%} to {@starting-credits}
if {neo::rank::%uuid of {_p}%} is not set:
set {neo::rank::%uuid of {_p}%} to "Runner"
if {neo::heat::%uuid of {_p}%} is not set:
set {neo::heat::%uuid of {_p}%} to 0
if {neo::reputation::%uuid of {_p}%} is not set:
set {neo::reputation::%uuid of {_p}%} to 0
function neoCredits(p: player) :: number:
neoSetup({_p})
return {neo::credits::%uuid of {_p}%}
function neoCredit(p: player, amount: number):
neoSetup({_p})
add {_amount} to {neo::credits::%uuid of {_p}%}
function neoDebit(p: player, amount: number) :: boolean:
neoSetup({_p})
if {neo::credits::%uuid of {_p}%} < {_amount}:
return false
remove {_amount} from {neo::credits::%uuid of {_p}%}
return true
function neoAddHeat(p: player, amount: number):
neoSetup({_p})
add {_amount} to {neo::heat::%uuid of {_p}%}
if {neo::heat::%uuid of {_p}%} > 100:
set {neo::heat::%uuid of {_p}%} to 100
function neoAddReputation(p: player, amount: number):
neoSetup({_p})
add {_amount} to {neo::reputation::%uuid of {_p}%}
if {neo::reputation::%uuid of {_p}%} >= 250:
set {neo::rank::%uuid of {_p}%} to "Ghost"
else if {neo::reputation::%uuid of {_p}%} >= 100:
set {neo::rank::%uuid of {_p}%} to "Cipher"
else if {neo::reputation::%uuid of {_p}%} >= 30:
set {neo::rank::%uuid of {_p}%} to "Hunter"
on script load:
send "{@prefix}&a Core systems online." to console
on join:
neoSetup(player)
send "{@prefix}&b Welcome back, &f%player%&b. Use &f/neonhelp &bto access the network." to player
on first join:
give 1 compass named "&bNeon Scanner" to player
give 1 paper named "&dIdentity Chip" to player
send "{@prefix}&f You received a &bNeon Scanner&f. Right-click it to locate active bounty targets." to player
command /neon:
trigger:
neoSetup(player)
send "&8&m----------------------------------------" to player
send "&b&lNEON FRONTIER &8| &fCitizen Dashboard" to player
send "&7Credits: &a%neoCredits(player)% ⬡" to player
send "&7Rank: &b%{neo::rank::%uuid of player%}%" to player
send "&7Reputation: &d%{neo::reputation::%uuid of player%}%" to player
send "&7Heat: &c%{neo::heat::%uuid of player%}%&7/100" to player
send "&8&m----------------------------------------" to player
send "&7Commands: &f/neonhelp, /armory, /terminal, /bounty, /contract" to player
command /neonhelp:
trigger:
send "&b&lNeon Frontier Commands" to player
send "&f/neon &8- &7View credits, rank, reputation, and heat." to player
send "&f/armory &8- &7Buy futuristic weapons and tactical equipment." to player
send "&f/terminal create <id> &8- &7Admin: register the block you face as a hacking terminal." to player
send "&f/terminal list &8- &7List registered terminals." to player
send "&f/hack <code> &8- &7Enter a terminal breach code." to player
send "&f/bounty place <player> <credits> &8- &7Place a bounty." to player
send "&f/bounty list &8- &7View active bounty contracts." to player
send "&f/contract accept <delivery|eliminate|hack> &8- &7Accept a city contract." to player
send "&f/heat &8- &7View your current corporate heat." to player
command /credits:
trigger:
send "{@prefix}&7 Your balance is &a%neoCredits(player)% credits&7." to player
command /heat:
trigger:
neoSetup(player)
send "{@prefix}&7 Corporate heat: &c%{neo::heat::%uuid of player%}%&7/100." to player
if {neo::heat::%uuid of player%} >= 75:
send "&cWARNING: Corporate response teams are actively tracking you." to player
else if {neo::heat::%uuid of player%} >= 40:
send "&6CAUTION: Your profile has been flagged by city security." to player
else:
send "&aYour signal profile is currently low-risk." to player
every 5 minutes:
loop all players:
neoSetup(loop-player)
if {neo::heat::%uuid of loop-player%} > 0:
remove 5 from {neo::heat::%uuid of loop-player%}
if {neo::heat::%uuid of loop-player%} < 0:
set {neo::heat::%uuid of loop-player%} to 0
send "{@prefix}&7 Your heat signature cooled by &a5&7." to loop-player
on right click:
if name of player's tool is "&bNeon Scanner":
set {_nearest} to 100000
delete {_target}
loop all players:
if {neo::bounty::amount::%uuid of loop-player%} is set:
if loop-player is not player:
set {_distance} to distance between player and loop-player
if {_distance} < {_nearest}:
set {_nearest} to {_distance}
set {_target} to loop-player
if {_target} is set:
send "{@prefix}&b Scanner lock: &f%{_target}% &8(&e%round({_nearest})% blocks&8)" to player
send "&7Active contract: &a%{neo::bounty::amount::%uuid of {_target}%}% credits" to player
else:
send "{@prefix}&7 Scanner result: no active bounty targets in the city." to player