• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua NPC will take dmg on player attacks and die

skywalker16

New Member
Joined
Nov 5, 2008
Messages
250
Reaction score
1
Location
Switzerland
By searching for this feature I figured out how to make an npc attackable. The problem right now is, that he wont take any damge.

Is there any way to change this?
 
show script?

Here you go. It's basically just an edited default NPC. The walk.lua is not related to the "attackable".

The NPC is attackable (targetable) on TFS 1.0 but doesn't take any damage.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Alice" script="walk.lua" walkinterval="0" attackable="1" floorchange="0" access="0" speed="400">
  <health now="100" max="100"/>
  <look type="268" head="0" body="0" legs="79" feet="76" addons="3"/>
  <defenses armor="0" defense="0"/>
    <flags>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="0"/>
    </flags>
</npc>
 
Sorry but i didn't understand why u want to do this, can example me this for make this for you?? Don't is more easy to make one monster with npc looktype? put functions .lua in monster?
 
Back
Top