

Code: Select all
health = 999999,
protection = 999,
evasion = 999,
immunities = { "sleep", "blinded", "frozen", "knockback" },
resistances = {fire = "immune",cold = "immune",poison = "immune",shock = "absorb",physical = "immune"},
traits = { "elemental" },
bongobeat wrote:if you want to add custom voice to your npc, here is a site that allow you to hear what you write, in most languages.
http://www.oddcast.com/home/demos/tts/tts_example.php
you can then record what you hear with your computer/micro the sound.
it's quite good, I have use this for my mod toorum manor, to simulate some super computer voice.
Looks like some really good stuff. Is this demo asset package still available? The link isn't working for me.mahric wrote: ↑Sat Nov 22, 2014 5:46 pm I've uploaded a version for LoG2 that includes almost ALL (40+) of the basic monsters. (video here or download demo and source here)
With a few lines of scripting it's easy to interact with them, give them something or command them to move.
You can register functions that are called if the player clicks on the npc or gives something to the npc.Code: Select all
mdNPC.source:registerNPC("myNPC") -- registers the npc at the framework mdNPC.source:setRoute("myNPC", "f") -- moves the npc one square forward (use 'f' for forward, 'l' for turn left, 'r' for turn right and 'w' to wait a tiny bit)
Warning: these functions are only called if the npc is not moving.
For more info, check the source in the example from the link above.Code: Select all
mdNPC.source:setOnInteract("myNPC", myScriptEntity.script.myFunction) -- Means: Call the 'myFunction' in the script 'myScript' if the npc 'myNPC' is clicked on while the player has NO item on the cursor mdNPC.source:setOnGive("myNPC", myScriptEntity.script.myFunction) -- Means: call the 'myFunctoin' in the script 'myScript' if the npc 'myNPC' is clicked while the player HAS an item on the cursor
Edit: It is not possible to add custom voices or sounds to the npcs