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

Spell Animation and One shot problem


Shube
 Share

Recommended Posts

goto server side and look for the sub CastSpell.

Inside that sub, look for this little bit of code:

```

For i = 1 To MAX_MAP_NPCS

If MapNpc(mapnum).Npc(i).Num > 0 Then

If MapNpc(mapnum).Npc(i).Vital(HP) > 0 Then

If isInRange(AoE, x, y, MapNpc(mapnum).Npc(i).x, MapNpc(mapnum).Npc(i).y) Then

If CanPlayerAttackNpc(index, i, True) Then

SendAnimation mapnum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_NPC, i

PlayerAttackNpc index, i, Vital, spellnum

End If

End If

End If

End If

Next

```

replace it with

```

For i = 1 To MAX_MAP_NPCS

If MapNpc(mapnum).Npc(i).Num > 0 Then

SendAnimation mapnum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_NPC, i

If MapNpc(mapnum).Npc(i).Vital(HP) > 0 Then

If isInRange(AoE, x, y, MapNpc(mapnum).Npc(i).x, MapNpc(mapnum).Npc(i).y) Then

If CanPlayerAttackNpc(index, i, True) Then

PlayerAttackNpc index, i, Vital, spellnum

End If

End If

End If

End If

Next

```

It's only doing it for the npc but i think you will see the difference. if you look, you will see there is a check to see if the npc's hp is more than 0\. if it is, it will show the animation. If you move the SendAnimation call just before that check, it will send it even if he died from it.

Hope that's what you wanted.

Sincerely,

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