so im using skript and skbee to create this orbs plugin i have all the orbs and the infusion system but the /orbshop system wasnt made yet can you make it please
📎
1 file
14,813 chars
📄
pasted-code-1775754552838.txt
txt
298 lines
▶
pasted-code-1775754552838.txt
txt
298 lines
# ==========================================
# ADMIN COMMAND: GET AUTHENTIC ORBS
# ==========================================
command /orbs:
permission: op
trigger:
# SECURITY TAG
set {_auth} to "&r&r&7&m"
set {_tag} to " &8◈%{_auth}%"
# OFFENSIVE (Magma Cream) - Weapons
give player 1 magma cream named "&e[Volt Orb]" with lore "&7Infuse into Weapon" and "%{_tag}%"
give player 1 magma cream named "&b[Frost Orb]" with lore "&7Infuse into Weapon" and "%{_tag}%"
give player 1 magma cream named "&2[Venom Orb]" with lore "&7Infuse into Weapon" and "%{_tag}%"
give player 1 magma cream named "&f[Precision Orb]" with lore "&7Infuse into Weapon", and "%{_tag}%"
give player 1 magma cream named "&8[Decay Orb]" with lore "&7Infuse into Weapon" and "%{_tag}%"
# DEFENSIVE (Snowball) - Armor
give player 1 snowball named "&9[Guardian Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 snowball named "&3[Chillguard Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 snowball named "&e[Grounded Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 snowball named "&c[Bloodguard Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 snowball named "&6[Absorption Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
# UTILITY (Slimeball) - Armor
give player 1 slime ball named "&d[Insight Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 slime ball named "&a[Dash Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 slime ball named "&f[Feather Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 slime ball named "&b[Gale Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
give player 1 slime ball named "&5[Vision Orb]" with lore "&7Infuse into Armor" and "%{_tag}%"
send "&a&l⚡ &7Orbs delivered!" to player
# ==========================================
# UNIVERSAL INFUSION ENGINE
# ==========================================
on rightclick:
# 1. THE RELIABLE SECURITY CHECK
# We check for the special symbol ◈ and the gray strikethrough color code.
set {_item_lore} to "%lore of player's tool%"
# If the item doesn't have the "Orb" tag in the lore, stop.
if {_item_lore} contains "◈":
# This double-checks that it wasn't made in an anvil.
# Anvils strip the '§' symbol used for color codes.
if {_item_lore} does not contain "§":
send "&c&l✘ &7Invalid Orb! Anvils strip security codes." to player
stop
cancel event
set {_orb} to player's tool
set {_orb_name} to name of {_orb}
set {_gear} to player's offhand tool
set {_gear_str} to "%{_gear}%"
# 2. SLOT CALCULATION
set {_gear_lore} to "%lore of {_gear}%"
set {_slots} to 0
if {_gear_lore} contains "◈":
add 1 to {_slots}
if {_gear_lore} contains "◈ ◈":
set {_slots} to 2
if {_slots} >= 2:
send "&c&l✘ &7Item is full (2/2)!" to player
stop
# 3. PREPARE DISPLAY NAME
set {_display} to {_orb_name}
replace all "[" and "]" and " Orb" with "" in {_display}
set {_mark} to "◈" if {_slots} is 0 else "◈ ◈"
# 4. INFUSION LOGIC
# WEAPONS (Magma Cream)
if {_orb} is magma cream:
if {_gear_str} contains "sword" or "axe":
add "&8» &f%{_display}% Infused &7%{_mark}% §r§r§7§m" to lore of player's offhand tool
remove 1 of {_orb} from player's inventory
send "&e&l✨ &f%{_display}% &7infused into weapon!" to player
play sound "block.enchantment_table.use" at player
else:
send "&c&l✘ &7Magma orbs are for Weapons only!" to player
# ARMOR (Snowball / Slimeball)
else if {_orb} is snowball or slime ball:
if {_gear_str} contains "helmet" or "chestplate" or "leggings" or "boots":
add "&8» &f%{_display}% Infused &7%{_mark}% §r§r§7§m" to lore of player's offhand tool
remove 1 of {_orb} from player's inventory
send "&b&l✨ &f%{_display}% &7infused into armor!" to player
play sound "block.enchantment_table.use" at player
else:
send "&c&l✘ &7These orbs are for Armor only!" to player
# 5. ERROR CATCHER
else if name of player's tool contains "Orb":
send "&c&l✘ &7Security Check Failed. Run /orbs again for new items." to player
on damage:
attacker is a player
# Broad check: Does the weapon lore contain our symbol and an orb name?
set {_w} to "%lore of attacker's tool%"
if {_w} contains "◈":
# --- VOLT ORB ---
if {_w} contains "Volt":
chance of 25%:
strike lightning effect at victim
damage victim by 1.5
# --- FROST ORB ---
if {_w} contains "Frost":
apply slowness 2 to victim for 3 seconds
# --- VENOM ORB ---
if {_w} contains "Venom":
apply poison 1 to victim for 4 seconds
# --- PRECISION ORB ---
if {_w} contains "Precision":
add 1 to {combo::%attacker%}
set {comborelease::%attacker%} to now
if {combo::%attacker%} >= 3:
set damage to damage + 1.5
# --- DECAY ORB ---
if {_w} contains "Decay":
if attacker is not on ground:
if attacker's fall distance > 0:
loop armor of victim:
damage loop-value by 5
play sound "entity.item.break" with volume 0.5 at victim
# Reset combos every 2 seconds
every 2 seconds:
loop all players:
if {combo::%loop-player%} is set:
set {_diff} to difference between {comborelease::%loop-player%} and now
if {_diff} > 2 seconds:
delete {combo::%loop-player%}
# ==========================================
# ARMOR ABILITIES (DEFENSE)
# ==========================================
on damage:
victim is a player
# Broad check for the symbol to ensure it's an infused item
set {_v_armor} to "%lore of victim's helmet% %lore of victim's chestplate% %lore of victim's leggings% %lore of victim's boots%"
if {_v_armor} contains "◈":
# --- GUARDIAN ORB (Damage Reduction 20%) ---
if {_v_armor} contains "Guardian":
# Reduces final damage by 20%
set damage to damage * 0.8
# --- CHILLGUARD ORB (Slows Attacker) ---
if {_v_armor} contains "Chillguard":
if attacker is a player or a monster:
apply slowness 1 to attacker for 3 seconds
# --- GROUNDED ORB (Energy/Lightning Resistance) ---
if {_v_armor} contains "Grounded":
if damage cause is lightning or magic or potion:
set damage to damage * 0.5 # 50% reduction for these specific types
# --- BLOODGUARD ORB (Low HP Resistance) ---
if {_v_armor} contains "Bloodguard":
if health of victim is less than 4: # 2 hearts or lower
apply resistance 2 to victim for 5 seconds
send "&c&l❤ &7Bloodguard Activated!" to victim
# --- ABSORPTION ORB (Periodic Hearts) ---
# This runs on a timer because it's a passive buff
every 10 seconds:
loop all players:
set {_v_armor} to "%lore of loop-player's helmet% %lore of loop-player's chestplate% %lore of loop-player's leggings% %lore of loop-player's boots%"
if {_v_armor} contains "◈":
if {_v_armor} contains "Absorption":
# Gives 2 golden hearts
apply absorption 1 to loop-player for 8 seconds
# ==========================================
# UTILITY ABILITIES
# ==========================================
# --- DASH ORB (Forward Dash) ---
# Triggers on Sneak (Shift)
on sneak toggle:
player is sneaking
set {_v} to "%lore of player's helmet% %lore of player's chestplate% %lore of player's leggings% %lore of player's boots%"
if {_v} contains "Dash":
# Check cooldown (prevents spamming)
if {dash_cd::%player%} is not set:
push player forward at speed 1.5
push player forward at speed 0.2
set {dash_cd::%player%} to true
wait 5 seconds
delete {dash_cd::%player%}
send "&a&l⚡ &7Dash ready!" to player
# --- INSIGHT ORB (Action Bar Health) ---
on damage:
attacker is a player
set {_v} to "%lore of attacker's helmet% %lore of attacker's chestplate% %lore of attacker's leggings% %lore of attacker's boots%"
if {_v} contains "Insight":
# Action Bar is the most compatible way to show health in 2.14.2
set {_hp} to health of victim
set {_max} to max health of victim
send action bar "&fTarget: &b%victim% &8| &c%{_hp}%&7/&c%{_max}% HP" to attacker
# --- PASSIVE UTILITIES (Gale, Vision, Feather) ---
every 3 seconds:
loop all players:
set {_v} to "%lore of loop-player's helmet% %lore of loop-player's chestplate% %lore of loop-player's leggings% %lore of loop-player's boots%"
if {_v} contains "◈":
if {_v} contains "Gale":
apply speed 1 to loop-player for 4 seconds
if {_v} contains "Vision":
apply night vision 1 to loop-player for 4 seconds
if {_v} contains "Feather":
# Fall damage reduction via slow falling
apply slow falling 1 to loop-player for 4 seconds
# ==========================================
# 1. THE MAIN GUIDE CATEGORIES
# ==========================================
command /orbguide:
trigger:
open chest with 3 rows named "&0Guide: Select Category" to player
set metadata tag "ORB_GUIDE" of player to "main"
set slot 11 of player's current inventory to diamond sword named "&cOffense Orbs" with lore "&7Click to view Offense abilities"
set slot 13 of player's current inventory to diamond chestplate named "&9Defense Orbs" with lore "&7Click to view Defense abilities"
set slot 15 of player's current inventory to feather named "&fUtility Orbs" with lore "&7Click to view Utility abilities"
# ==========================================
# 2. THE SUB-GUIDE MENUS
# ==========================================
command /guide-offense:
trigger:
open chest with 3 rows named "&0Guide: Offense" to player
set metadata tag "ORB_GUIDE" of player to "info"
set slot 11 of player's current inventory to magma cream named "&eVolt Orb" with lore "&7On Hit: Strikes your enemy" and "&7with lightning."
set slot 12 of player's current inventory to magma cream named "&bFrost Orb" with lore "&7On Hit: Applies slowness effect on your enemy" and "&7 for 2 seconds."
set slot 13 of player's current inventory to magma cream named "&2Venom Orb" with lore "&7On Hit: Inflicts Poison II" and "&7on your target."
set slot 14 of player's current inventory to magma cream named "&cPrecision Orb" with lore "&7On Hit: Deals a extra damage" and "&7on combos."
set slot 15 of player's current inventory to magma cream named "&8Decay Orb" with lore "&7On Hit: Deals extra durability damage" and "&7to your enemys armor."
set slot 22 of player's current inventory to barrier named "&cBack"
command /guide-defense:
trigger:
open chest with 3 rows named "&0Guide: Defense" to player
set metadata tag "ORB_GUIDE" of player to "info"
set slot 11 of player's current inventory to (snowball named "&9Guardian Orb" with lore "&7Passive: Reduces incoming" and "&7damage by 20%%")
set slot 12 of player's current inventory to snowball named "&3Chillguard Orb" with lore "&7Passive: Slows down enemies" and "&7who hit you."
set slot 13 of player's current inventory to snowball named "&eGrounded Orb" with lore "&7Passive: Reduces damage from effects to" and "&7lightning charges."
set slot 14 of player's current inventory to snowball named "&cBloodguard Orb" with lore "&7Passive: Gives you resistance effect" and "&7on low hp."
set slot 15 of player's current inventory to snowball named "&6Absorption Orb" with lore "&7Passive: gives you absorption effect and" and "&7hearts every 30 seconds."
set slot 22 of player's current inventory to barrier named "&cBack"
command /guide-utility:
trigger:
open chest with 3 rows named "&0Guide: Utility" to player
set metadata tag "ORB_GUIDE" of player to "info"
set slot 11 of player's current inventory to slime ball named "&dInsight Orb" with lore "&7Use: Highlights your enemys" and "&7hp when fighting."
set slot 12 of player's current inventory to slime ball named "&aDash Orb" with lore "&7Use: Gives the ability to lunge but with a cooldown" and "&7in the direction you look."
set slot 13 of player's current inventory to slime ball named "&fFeather Orb" with lore "&7Passive: Grants permanent" and "&7Slow Falling."
set slot 14 of player's current inventory to slime ball named "&bGale Orb" with lore "&7Use: applies speed 2 effect to you."
set slot 15 of player's current inventory to slime ball named "&5Vision Orb" with lore "&7Passive: Grants permanent" and "&7Night Vision."
set slot 22 of player's current inventory to barrier named "&cBack"
# ==========================================
# 3. THE CLICK LOGIC (No Stealing)
# ==========================================
on inventory click:
if metadata tag "ORB_GUIDE" of player is set:
cancel event
# Navigation logic
if event-item is diamond sword:
execute player command "/guide-offense"
else if event-item is diamond chestplate:
execute player command "/guide-defense"
else if event-item is feather:
execute player command "/guide-utility"
else if event-item is barrier:
execute player command "/orbguide"
# Cleanup tag on close
on inventory close:
delete metadata tag "ORB_GUIDE" of player
KodariApr 9 at 5:12 pm 12,440 (v2)
I’ll create a Java-based GUI shop plugin that works alongside your Skript orb system.
OrbShop
A GUI-based shop system for purchasing orbs with economy integration. Features categorized orb browsing (Offensive, Defensive, Utility), configurable pricing, and economy support via Vault. Generates the same authenticated orbs used in the Skript infusion system with proper security tags. Players can purchase orbs using in-game currency through an intuitive chest GUI interface.
I’ll create a Java shop plugin that integrates with your Skript orb system, using an inventory GUI for purchases.
OrbShop plugin created! This Java-based GUI shop works alongside your Skript system. Players use /orbshop to browse and purchase orbs with economy integration via Vault. The orbs are created with identical security tags and will work with your Skript infusion system. Configure prices in config.yml.
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
15 842
src/main/java/com/orbshop/OrbShop.java
package com.orbshop;
import com.orbshop.commands.OrbShopCommand;
import com.orbshop.inventory.gui.GUIListener;
import com.orbshop.inventory.gui.GUIManager;
import lombok.Getter;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class OrbShop extends JavaPlugin {
private GUIManager guiManager;
private Economy economy;
@Override
public void onEnable() {
saveDefaultConfig();
if (!setupEconomy()) {
getLogger().severe("Vault not found! Disabling plugin...");
Bukkit.getPluginManager().disablePlugin(this);
return;
}
this.guiManager = new GUIManager();
Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
getCommand("orbshop").setExecutor(new OrbShopCommand(this));
getLogger().info("OrbShop has been enabled!");
}
@Override
public void onDisable() {
getLogger().info("OrbShop has been disabled!");
}
private boolean setupEconomy() {
if (Bukkit.getPluginManager().getPlugin("Vault") == null) {
return false;
}
RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
if (rsp == null) {
return false;
}
economy = rsp.getProvider();
return economy != null;
}
}