Custom NPCs Scripting Tutorial #1 - The Basics

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 94

  • @Valenspire
    @Valenspire 10 лет назад +5

    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.

    • @OsimonB
      @OsimonB  10 лет назад +1

      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.

    • @McWeefreemen
      @McWeefreemen 9 лет назад

      Osimon I enjoy your style :P...and the challenge.

  • @badabiiebumbum6041
    @badabiiebumbum6041 Год назад

    Holy shit, Why is this channel so Underrated?!

  • @schamara
    @schamara 8 лет назад

    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!

  • @BrookerBracker
    @BrookerBracker 8 лет назад +1

    how do you make them fly??

  • @gunblast268
    @gunblast268 8 лет назад

    Great series! I love how you give us homework. Looking forward to progressing through the series!

  • @LosEagle
    @LosEagle 9 лет назад +1

    Is there any kind of API documentation for functions under objects like "world"?

  • @michaelcarlisle7446
    @michaelcarlisle7446 9 лет назад

    sun.org.mozilla.javascript.internal.EvaluatorException: syntax error (#4) shows up in the consol. What do I do?

  • @ExpediGame
    @ExpediGame 9 лет назад +7

    Hey, you can do tutorial with how install ECMAscript please ^^'

    • @OsimonB
      @OsimonB  9 лет назад +1

      +Expedi Game Hey, I show how to do it in this video here: ruclips.net/video/eu2RNuiQdjI/видео.html

  • @seanamor853
    @seanamor853 8 лет назад +2

    I do not see the script tabs in 1.8.9, Can someone provide a short video on basic scripting in 1.8.9?

  • @amyrose8781
    @amyrose8781 7 лет назад

    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

  • @levarchknight9830
    @levarchknight9830 7 лет назад

    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

  • @feldmanjared
    @feldmanjared 10 лет назад +1

    Cool tutorial, I'd love to see more.

  • @Kyole4255
    @Kyole4255 5 лет назад

    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!"

  • @BlackNightDragon
    @BlackNightDragon 6 лет назад

    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 ^^)

  • @quen3742
    @quen3742 9 лет назад

    :2:24 Expected ; but found :
    event.setCancelled(true):
    ^ in at line number 2 at column number 24 How to fix??

    • @OsimonB
      @OsimonB  9 лет назад

      That Random Gamer // QemTRG Looks like you're using a colon instead of a semi-colon. (A : instead of ;)

    • @quen3742
      @quen3742 9 лет назад

      Osimon Thanks

  • @zeldera
    @zeldera 4 года назад

    I have the mod installed and available but I simply cannot create any of the wands on my crafting table

  • @cheekibreeki8652
    @cheekibreeki8652 7 лет назад

    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)

  • @dizzynoodles1758
    @dizzynoodles1758 7 лет назад

    Can you make another video or something to teach us how to use the Builders block ?

  • @hybrid_hydra7974
    @hybrid_hydra7974 9 лет назад

    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-

    • @OsimonB
      @OsimonB  9 лет назад

      +Eric Heidrich What function are you using to do the walking?

  • @josephstalin9194
    @josephstalin9194 6 лет назад

    Can I make the NPC emit a sound or trigger aggro?

  • @genuinefraud8262
    @genuinefraud8262 4 года назад

    i dont have a script or website page, what do i do?

  • @GracieMeiling
    @GracieMeiling 8 лет назад

    THANK U FOR MAKING THESE VIDEOS. I am now able to use this mod to its full capacity. :D

  • @FlipstaPlayss
    @FlipstaPlayss 9 лет назад

    How do I cancel the actual Hello ? Because when I do the command you entered, it also deletes my trading system! Please help!

    • @OsimonB
      @OsimonB  9 лет назад +1

      +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.

    • @FlipstaPlayss
      @FlipstaPlayss 9 лет назад

      Thank you!

  • @HoaxNess
    @HoaxNess 8 лет назад

    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

  • @itsjustinee629
    @itsjustinee629 8 лет назад

    Why does this not work for 1.8.9? I have done everything in the video, but it keeps saying script errored... Please help? :)

    • @Daot
      @Daot 8 лет назад

      They changed the scripting format in 1.8.9

    • @itsjustinee629
      @itsjustinee629 8 лет назад

      ah thanks :)

  • @killertu
    @killertu 9 лет назад

    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.

    • @OsimonB
      @OsimonB  9 лет назад

      +Bipolar_Panda Not in 1.7.10 sadly, it looks like he is adding support for the 1.8.8 version of CustomNPCs though.

    • @killertu
      @killertu 9 лет назад

      Thank you :)

  • @BirdmdTwoGamersGaming
    @BirdmdTwoGamersGaming 9 лет назад

    I can't find my Nashorn.jar file, I need help. ;-;

  • @JohnJohn-iw4ml
    @JohnJohn-iw4ml 9 лет назад

    Thanks for these tutorials, please keep them up into much more advanced stages. :)

    • @OsimonB
      @OsimonB  9 лет назад

      Omer Said Thanks Omer! Will do!

  • @MrNicodu75
    @MrNicodu75 8 лет назад

    Hello ! Do you know how can i run a console command ? Thanks !

  • @creeperingamer6460
    @creeperingamer6460 9 лет назад +7

    do or do not, there is no try

  • @bert7100
    @bert7100 5 лет назад

    How to hide the caption - "Starts scene scene1" on the chat?

  • @GrimReaper-en3vl
    @GrimReaper-en3vl 8 лет назад

    How can i make the run commands?

  • @somekindofdude1130
    @somekindofdude1130 6 лет назад

    Can I script in python or java?

  • @GrennKren
    @GrennKren 6 лет назад

    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..

  • @zkiller-46757
    @zkiller-46757 5 лет назад

    I have a little problem: I don't have ECMAScript

  • @Misery_Loves
    @Misery_Loves 9 лет назад

    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.

    • @OsimonB
      @OsimonB  9 лет назад

      +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.

    • @Misery_Loves
      @Misery_Loves 9 лет назад

      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

  • @keybladegames_real
    @keybladegames_real 8 лет назад

    How do you make an npc fly?

    • @kristijanveljaca1687
      @kristijanveljaca1687 7 лет назад

      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.

  • @herrhuski4070
    @herrhuski4070 8 лет назад

    Wehere have i to push. that the npc's only spawn at the Night or at day?

    • @zoem7142
      @zoem7142 8 лет назад

      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

    • @herrhuski4070
      @herrhuski4070 8 лет назад

      Zoe M No that they only spawn at night or day

    • @herrhuski4070
      @herrhuski4070 8 лет назад

      Zoe M automatic

    • @zoem7142
      @zoem7142 8 лет назад

      Oh,sorry

    • @technorazor976
      @technorazor976 8 лет назад

      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.)

  • @adlerbs1472
    @adlerbs1472 9 лет назад

    how do i fix the language because mine says Scala

  • @CloteBloody4305
    @CloteBloody4305 8 лет назад

    how to make a mob fly?

  • @joelwybrew
    @joelwybrew 7 лет назад

    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.

  • @Dragorach
    @Dragorach 9 лет назад

    Ummm, Ecma help doesnt show now. :C

    • @OsimonB
      @OsimonB  9 лет назад

      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.

    • @Dragorach
      @Dragorach 9 лет назад

      Osimon Ok thanks, i will try it.

  • @redodprograng9556
    @redodprograng9556 7 лет назад

    so its like C# sort of...

  • @ricky12awesome
    @ricky12awesome 9 лет назад

    Doesn't Word now the ECMA is missing the link dids crap

    • @OsimonB
      @OsimonB  9 лет назад

      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.

  • @davidtuma9067
    @davidtuma9067 9 лет назад

    Oh no.... Excel is coming to get me!!! This is SO reminding me of it. ;)

  • @santiagovidal4497
    @santiagovidal4497 9 лет назад +1

    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

    • @OsimonB
      @OsimonB  9 лет назад +1

      Santiago Vidal Looks like you're forgetting a dot. It should be:
      var time = world.getTime() % 24000;
      npc.say("The time is: " + time);

  • @maiddragonbuilds1006
    @maiddragonbuilds1006 4 года назад +2

    The real Frank would just say that its time to stop : O

  • @Roug3e_Bunny
    @Roug3e_Bunny 4 года назад

    I just want to learn how to define a player

  • @wattyboys1
    @wattyboys1 9 лет назад

    Great tutorial!

  • @raptor341
    @raptor341 8 лет назад +4

    блеадь! почему нет туториала на Русском!

  • @pigio9033
    @pigio9033 7 лет назад

    this sounds like ill be doing this is roblox but its minecraft

  • @heroofhyrule9778
    @heroofhyrule9778 8 лет назад

    this is awesome! thanks so much

  • @DaKingOfMinecraft1
    @DaKingOfMinecraft1 9 лет назад

    I DIED of laughter. +1 sub for you, mate.

  • @halod2566
    @halod2566 7 лет назад

    1:21 LOL 😂😂😂😂😂😂

  • @DoreikuYT
    @DoreikuYT 8 лет назад

    This is a mod -.- not scripting actually

    • @skelskeleton
      @skelskeleton 8 лет назад +5

      you can script with it though.

    • @unlshtb4524
      @unlshtb4524 7 лет назад

      Of course fucker what have you tought

  • @itsjustinee629
    @itsjustinee629 8 лет назад

    Thanks!! This was so helpful ^^

  • @BuckytheRaptor
    @BuckytheRaptor 9 лет назад

    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!