HOW TO MAKE AN NPC DO WHAT YOU WANT IT TO DO (noobs, welcome)

Ok, I am seeing a lot of questions, especially in scripting, on How to make an NPC do this, or that, and I thought to myself, mabey I should make a tutorial to at least push the noobs in the right direction! Ok, now we start: Step one, pick your NPC, once you do that, go onto the top right corner of the NPC edit box and click on the drop down box up there.  Once that is done, you will have to decide what your NPC will do! Here are the attributes and what they all do:

Attack On Sight: Ok, this attribute is an easy one, and probably most used in ORPGs! It is exactly how it sounds, this NPC will attack any one in its sight range! Oh, and one more thing, it will say what is in the text box under the attributes dropdown once it sees something (also something to note, MONSTERS will almost never attack a person with acess of 2 or higher unless attacked, it is NOT a glitch)

Attack when Attacked: This is the same as above, but they will NOT attack you until you attack them, when attacked they will say what is in the text box (very useful for harmless creatures!!)

Friendly: This one is probably the most misunderstood NPC attribute! Friendly does not mean you can attack it, but it DOES mean you can talk to it! First put something in the text box mentioned above and then set it’s HP to 1 (without this step, the NPC won’t talk).  You can actually set its HP to whatever you want other than 0, it doesn’t matter!  Only one thing, unconfirmed sorces tell me that you cannot talk to these NPCs if your map’s attribute is HOUSE

Shop Keeper: This attribute is the exact same as friendly except it makes the NPC immovable

Gaurd: This attribute is also pretty useful! It is very similar to attack when attacked except, if you have more than one gaurd attributed NPCs on a map and you attack one, they will all become aggressive to you! (also, if you kill a player, your name will turn red and gaurds WILL be aggressive to you, until you die at any time)

Scripted: A scripted NPC can do almost anything you want it to EXCEPT be attacked or killed, Just for starters, here is a simple command you can set for a scripted NPC, changing the case # to whatever the next case is

case 1
call playermsg(index, “this is a test to see this NPC works!!”, 4)

You can of corse change the text inside of the parenthases " " to whatever you want, and you can change the # as well because that is what color the text will be! (just a side note, if you want to make an NPC do something after dying, try messing with the On NPC Death sub or requesting in the Script Request Sub section of the Scripts forum!

Oh, and on a final note, NPCs CANNOT BE SET TO, OR SCRIPTED TO ATTACK EACH OTHER, so don’t ask or request on script request, try source request.

Also, you may want to add, if a player kills another player, his name will turn red.  The guards will automatically attack a rednamed player; also good to keep PKers out of the city (read it from here; tested it myself).

Thx Admiral

I think this is way too simple, anyone can find this out except for scripted maybe. 2/5

You’d Be surprised how many people can’t figure out how to make NPCs talk without scripting

@Ruins:

I think this is way too simple, anyone can find this out except for scripted maybe. 2/5

If you spend enough time in the Questions section, answering people’s questions, you’ll be thankful someone made a tutorial like this; it’s easier linking to a tutorial that explains something as trivial as making an NPC talk, instead of explaining how to do it step-by-step 4-5 times a month to users who don’t feel like experimenting with eclipse for themselves.

I think it was a great guide and seriously noob friendly.
People ask how to do things that from our perspectives are simple, and annoying so maybe this will stop that kind of spam and flaming throughout a pointless threat. Thanks Magician 4.7/5

First of all you misspelled “Guard”, and does guards also attack other “bad” NPCs like monsters set to “Attack on sight”?

Wait a sec, this isnt kinky as it sounds at all….  I’m dissapointed

DrNova, what are you talking about?

@DrNova:

Wait a sec, this isnt kinky as it sounds at all….  I’m dissapointed

@Ridrik:

DrNova, what are you talking about?

roflmao.

This is good but it lacks a bit of info. You should include info about the health and attack strength defence stuff. Good tutorial though!

ok this isnt working fro me i dont know why but i cant put them i did 1 time before but i re download stable then when back to 2.8 eclipse but now i cant put npc i tryed this and many other ways awell but i cant put one
:huh:i even reinstalled it 5 time and i still cant

@atmadragon:

ok this isnt working fro me i dont know why but i cant put them i did 1 time before but i re download stable then when back to 2.8 eclipse but now i cant put npc i tryed this and many other ways awell but i cant put one
:huh:i even reinstalled it 5 time and i still cant

What part are you having trouble with? does it not attack talk? or can you not place it at all?

–-deleted—

thanks for this. now i understand of all this… ty so much :poonbox:

Log in to reply