Kinoko NPC Scripts

Newbie Spellweaver
Joined
Feb 17, 2025
Messages
8
Reaction score
0
How do you usually create missing NPC scripts? Do you base them on an existing reference from somewhere (like an official script dump / another emulator), or do you just write them from scratch following Kinoko’s script patterns?


I’ve been testing the server and when I went to job advance to Thief (Rogue), there was no script 😂
So I wrote a quick one, but I’m not sure if it matches the usual flow/style.


Is there an easier way to “pull”/reuse NPC scripts from other repos (HeavenMS/Cosmic/others) and adapt them to Kinoko, or a recommended repo/source to scrape from?

If anyone has a better example for job advancement scripts (or a list of existing Kinoko NPC script IDs/names), I’d really appreciate it 🙏
Here’s what I made for the DarkLord NPC:
@Script("rogue")
public static void rogue(ScriptManager sm) {
// Dark Lord : Thief Job Instructor (ex.: Kerning)
if (sm.getJob() == Job.BEGINNER.getJobId()) {
final int jobChangeLevel = JobConstants.getJobChangeLevel(Job.ROGUE.getJobId(), 0, 1);
sm.sayNext("Do you want to be a Thief? You need to be at least #bLevel " + jobChangeLevel + "#k.");
if (sm.getLevel() < jobChangeLevel) {
sm.sayOk("You need more training before becoming a Thief.");
return;
}
if (!sm.askYesNo("You look ready. Do you want to become a Thief?")) {
sm.sayOk("Take your time and talk to me again when you decide.");
return;
}

sm.setJob(Job.ROGUE);
if (sm.getLevel() > jobChangeLevel) {
sm.sayBoth("You advanced late, so I compensated your missing Skill Points.");
}
sm.sayBoth("You are now a Thief. Keep training and get stronger.");
} else if (sm.getJob() == Job.ROGUE.getJobId()) {
sm.sayOk("Train hard. Come back later for higher job advancement.");
} else {
sm.sayOk("I only guide thieves.");
}
}
 
Last edited:
The difference between Kinoko and the aforementioned sources is that previously, "status" was used to determine how the NPC would react. In Kinoko and other sources, this is not necessary. So, you have a few scenarios:

1. If you want to use scripts from other sources (Cosmic, for example), you include an older version of script reading in your source and then use that to read scripts from other sources.

2. You can use AIs and train them to convert Cosmic/Heaven scripts to Kinoko.

3. You do this manually based on older scripts, removing the status and using updated functions.
 
Upvote 0
Back