Hey guys! I've posted the code in the description, so you can copy paste it, then tweak the code as you like. Be sure to copy, then click the PASTE button in the script menu, not ctrl-v when pasting it in. If you ctrl-v, it will paste very weird
I know this is late and all and I'm just getting started with the vids, but is it possible to make a script condition in that they transform at low health, but revert upon being healed or kill their target? I kind of want to build a companion type Npc and having them being permanently transformed probably won't work out in a play through.
For 1.10 and later, just use function x(event) where x is whatever hook he's using for that command, then type the command. Put event. before any command. Put any variables before the function. You also don't need to use the tempData thing anymore because there's only one console. To do his "health increases when the NPC's damaged" trick, for example, you'd do this. var curH = 20 function damaged(event) { curH = curH + 1; event.npc.setMaxHealth(curH); }
Trying scripting in 1.16.5 and it doesn't list out the hooks, Idk if ya know how to fix that. Cuz that makes it a lot more annoying because idk if they expect me to smash all my code together.
Tip: setTempdata does not work anymore. You have to use event.npc.getTempdata().put("[variable name]",[variable value]) and event.npc.getTempdata().get("[variable name]") when you want to change and get a temporary variable value, respectively.
hmm its a little complex but its pritty ok i learnd alot thx btw TRANSFORMATIONS THAT IS WHAT I WANTps thx for this i asked you to teach me it and you pulled through
How do you store variable in 1.12? I can't find to commands and saveStoredData / saveTempData isn't working. I want a variable to be created in the tick / update function so that it's updated every tick and to be used in the interact function, using the most up to date value of the variable..??
Zoe Rowbotham ya...that stuff works very different in 1.12, some point in the future I'll need to cover it. Basically there's a data object you need to get (I forget the full name) and said object has the get/put methods for manipulating stored data
Do you know how to add custom songs? All tutorials are outdated. Actually ive done everything, i see a song, but when i set it to npc it just doesnt play. You really could make more custom npcs tuts, couse they are awesome
Heya! Do you have any idea on how to script a telegraphed attack? Mostly with a sound before firing? I'm tinkering around with an NPC that uses the unused "Castle Guardian" model from Twilight Forest, and I'm trying to script it to function identically to a Guardian from "Breath of the Wild". Especially the charged laser attack. In case you didn't know, Guardians in "Breath of the Wild" lock on to Link with a tracking laser while playing audible beeping, indicating that the player should either run or get ready to counter. If Link fails to break a Guardian's LoS, it then fires a highly-damaging laser at Link. I'm trying to figure out how to script the NPC to play a sound, or multiple of the same sound over and over again, before firing. And if it's possible, maybe draw a laser in the form of a line of Redstone particles, or even just a recolored Monument Guardian laser from the NPC to the player. If you could help me with this, I'll be forever in your debt! :)
You would need to check the players you plan to give tp to and see how far their position is to the npc. I'd recommend looking up how to calculate the distance between two vectors on goggle
i'm using 1.12.2 at the moment and when I use the NPC scripter on an NPC I only get the "settings" tab no "scripits" or "website" any idea why this could be? is it because of the version of minecraft im using or have I missed something?
The main difference with custom NPCs post a certain version is it no longer has tabs for the events, you declare them yourself. It makes it way more efficient and cleaner. You click the 1 tab and code. I really need to do a vid explaining this since there isn't much info on it
@@HeroesNFools even just a short video explaining how we can implement knowledge learned in this series to 1.12.2 if possible would be HUGE, do's and do's etc
@@jonathanX01 did you double check capitalization? Also did you make sure to install the coding stuff like I speisified in ep 1 of these series of vids?
I usually define the player from the damaged tab, so target player would be last one who hit the npc. Then u would store the player in the settempdata, then get that tempdata in the update, making sure to verify its not null
@@HeroesNFools see I've figured out a way to use a function to set the power release to 127 but I want to make sure in a certain area the player is in it constantly sets the power release to 0 but I don't know how to define the player
The npc does everything except give the tp or run the command it is supposed to in my server, but when I try the same exact thing in a single payer world it works perfectly. I NEED HELP!
ThePS4IndieGamer I haven't tested what happens if u set the hp past the normal limit, I do know any value has a theoretical limit based on if it's an int, double, etc. HOWEVER, u can intercept the damage and manipulate it, so theoretically u could have a separate hidden hp that ticks down first before the normal hp is touched, thereby extending the life total
My intention was to get ranged damage past the limit because i know it caps before melee damage does so for dbc servers you hit a point where players become stronger then npc ranged attacks for custom sagas and they take no dmg.
ThePS4IndieGamer I know you can set the projectile damage, I'll have to experiment with setting the damage past the limit. Although if u wanted added danger, u could make the npc teleport next to the player so they get a swing in
hey, can i do a script to npc deal less damage if player has permission "defence.level" 1? for exemple to player doesn't have this permission npc will deal 1.000 of damag, in player with this permission will deal 500, how can I do this? if yes how?
Depends on the context. If it's for dbc it'd be very tricky because the dbc mod damage happens after custom npc, so you won't register the damage difference. If it's for most anything else then you can as long as you have a way for a custom npc to get that permission. You can get a players name easy enough, and might be able to pull from a database, but I'm unclear how to do that. You could have permission given through an NPC and store it that way (like a permission quest) and check if they did the quest
@@HeroesNFools I just want a way for the npc to see if the player has a permission. if it were a skrpt the skrpt plugin would look like this: if victim has permission "shield"
Very nice tutorial series, helped me a lot creating a boss. I have however a question, maybe you can help out. What is the class or method to use in a traderrole to buy an item? I think it's not possible, but maybe I just don't know how. For example: When you buy ItemStack1 or Itemdata1 it fires: executeCommand(command1) But when you buy itemStack5 or itemdata5:metadata it fires: executeCommand(command5) I checked the api from 1.7.10, but stuff you use are not defined there. I don't know how to write the script and if it is even possible, but that way I can make a crafting GUI in an npc that gives xp upon creating armour. Thanks in advance!
Yep, just found out that since 1.8 there is a event for traders which sell/buy items, so it's definitely possible right there. I think it's not possible for 1.7.10. Unless you know perhaps another way, involving more experience to programming or magic hehe. The dialogue for 1.7.10 only contains isClosing, which is depecrated.
hollandia34 well see if it fires off is closing after they shop. If ur trying to get something to trigger off a certain item purchase u could check the players inventory right after. Also, you could instead set up a "trigger" by basically making a quest set for obtaining an item, then have a command line fire off that. For example, have an NPC which triggers off damage stuffed in a hole, and when the quest is complete use a command line to summon lava on said NPC, then work off that
That's a very cool en inventive way of dealing with this problem. Gonna try it immediately, will probably take a while (typo's and stuff hehe). Will post the script if it works for me, for you and others. Thanks so far!
I have been busy for a long time. I cannot figure it out. There are classes like "getItem, getItemstack" etc. But my guess is that I have to create tempData or something, which is I think above my experience. If you would like to help me out with the script I would appreciate that. If you would make a video even more, however I understand that I am asking a lot of your time, if it's too much I understand. What I got so far (maybe helpful for people who want a greater market): if (option == 1) {npc.getRole().setMarket("Tier1");} if (option == 2) {npc.getRole().setMarket("Tier2");} I tried a lot of classes like getItem, getItemstack and even getMCItemStack, there are so many. I do not know which one to use nor do I even know what the items are called: minecraft:diamond_sword doesn't work. I tried debugging how items work out with: npc.getLefttItem() if (npc.getLefttItem() == "customnpcs:npcEmeraldGun") { npc.executeCommand("w @a working")}; When "==" is replaced with "!=" it works. Also tried this with item id to no avail. I think I am getting at it the wrong way.
@@Star-ny3fm ki waves are tricky, basically ud have to take one using the projectile script. There is a way to fire a projectile via script, and as such you could have a few fire every tick to give that look of a ki wave, you just need to use some object which is big and clear
all of my videos should cover some basic parts of the npc api, and applications such as transform, flying, stat adjustment, etc. I could cover more, im currently adjusting my schedule from streaming daily to fit in other projects like this one
HeroesNFools Zeshin So when I right click on the npc with the scripter wand, only the settings tab is shown, while the scripts and website tab are not. Its hard to explain but I will try to screenshot it and give a link of the screenshot.
+The strongest Uchiha rinnsharingan and sharingan you can't do a dbc aura since you can only access what the api has access to. I can see if I can figure out a tricky way to do it tho for a future episode tho :3. Also I found a way to do flight but it's not great XD
Is possible to make the npc react to other npc stats? like the npc is set to "retaliate" so it attacks you, but if his friend,boss or something dies(hp= 0) it make him to be set to "retreat" and say something like: "shit, my boss is dead"
depends on how the set target effect would work. What you can do is have an object which has a boolean retreat. When false behavior is normal. When the boss dies, set it to true and save to the world.setTempData(). On update for the minion, they could be grabing this object and checking the retreat value, and when it's true, start doing the run away behavior. You might be able to set some of the ai values to get the run away to work, but im not sure how good they work
Do you know how to make it so the npc's do more damage when your using the dbc mod with max dex, because they do no damage but i make them transform but still do no damage. Let me know if you know how to give them higher damage rather then 99999.
Thevidosaregood it'd be one of the NPC methods which ups damage value, I'd read through the API. If an NPC doesn't do any damage even after setting the basic value, even a value of 99999 then that's an issue with your dec mod
0:43 oh my fucking god!!!! i jsut screemed cause of hype wtf wtf wtf i need to know how to do that trasform thingy omg omg to cool i allwasy wanted to know those thigns
can anybody help me with deleting a script from within the folder instead of in game? I started writing a script but didn't realize I was using the wrong program. After trying to access the script my game crashed. When I try to load back into my world the game continues to crash but if I join another world then it's fine. The worst part is that I have put a lot of work into this world and I can't risk doing anything as simple as creating a new world.
I am having a little issue on my script and i want to the npc to have "Defense" I have script activated and the console doesnt run any error message and my npc is doing: NOTHING This is what I wrote on the Damaged Hook: var dmg = npc.getMaxHealth() - npc. getHealth(); var Defense = 200000; var RDmg = Defense - dmg if(dmg > Defense){ event.setDamage(RDmg); } else { event.setDamage(null); } EDIT: Now i am doing no dmg to the npc wtf
@@CMGogeta so dbc damage is calculated after custom npc damage. If you check the incoming damage from the event is see the damage was like 1 or 2. I've tried doing this once and it just didn't work right. If you want a varied defence, try seeing if you can adjust the customer npc % damage reduction thing
I don’t know why people think binary is cool and use it in thumbnails like when a “hacker” is doing stuff He’s in the cmd prompt and he’s gonna use binary...
HeroesNFools Zeshin true, but it’s pretty Overused when you’re scripting. I know binary can be a shortcut like when it comes to urls and etc. but it has been going on for a bit When someone’s scripting most likely for traffic and views. I’ve seen it many times before
Amazing tutorial, helped a lot. I have a question for anyone who can help me, though: how can you change the texture of a skin via URL because setTexture just sets it to the texture address when I want to add a URL. Any help would be greatly appreciated!
i dont think you can in 1.7.10, the best way i figured a way around it is spawn a new npc with the second skin and kill the old npc. That can get complicated quick tho, but as I said, not sure if you can change the url texture. Not to say you can't, but I havn't found a way how yet
Thanks for replying, I have another question though xD. Do you know how to get the health of an NPC? I want to check how much the health is everytime it's hit. I'm really happy you read and replied last time :D
noob Shadi432 in the world object, if u look through the API there should be a method called spawnClone. It let's u spawn NPCs u saved via the clone tool on the server side
Totally possible to do by making them save what their health is gonna be before death, and pull their health on spawning. Tho probably need to have a separate npc to track the hp since you want to spawn multiples
ThePS4IndieGamer I haven't found a way to yet in 1.7.10. it seems to only change the texture skin. Although the work around is to spawn a different entitity and kill the original for a transform
well, on 1.7.10 version i can't write script like the video one. It'll send only error in console. Script'll work only this way: function interact(event) {event.npc.say("Hello, @p");} It's so long and hard to understand sometimes. I don't know how to avoid or fix this
Are u talking like creating a class to use a function from? It's jank but u can have an NPC at spawn which on init creates an object containing functions and variables, stores it in the world.setTempData function, then pull that object elsewhere in any NPC with world.getTemData. I've found that helps to lessen the work load
No no, i mean i didn't simply know you could code, i made the trelamium mod and i know how to code so :P. I understand everything in the video. Sorry, i should have clerified the meaning of the comment a bit more. I wont do this again.
@@silversable4825 try reinstalling it, and if you're having trouble search up how to find nashorn for your machine. I think it differs for mac if you're using a mac, and probly differs if you're using an older version of windows
Hey guys! I've posted the code in the description, so you can copy paste it, then tweak the code as you like. Be sure to copy, then click the PASTE button in the script menu, not ctrl-v when pasting it in. If you ctrl-v, it will paste very weird
the scripts i put in the npc keep dissapearing, how do i fix this????
MrPokemon555 read the notes, I pointed that out directly in the document
Can you make npcs naturally swim with this? Actively avoiding land?
@@epicninjaliracingmmaandfps4679 maybe? It would depend on how you control pathing, I know you can detect a block
I know this is late and all and I'm just getting started with the vids, but is it possible to make a script condition in that they transform at low health, but revert upon being healed or kill their target? I kind of want to build a companion type Npc and having them being permanently transformed probably won't work out in a play through.
me when i finally figure out why the npc i was scripting wasn't doing anything: *pure happiness*
For 1.10 and later, just use function x(event) where x is whatever hook he's using for that command, then type the command. Put event. before any command. Put any variables before the function. You also don't need to use the tempData thing anymore because there's only one console.
To do his "health increases when the NPC's damaged" trick, for example, you'd do this.
var curH = 20
function damaged(event) {
curH = curH + 1;
event.npc.setMaxHealth(curH);
}
its me again i wanna say thank you for the help all those years ago haha
Np
Trying scripting in 1.16.5 and it doesn't list out the hooks, Idk if ya know how to fix that. Cuz that makes it a lot more annoying because idk if they expect me to smash all my code together.
Perfect tutorial I actually need this
Smove3323 glad to help :D
HeroesNFools Zeshin your the man
Hey yo can you tell me how to give npc's particles? I was trying for a while now.
can you make a tutorial for 1.1.2.2 ?
is sad it don't work in Aternos server..
Tip: setTempdata does not work anymore. You have to use event.npc.getTempdata().put("[variable name]",[variable value]) and event.npc.getTempdata().get("[variable name]") when you want to change and get a temporary variable value, respectively.
hmm its a little complex but its pritty ok i learnd alot thx btw TRANSFORMATIONS THAT IS WHAT I WANTps thx for this i asked you to teach me it and you pulled through
Np, I know transforming and executing commands are big on the list
i was waiting for this thx i asked you to make this in the tourny thx
+The strongest Uchiha rinnsharingan and sharingan Np, I plan to do more :D
How do you store variable in 1.12? I can't find to commands and saveStoredData / saveTempData isn't working. I want a variable to be created in the tick / update function so that it's updated every tick and to be used in the interact function, using the most up to date value of the variable..??
Zoe Rowbotham ya...that stuff works very different in 1.12, some point in the future I'll need to cover it. Basically there's a data object you need to get (I forget the full name) and said object has the get/put methods for manipulating stored data
Do you know how to add custom songs? All tutorials are outdated. Actually ive done everything, i see a song, but when i set it to npc it just doesnt play. You really could make more custom npcs tuts, couse they are awesome
Heya! Do you have any idea on how to script a telegraphed attack? Mostly with a sound before firing? I'm tinkering around with an NPC that uses the unused "Castle Guardian" model from Twilight Forest, and I'm trying to script it to function identically to a Guardian from "Breath of the Wild". Especially the charged laser attack.
In case you didn't know, Guardians in "Breath of the Wild" lock on to Link with a tracking laser while playing audible beeping, indicating that the player should either run or get ready to counter. If Link fails to break a Guardian's LoS, it then fires a highly-damaging laser at Link.
I'm trying to figure out how to script the NPC to play a sound, or multiple of the same sound over and over again, before firing.
And if it's possible, maybe draw a laser in the form of a line of Redstone particles, or even just a recolored Monument Guardian laser from the NPC to the player. If you could help me with this, I'll be forever in your debt! :)
is it possible to let a npc craft something? or at least move things from one chest to another?
How do you make broly attack from short and long distance?
It is work in the single player but it is don't work with my server :( I put nashorn in both minecraft and server's mods folder.
How would I set the npc faction ID to a choice when the npc stopped targeting the player?
How would I make a npc give tp to people within a certain block radius. I already know how to execute the command on kill
You would need to check the players you plan to give tp to and see how far their position is to the npc. I'd recommend looking up how to calculate the distance between two vectors on goggle
How to define the "npc" object in 1.12? When I type in something like "npc.setMaxHealth" it says "npc" isn't defined
did you get an answer? i'm stuck on that, can't find good tutorials for 1.12 :(
i'm using 1.12.2 at the moment and when I use the NPC scripter on an NPC I only get the "settings" tab no "scripits" or "website" any idea why this could be? is it because of the version of minecraft im using or have I missed something?
The main difference with custom NPCs post a certain version is it no longer has tabs for the events, you declare them yourself. It makes it way more efficient and cleaner. You click the 1 tab and code. I really need to do a vid explaining this since there isn't much info on it
@@HeroesNFools even just a short video explaining how we can implement knowledge learned in this series to 1.12.2 if possible would be HUGE, do's and do's etc
I need help, I am trying to make my npc say something using npc.say("Hello"), but nothing is working. I place it in both init and update.
Did you add a semi colon?
@@HeroesNFools I did.
@@jonathanX01 did you double check capitalization? Also did you make sure to install the coding stuff like I speisified in ep 1 of these series of vids?
@@HeroesNFools Yeah, it doesn't really matter anyways, I was just using that to test. Everything else on the other hand works.
how does one define a player ? but use the command intended for the player in a update tab?
I usually define the player from the damaged tab, so target player would be last one who hit the npc. Then u would store the player in the settempdata, then get that tempdata in the update, making sure to verify its not null
@@HeroesNFools see I've figured out a way to use a function to set the power release to 127 but I want to make sure in a certain area the player is in it constantly sets the power release to 0 but I don't know how to define the player
can you import animations from blockbench?
No idea
Mod name??
Two items in ur inventory 1 and 2nd hotbar
How do you code explosions, such as the wither spawning?
Take a look at my flying with explosions vid
@@HeroesNFools thanks for replying so quickly!
The npc does everything except give the tp or run the command it is supposed to in my server, but when I try the same exact thing in a single payer world it works perfectly. I NEED HELP!
did you make sure nashorn is on the server, also did you make sure to enable custom npcs to run commands in the config on the server?
@@HeroesNFools Omg thank you so much, I did not notice that I had to enable custom npcs in the config. Thanks again!
Where is the nashorn.jar file? I'm using a mac, so it may be different. IDK
Petey :D should be the same, it's Java. Find where ever you installed java
so can using scripts to alter npc stats allow you to go above the normal cnpc maximums?
ThePS4IndieGamer I haven't tested what happens if u set the hp past the normal limit, I do know any value has a theoretical limit based on if it's an int, double, etc. HOWEVER, u can intercept the damage and manipulate it, so theoretically u could have a separate hidden hp that ticks down first before the normal hp is touched, thereby extending the life total
My intention was to get ranged damage past the limit because i know it caps before melee damage does so for dbc servers you hit a point where players become stronger then npc ranged attacks for custom sagas and they take no dmg.
ThePS4IndieGamer I know you can set the projectile damage, I'll have to experiment with setting the damage past the limit. Although if u wanted added danger, u could make the npc teleport next to the player so they get a swing in
to answer your question, yes, you can set the projectile damage with npc.setRangedStrength(); And i was able to set it to 1million XD
hey, can i do a script to npc deal less damage if player has permission "defence.level" 1? for exemple to player doesn't have this permission npc will deal 1.000 of damag, in player with this permission will deal 500, how can I do this? if yes how?
Depends on the context. If it's for dbc it'd be very tricky because the dbc mod damage happens after custom npc, so you won't register the damage difference. If it's for most anything else then you can as long as you have a way for a custom npc to get that permission. You can get a players name easy enough, and might be able to pull from a database, but I'm unclear how to do that. You could have permission given through an NPC and store it that way (like a permission quest) and check if they did the quest
@@HeroesNFools no, i want like this, like a defence sistym, if player has permission "defencelevel.1" the npc.setMeleeStrenght is less
@@HeroesNFools
I just want a way for the npc to see if the player has a permission. if it were a skrpt the skrpt plugin would look like this:
if victim has permission "shield"
Is there a way to find nashorn on mac I'm very confused
I'm not sure, it would be where ever java is installed
@@HeroesNFools I was able to find it thanks
How to change own model with custom npc ?
The data commands confuzed me, kinda.
Very nice tutorial series, helped me a lot creating a boss. I have however a question, maybe you can help out. What is the class or method to use in a traderrole to buy an item? I think it's not possible, but maybe I just don't know how. For example:
When you buy ItemStack1 or Itemdata1 it fires: executeCommand(command1)
But when you buy itemStack5 or itemdata5:metadata it fires: executeCommand(command5)
I checked the api from 1.7.10, but stuff you use are not defined there.
I don't know how to write the script and if it is even possible, but that way I can make a crafting GUI in an npc that gives xp upon creating armour. Thanks in advance!
hollandia34 not sure if the trade is hooked in, I'd look into the diolog events. Those tend to fire off as you interact with the npc
Yep, just found out that since 1.8 there is a event for traders which sell/buy items, so it's definitely possible right there. I think it's not possible for 1.7.10. Unless you know perhaps another way, involving more experience to programming or magic hehe. The dialogue for 1.7.10 only contains isClosing, which is depecrated.
hollandia34 well see if it fires off is closing after they shop. If ur trying to get something to trigger off a certain item purchase u could check the players inventory right after. Also, you could instead set up a "trigger" by basically making a quest set for obtaining an item, then have a command line fire off that. For example, have an NPC which triggers off damage stuffed in a hole, and when the quest is complete use a command line to summon lava on said NPC, then work off that
That's a very cool en inventive way of dealing with this problem. Gonna try it immediately, will probably take a while (typo's and stuff hehe). Will post the script if it works for me, for you and others. Thanks so far!
I have been busy for a long time. I cannot figure it out. There are classes like "getItem, getItemstack" etc. But my guess is that I have to create tempData or something, which is I think above my experience. If you would like to help me out with the script I would appreciate that. If you would make a video even more, however I understand that I am asking a lot of your time, if it's too much I understand.
What I got so far (maybe helpful for people who want a greater market):
if (option == 1) {npc.getRole().setMarket("Tier1");}
if (option == 2) {npc.getRole().setMarket("Tier2");}
I tried a lot of classes like getItem, getItemstack and even getMCItemStack, there are so many. I do not know which one to use nor do I even know what the items are called: minecraft:diamond_sword doesn't work. I tried debugging how items work out with:
npc.getLefttItem()
if (npc.getLefttItem() == "customnpcs:npcEmeraldGun") {
npc.executeCommand("w @a working")};
When "==" is replaced with "!=" it works. Also tried this with item id to no avail. I think I am getting at it the wrong way.
Can We use Lua?
7:47 i thought you were saying FBI open the door
And how can I make a ki wave like final flash for Npc?
I can’t make it throw multiple blocks
Possibly u could use lua, as long as it's a scripting language. I'm not sure how to set that up tho
@@Star-ny3fm ki waves are tricky, basically ud have to take one using the projectile script. There is a way to fire a projectile via script, and as such you could have a few fire every tick to give that look of a ki wave, you just need to use some object which is big and clear
oh,thx!
np? XD
When my NPC reaches curtain hitpoints he will change to a URL skin, increase health and use different abilities. That's what I want to learn.
all of my videos should cover some basic parts of the npc api, and applications such as transform, flying, stat adjustment, etc. I could cover more, im currently adjusting my schedule from streaming daily to fit in other projects like this one
HeroesNFools Zeshin OK. Im using 1.12.2 by the way.
Rashard Givens with dbc? Or base custom NPCs? 1.10 and up do things a little different, its what I wanna cover next vid
when I open up the script, only settings is shown.... Can you tell me what I did wrong?
no idea, would need more info then that
HeroesNFools Zeshin So when I right click on the npc with the scripter wand, only the settings tab is shown, while the scripts and website tab are not. Its hard to explain but I will try to screenshot it and give a link of the screenshot.
@@HeroesNFools I have a screenshot now, I hope this helps i.imgur.com/Rfi6URF.png
@@avrillove11m94 what version are you in? in later versions you have to write everything including the events
HeroesNFools Zeshin I’m in version 1.12.2
can you make it have aura? and i want to know how to make it fly and transform
+The strongest Uchiha rinnsharingan and sharingan you can't do a dbc aura since you can only access what the api has access to. I can see if I can figure out a tricky way to do it tho for a future episode tho :3. Also I found a way to do flight but it's not great XD
Is possible to make the npc react to other npc stats?
like the npc is set to "retaliate" so it attacks you, but if his friend,boss or something dies(hp= 0) it make him to be set to "retreat" and say something like: "shit, my boss is dead"
depends on how the set target effect would work. What you can do is have an object which has a boolean retreat. When false behavior is normal. When the boss dies, set it to true and save to the world.setTempData(). On update for the minion, they could be grabing this object and checking the retreat value, and when it's true, start doing the run away behavior. You might be able to set some of the ai values to get the run away to work, but im not sure how good they work
ow ur're fast
i try xD
Do you know how to make it so the npc's do more damage when your using the dbc mod with max dex, because they do no damage but i make them transform but still do no damage. Let me know if you know how to give them higher damage rather then 99999.
Thevidosaregood it'd be one of the NPC methods which ups damage value, I'd read through the API. If an NPC doesn't do any damage even after setting the basic value, even a value of 99999 then that's an issue with your dec mod
Looks like setMeleeStrength(int value) is the melee setting damage value
i meant dbc mod with max dex it was auto correct so i hope that works.
Thevidosaregood did you try my suggestion?
it did thanks so much!
hmm im starting it now thx for the turorial ill see if its to hard
The Noble Solo alright, feel free to ask questions if u get stuck! :D
Can I do this in 1.12.2?
How d u get that hair.
The hair is from dbc mod which is in 1.7.10
Can I make them fly and fire real ki blast?
I have a vid for flying, and I noticed as of late there was a command to fire ki blasts from the dbc mod, so that might be possible too
When i put nashron in mods folder game crashes...
Okey, when i launched a game by a second time it worked. Idk why, but ok!
@@redoctober2088 no idea
0:43 oh my fucking god!!!! i jsut screemed cause of hype wtf wtf wtf i need to know how to do that trasform thingy omg omg to cool i allwasy wanted to know those thigns
I got a vid for it :D
*Init* : ....
*Me Who's Terrible with Mathematics & Science* : ..................................................................................................................................................................
*How my brain is LITERALLY processing this entire thing* /\
can anybody help me with deleting a script from within the folder instead of in game? I started writing a script but didn't realize I was using the wrong program. After trying to access the script my game crashed. When I try to load back into my world the game continues to crash but if I join another world then it's fine. The worst part is that I have put a lot of work into this world and I can't risk doing anything as simple as creating a new world.
Delete the contents of the custom noc folder, you can't target an individual script far as I know
I am having a little issue on my script and i want to the npc to have "Defense" I have script activated and the console doesnt run any error message and my npc is doing: NOTHING
This is what I wrote on the Damaged Hook:
var dmg = npc.getMaxHealth() - npc. getHealth();
var Defense = 200000;
var RDmg = Defense - dmg
if(dmg > Defense){
event.setDamage(RDmg);
} else {
event.setDamage(null);
}
EDIT: Now i am doing no dmg to the npc wtf
Um i think its beacuse dbc damage is slow but idk how to fix it
@@CMGogeta so dbc damage is calculated after custom npc damage. If you check the incoming damage from the event is see the damage was like 1 or 2. I've tried doing this once and it just didn't work right. If you want a varied defence, try seeing if you can adjust the customer npc % damage reduction thing
Seems my npc is defending MINECRAFT damage but seems is impossible making a defense for npcs (dbc damage) and thanks for your help
does this work for 1.12 version
No, 1.12 has a different set up
I don’t know why people think binary is cool and use it in thumbnails like when a “hacker” is doing stuff
He’s in the cmd prompt and he’s gonna use binary...
Because binary is the basics of machine code, so it's fitting when talking about coding. Its very thematic
HeroesNFools Zeshin true, but it’s pretty Overused when you’re scripting.
I know binary can be a shortcut like when it comes to urls and etc. but it has been going on for a bit
When someone’s scripting most likely for traffic and views. I’ve seen it many times before
@@triangulumnebula8167 thats cool
HeroesNFools Zeshin Thanks, have a good day :P
Amazing tutorial, helped a lot. I have a question for anyone who can help me, though:
how can you change the texture of a skin via URL because setTexture just sets it to the texture address when I want to add a URL.
Any help would be greatly appreciated!
i dont think you can in 1.7.10, the best way i figured a way around it is spawn a new npc with the second skin and kill the old npc. That can get complicated quick tho, but as I said, not sure if you can change the url texture. Not to say you can't, but I havn't found a way how yet
Thanks for replying, I have another question though xD. Do you know how to get the health of an NPC? I want to check how much the health is everytime it's hit. I'm really happy you read and replied last time :D
Also, how do you access other NPCs from one script so that I can spawn the new NPC with the second skin.
noob Shadi432 I think it's npc.getHealth() but I would double check the API. Just check it on the damaged event
noob Shadi432 in the world object, if u look through the API there should be a method called spawnClone. It let's u spawn NPCs u saved via the clone tool on the server side
i can't find where to download nashorn
Install Java, like I say in the vid, it'll then be in your Java folder
Make an npc that clones himself when he dies, with less health and smaller, until the last phase has 128 tiny ones
Totally possible to do by making them save what their health is gonna be before death, and pull their health on spawning. Tho probably need to have a separate npc to track the hp since you want to spawn multiples
@@HeroesNFools thanks, and what are the differences between 1.7 scripting and 1.12 since im watching this tutorial but im using 1.12
Does anyone know how to download Nashorn to minecraft on a mac?
when you install java, it should come with the files
I know I know but I cant find my nashorm file and i looked everywhere
(I know its late)
How do I make my model hit and shoot
Wdym?
Could you make new tutorial for 1.12.2, pleeease? :D
I plan to, just currently in the middle of other projects
@@HeroesNFools Great :)
not that this will ever be seen but I dont have nashorn I used to and its gone :P
Reinstall Java?
i can't find nashorn i searched it nothing
it comes with java when you install it, as the section where i explain how to install nashorn explains. Are you on a mac or somthing?
Can i use c++ here?
as far as i know, no, because it requires a scripting language
@@HeroesNFools ok thanks
i just want to know hot to add freaking particles..
DeralTGM go to edit and body
@@elstickisaac9146 i dont have these options i probably have an outdated version ima check
wanna hear a REALLY bad pun. "scripting is pretty hard Init?"
cringe++;
If(cringe>limit) exit();
Is this for 1.7.10
check the title
Too confusing for me sadly.
Nashorn is german for Rhino
Nosehorn... yea
Interesting?
More interestingly it's the name of a German tank
wow it worked
Is it possible to use a skin url to change the skin when scripting and if so how would i go about it.
ThePS4IndieGamer I haven't found a way to yet in 1.7.10. it seems to only change the texture skin. Although the work around is to spawn a different entitity and kill the original for a transform
1.7.10 version requires function. How can i write scripts easily on this version with half-java knowledge?
JeViCo Show what do u mean, like there's something u can use besides function?
well, on 1.7.10 version i can't write script like the video one. It'll send only error in console. Script'll work only this way: function interact(event) {event.npc.say("Hello, @p");}
It's so long and hard to understand sometimes. I don't know how to avoid or fix this
Are u talking like creating a class to use a function from? It's jank but u can have an NPC at spawn which on init creates an object containing functions and variables, stores it in the world.setTempData function, then pull that object elsewhere in any NPC with world.getTemData. I've found that helps to lessen the work load
no-no-no-no-no. here the problem(screenshots): imgur.com/a/lLzZM However npc.say works perfect
JeViCo Show don't capitalize the s, it's npc.setMaxHealth
i like cheese
7:12
Muhammad Syazani what about collide?
found it nvm
Preston James k? XD
Whaaaaaaaaaaaa?
GodCatCreator xD was it too confusing? Anything I could clarify?
No no, i mean i didn't simply know you could code, i made the trelamium mod and i know how to code so :P. I understand everything in the video. Sorry, i should have clerified the meaning of the comment a bit more. I wont do this again.
GodCatCreator xD oh XD ya I program for a living
Do you know C#, if you do you could make a terraria mod yourself!
GodCatCreator xD I do, it's the language I know the most, thing is not sure when I'd have the time to mod past the yt stuff XD
i have an issue when i put nashorn in mods folder, minecraft says that it isnt an actual mod file
i cannot find nashorn anywhere the search bar doesnt even show anything
did you make sure to install java?
@@HeroesNFools well i think so it sould be
@@silversable4825 try reinstalling it, and if you're having trouble search up how to find nashorn for your machine. I think it differs for mac if you're using a mac, and probly differs if you're using an older version of windows
@@HeroesNFools ohok ill try that