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

Spell Animation stops when NPC/Player is killed


Slasheree
 Share

Recommended Posts

In your server, in the sub PlayerAttackNpc

Find this:

```
' send animation

If n > 0 Then

If Not overTime Then

If spellNum = 0 Then Call SendAnimation(mapNum, Item(GetPlayerEquipment(attacker, Weapon)).Animation, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y)

End If

End If
```

Change it to this:

```
' send animation

If n > 0 Then

If Not overTime Then

If spellnum = 0 Then

Call SendAnimation(mapNum, Item(GetPlayerEquipment(Attacker, Weapon)).Animation, MapNpc(mapNum).NPC(mapNpcNum).x, MapNpc(mapNum).NPC(mapNpcNum).y)

Else

Call SendAnimation(mapNum, Spell(spellnum).SpellAnim, MapNpc(mapNum).NPC(mapNpcNum).x, MapNpc(mapNum).NPC(mapNpcNum).y)

End If

End If

End If
```
Link to comment
Share on other sites

Houm…. noticed that n > 0 checks if a player had a weapon, so I changed the fragment to this and it worked fine for me:

```

' send animation

If n > 0 Then

If Not overTime Then

If spellNum = 0 Then

Call SendAnimation(mapNum, Item(GetPlayerEquipment(attacker, Weapon)).Animation, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y)

Else

Call SendAnimation(mapNum, Spell(spellNum).SpellAnim, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y)

End If

End If

'-------------------

Else

If spellNum = 0 Then

Call SendAnimation(mapNum, Item(GetPlayerEquipment(attacker, Weapon)).Animation, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y)

Else

Call SendAnimation(mapNum, Spell(spellNum).SpellAnim, MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y)

End If

'-----------------

End If

```

eventhough I'm gonna clean the previous play animation for the spell, it's not needed there
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...