BUG - Heal Spell Slays NPC

Hello! :)

I have a trouble with Healing Spells 😕

When I cast some Damage Spells on a NPC, his HP decrease (allright :P)

BUT when I cast a Healing Spell (after throwing some Damage Spells), he get killed! and doesnt matter how much HP the NPC have :(

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

!

hmm what engein you using?

try make range self cast

hmm what engein you using?

try make range 0

Eclipse Origins 2.0.

Tange 0?? Self-Cast? Then I can only heal myself, but not other players or NPC

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

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 +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]

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.

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 :(

Edit: Well I deleted some lines and now is working, but now I cant Heal NPC :(

Anyway, solved :)

Edit2: Thats so weird! I can heal NPC that cast spells, but no others o.O

Log in to reply