Naruto Destination - CustomNPC+ Scripting API¶
This API is for CustomNPC+, not the original CustomNPC
Make sure you have the correct version installed. The original/default CustomNPC mod does not support this.
This API lets CustomNPC+ NPCs interact with the Naruto Destination mod — reading player stats, casting jutsus, and building scripted boss fights.
Quick Example¶
var stats = Java.type("narutodestination.Mathioks.CNPC.CustomNPCStatsHandler");
var Fireball = Java.type("narutodestination.Mathioks.CNPC.Jutsus.FireballJutsu");
function interact(event) {
var player = event.player;
var ninjutsu = stats.getNinjutsu(player);
var rank = stats.getRank(player);
if (ninjutsu >= 100) {
player.message("A " + rank + " with " + ninjutsu + " Ninjutsu? Prepare yourself!");
} else {
player.message("Train your Ninjutsu and come back.");
}
}
function tick(event) {
var target = event.npc.getAttackTarget();
if (target != null) {
Fireball.cast(event.npc, 30.0, 100);
}
}
Player Stats¶
| Page | |
|---|---|
| General Stats | Level, skill points, jutsu points, intelligence |
| Skills | Ninjutsu, Taijutsu, Genjutsu, and the other combat skills |
| Chakra & Health | Chakra pool, health stat, health caps |
| Clan & Affiliation | Clan, rank, village, land |
| Nature Releases | Fire, Water, Wind, Earth, Lightning, Yin, Yang |
| Kekkei Genkai | Wood, Lava, Ice, Sharingan, Byakugan, etc. |
| Clan Checks | Boolean clan membership checks |
| Bijuu | Tailed beast type, unlock progress, scale |
| Modes | Sage Mode, Susanoo, Curse Seal, Eight Gates, etc. |
| Helpers | Arrays of known releases, clans, bijuu |
NPC Jutsus¶
| Page | |
|---|---|
| Jutsu Handler (All-in-One) | Single import for all jutsus and block breaking |
| Standard Jutsus | Fireballs, meteors, water bullets, and 12 more |
| Continuous Jutsus | Jutsus that fire over time (Magnet Gold Push) |
| Jutsu Utilities | Breaking jutsu blocks, detection, effects |
Guides¶
| Page | |
|---|---|
| Getting Started | Setup, imports, first script |
| Script Examples | Full boss scripts, multi-element NPCs, phase transitions |
| Tips & Troubleshooting | Cooldowns, debugging, common issues |