Thanks for making this! I was looking up some tutorials on this and found this video randomly. I know a little JavaScript already so I manged to do the challenge, I even made it so the npc says different thing depending on the time of day.
DayCraftMC Awesome, I hope my awkward tutorial style wasn't too much. I've uploaded another one if you want to check it out that expands on time keeping and adds a calender of sorts to the game.
I can not figure out how to create the scripter receipt. It shows up in the NEI menue but i cant look for the receipt and if i want to create it on my own, I dont know how to put the scripter in the same field you have it at 1:06 Please help me thanks!
Hi can you make a script to make npcs walk on walls and climb walls? If you can, can you do it so that they a dont brush their body on the wall but appear like they are horizontal? thanks, because custom npcs, arthropod feature does not work somehow
Hi how to change the weapons at the NPC for example with the bow and the sword. That is, when the enemy comes close enough, the NTC changes the bow to the sword? (sorry fo my english ^^)
Not to be that guy that asks dumb questions, but its there a way to script NPCs so that they will naturally despawn like regular mobs? Im making a world that has my own custom monsters (barbarians to be exact) that spawn naturally using the Natural Spawns tool. They spawn correctly and all, but they dont despawn like zombies and creepers would. This means that I get a bunch of mobs in a small area, and since spawn numbers are limited they dont spawn anywhere else (in other nearby chunks). If I'm not mistaken there used to be a Naturally Despawns option in 1.7.10, but I cant find this in my version (1.10.2)
Hoping for some help here, Did javascript in my comp. programming class in Highschool 8 years ago so im a little LOST now. Im trying to create a script that will mmake a Shopkeeper NPC move from Position 1 (X,Y,Z) to Position 2 (X,Y,Z) after the time is about 10700 and then back when the time is about 500 (as defined by var time = world.getTIme % 24000). Can anyone help me out? im sure what im doing is WAAAY WRONG but so far im getting several non-functioning and USELESS scripts that either crash the NPC and game or just do NOTHING. -Kisonu Yuutatchi-
+FlipstaPlays Try going into the clicking on the NPC with the wand and go to Advanced -> Lines -> Interact Lines -> Then clear the one that says "Hello, @p". Use this instead of "event.setCancelled(true)", thanks for letting me know about this, I'll mention it in my next video.
I need a bit explanation here guys, I know that was Java or maybe Javascript language which he just used. But that class 'world' and 'npc' was from the plugin or what? And that function from event (setCanceled) where I can learn more about It so I can get know another function from that. Just that what I want to know , thank you..
+The random channel I might do later, but for now, look in "C:\Program Files\Java\jre[some version number]\lib\ext", there should be a file called "nashorn.jar". Copy and paste that into your mods folder.
It depends, what version do you have? You can make them fly by going to the movement options and selecting them to walk and clicking ground to change to flying.
You right click on the ground to spawn them with a wand,(he showed how to make one) and then right click the npc with the wand to make then to what you want,if that's whAt your asking
After you declare the time variable in the "Update" section (as shown in the video) you can use if statements to check if it is both dead, and the time of day you want it to re-spawn in. Then you can change its health to be full, and its location to be the spawn point. (Also, change the settings with the npc wand so the respawn delay is very high.)
Hey Osimon, you seem to know you're crap. Sweet tutorials :) Just reaaaaally need to know something. There is a conversation job (you're probably familiar) in this mod, and it seems to loop in the background of the world while the player(s) is elsewhere. So, when coming INTO the range to hear the conversation, chances are you will walk halfway into it. It could therefore even start being played at the last line. This is really inconvenient for me, as the ones I've setup only play once and start a quest at the end. Is there a command, or script, or SOMEthing I could use to fix this? Can I make a conversation start at the start when I walk into range? Resetting the NPCs does reset the conversations too, but you need to use the wand for that normally. Any ideas (anyone)? Thanks HEAPS in advance.
Ricky12Awesome Are you sure? Try: www.kodevelopment.nl/minecraft/customnpcs/scripting Essentially it says: ECMAScript(more commenly know as javascript): Should be available if you are on the latest java version. (If you have java 8 and it’s not available, go to your java/jre/lib/ext folder and copy the nashorn.jar to the mods folder) So make sure you have the latest version of Java.
ReferenceError: "worldgetTime" is not defined in at line number 1 1 var time = worldgetTime() % 24000; 2 3 npc.say("The time is: " + time); Halp meh ples
Thanks for making this! I was looking up some tutorials on this and found this video randomly. I know a little JavaScript already so I manged to do the challenge, I even made it so the npc says different thing depending on the time of day.
DayCraftMC Awesome, I hope my awkward tutorial style wasn't too much. I've uploaded another one if you want to check it out that expands on time keeping and adds a calender of sorts to the game.
Osimon I enjoy your style :P...and the challenge.
Holy shit, Why is this channel so Underrated?!
I can not figure out how to create the scripter receipt. It shows up in the NEI menue but i cant look for the receipt and if i want to create it on my own, I dont know how to put the scripter in the same field you have it at 1:06
Please help me
thanks!
how do you make them fly??
Great series! I love how you give us homework. Looking forward to progressing through the series!
Is there any kind of API documentation for functions under objects like "world"?
sun.org.mozilla.javascript.internal.EvaluatorException: syntax error (#4) shows up in the consol. What do I do?
Hey, you can do tutorial with how install ECMAscript please ^^'
+Expedi Game Hey, I show how to do it in this video here: ruclips.net/video/eu2RNuiQdjI/видео.html
I do not see the script tabs in 1.8.9, Can someone provide a short video on basic scripting in 1.8.9?
I need it to :P
Can someone help me?
I placed down a script door now its just STUCK THERE FOREVER :(
can someone plz reply to tell me how to delete the door? THX
Hi can you make a script to make npcs walk on walls and climb walls? If you can, can you do it so that they a dont brush their body on the wall but appear like they are horizontal? thanks, because custom npcs, arthropod feature does not work somehow
Cool tutorial, I'd love to see more.
Hey, how do you make the NPC walk a path if the Player stands in what ever area? After he walked he Should say "Stop Right there!"
Hi how to change the weapons at the NPC for example with the bow and the sword. That is, when the enemy comes close enough, the NTC changes the bow to the sword?
(sorry fo my english ^^)
:2:24 Expected ; but found :
event.setCancelled(true):
^ in at line number 2 at column number 24 How to fix??
That Random Gamer // QemTRG Looks like you're using a colon instead of a semi-colon. (A : instead of ;)
Osimon Thanks
I have the mod installed and available but I simply cannot create any of the wands on my crafting table
Not to be that guy that asks dumb questions, but its there a way to script NPCs so that they will naturally despawn like regular mobs?
Im making a world that has my own custom monsters (barbarians to be exact) that spawn naturally using the Natural Spawns tool. They spawn correctly and all, but they dont despawn like zombies and creepers would. This means that I get a bunch of mobs in a small area, and since spawn numbers are limited they dont spawn anywhere else (in other nearby chunks). If I'm not mistaken there used to be a Naturally Despawns option in 1.7.10, but I cant find this in my version (1.10.2)
Can you make another video or something to teach us how to use the Builders block ?
Hoping for some help here, Did javascript in my comp. programming class in Highschool 8 years ago so im a little LOST now. Im trying to create a script that will mmake a Shopkeeper NPC move from Position 1 (X,Y,Z) to Position 2 (X,Y,Z) after the time is about 10700 and then back when the time is about 500 (as defined by var time = world.getTIme % 24000). Can anyone help me out? im sure what im doing is WAAAY WRONG but so far im getting several non-functioning and USELESS scripts that either crash the NPC and game or just do NOTHING.
-Kisonu Yuutatchi-
+Eric Heidrich What function are you using to do the walking?
Can I make the NPC emit a sound or trigger aggro?
i dont have a script or website page, what do i do?
THANK U FOR MAKING THESE VIDEOS. I am now able to use this mod to its full capacity. :D
How do I cancel the actual Hello ? Because when I do the command you entered, it also deletes my trading system! Please help!
+FlipstaPlays Try going into the clicking on the NPC with the wand and go to Advanced -> Lines -> Interact Lines -> Then clear the one that says "Hello, @p". Use this instead of "event.setCancelled(true)", thanks for letting me know about this, I'll mention it in my next video.
Thank you!
I'm going to follow this miniseries :D I think that if you'd make more videos on the matter, a lot of people would appreciate it :D
Why does this not work for 1.8.9? I have done everything in the video, but it keeps saying script errored... Please help? :)
They changed the scripting format in 1.8.9
ah thanks :)
It is possible to have them fly/hover? I'm also looking in www.kodevelopment.nl/customnpcs/oldapi/ to see if there anything but nothing yet.
+Bipolar_Panda Not in 1.7.10 sadly, it looks like he is adding support for the 1.8.8 version of CustomNPCs though.
Thank you :)
I can't find my Nashorn.jar file, I need help. ;-;
Thanks for these tutorials, please keep them up into much more advanced stages. :)
Omer Said Thanks Omer! Will do!
Hello ! Do you know how can i run a console command ? Thanks !
do or do not, there is no try
How to hide the caption - "Starts scene scene1" on the chat?
How can i make the run commands?
Can I script in python or java?
I need a bit explanation here guys, I know that was Java or maybe Javascript language which he just used. But that class 'world' and 'npc' was from the plugin or what? And that function from event (setCanceled) where I can learn more about It so I can get know another function from that.
Just that what I want to know , thank you..
I have a little problem: I don't have ECMAScript
can you do a tutorial on how to make it work with MCA and it doesn't say how to get the ECMA fixed on that link you gave.
+The random channel I might do later, but for now, look in "C:\Program Files\Java\jre[some version number]\lib\ext", there should be a file called "nashorn.jar". Copy and paste that into your mods folder.
i'm on a mac where would that file be? i attempted to look it up but the net isn't giving answers and noppes doesn't know what i am talking about
How do you make an npc fly?
It depends, what version do you have?
You can make them fly by going to the movement options and selecting them to walk and clicking ground to change to flying.
Wehere have i to push. that the npc's only spawn at the Night or at day?
You right click on the ground to spawn them with a wand,(he showed how to make one) and then right click the npc with the wand to make then to what you want,if that's whAt your asking
Zoe M No that they only spawn at night or day
Zoe M automatic
Oh,sorry
After you declare the time variable in the "Update" section (as shown in the video) you can use if statements to check if it is both dead, and the time of day you want it to re-spawn in. Then you can change its health to be full, and its location to be the spawn point. (Also, change the settings with the npc wand so the respawn delay is very high.)
how do i fix the language because mine says Scala
Adler Warmbier nvm
how to make a mob fly?
Hey Osimon, you seem to know you're crap. Sweet tutorials :)
Just reaaaaally need to know something. There is a conversation job (you're probably familiar) in this mod, and it seems to loop in the background of the world while the player(s) is elsewhere. So, when coming INTO the range to hear the conversation, chances are you will walk halfway into it. It could therefore even start being played at the last line. This is really inconvenient for me, as the ones I've setup only play once and start a quest at the end.
Is there a command, or script, or SOMEthing I could use to fix this? Can I make a conversation start at the start when I walk into range? Resetting the NPCs does reset the conversations too, but you need to use the wand for that normally.
Any ideas (anyone)? Thanks HEAPS in advance.
Ummm, Ecma help doesnt show now. :C
Dragorach Hey, sorry about the late reply. Did you manage to get it working? You may have to put the 'nashorn.jar' file into your mods folder.
Osimon Ok thanks, i will try it.
so its like C# sort of...
Doesn't Word now the ECMA is missing the link dids crap
Ricky12Awesome Are you sure? Try: www.kodevelopment.nl/minecraft/customnpcs/scripting
Essentially it says:
ECMAScript(more commenly know as javascript): Should be available if you are on the latest java version. (If you have java 8 and it’s not available, go to your java/jre/lib/ext folder and copy the nashorn.jar to the mods folder)
So make sure you have the latest version of Java.
Oh no.... Excel is coming to get me!!! This is SO reminding me of it. ;)
ReferenceError: "worldgetTime" is not defined in at line number 1
1 var time = worldgetTime() % 24000;
2
3 npc.say("The time is: " + time);
Halp meh ples
Santiago Vidal Looks like you're forgetting a dot. It should be:
var time = world.getTime() % 24000;
npc.say("The time is: " + time);
The real Frank would just say that its time to stop : O
lol that's a good one
I just want to learn how to define a player
Great tutorial!
блеадь! почему нет туториала на Русском!
:)
this sounds like ill be doing this is roblox but its minecraft
this is awesome! thanks so much
I DIED of laughter. +1 sub for you, mate.
1:21 LOL 😂😂😂😂😂😂
This is a mod -.- not scripting actually
you can script with it though.
Of course fucker what have you tought
Thanks!! This was so helpful ^^
Is there a way to program the npc to come to the door when I ring a doorbell, or run to a programmed spot once they finish dialog? Thanks!