#KubeJS x Puffish Skills x Iron Spells- Spell Restriction Script

23 messages · Page 1 of 1 (latest)

shell shadow
#

Features:

**Self-healing persistent data: **The script automatically fixes or wipes corrupted NBT data for spell schools.
Spell level restrictions: You can require an exact spell level, a minimum, or a range (e.g. only level 3, or 2–4).
**Customizable restrictions for each spell: **require a specific school, skill, level, and/or spell level.
Feedback display toggle: Players can choose if restriction messages appear in the actionbar or chat with /spellschool feedback <true or false>

  • Player spell school management with /spellschool set, /spellschool remove, /spellschool show.
  • Tab-completion for all spell school commands (no need for quotes, just tab!).
  • Restrict spell casting based on player’s spell school, skill unlocks, and level in a Puffish Skills category.

Admin commands: /spellschool fix (removes empty/corrupt entries), /spellschool nukecorrupt (wipes broken data).

Readable, multi-line feedback: All restriction messages are formatted with line breaks for easy reading.
Commands:
/spellschool set <school> – Add a spell school to yourself (tab-complete for all valid schools).
/spellschool remove <school> – Remove a school.
/spellschool show – See your current schools.
/spellschool fix – Remove empty/corrupt entries from your school list.
/spellschool nukecorrupt – Wipe your spell school data if it’s badly corrupted (use only if /fix doesn’t work).
/spellschool feedback – Shows your current feedback mode (actionbar or chat).
/spellschool feedback <true|false> – Set feedback to actionbar (true) or chat (false).
/spellrestrictions list – See all spell restrictions and your status for each.

Requirements:
KubeJS (Forge)
Kube Irons Spells
Irons Spells 'n Spellbooks
Puffish Skills (SkillsMod)

Place the script in the kubejs/server_scripts/spell_restriction_script_server.js. folder
Edit the SPELL_RESTRICTIONS array at the top of the script to add or change spell requirements for your server.
Questions or issues?
Reply here or DM me!

honest pineBOT
#

Paste version of spell_restriction_script_server.js, 01_custom_command_helper.js from @shell shadow

stray rampart
#

I'm going to give this a shot later if you dont mind; thanks for your hard work

hybrid girder
#

i'm a little lost here, what is this, and how does it work

shell shadow
#

is it not clear?

#

if u use puffish skills and/or irons spells you can restrict spells that can be casted or used anywhere.

#

based off of configurations inside the script

#

not sure how else to explain it

dense girder
#

ok!

stiff cove
#

hello, so if i understand correctly, this script restrict the learning of spells to the system added by puffish skills ?

shell shadow
#

script updated!!!!

honest pineBOT
#

Paste version of spell_restriction_script_server.js from @shell shadow

shell shadow
honest pineBOT
#

Paste version of irons_spell_restriction_class-template.zip from @shell shadow

shell shadow
#

in this version the code over all has been reduced, tested against the latest iron spells js version, and you only need the one command /spellschools

#

Note: if you do use the (category:"") field, you have to use one or both of these fields when using puffish skills mod.

  • requiredLevel (category/skill tree level)
  • requiredSkillId ( the skill id field from the skill.json file in the puffish skills datapack, if u look in the datapack it looks like this "19aazycn9ii0lfh1") This basically checks if you unlocked/put a point into a skill.
stiff cove
shell shadow
#

fixed, i jsut needed to wrap it up in a try catch

honest pineBOT
#

Paste version of spell_restriction_script_server.js from @shell shadow

drowsy flare
#

if you need to wrap something in a try catch is it actually fixed 😂

shell shadow
honest pineBOT
#

Paste version of spell_restriction_script_server.js from @shell shadow

shell shadow