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

Get the Spells working again


unnown
 Share

Recommended Posts

how to make the spells working,
even with spell animations on death

> If GetPlayerHP(n) > 0 And GetPlayerMap(Index) = GetPlayerMap(n) And GetPlayerLevel(Index) >= 10 And GetPlayerLevel(n) >= 10 And (Map(GetPlayerMap(Index)).Moral = MAP_MORAL_NONE Or Map(GetPlayerMap(Index)).Moral = MAP_MORAL_NO_PENALTY) And GetPlayerAccess(Index) <= 0 And GetPlayerAccess(n) <= 0 Then

this is why it didn't work on other players (sometimes)

this line (server side) has a few weird things,
both players need to be above level 10,
both players can't be admins,
and the map moral needs to be no penalty or no moral at all,

and to get npc's to work change

> If CInt(Sqr((GetPlayerX(Index) - MapNPC(GetPlayerMap(Index), n).x) ^ 2 + ((GetPlayerY(Index) - MapNPC(GetPlayerMap(Index), n).Y) ^ 2))) > Spell(SpellNum).Range Then
>                 Call BattleMsg(Index, "You are too far away to hit the target.", BRIGHTRED, 0)
>                 Exit Sub
>             End If

to

> n = Player(Index).TargetNPC
>             If CInt(Sqr((GetPlayerX(Index) - MapNPC(GetPlayerMap(Index), n).x) ^ 2 + ((GetPlayerY(Index) - MapNPC(GetPlayerMap(Index), n).Y) ^ 2))) > Spell(SpellNum).Range Then
>                 Call BattleMsg(Index, "You are too far away to hit the target.", BRIGHTRED, 0)
>                 Exit Sub
>             End If

then to get the animations to work do this
(it send the player's target instead of the npc num or player num

> If Casted = True Then
>         Player(Index).AttackTimer = GetTickCount
>         Player(Index).CastedSpell = YES
>         Call SendDataToMap(GetPlayerMap(Index), "spellanim" & SEP_CHAR & SpellNum & SEP_CHAR & Spell(SpellNum).SpellAnim & SEP_CHAR & Spell(SpellNum).SpellTime & SEP_CHAR & Spell(SpellNum).SpellDone & SEP_CHAR & Index & SEP_CHAR & Player(Index).TargetType & SEP_CHAR & n & SEP_CHAR & Player(Index).CastedSpell & SEP_CHAR & Spell(SpellNum).Big & END_CHAR)
>         Call SendDataToMap(GetPlayerMap(Index), "sound" & SEP_CHAR & "magic" & SEP_CHAR & Spell(SpellNum).Sound & END_CHAR)
>     End If
Link to comment
Share on other sites

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

@[BS:

> Elephant God Yorty link=topic=43236.msg434514#msg434514 date=1240633214]
> Well, this is nice and all but EE 3.0 will (prob) make all of this unnecessary.

if you know java, then yeah, if not this is the next best thing,
and tyr why didn't you post the fix then?
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...