Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

BUG - Heal Spell Slays NPC


troglodite
 Share

Recommended Posts

Hello! ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

I have a trouble with Healing Spells :/

When I cast some Damage Spells on a NPC, his HP decrease (allright ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png))

BUT when I cast a Healing Spell (after throwing some Damage Spells), he get killed! and doesnt matter how much HP the NPC have ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sad.png)

Also I see that the Healing Spell do something wrong with the HP of the NPC,

like it decreases to their minimum HP, doing it very easy to kill

The Spell seems to be Ok

>! ![](http://i47.tinypic.com/6zn2mq.jpg)
Link to comment
Share on other sites

click on area effect spells then below is renge scroll for that aoe

also here is fix to dont heal npc

[http://www.touchofdeathforums.com/community/index.php?/topic/119712-eofixor-stop-overhealhealing-npcs/page__hl__%2Bheal+%2Bspell](http://www.touchofdeathforums.com/community/index.php?/topic/119712-eofixor-stop-overhealhealing-npcs/page__hl__%2Bheal+%2Bspell)
Link to comment
Share on other sites

> click on area effect spells then below is renge scroll for that aoe
>
> also here is fix to dont heal npc
>
> [http://www.touchofde…l__+heal](http://www.touchofde...l__+heal) +spell

Uh…I tried but It didnt worked, or maybe I didnt understand

This is my Sub SpellNpc_Effect

```

Public Sub SpellNpc_Effect(ByVal Vital As Byte, ByVal increment As Boolean, ByVal index As Long, ByVal Damage As Long, ByVal spellnum As Long, ByVal mapNum As Long)

Dim sSymbol As String * 1

Dim Colour As Long

If Damage > 0 Then

If increment Then

sSymbol = "+"

If Vital = Vitals.HP Then Colour = BrightGreen

If Vital = Vitals.MP Then Colour = BrightBlue

Else

sSymbol = "-"

Colour = Blue

End If

SendAnimation mapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_NPC, index

SendActionMsg mapNum, sSymbol & Damage, Colour, ACTIONMSG_SCROLL, MapNpc(mapNum).NPC(index).x * 32, MapNpc(mapNum).NPC(index).y * 32

' send the sound

SendMapSound index, MapNpc(mapNum).NPC(index).x, MapNpc(mapNum).NPC(index).y, SoundEntity.seSpell, spellnum

If increment Then

If MapNpc(mapNum).NPC(index).Vital(Vital) + Damage <= GetNpcMaxVital(index, Vitals.HP) Then

MapNpc(mapNum).NPC(index).Vital(Vital) = MapNpc(mapNum).NPC(index).Vital(Vital) + Damage

Else

MapNpc(mapNum).NPC(index).Vital(Vital) = GetNpcMaxVital(index, Vitals.HP)

End If

If Spell(spellnum).Duration > 0 Then

AddHoT_Npc mapNum, index, spellnum

End If

ElseIf Not increment Then

MapNpc(mapNum).NPC(index).Vital(Vital) = MapNpc(mapNum).NPC(index).Vital(Vital) - Damage

End If

End If

End Sub

```

AND here is a video, **and the last Spell is a Casting Spell** (the cross sprite)

>! [media]http://youtu.be/n6w3eNgpQok[/media]
Link to comment
Share on other sites

to stop heal npc

go server side and delete this

```
MapNpc(mapNum).Npc(index).Vital(Vital) = MapNpc(mapNum).Npc(index).Vital(Vital) + Damage

If Spell(spellnum).Duration > 0 Then

AddHoT_Npc mapNum, index, SpellNum

End If
```

the above is the code to delete as this basicly says, if it is a [background=yellow]heal[/background], then [background=yellow]heal[/background] it.

If you want to stop [background=yellow]heal[/background]ing npcs, you are done.
Link to comment
Share on other sites

> to stop heal npc
>
> go server side and delete this
>
> ```
> MapNpc(mapNum).Npc(index).Vital(Vital) = MapNpc(mapNum).Npc(index).Vital(Vital) + Damage
>
> If Spell(spellnum).Duration > 0 Then
>
> AddHoT_Npc mapNum, index, SpellNum
>
> End If
> ```
>
> the above is the code to delete as this basicly says, if it is a [background=yellow]heal[/background], then [background=yellow]heal[/background] it.
>
> If you want to stop [background=yellow]heal[/background]ing npcs, you are done.

But I have no the same lines ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sad.png)

Edit: Well I deleted some lines and now is working, but now I cant Heal NPC ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sad.png)

Anyway, solved ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

Edit2: Thats so weird! I can heal NPC that cast spells, but no others o.O
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...