Bug na spell?
3 participantes
Página 1 de 1
Bug na spell?
Ola to com um bug aq na spell, quando eu seleciono o npc ou monstro ou p layer pra usa spell nao da pra solta se fica apertando insert mas a skill nao sai, mas quando poim em area effect sai skill normal. pq sera que nao ta dando pra solta no oponente quando clica nele?
xurana321- Membro Sênior
- Mensagens : 297
Re: Bug na spell?
é um erro que ocorre comigo tambem, o unico geito é ir fazendo magia de área né.. ninguem sabe resolve isso, é muito complicado
RaiconBanido- Mensagens : 365
Re: Bug na spell?
Ja memorizou a skill?Se nao clique duas vezes no nome da skill ate falar algo sobre memorização do chat.
{Cake}Vitin- Novato
- Mensagens : 22
Re: Bug na spell?
RESOLVIDO,
Procure no projeto do servidor 'CastSpell'
REMOVE TUDO DESSA PARTE
E COLA ISSO
Procure no projeto do servidor 'CastSpell'
REMOVE TUDO DESSA PARTE
E COLA ISSO
- Código:
Sub CastSpell(ByVal Index As Long, ByVal SpellSlot As Long)
Dim SpellNum As Long, I As Long, n As Long, Damage As Long
Dim Casted As Boolean
Casted = False
' Prevent player from using spells if they have been script locked
If Player(Index).LockedSpells = True Then
Exit Sub
End If
' Prevent subscript out of range
If SpellSlot <= 0 Or SpellSlot > MAX_PLAYER_SPELLS Then
Exit Sub
End If
SpellNum = GetPlayerSpell(Index, SpellSlot)
' Make sure player has the spell
If Not HasSpell(Index, SpellNum) Then
Call BattleMsg(Index, "You do not have this spell!", BRIGHTRED, 0)
Exit Sub
End If
I = GetSpellReqLevel(SpellNum)
' Check if they have enough MP
If GetPlayerMP(Index) < Spell(SpellNum).MPCost Then
Call BattleMsg(Index, "Not enough mana!", BRIGHTRED, 0)
Exit Sub
End If
' Make sure they are the right level
If I > GetPlayerLevel(Index) Then
Call BattleMsg(Index, "You need to be " & I & "to cast this spell.", BRIGHTRED, 0)
Exit Sub
End If
' Check if timer is ok
If GetTickCount < Player(Index).AttackTimer + 1000 Then
Exit Sub
End If
' Check if the spell is scripted and do that instead of a stat modification
If Spell(SpellNum).Type = SPELL_TYPE_SCRIPTED Then
MyScript.ExecuteStatement "Scripts\Main.ess", "ScriptedSpell " & Index & "," & Spell(SpellNum).Data1
Exit Sub
End If
' End If
Dim X As Long, Y As Long
If Spell(SpellNum).AE = 1 Then
For Y = GetPlayerY(Index) - Spell(SpellNum).Range To GetPlayerY(Index) + Spell(SpellNum).Range
For X = GetPlayerX(Index) - Spell(SpellNum).Range To GetPlayerX(Index) + Spell(SpellNum).Range
n = -1
For I = 1 To MAX_PLAYERS
If IsPlaying(I) = True Then
If GetPlayerMap(Index) = GetPlayerMap(I) Then
If GetPlayerX(I) = X And GetPlayerY(I) = Y Then
If I = Index Then
If Spell(SpellNum).Type = SPELL_TYPE_ADDHP Or Spell(SpellNum).Type = SPELL_TYPE_ADDMP Or Spell(SpellNum).Type = SPELL_TYPE_ADDSP Then
Player(Index).Target = I
Player(Index).TargetType = TARGET_TYPE_PLAYER
n = Player(Index).Target
End If
Else
Player(Index).Target = I
Player(Index).TargetType = TARGET_TYPE_PLAYER
n = Player(Index).Target
End If
End If
End If
End If
Next I
For I = 1 To MAX_MAP_NPCS
If MapNPC(GetPlayerMap(Index), I).num > 0 Then
If NPC(MapNPC(GetPlayerMap(Index), I).num).Behavior <> NPC_BEHAVIOR_FRIENDLY And NPC(MapNPC(GetPlayerMap(Index), I).num).Behavior <> NPC_BEHAVIOR_SHOPKEEPER Then
If MapNPC(GetPlayerMap(Index), I).X = X And MapNPC(GetPlayerMap(Index), I).Y = Y Then
Player(Index).Target = I
Player(Index).TargetType = TARGET_TYPE_NPC
n = Player(Index).Target
End If
End If
End If
Next I
Casted = False
If n > 0 Then
If Player(Index).TargetType = TARGET_TYPE_PLAYER Then
If IsPlaying(n) Then
If n = Index Then
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_ADDHP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerHP(n, GetPlayerHP(n) + Spell(SpellNum).Data1)
Call SendHP(n)
Case SPELL_TYPE_ADDMP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerMP(n, GetPlayerMP(n) + Spell(SpellNum).Data1)
Call SendMP(n)
Case SPELL_TYPE_ADDSP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerSP(n, GetPlayerSP(n) + Spell(SpellNum).Data1)
Call SendSP(n)
End Select
Casted = True
Else
Call PlayerMsg(Index, "Cannot cast spell!", BRIGHTRED)
End If
If n <> Index Then
Player(Index).TargetType = TARGET_TYPE_PLAYER
If GetPlayerHP(n) > 0 And GetPlayerMap(Index) = GetPlayerMap(n) Then
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_SUBHP
Damage = (Int(GetPlayerMAGI(Index) / 4) + Spell(SpellNum).Data1) - GetPlayerProtection(n)
If Damage > 0 Then
Call AttackPlayer(Index, n, Damage)
Else
Call BattleMsg(Index, "The spell was to weak to hurt " & GetPlayerName(n) & "!", BRIGHTRED, 0)
End If
Case SPELL_TYPE_SUBMP
Call SetPlayerMP(n, GetPlayerMP(n) - Spell(SpellNum).Data1)
Call SendMP(n)
Case SPELL_TYPE_SUBSP
Call SetPlayerSP(n, GetPlayerSP(n) - Spell(SpellNum).Data1)
Call SendSP(n)
End Select
Casted = True
If GetPlayerMap(Index) = GetPlayerMap(n) And Spell(SpellNum).Type >= SPELL_TYPE_ADDHP And Spell(SpellNum).Type <= SPELL_TYPE_ADDSP Then
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_ADDHP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerHP(n, GetPlayerHP(n) + Spell(SpellNum).Data1)
Call SendHP(n)
Case SPELL_TYPE_ADDMP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerMP(n, GetPlayerMP(n) + Spell(SpellNum).Data1)
Call SendMP(n)
Case SPELL_TYPE_ADDSP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerSP(n, GetPlayerSP(n) + Spell(SpellNum).Data1)
Call SendSP(n)
End Select
Casted = True
Else
Call PlayerMsg(Index, "Cannot cast spell!", BRIGHTRED)
End If
End If
Else
Player(Index).TargetType = TARGET_TYPE_PLAYER
If n = Index Then
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_ADDHP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerHP(n, GetPlayerHP(n) + Spell(SpellNum).Data1)
Call SendHP(n)
Case SPELL_TYPE_ADDMP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerMP(n, GetPlayerMP(n) + Spell(SpellNum).Data1)
Call SendMP(n)
Case SPELL_TYPE_ADDSP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerSP(n, GetPlayerSP(n) + Spell(SpellNum).Data1)
Call SendSP(n)
End Select
Casted = True
Else
Call PlayerMsg(Index, "Cannot cast spell!", BRIGHTRED)
End If
If GetPlayerHP(n) > 0 And GetPlayerMap(Index) = GetPlayerMap(n) Then
Else
If GetPlayerMap(Index) = GetPlayerMap(n) And Spell(SpellNum).Type >= SPELL_TYPE_ADDHP And Spell(SpellNum).Type <= SPELL_TYPE_ADDSP Then
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_ADDHP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerHP(n, GetPlayerHP(n) + Spell(SpellNum).Data1)
Call SendHP(n)
Case SPELL_TYPE_ADDMP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerMP(n, GetPlayerMP(n) + Spell(SpellNum).Data1)
Call SendMP(n)
Case SPELL_TYPE_ADDSP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerSP(n, GetPlayerSP(n) + Spell(SpellNum).Data1)
Call SendSP(n)
End Select
Casted = True
Else
Call BattleMsg(Index, "Could not cast spell!", BRIGHTRED, 0)
End If
End If
End If
Else
Call BattleMsg(Index, "Could not cast spell!", BRIGHTRED, 0)
End If
Else
Player(Index).TargetType = TARGET_TYPE_NPC
If NPC(MapNPC(GetPlayerMap(Index), n).num).Behavior <> NPC_BEHAVIOR_FRIENDLY And NPC(MapNPC(GetPlayerMap(Index), n).num).Behavior <> NPC_BEHAVIOR_SHOPKEEPER Then
If Spell(SpellNum).Type >= SPELL_TYPE_SUBHP And Spell(SpellNum).Type <= SPELL_TYPE_SUBSP Then
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on a " & Trim$(Npc(MapNpc(GetPlayerMap(index), n).num).Name) & ".", BrightBlue)
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_SUBHP
Damage = (Int(GetPlayerMAGI(Index) / 4) + Spell(SpellNum).Data1) - Int(NPC(MapNPC(GetPlayerMap(Index), n).num).DEF / 2)
If Damage > 0 Then
If Spell(SpellNum).Element <> 0 And NPC(MapNPC(GetPlayerMap(Index), n).num).Element <> 0 Then
If Element(Spell(SpellNum).Element).Strong = NPC(MapNPC(GetPlayerMap(Index), n).num).Element Or Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Weak = Spell(SpellNum).Element Then
Call BattleMsg(Index, "A deadly mix of elements harm the " & Trim$(NPC(MapNPC(GetPlayerMap(Index), n).num).Name) & "!", BLUE, 0)
Damage = Int(Damage * 1.25)
If Element(Spell(SpellNum).Element).Strong = NPC(MapNPC(GetPlayerMap(Index), n).num).Element And Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Weak = Spell(SpellNum).Element Then
Damage = Int(Damage * 1.2)
End If
End If
If Element(Spell(SpellNum).Element).Weak = NPC(MapNPC(GetPlayerMap(Index), n).num).Element Or Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Strong = Spell(SpellNum).Element Then
Call BattleMsg(Index, "The " & Trim$(NPC(MapNPC(GetPlayerMap(Index), n).num).Name) & " absorbs much of the elemental damage!", RED, 0)
Damage = Int(Damage * 0.75)
If Element(Spell(SpellNum).Element).Weak = NPC(MapNPC(GetPlayerMap(Index), n).num).Element And Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Strong = Spell(SpellNum).Element Then
Damage = Int(Damage * (2 / 3))
End If
End If
End If
Call AttackNpc(Index, n, Damage)
Else
Call BattleMsg(Index, "The spell was to weak to hurt " & Trim$(NPC(MapNPC(GetPlayerMap(Index), n).num).Name) & "!", BRIGHTRED, 0)
End If
Case SPELL_TYPE_SUBMP
MapNPC(GetPlayerMap(Index), n).MP = MapNPC(GetPlayerMap(Index), n).MP - Spell(SpellNum).Data1
Case SPELL_TYPE_SUBSP
MapNPC(GetPlayerMap(Index), n).SP = MapNPC(GetPlayerMap(Index), n).SP - Spell(SpellNum).Data1
End Select
Casted = True
Else
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_ADDHP
MapNPC(GetPlayerMap(Index), n).HP = MapNPC(GetPlayerMap(Index), n).HP + Spell(SpellNum).Data1
' resets HP to max if it goes above max
If MapNPC(GetPlayerMap(Index), n).HP >= GetNpcMaxHP(MapNPC(GetPlayerMap(Index), n).num) Then
MapNPC(GetPlayerMap(Index), n).HP = GetNpcMaxHP(MapNPC(GetPlayerMap(Index), n).num)
End If
Call SendDataToMap(GetPlayerMap(Index), "npchp" & SEP_CHAR & n & SEP_CHAR & MapNPC(GetPlayerMap(Index), n).HP & SEP_CHAR & GetNpcMaxHP(MapNPC(GetPlayerMap(Index), n).num) & END_CHAR)
Case SPELL_TYPE_ADDMP
MapNPC(GetPlayerMap(Index), n).MP = MapNPC(GetPlayerMap(Index), n).MP + Spell(SpellNum).Data1
Case SPELL_TYPE_ADDSP
MapNPC(GetPlayerMap(Index), n).SP = MapNPC(GetPlayerMap(Index), n).SP + Spell(SpellNum).Data1
End Select
Casted = True
End If
Else
Call BattleMsg(Index, "Could not cast spell!", BRIGHTRED, 0)
End If
End If
End If
If Casted = True Then
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 & Player(Index).Target & 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
Next X
Next Y
Call SetPlayerMP(Index, GetPlayerMP(Index) - Spell(SpellNum).MPCost)
Call SendMP(Index)
Else
n = Player(Index).Target
If Player(Index).TargetType = TARGET_TYPE_PLAYER Then
If IsPlaying(n) Then
If GetPlayerName(n) <> GetPlayerName(Index) Then
If CInt(Sqr((GetPlayerX(Index) - GetPlayerX(n)) ^ 2 + ((GetPlayerY(Index) - GetPlayerY(n)) ^ 2))) > Spell(SpellNum).Range Then
Call BattleMsg(Index, "You are too far away to hit the target.", BRIGHTRED, 0)
Exit Sub
End If
End If
Player(Index).TargetType = TARGET_TYPE_PLAYER
If GetPlayerHP(n) > 0 And GetPlayerMap(Index) = GetPlayerMap(n) Then
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
If Spell(SpellNum).Type >= SPELL_TYPE_SUBHP And Spell(SpellNum).Type <= SPELL_TYPE_SUBSP Then
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_SUBHP
Damage = (Int(GetPlayerMAGI(Index) / 4) + Spell(SpellNum).Data1) - GetPlayerProtection(n)
If Damage > 0 Then
Call AttackPlayer(Index, n, Damage)
Else
Call BattleMsg(Index, "The spell was to weak to hurt " & GetPlayerName(n) & "!", BRIGHTRED, 0)
End If
Case SPELL_TYPE_SUBMP
Call SetPlayerMP(n, GetPlayerMP(n) - Spell(SpellNum).Data1)
Call SendMP(n)
Case SPELL_TYPE_SUBSP
Call SetPlayerSP(n, GetPlayerSP(n) - Spell(SpellNum).Data1)
Call SendSP(n)
End Select
' Take away the mana points
Call SetPlayerMP(Index, GetPlayerMP(Index) - Spell(SpellNum).MPCost)
Call SendMP(Index)
Casted = True
End If
If GetPlayerMap(Index) = GetPlayerMap(n) And Spell(SpellNum).Type >= SPELL_TYPE_ADDHP And Spell(SpellNum).Type <= SPELL_TYPE_ADDSP Then
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_ADDHP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerHP(n, GetPlayerHP(n) + Spell(SpellNum).Data1)
Call SendHP(n)
Case SPELL_TYPE_ADDMP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerMP(n, GetPlayerMP(n) + Spell(SpellNum).Data1)
Call SendMP(n)
Case SPELL_TYPE_ADDSP
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on " & GetPlayerName(n) & ".", BrightBlue)
Call SetPlayerSP(n, GetPlayerSP(n) + Spell(SpellNum).Data1)
Call SendSP(n)
End Select
' Take away the mana points
Call SetPlayerMP(Index, GetPlayerMP(Index) - Spell(SpellNum).MPCost)
Call SendMP(Index)
Casted = True
End If
End If
Else
Call PlayerMsg(Index, "Cannot cast spell!", BRIGHTRED)
End If
Else
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
Player(Index).TargetType = TARGET_TYPE_NPC
If NPC(MapNPC(GetPlayerMap(Index), n).num).Behavior <> NPC_BEHAVIOR_FRIENDLY And NPC(MapNPC(GetPlayerMap(Index), n).num).Behavior <> NPC_BEHAVIOR_SHOPKEEPER Then
' Call MapMsg(GetPlayerMap(index), GetPlayerName(index) & " casts " & Trim$(Spell(SpellNum).Name) & " on a " & Trim$(Npc(MapNpc(GetPlayerMap(index), n).num).Name) & ".", BrightBlue)
Select Case Spell(SpellNum).Type
Case SPELL_TYPE_ADDHP
MapNPC(GetPlayerMap(Index), n).HP = MapNPC(GetPlayerMap(Index), n).HP + Spell(SpellNum).Data1
' resets HP to max if it goes above max
If MapNPC(GetPlayerMap(Index), n).HP >= GetNpcMaxHP(MapNPC(GetPlayerMap(Index), n).num) Then
MapNPC(GetPlayerMap(Index), n).HP = GetNpcMaxHP(MapNPC(GetPlayerMap(Index), n).num)
End If
Call SendDataToMap(GetPlayerMap(Index), "npchp" & SEP_CHAR & n & SEP_CHAR & MapNPC(GetPlayerMap(Index), n).HP & SEP_CHAR & GetNpcMaxHP(MapNPC(GetPlayerMap(Index), n).num) & END_CHAR)
Case SPELL_TYPE_SUBHP
Damage = (Int(GetPlayerMAGI(Index) / 4) + Spell(SpellNum).Data1) - Int(NPC(MapNPC(GetPlayerMap(Index), n).num).DEF / 2)
If Damage > 0 Then
If Spell(SpellNum).Element <> 0 And NPC(MapNPC(GetPlayerMap(Index), n).num).Element <> 0 Then
If Element(Spell(SpellNum).Element).Strong = NPC(MapNPC(GetPlayerMap(Index), n).num).Element Or Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Weak = Spell(SpellNum).Element Then
Call BattleMsg(Index, "A deadly mix of elements harm the " & Trim$(NPC(MapNPC(GetPlayerMap(Index), n).num).Name) & "!", BLUE, 0)
Damage = Int(Damage * 1.25)
If Element(Spell(SpellNum).Element).Strong = NPC(MapNPC(GetPlayerMap(Index), n).num).Element And Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Weak = Spell(SpellNum).Element Then
Damage = Int(Damage * 1.2)
End If
End If
If Element(Spell(SpellNum).Element).Weak = NPC(MapNPC(GetPlayerMap(Index), n).num).Element Or Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Strong = Spell(SpellNum).Element Then
Call BattleMsg(Index, "The " & Trim$(NPC(MapNPC(GetPlayerMap(Index), n).num).Name) & " aborbs much of the elemental damage!", RED, 0)
Damage = Int(Damage * 0.75)
If Element(Spell(SpellNum).Element).Weak = NPC(MapNPC(GetPlayerMap(Index), n).num).Element And Element(NPC(MapNPC(GetPlayerMap(Index), n).num).Element).Strong = Spell(SpellNum).Element Then
Damage = Int(Damage * (2 / 3))
End If
End If
End If
Call AttackNpc(Index, n, Damage)
Else
Call BattleMsg(Index, "The spell was to weak to hurt " & Trim$(NPC(MapNPC(GetPlayerMap(Index), n).num).Name) & "!", BRIGHTRED, 0)
End If
Case SPELL_TYPE_ADDMP
MapNPC(GetPlayerMap(Index), n).MP = MapNPC(GetPlayerMap(Index), n).MP + Spell(SpellNum).Data1
Case SPELL_TYPE_SUBMP
MapNPC(GetPlayerMap(Index), n).MP = MapNPC(GetPlayerMap(Index), n).MP - Spell(SpellNum).Data1
Case SPELL_TYPE_ADDSP
MapNPC(GetPlayerMap(Index), n).SP = MapNPC(GetPlayerMap(Index), n).SP + Spell(SpellNum).Data1
Case SPELL_TYPE_SUBSP
MapNPC(GetPlayerMap(Index), n).SP = MapNPC(GetPlayerMap(Index), n).SP - Spell(SpellNum).Data1
End Select
' Take away the mana points
Call SetPlayerMP(Index, GetPlayerMP(Index) - Spell(SpellNum).MPCost)
Call SendMP(Index)
Casted = True
Else
Call BattleMsg(Index, "Could not cast spell!", BRIGHTRED, 0)
End If
End If
End If
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
End Sub
RaiconBanido- Mensagens : 365
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
Dom 08 Abr 2018, 18:40 por JorgeZinhoo002
» Ojkjeeeee
Seg 10 Out 2016, 23:19 por Frozen
» Naruto Great Ninja Batle
Dom 09 Out 2016, 14:29 por GuiinhoLP
» Recrutamento de um Designer para jogo de CDZ.
Sex 23 Set 2016, 18:37 por newbie123
» Serviços de suporte maker( Programação , Design , PixelArt ) E Vendas de Jogos
Qui 22 Set 2016, 20:11 por Eduardo
» Serviços de suporte maker( Programação , Design , PixelArt ) E Vendas de Jogos
Qui 22 Set 2016, 20:11 por Eduardo
» Serviços de suporte maker( Programação , Design , PixelArt ) E Vendas de Jogos
Qui 22 Set 2016, 20:09 por Eduardo
» Projeto Dbz
Qua 31 Ago 2016, 23:46 por 157
» Avaliação - Sprites Naruto
Qua 31 Ago 2016, 17:09 por 157
» [Sprites] DBZ (Plix)
Qua 31 Ago 2016, 14:13 por 157
» Super Pack - Bleach V.2
Qua 31 Ago 2016, 13:02 por 157
» [PEDIDO][PROJETO][RECRUTAMENTO] DYNISTYGAMES
Ter 30 Ago 2016, 10:04 por 157
» [PEDIDO][PROJETO][RECRUTAMENTO] DYNISTYGAMES
Ter 30 Ago 2016, 10:03 por 157
» [PEDIDO][PROJETO][RECRUTAMENTO] DYNISTYGAMES
Ter 30 Ago 2016, 10:02 por 157
» [Pedido] Contador de resets na FrmMain
Sáb 13 Ago 2016, 17:45 por killers97
» [Recrutamento]
Qua 10 Ago 2016, 23:09 por Monsters
» Ajuda erro no Cliente e Servidor do EEB 2.6!
Qua 20 Jul 2016, 19:53 por Binholx
» Como criar tilesets para Eclipse Origins 3.0 (POKÉMON)
Qua 29 Jun 2016, 19:46 por Sir Aaron
» Recursos Pokemons
Qua 29 Jun 2016, 19:34 por Sir Aaron
» erro frm flash
Qua 25 maio 2016, 13:51 por vava123
» Pedido - Pack de star wars
Qui 19 maio 2016, 05:06 por edsonpet
» [Ajuda] Sobre como por o servidor on por ip fixo
Ter 17 maio 2016, 16:14 por vava123
» Illusion Dimension - O Misterio do ID: BETA TESTE ONLINE
Sex 06 maio 2016, 20:02 por LksFlorencio
» [NSME] Naruto Shinobi Maker Engine
Qua 23 Mar 2016, 15:11 por luana1457
» Script /base,/casa Igual DBZ Forces
Dom 21 Fev 2016, 07:34 por JorgeZinhoo002
» [Pedido]Colar Tsunade item sprite eclipse origin
Qui 21 Jan 2016, 07:38 por lawllietbr
» [Pedido] Elysium
Sáb 19 Dez 2015, 11:31 por luana1457
» Naruto - Recruta
Ter 15 Dez 2015, 18:40 por Uchiha ~
» [Avaliação] - Kirito from Sword Art Online; Red and Pikachu from Pokemon.
Qua 25 Nov 2015, 13:43 por Thanakii
» [Avaliação] - Kenpachi Zaraki from Bleach; Libra Shiryu From Saint Seiya.
Qua 25 Nov 2015, 12:55 por Thanakii
» Demonstração de Sprites (Á VENDA!)
Qua 25 Nov 2015, 12:40 por Thanakii
» [Sistema de Reset]Para Eclipse .
Ter 24 Nov 2015, 16:51 por VithorUchi
» Cada Guild Nascer em Certo Mapa
Qui 12 Nov 2015, 06:13 por fabiofeijó_HIT
» Dragon Ball z Fusion A Grande Volta
Qui 29 Out 2015, 15:17 por fabiofeijó_HIT
» Ajuda com Ip fixo
Seg 26 Out 2015, 16:07 por GalaxyHells15
» Como Fazer um GUI no Eclipse Origins
Dom 18 Out 2015, 22:10 por Jeanleee
» Shisui Susanoo
Dom 18 Out 2015, 20:23 por Jeanleee
» Fantasy Art Online
Dom 18 Out 2015, 16:41 por daviih123
» Ajuda !!
Seg 05 Out 2015, 12:13 por andersonzika
» como passar o usuário e senha para o MainMenu?
Seg 28 Set 2015, 22:03 por Bëzerk
» Ru time ero 13 Type mismatch
Seg 28 Set 2015, 09:08 por andredarle
» Jarvis 1.3 Download
Qua 23 Set 2015, 18:42 por soares125
» [Avaliação/Disponibilização]Árvore 64x64
Qua 23 Set 2015, 15:15 por Over~
» Mlk's Zikas Signatures
Ter 22 Set 2015, 21:15 por Aikawa Reborn'
» Pedido de Sistemas
Dom 20 Set 2015, 18:05 por cleyton_05
» [AjudaEEB]Gerador de EXP
Qua 16 Set 2015, 14:04 por Over~
» [Avaliar] Base, Humano e Goblin.
Seg 14 Set 2015, 22:51 por .iBlaz3.
» Fabrica do Tio Cronos!
Dom 13 Set 2015, 21:31 por [ADM]Cronos
» [PixelArt] Minion - Meu malvado favorito
Dom 13 Set 2015, 12:51 por [ADM]Cronos
» [Avaliar] Goku Dragon Ball Z
Qua 05 Ago 2015, 21:36 por Setrux