Skript setup
Installing the scripts on a server, how they work, and the file layout.
File tree #
laravel-app/
├── app/
│ ├── Enums/ ActionStatus, ActionType, PunishmentType, ServerStatus
│ ├── Http/
│ │ ├── Controllers/
│ │ │ ├── Api/V1/ ServerApiController (base), Auth, Heartbeat, Queue,
│ │ │ │ PlayerSession, PlayerData, GameEvent, InGamePunishment
│ │ │ ├── Auth/ Login, PasswordReset, Invitation (invite-only onboarding)
│ │ │ ├── Settings/ Settings, Webhook, MailSettings
│ │ │ └── Dashboard, Player, Punishment, Broadcast, Server,
│ │ │ ActionQueue, Staff, Role, AuditLog
│ │ └── Middleware/ AuthenticateServer (bearer), EnsureUserIsActive
│ ├── Jobs/ SendDiscordWebhook, SendDiscordDm, SendPunishmentEmail
│ ├── Mail/ PunishmentIssued, StaffInvitationMail
│ ├── Models/ User, Role, StaffInvitation, Server, ServerToken, Player,
│ │ PlayerSession, PlayerMessage, GameEvent, Punishment,
│ │ ActionQueue, AuditLog, DiscordWebhook, Setting
│ ├── Providers/AppServiceProvider.php RBAC gate, rate limiters, SMTP overlay
│ └── Services/ ActionDispatcher, QueueService, PunishmentService,
│ PlayerSync, PlayerDataWriter, ServerHealth,
│ AuditLogger, DiscordNotifier, DiscordAlerts, MailSettings
├── config/network.php token TTL, heartbeat timeout, queue + rate limits
├── config/permissions.php permission catalogue + default roles
├── database/migrations/ users+roles+invitations, servers+server_tokens, players,
│ player_sessions+player_messages+game_events, punishments,
│ action_queues, audit_logs, discord_webhooks+settings
├── resources/css/app.css GOV.UK-style tokens and components (Tailwind 4)
├── resources/views/ Blade pages (auth, dashboard, players, punishments,
│ broadcasts, servers, queue, staff, roles, settings, audit, mail)
├── routes/api.php /api/v1/...
├── routes/web.php panel routes, each behind a permission
├── routes/console.php network:* commands + scheduler
└── tests/Feature/ ServerApiTest, PanelTest
skript/ grouped by domain, like a Laravel app: one folder per area, PascalCase files
├── config-pit.sk config for Pit servers } paste into scripts/config.sk and set
├── config-lobby.sk config for the lobby } server_id / server_name: API URL,
├── config-survival.sk config for survival } intervals, fallback rules, key file
├── updater/
│ └── Updater.sk installs mass, network and category updates and Script editor addons.
│ Copied by hand once; no update can replace it
├── core/ the framework every other script leans on
│ ├── Http/ ServerSafe (auth + token cache, NetSafe_Request, circuit breaker,
│ │ health probe, guaranteed-delivery outbox, /network),
│ │ QueueSync (poll → inbox → main-thread executor → ack; dedupe)
│ ├── Players/ Sessions (async pre-login profile + ban check, join/quit, heartbeat, TPS),
│ │ Storage (per-group saves: inventory codec, XP/health/location, keep inventory)
│ └── Support/ Compat (1.8 / modern helpers), Json (Gson helpers),
│ TextFormat (gradients, hex colours, click and hover parts, Text_Send),
│ ActionBar (the one shared, stacking action bar)
├── network/ server-wide modules, installed by the network updater:
│ ├── Chat/ ChatFilter (word filter, spam limits), ChatText (hovers, [item], kill message
│ │ hovers, gradients), Textmojis, CustomMessages (/custommessages), Language, Translations
│ ├── Combat/ Anim (particle/animation timelines), Combat (weapon skills, enchantments, elements),
│ │ Bosses, Elites, SmartMobs, HealthBars, Mechanics, CombatLog, Bounties
│ ├── Cosmetics/ Particles, Sounds, KillEffects, Pets (/pet), Names (/badge)
│ ├── Economy/ Coins (/pay), Shop, Loadouts, Marketplace (/marketplace), Auction (/auction), Exchange (/exchange), Premium (/store, /premium), Vote (/vote), Referrals
│ ├── Items/ CustomItems (/citem), Artifacts (/artifacts), Rarity, Recipes, Fishing
│ ├── Moderation/ Punishments, Reports, Lockdown, CommandBlock (blocked commands)
│ ├── Panel/ Portal (pushes from the panel), Console, Discord, Hooks (Script editor),
│ │ Globals, Handbook (/handbook), CustomCommands, ServerStorage, Events (activity log)
│ ├── Players/ PlayerData, Stats, StatsMenu (/stats), Settings, Xp, LevelRewards, Leaderboards,
│ │ Classes (/class), Blessings (/blessings), Jobs (/job), Mana (/mana), Sidebar
│ ├── Quests/ Progress (quests and badges), QuestStory (NPCs, dialogue, quest script runtime)
│ ├── Social/ Friends, Crews, Inbox (/inbox)
│ └── World/ Spawn, Teleports (/tpa), Rules (/worldinfo), Npcs, Envoy, Hub (/hub),
│ CommunityEvents (/events), Postpone
├── pit/ Pit gameplay (1.8.9):
│ ├── Combat/ Skills (/skills), Duels (/1v1)
│ ├── Kits/ DefaultKit (upgrades and kit), KitLayout, ItemShop
│ ├── Players/ Levels (levels, streaks, scoreboard), Leaderboard
│ ├── Support/ LegacyBridge, LanguageJP
│ └── World/ Spawn (spawn, combat tag), Launchpad, Misc
├── tag/ Tag game mode (modern Paper only): Tag (rounds, modes, voting, maps), TagSkills (/tag skills)
├── lobby/ Lobby.sk for the lobby (selector, pets, settings)
└── survival/ game/ = the survival gameplay, already split into Admin/, Player/ and Server/
(quests, dialogues, server events, effects, class buffs, UI, Server/Game/Islands/
for /island) + SurvivalBridge.sk
Only the top-level folders matter to the updater (core, network, the game mode's folder): it swaps each one
whole, so the subfolders inside them can change freely. Skript loads subfolders too, and functions work across
files whatever folder they're in. A folder or file whose name starts with - is skipped.
If you copy a folder by hand instead, delete the old core/, network/ or pit/ first. Copying the grouped layout over the old flat one leaves two copies of every script, so commands and functions are registered twice (/networkupdate clean turns off the older copy of a doubled command).
Requirements #
Requirements:
- Pit: Spigot/PaperSpigot 1.8.8–1.8.9, Skript 2.6.5-for-1.8, skript-reflect v2.3 (the last release for Skript 2.6), SkBee for the sidebar. JSON uses the Gson that ships inside Spigot, and HTTP uses
java.net.HttpURLConnection, so Java 8 works. - Lobby and survival: Paper 26.1.x, Skript 2.17.x, the current skript-reflect. Survival also needs the addons its gameplay already used: SkJson (the player cache), skript-gui (menus), and whatever provides
async run(as before). The scoreboard no longer needs FastBoard: it's drawn bynetwork/Players/Sidebar.sk, which 1.7 and 1.8 clients joining through ViaVersion can read.
The same core/ and network/ run on both. Anything that differs between 1.8 and modern (item names, sounds, menus, the | /citem list|menu|held|give <id> [player] [amount] (alias /customitem) item, skull skins, mob pathfinding, game rule names, item saving) goes through core/Support/Compat.sk: Net_Modern(), Net_Stack("SKULL_ITEM:3"), Net_Sound(player, "levelup") and so on. Item saves on modern servers use Paper's own format (p1: in the save); a 1.8 server leaves such a save alone instead of corrupting it.
Items passed to a function are copies. Skript clones an ItemStack when it goes into a function, so a function that changes an item must return it and the caller must keep the result: set {_stack} to Net_Glow({_stack}). A bare Net_Glow({_stack}) changes nothing (this was the "/citem held says it isn't a custom item" bug). The network's item-changing functions all return the stack (see Custom items in items-economy.md), and the linter refuses a bare call to them (SkriptLinter::ITEM_CHANGERS; add new ones there).
Things that stop a script loading on survival and lobby (Skript 2.17 on Paper). The linter refuses each of these (see Script editor in updates.md), but they're easy to write:
on right click on block:doesn't parse ("Can't understand this structure"). Useon right click:and start withif clicked block is not set: stop, then useclicked block.wait ({_secs} * 20) ticksdoesn't parse. Make the timespan first:set {_pause} to "%{_secs}% seconds" parsed as timespan, thenwait {_pause}.- In a function that returns a value (
function X() :: boolean:), areturnafter Skript'steleportor awaitis refused ("The return effect can only be used in functions…"): on Paper,teleportcounts as a delay. Teleport with Bukkit's own method instead,{_p}.teleport({_to}), which is instant (set{-dg::allow::<uuid>}around it inside a dungeon, as Skript's teleport needed). A wait inside arun 0 ticks later:orcreate new sectionblock is fine, since that block runs on its own. - Inside two
loop … times:loops, a bareloop-numbermatches neither ("There's no loop that matches"). Use a counter for the inner one:set {_i} to 0,while {_i} < …:,add 1 to {_i}. - Looping a Java collection needs skript-reflect's spread:
loop ...{_w}.getPlayers().toArray():(loop {_w}.getPlayers():says "it's only a single value"). loop-indexonly exists in a loop over a list variable, andloop-index-2only when two such loops are open;"%loop-index%"works but warns ("already a text"), so writeloop-index.
Coloured and clickable text goes through core/Support/TextFormat.sk. Net_Color turns <gradient:#ff5555:#5555ff>text</gradient> and &#ff8800 into colours (the closest of the 16 chat colours on 1.8). Text_Part(text, action, value, hover) builds one JSON part with a click and a hover in both the old and the 1.21.5+ shapes (only the old shape doesn't click on Paper), Text_Line / Text_Add / Text_SendLine put parts together, and Text_Send(player, text) sends trusted text with clickable links and <link:>, <run:>, <suggest:>, <copy:> and <hover:> markup. Never pass a player's chat message through the markup: network/Chat/ChatText.sk builds chat lines with raw parts instead. A player's message goes through ChatText_Message(player, text) once, in network/Panel/Events.sk: it turns the & codes, gradients and hex colours they're allowed into § codes and takes out the rest (see Chat text and spam in moderation.md), and ChatFilter_IsBlank stops messages with nothing visible before that.
The action bar goes through core/Support/ActionBar.sk, never send action bar directly (a test refuses it anywhere else). ActionBar_Show(player, source, text, seconds, priority) puts a message in that source's slot for the player, and ActionBar_Clear(player, source) takes it out; ActionBar_Has checks one. Each source (combat.charge, combat.skill, combat.timer, pets.ability, xp.gain, spawn.warmup, island.protect, panel.broadcast...) has one slot, so sending again from the same source replaces its text instead of fighting other scripts. Every 5 ticks (and right away when a slot's text changes) the slots still running are joined into one line, highest priority first (the oldest source first when equal), with &8| between them; parts that don't fit in 80 visible characters are left out, lowest priority first, and the line is re-sent before it fades. seconds is how long a message stays (default 2; 0 or less keeps it until ActionBar_Clear or the player leaves). Priorities: 100 alerts that must be read (teleport cancelled, can't build here), 90 countdowns, 80 charge bars and skill casts, 70 combat timer and roles, 60 cooldowns, 50 the default (pet and class messages), 40 status such as low HP, 30 XP and progress gains. Text takes & codes, gradients and hex colours (Net_Color); new lines become spaces. Survival's own helpers (PlayerAppUiActionbar__Intercept, __InterceptKeyed, __InterceptStack for "+12 XP" totals, __Update for the combat tag) now take seconds as a number and go through the same layer. It sends with Skript's send action bar, which works on both 1.8 Pit (Skript 2.6.5) and modern servers.
Install #
The scripts come in four folders:
| Folder | What it is | Goes on |
|---|---|---|
updater/ |
The network updater. No update can replace it, so it stays as it is | every server, copied by hand once |
core/ |
Network layer: API, queue, sessions, saves | every server, updated from the panel (Mass updates) |
network/ |
Server-wide modules: friends, coins and /pay, crews, quests, badges, /stats, pets, settings, language, /hub, Discord, chat filter, reports, loadouts, Item Shop, combat log, bounties |
every server, installed and updated from the panel |
pit/ |
Pit gameplay (kit, levels, spawn and combat tag, launchpad, Japanese menus) | Pit servers |
lobby/ |
Lobby: hotbar with server selector, pets and settings menus | the lobby |
survival/game/ |
The survival gameplay | survival servers |
config-pit.sk, config-lobby.sk, config-survival.sk |
The config for each kind of server | pasted into scripts/config.sk |
- In the panel, go to Servers → Register a server, put the server in a group, and copy the API key.
- Put the key on a single line in
plugins/Skript/network-api-key.txt. - Copy into
plugins/Skript/scripts/:config.sk(paste inconfig-pit.sk,config-lobby.skorconfig-survival.sk),updater/,core/, andpit/(Pit),lobby/Lobby.sk(lobby) orsurvival/game/(survival: asscripts/survival/orscripts/survival/game/, either works). Do not copyold/orold-survival/. Moving an existing server:Updater.skused to be incore/. Deletescripts/core/Updater.sk, then copy the newupdater/andcore/folders, and run/sk reload all. If both copies are there, Skript reports duplicate functions and neither works. This is needed once; after it,core/comes from Mass updates. - Publish the server-wide scripts once: Developers → Mass updates, upload a zip of your folders, and add
network(and the game mode's folder) to each category under Folders to apply. Each server installs them within a minute and reloads. Later changes are published the same way. Network updates (skript/network.zip) still work too./networkupdateshows the installed version, and/networkupdate forcereinstalls. Updates no longer leave the replaced folder behind: it's deleted once the new one is in (exceptcore's last one,-core.old-…, the way back from a brokencore), and on every load the updater deletes any old copies (-<folder>.old-…,-<folder>.new) and writes doubled commands to the console. A server whose category has no Script editor package at all (none published, or it moved category) deletes its oldscripts/addons/./networkupdate cleandoes the same now, deletes thecorebackup too, turns off the older of two same-named scripts that register the same command (renamed to-Name.sk), and sends everyone their command list again. All of this needs the newupdater/Updater.skcopied by hand, andcoreupdated. You can also copynetwork/by hand. - Edit
config.sk: setapi_url,server_id, and the proxy names (lobby_server,proxy_name::<ID>) if they differ from the panel server IDs in lower case. - Run
/sk reload all, then check with/network(permissionnetwork.admin). In the lobby, stand where players should appear and type/setlobbyspawn.
How it works #
- No blocking on the main thread. Every HTTP call runs in a skript-reflect async section.
NetSafe_Requestrefuses to run on the main thread. Data passes between threads throughConcurrentLinkedQueues: the outbox, the event buffer, the inbox and pending acks. Bukkit calls such as kicks and titles happen only in the main-thread executor. - Pre-login runs on Bukkit's async login thread. It loads the profile, refreshes the local ban/mute cache and refuses banned players with the ban screen. It waits up to 8 seconds for another server to release the session, which keeps the legacy behaviour and messages.
- Fallback when the panel is down. After 3 consecutive failures the circuit opens, and only
GET /healthis probed, with backoff (2, 4, 8 … 60 s). While it's open, players join from the local cache with locally cached bans still enforced. Session events, final saves and in-game punishments wait in the outbox and are delivered in order once a probe succeeds. Chat and command logs are best-effort and capped at 2000 entries. To restore the legacy strict behaviour, setallow_join_when_offlinetofalseorkick_on_outagetotrue. - Chat logs show where. Every chat line, private message and command (
network/Panel/Events.sk) is sent with the world and block the player was at, shown in the Where column of a player's Messages tab (player_messages.location). Other recorded events get it in their payload aslocation. - Token handling. The token is cached (and survives restarts) until one minute before expiry. A
401 token_invalidtriggers one re-authentication and a retry. A wrong key or a disabled server is logged once, and authentication then pauses for 60 seconds instead of hammering the API.
Legacy migration #
- The gameplay files moved to
modules/game/unchanged: kit/upgrades, item shop, Japanese language, launchpad, stats, levels/killstreak/scoreboard, misc and spawn/combat. Commands, GUIs and messages are the same. - They keep using the same variables (
{lvl::},{cxp::},{coins::},{killstreak::},{kills::*::},{upgrade::*::},{lang::}). Those are now a local cache of the panel record: loaded on join, autosaved every 60 seconds, and saved with the quit event. - Progress migrates automatically. If the panel has no data for a player yet (
data_version0), the existing local variables are kept and uploaded on the next save. - The connector's prompts are kept: "Loading Complete", "Server is preparing for update…", "Your account is active on server X…", "CloudProvider: Service is unavailable…", the profile-loading chat guard, and "Skipped cloud save…". Its storage layer is replaced.
LegacyBridge.skkeeps theServerCloudStorage__Connector_*function names so remaining callers still work. Bounty now lives in the player data blob. /email set|viewis kept with the same messages and masking. The address is stored on the panel and used for ban emails.
Script hooks reference #
Everything Script editor projects (Developers > Script editor), custom item scripts (Items > Custom items > an item > Scripts) and the network's own scripts can use to talk to the rest of the network. The editor lists the same functions and events next to the code (click one to insert it), with a link here.
There are two kinds:
- Functions you call, like
Net_Money(player)orDungeon_RunOf(player). They're defined innetwork/Panel/Hooks.sk(Net_..., kept in step withApp\Support\ScriptHooks),network/Players/Mana.sk,network/Items/..., and for survivalsurvival/game/Server/Game/Dungeons/Dungeon.sk(Dungeon_...) andIslands/Island.sk(Island_Owner). Survival-only functions only exist on survival servers, so a project that calls them belongs in the survival category. - Event hooks: functions you define, named after the event (
On_DungeonClear), that the network calls when it happens. Give it exactly the arguments listed (the linter refuses a different number). Several projects can each react to the same event by adding their own ending:On_DungeonClear_myaddon. The network scripts callNet_Hook("dungeon_clear", ...)where it happens; when the panel publishes a category's Projects it finds everyOn_function in them and adds one generated file,scripts/addons/script-hooks/ScriptHooks.sk(App\Support\ScriptEvents), that calls them. Nothing is queued for an event no project uses. Hooks run on the next tick, so they can't cancel what happened, and a player in the arguments may have gone offline by then (if {_p} is online:).
# A project in the survival category: pay everyone who clears a hardcore raid.
function On_DungeonClear(run: number, key: text):
if Dungeon_IsHardcore({_run}) is false:
stop
loop Dungeon_Members({_run}):
Net_MoneyGive(loop-value, 1000)
send "&6+1000 for clearing %{_key}% on hardcore!" to loop-value
Custom item scripts #
On a custom item's page (Items > Custom items), Scripts has a box for each event: right click, left click, hitting an entity, being hit while holding or wearing it, killing with it, mining a block, consuming it, holding it (every tick), equipping or unequipping it (armour, checked twice a second, and again when they join wearing it) and dropping it, each with its own cooldown in seconds (per player; 0 for none). The code runs only for that item: the handlers match the custom item ID tag, so renamed or restacked copies still count. Every event has {_player} and {_item} (the ItemStack); right and left click have {_block} (if they clicked one), hitting has {_victim} and {_damage}, being hit has {_attacker} (not set for falls and fire) and {_damage}, killing has {_victim}, mining has {_block}. Set {_cancel} to true to cancel the event (not for killing, holding, equipping or unequipping), and set {_damage} to change the damage. Both are read when the code reaches its end, so don't stop before it if you set them.
Saving runs the linter on each event's code and refuses it with the event and the line number of the code as typed. Each event becomes a function, CItemScript_<item id>_<event>(player, item), in one generated file, scripts/addons/item-scripts/ItemScripts.sk (App\Support\ItemScripts), published with every category's Projects (custom items are network-wide) within a minute of saving. Only the events some item uses get a handler, and they work on both Pit (1.8, Skript 2.6.5) and modern servers. The form has example snippets.
Functions #
Player data
| Function | What it does |
|---|---|
Net_DataGet(p: player, key: text) :: object |
A value your project saved for this player. Saved with their game mode save, so it follows them across servers in this category. |
Net_DataSet(p: player, key: text, value: object) |
Save a value for this player (number, text or true/false). Use your project name in the key, e.g. "myaddon.wins". |
Net_DataAdd(p: player, key: text, amount: number) |
Add to a saved number. |
Stats, quests and badges
| Function | What it does |
|---|---|
Net_Stat(p: player, key: text, amount: number = 1) |
Add to a stat on their Saved data and My stats pages (shown under "Other"). |
Net_Quest(p: player, key: text, amount: number = 1) |
Count progress for quest and badge objectives of type "Custom" with this key. |
Money
| Function | What it does |
|---|---|
Net_Money(p: player) :: number |
Their in-game money on this game mode. |
Net_MoneyGive(p: player, amount: number) |
Give in-game money (also runs money_give_command). |
Net_MoneyTake(p: player, amount: number) :: boolean |
Take money if they have enough. Returns false (and takes nothing) if not. |
Player info
| Function | What it does |
|---|---|
Net_Tr(p: player, key: text, fallback: text) :: text |
Text in the player's language (Translations; use a "custom." key). |
Trf(p: object, key: text, fallback: text, a: text = "", ...) :: text |
A sentence with values, in the language of the player: Trf(player, "custom.paid", "You paid {amount}", "amount=%{_x}%"). Up to 8 values. |
Net_Language(p: player) :: text |
Their language code, e.g. EN or JP. |
Net_Setting(p: player, key: text) :: boolean |
One of their settings: friend_requests, private_messages, join_alerts, friend_alerts, show_pet. |
Net_InCombat(p: player) :: boolean |
True while they are combat tagged. |
Net_Badge(p: player) :: text |
The chat tag of the badge they wear, or "". |
Net_Crew(p: player) :: text |
Their crew tag, or "". |
Crew_Of(p: player) :: text |
The same as Net_Crew: their crew tag, or "". |
Net_IsPremium(p: player) :: boolean |
True while they have Premium. |
Net_Level(p: player) :: number |
Their network level (1 if they have none yet). |
Mana (MP)
| Function | What it does |
|---|---|
Net_ManaOn() :: boolean |
True where the Mana rule is on. Where it's off every mana hook acts as "has enough" and changes nothing, so your script works either way. |
Net_Mana(p: player) :: number |
Their MP now (whole number). Where mana is off: 0. |
Net_ManaMax(p: player) :: number |
Their max MP: the category's max plus class, artifact and script bonuses. |
Net_ManaRegen(p: player) :: number |
MP they get back per second, bonuses included. |
Net_ManaHas(p: player, amount: number) :: boolean |
True if they have at least this much MP (always true where mana is off). |
Net_ManaUse(p: player, amount: number) :: boolean |
Take MP only if they have enough. Returns false (and takes nothing) if not, and tells them. Always true where mana is off. |
Net_ManaGive(p: player, amount: number) |
Give MP back, up to their max. |
Net_ManaSet(p: player, amount: number) |
Set their MP (kept between 0 and their max). |
Net_ManaBonus(p: player, key: text, maxAdd: number, regenAdd: number, seconds: number = 0) |
Add max MP and/or MP per second under a key of yours, e.g. "myaddon.potion". 0 seconds: it lasts until removed. Saved with their game mode save, so it follows them across servers in this category (a timed one runs out on time even while they're away). The same key again replaces it. |
Net_ManaBonusRemove(p: player, key: text) |
Take a bonus off again. |
Net_ManaListen(command: text) |
Run a console command of yours when MP is spent, given or short: "<command> <player> used|gave|short <amount> <mp left>". Call it on load, e.g. Net_ManaListen("myaddon_mana") with a command /myaddon_mana that only the console can run. |
Anti-AFK
| Function | What it does |
|---|---|
Net_IsAfk(p: player) :: boolean |
True while they're AFK under the category's Anti-AFK rules. Always false where anti-AFK is off. |
Net_AfkSeconds(p: player) :: number |
Seconds since they last did something that counts as activity (0 where anti-AFK is off). |
Net_AfkActivity(p: player) |
Count something your script saw them do as activity, so they aren't AFK. |
Server
| Function | What it does |
|---|---|
Net_Group() :: text |
This server's category, e.g. "pit". |
Net_Server() :: text |
This server's ID, e.g. "PIT_US_1". |
Net_Rule(key: text) :: object |
A world rule for this server (e.g. "pvp", "difficulty"). |
Dungeons (survival)
| Function | What it does |
|---|---|
Dungeon_InRaid(p: player) :: boolean |
True while they are in a raid (forming or running). |
Dungeon_RunOf(p: player) :: number |
The ID of the raid they are in, or 0. Other dungeon functions take it. |
Dungeon_KeyOf(run: number) :: text |
The raid's dungeon key (Gameplay > Dungeons), in capitals, or "". |
Dungeon_IsLeader(p: player) :: boolean |
True if they lead the raid they are in. |
Dungeon_Members(run: number) :: players |
Everyone in the raid who is online on this server: loop Dungeon_Members({_run}): |
Dungeon_LivesLeft(p: player) :: number |
Deaths they have left before they are out of their raid: -1 with no limit, 0 when not in a raid. |
Dungeon_TimeLeft(run: number) :: number |
Seconds until the raid's time runs out (0 before it begins or after it ends). |
Dungeon_IsHardcore(run: number) :: boolean |
True for a hardcore raid. |
Dungeon_Difficulty(run: number) :: text |
The dungeon's difficulty as set on the panel, or "". |
Dungeon_InDungeonWorld(loc: location) :: boolean |
True if this location is in a dungeon world. |
Islands (survival)
| Function | What it does |
|---|---|
Island_Owner(w: object) :: text |
The owner's UUID if this world or location is on a loaded island, else "": Island_Owner(location of player). |
Envoys
| Function | What it does |
|---|---|
Envoy_AddCrate(id: text, name: text, weight: number = 10) |
A crate type of your own (call it first, e.g. on load). Weight is against 100 for the panel's crate. |
Envoy_AddItem(id: text, item: object, chance: number = 100) |
Something your crate can hold, with its chance in % per crate. |
Envoy_AddCommand(id: text, command: text, chance: number = 100) |
A console command your crate runs ({player} is the opener). |
Envoy_Start() |
Start an envoy now (crates fall around the envoy centre). |
Envoy_Left() :: number |
How many crates from the current envoy are still out there. |
Custom items
| Function | What it does |
|---|---|
Net_Item(id: text, amount: number = 1) :: object |
An ItemStack of a custom item by its ID (Items > Custom items), or nothing if there is no such item. |
Net_ItemGive(p: player, id: text, amount: number = 1) :: boolean |
Give them a custom item; what doesn't fit drops at their feet. Returns false if there is no such item. |
Net_ItemIs(stack: object, id: text) :: boolean |
True if this item is the custom item with this ID, e.g. Net_ItemIs(Net_HeldItem(player), "3fa9c0d1"). |
Net_ItemId(stack: object) :: text |
The custom item ID of this item, or "" if it isn't one. Works after a pickup, a restart or an edit on the panel. |
Rarity
| Function | What it does |
|---|---|
Net_Rarity(stack: object) :: text |
The item's rarity (Items > Rarity): like "common", "epic" or a tier staff added. Anything not rated, or rated with a deleted tier, is the default ("common"). |
Net_RaritySet(stack: object, tier: text) :: object |
Give this item its own rarity, over its material's, and update its lore line. "" clears it. Modern servers only. Returns the changed item, so keep it: set {_item} to Net_RaritySet({_item}, "epic"). |
Net_RarityRank(tier: text) :: number |
0 for the lowest tier upwards (Common is 0 to start with), for comparing tiers. |
Custom messages
| Function | What it does |
|---|---|
Net_CustomMessage(p: player, type: text) :: text |
The ID of the "join", "quit" or "death" message they chose (Cosmetics and text > Custom messages), or "" for the normal one. |
Net_CustomMessageText(p: player, type: text, killer: text = "") :: text |
That message ready to show, or "" for the normal one. For a death, pass the killer's name if a player made the kill. |
Both versions (1.8 and modern)
| Function | What it does |
|---|---|
Net_Modern() :: boolean |
True on modern servers (lobby, survival), false on 1.8 (Pit). |
Net_Stack(spec: text, amount: number = 1) :: object |
An item by name on either version, e.g. "SKULL_ITEM:3", "WOOL:14", "MONSTER_EGG:PIG". |
Net_Sound(p: player, sound: text, volume: number = 1, pitch: number = 1) |
Play orb, levelup, pling, bass, click, anvil, pop, chest, explode, wither or enderdragon. |
Net_HeldItem(p: player) :: object |
The item in their main hand. |
Net_Short(n: number) :: text |
A big number for players: 1.2K, 1.5M, 2B. |
Net_Color(t: text) :: text |
Colour codes for text going into Java calls (item names, lore): Net_Color("&aHello"). On Skript 2.17 use it instead of "colored" there. |
Messages
| Function | What it does |
|---|---|
Net_Link(p: player, message: text, url: text) |
A chat line that opens a link when clicked. |
Net_Notify(uuid: text, message: text) |
Message a player by UUID, wherever they are on the network (through the panel). Kept for them if they are offline, and shown when they next sign in. |
Net_Log(project: text, message: text) |
Write to your project's log on the panel (shown under the editor). Handy for debugging. |
Event hooks #
Dungeons (survival)
-
On_DungeonStart(leader: player, run: number, key: text): A raid was started (forming; others can join).function On_DungeonStart(leader: player, run: number, key: text): send "&7Good luck with %{_key}%!" to {_leader} -
On_DungeonJoin(p: player, run: number, key: text): Someone joined a forming raid.function On_DungeonJoin(p: player, run: number, key: text): send "&aWelcome to the party." to {_p} -
On_DungeonBegin(run: number, key: text): The party was taken into the dungeon.function On_DungeonBegin(run: number, key: text): loop Dungeon_Members({_run}): send title "&4%{_key}%" to loop-value -
On_DungeonClear(run: number, key: text): The raid was cleared.function On_DungeonClear(run: number, key: text): loop Dungeon_Members({_run}): Net_Stat(loop-value, "myaddon.clears") -
On_DungeonFail(run: number, key: text, result: text): The raid failed ("failed": time ran out or nobody was left) or was "abandoned".function On_DungeonFail(run: number, key: text, result: text): broadcast "&cA %{_key}% raid %{_result}%." -
On_DungeonLeave(p: player, run: number, why: text): They left a raid: "left" (also logging off or teleporting out) or "died" (out of lives).function On_DungeonLeave(p: player, run: number, why: text): send "&7You left (%{_why}%)." to {_p} -
On_DungeonDeath(p: player, run: number, livesLeft: number): They died in the raid. livesLeft is -1 when there is no limit.function On_DungeonDeath(p: player, run: number, livesLeft: number): if {_livesLeft} is 1: send "&cLast life!" to {_p} -
On_DungeonSpawnerClear(run: number, code: text): A spawner spawned all its mobs and they are all dead (its code, e.g. DSP-ABCDE).function On_DungeonSpawnerClear(run: number, code: text): Net_Log("myaddon", "Spawner %{_code}% cleared in raid %{_run}%") -
On_DungeonBossSpawn(run: number, boss: entity, key: text): A spawner's boss appeared (its boss key).function On_DungeonBossSpawn(run: number, boss: entity, key: text): loop Dungeon_Members({_run}): Net_Sound(loop-value, "wither") -
On_DungeonBossKill(run: number, key: text, killer: object): A dungeon boss died. killer is the player who killed it, or "".function On_DungeonBossKill(run: number, key: text, killer: object): if {_killer} is a player: Net_MoneyGive({_killer}, 500) -
On_DungeonWallOpen(run: number, code: text): A [wall] came down (the spawner code, or "zone:<name>").function On_DungeonWallOpen(run: number, code: text): Net_Log("myaddon", "Wall %{_code}% opened") -
On_DungeonTeleport(p: player, run: number, code: text): A teleporter took them through (its TP- code).function On_DungeonTeleport(p: player, run: number, code: text): Net_Sound({_p}, "orb") -
On_DungeonEnd(p: player, run: number): They clicked the open end point (the dialogue starts, then the raid ends cleared).function On_DungeonEnd(p: player, run: number): send "&6You found the way out!" to {_p}
Tag
-
On_TagRoundStart(mode: text, map: text): A round started (everyone is in place).function On_TagRoundStart(mode: text, map: text): broadcast "&aRound of %{_mode}% on %{_map}%!" -
On_TagRoundEnd(mode: text, winners: text): A round ended. winners is their names, joined with commas ("" for none).function On_TagRoundEnd(mode: text, winners: text): broadcast "&6Winners: %{_winners}%" -
On_TagTagged(tagger: player, tagged: player, mode: text): Someone was tagged.function On_TagTagged(tagger: player, tagged: player, mode: text): Net_Stat({_tagger}, "myaddon.tags") -
On_TagBooster(p: player, name: text, buff: boolean): They picked up a booster (buff false: a nerf).function On_TagBooster(p: player, name: text, buff: boolean): if {_buff} is false: send "&cUnlucky!" to {_p}
Islands (survival)
-
On_IslandEnter(p: player, owner: text): They arrived on an island from another world (owner: the owner's UUID).function On_IslandEnter(p: player, owner: text): send "&7Entering an island." to {_p} -
On_IslandLeave(p: player, owner: text): They left an island for another world.function On_IslandLeave(p: player, owner: text): send "&7Leaving the island." to {_p} -
On_IslandUpgrade(p: player, owner: text, level: number): They bought an island size upgrade (the new size level).function On_IslandUpgrade(p: player, owner: text, level: number): broadcast "&a%name of {_p}%'s island grew to size %{_level}%!"
Players
-
On_LevelUp(p: player, level: number, from: number): Their network level went up (checked every second; from is the level before).function On_LevelUp(p: player, level: number, from: number): if mod({_level}, 10) is 0: broadcast "&b%name of {_p}% reached level %{_level}%!" -
On_JobLevelUp(p: player, job: text, level: number): A job of theirs levelled up (the job's key).function On_JobLevelUp(p: player, job: text, level: number): Net_MoneyGive({_p}, {_level} * 10) -
On_QuestComplete(p: player, quest: number, title: text): They finished a quest (its ID and title).function On_QuestComplete(p: player, quest: number, title: text): send "&dWell done on %{_title}%!" to {_p} -
On_CrewJoin(p: player, crew: text): They joined a crew (its tag), while online here.function On_CrewJoin(p: player, crew: text): send "&5Welcome to %{_crew}%." to {_p} -
On_CrewLeave(p: player, crew: text): They left a crew (or it was disbanded).function On_CrewLeave(p: player, crew: text): send "&7You left %{_crew}%." to {_p} -
On_PremiumGained(p: player): They got Premium while online here.function On_PremiumGained(p: player): Net_ItemGive({_p}, "3fa9c0d1") -
On_Crit(attacker: object, victim: object): A hit was a critical hit (the network's crits: classes, Pit skills, pets, survival's crit rate).function On_Crit(attacker: object, victim: object): if {_attacker} is a player: Net_Stat({_attacker}, "myaddon.crits")