Custom Npcs Scripting

Home Forums JinGames Forums Questions and Answers Custom Npcs Scripting

Viewing 15 reply threads
^ Advertisement ^
  • Author
    Posts
    • #36233
      TheLeinhart
      Participant

      So…I’m very new to the whole scripting aspect of custom npcs and have been trying to figure this out for a while now so any help would be appreciated. Do know I have seen the scripting pages for the Custom Npcs and just can’t make heads or tails of it nor can I find a decent tutorial on how to script custom damage modifiers as well as custom Hp modifiers.

      Essentially what I’m after is how do I script the NPC to set it’s melee higher than the cap. For this I am at a total loss and have been trying for hours on end. Once again, any and all help is much appreciated.

    • #36235
      Aegous
      Participant

      Well if you’re on java 7 then it’ll have the option to set the language to EMCAScript by default but if you have java 8 then you’ll need to go to C:\Program Files (x86)\Java\(jre1.8.0 or something like that)\lib\ext\ and find the nashorn.jar and put that into your mods folder on the server. Once you’ve got that done you’ll need to boot up your server and select EMCAScript. Once that is done you can you’ll need to go to the “Init” tab and enter this into the text box.

      npc.setMeleeStrength(10000)
      npc.setRangedStrength(10000)

      npc.setMaxHealth(10000)
      npc.setHealth(10000)

    • #36247
      Airswift101
      Participant

      How do I do it on single player worlds? ?

      • #36248
        TheLeinhart
        Participant

        I reckon you follow the same steps as was mentioned to me above, but instead, place it in your mods folder for single player use. Try that and see if it works.

    • #36250
      Aegous
      Participant

      Yeah it’ll work exactly the same if you just follow the steps but instead put it into your mods folder on the singleplayer world.

    • #36256

      Good I did this when I went to look before putting the mod, I already had the Script folder … What do I do now?

    • #36257

      Is there a Script Folder out of the npcs customs folder What do I do with this folder?

    • #36258

      I found it, I have to put in the same way that you send this script there in the damaged folder?

    • #36260
      Airswift101
      Participant

      What do you mean by “boot up your server”

      • #36273
        TheLeinhart
        Participant

        By restarting your server for it to take affect.

    • #36270
      Airswift101
      Participant

      ??

    • #36275
      Airswift101
      Participant

      WHAT DO YOU MEAN BY OPEN EMCA SCRIPT?!?! PLEASE HELP!!!!!

    • #36277
      Aegous
      Participant

      Airswift EMCAScript is another name for javascript and if you can’t follow that tutorial I wrote up then I’d say you might aswell give up because the scripting side of customnpcs is not for beginners.

    • #36279
      Airswift101
      Participant

      Nah… I figured it out
      I guess…
      Thanks?

      • #36280
        Aegous
        Participant

        Cool because I can’t think of an any easier way to explain it

    • #36283

      I’m talking to the creator of custom NPCs how to make the correct “scripts”

      • #36298
        Aegous
        Participant

        Why “” around scripts?

      • #36299
        Aegous
        Participant

        EMCAScript aka Javascript is a scripting language and they’re therefor scripts.

    • #40163
      James
      Participant

      Does anyone know how to make an npc Teleport to An enemy And fly in 1.7.10

    • #40164
      James
      Participant

      I have EMCAScript

    • #49499
      Peeko15
      Participant

      what do I script if I want the projectile that my npc shoots cause a potion effect from another mod?

      I’m using EMCAScript

Viewing 15 reply threads
  • You must be logged in to reply to this topic.

Comments are closed.