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