Convidado Convidado
| Assunto: Magia Reta (Spell Linear) Sex 02 Nov 2012, 10:58 | |
| Olá Pessoal venho apostar um sistema de Magia Reta(Spell Linear) Espero que gostem!!! Client~SideNa frmSpellEditor na cmbType na Propriedade List abaixo de Summon (Create Pet) Adicione: - Código:
-
Linear Procure por: - Código:
-
Public Const SPELL_TYPE_PET = 6 Abaixo adicione: - Código:
-
Public Const SPELL_TYPE_LINEAR = 7 Server~SideProcure por: - Código:
-
Public Const SPELL_TYPE_PET = 6 Abaixo Adicione: - Código:
-
Public Const SPELL_TYPE_LINEAR = 7 Procure por: - Código:
-
Sub CastSpell(ByVal Index As Long, _ Abaixo de: - Código:
-
Dim Packet As String Adicione: - Código:
-
Dim u As Long Abaixo de: - Código:
-
If GetTickCount < Player(Index).AttackTimer + 100 Then Exit Sub End If Adicione: - Código:
-
If Spell(SpellNum).Type = SPELL_TYPE_LINEAR Then x = GetPlayer(Index) y = GetPlayer(Index) For i = 2 To Spell(SpellNum).Range Select Case GetPlayerDir(Index) Case DIR_UP y = y - 1 Case DIR_DOWN y = y + 1 Case DIR_LEFT x = x - 1 Case DIR_RIGHT x = x + 1 End Select Player(Index).Target = MakeLoc(x, y) Player(Index).TargetType = TARGET_TYPE_LOCATION N = MakeLoc(x, y) If = MAX_MAPX Or y = MAX_MAPY Or GetPlayery(index) = MAX_MAPY Or GetPlayerx(index) = MAX_MAPX Then Exit For For u 1 To MAX_MAP_NPCS Damage = Int(GetPlayerMAGI(Index) / 4) + Spell(SpellNum).Data1 - Int(Npc(MapNpc(GetPlayerMap(Index), u).num).DEF / x) + (Rnd * 5) - 2 If MapNpc(GetPlayerMap(Index), u).num > 0 And MapNpc(GetPlayerMap(Index), u).x = x And MapNpc(GetPlayerMap(Index), u).y = y Then If Npc(MapNpc(GetPlayerMap(Index), u).num).Behavior <> NPC_BEHAVIOR_FRIENDLY And Npc(MapNpc(GetPlayerMap(Index), u).num).Behavior <> NPC_BEHAVIOR_SHOPKEEPER Then If Damage > 0 Then Call AttackNpc(Index, u, Damage) Call BattleMsg(Index, "A magia foi muito fraca para machucar " & Trim$(Npc(MapNpc(GetPlayerMap(Index), N).num).Name) & "!", BrightRed, 0) End If Call PlayerMsg(Index, "Você não pode atacar um npc Amigo!", 4) End If Exit For End If Next For u = 1 To MAX_PLAYERS Damage = GetPlayerMAGI(Index) / 4 + Spell(SpellNum).Data1 - Int(GetPlayerstr(u) / 2) * (Rnd * 5) - 2 If IsPlaying(u) = True And GetPlayerMap(Index) = GetPlayerMap(u) And GetPlayerX(u) = x And GetPlayerY(u) = y Then If GetPlayerHP(u) > 0 And GetPlayerMap(Index) = GetPlayerMap(u) And GetPlayerLevel(Index) >= 10 And GetPlayerLevel(u) >= 10 And (Map(GetPlayerMap(Index)).Moral = MAP_MORAL_NONE Or Map(GetPlayerMap(Index)).Moral = MAP_MORAL_NO_PENALTY) And GetPlayerAccess(Index) <= 0 And GetPlayerAccess(u) <= 0 Then If Damage > 0 Then Call AttackPlayer(Index, u, Damage) Call BattleMsg(Index, "A magia foi muita fraca e não feriu! " & GetPlayerName(u) & "!", BrightRed, 0) End If Else Call PlayerMsg(Index, "Você não pode atacar jogadores abaixo do nivel 10, maiores de accesso 2 e Quando não está numa zona da porrada.", 4) End If Exit For End If Next u 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 & END_CHAR) Next i If Spell(SpellNum).sound > 0 Then Call SendDataToMap(GetPlayerMap(Index), "sound" & SEP_CHAR & "Magic" & Spell(SpellNum).sound & END_CHAR) Call SetPlayerMP(Index, GetPlayerMP(Index) - Spell(SpellNum).MPCost) Exit Sub End If Créditos: Luucas Robeerto |
|