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

Another stupid question…but how do u make healing spells effect their target?


Clastic
 Share

Recommended Posts

@Clastic:

> i didnt use a script i just used the preloaded system in EE2.7
>
> if you could post a basic script it would be amazing!

Try this! Replace #'s with a value.
```
Case #
Dim Target

Target = GetPlayerTarget(index)

if Target = 0 then
  Call PlayerMsg(index, "Invalid Target", Red)
  Exit Sub
Else
  If Target > 0 Then
      If GetPlayerMap(target) = GetPlayerMap(index) Then
        Call SpellAnim(#, GetPlayerMap(index), GetPlayerX(Target), GetPlayerY(target))
        Call SetPlayerHP(index, (GetPlayerHP(index) + #)
        Call SetPlayerMP(index, (GetPlayerMP(index) - #))
      Else
        Call PlayerMsg(index, "Invalid Target!", Red)
      End If
      Exit Sub
  Else
      Target = GetPlayerTargetNPC(index)
      Call SpellAnim(#, GetPlayerMap(index), GetPlayerX(Target), GetPlayerY(target))
      Call SetPlayerHP(index, (GetPlayerHP(index) + #)
      Call SetPlayerMP(index, (GetPlayerMP(index) - #))
      Exit Sub
  End If
End If
```
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...