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

Golbi

Members
  • Posts

    264
  • Joined

  • Last visited

    Never

Golbi's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. i have 20 titlesets first open map editor i can see 20 titlesets i close the map editor i open the map editor i can see 10 titlesets
  2. hi little bug Titelset in map editor 1\. You oben map editor, all titelsets can see 2\. You close map editor 3 You oben map editor, 1-10 titelsets can see…..
  3. Is there a solution for this problem? (FIX) I would be very happy if there already exists a solution. I will write the next time the right Trade I'm sorry this is something I've written in the wrong
  4. I have big Problem. Spell 1 - Spell 35 is working. (No problems) Spell 36 - 255 is not Working.
  5. Now it goes I thank you very much It's very nice that you helped me
  6. yes i have instalet libary files from EE2.7
  7. :-( Laufzeitfehler '429': Objekterstellung durch ActiveX-Komponente nicht möglich Run-time error '429 ': Create object ActiveX component can not
  8. ``` Public Sub CastSpell(ByVal index As Long, ByVal spellslot As Long, ByVal target As Long, ByVal targetType As Byte) Dim spellnum As Long Dim MPCost As Long Dim LevelReq As Long Dim mapNum As Long Dim Vital As Long Dim DidCast As Boolean Dim ClassReq As Long Dim AccessReq As Long Dim I As Long Dim AoE As Long Dim Range As Long Dim VitalType As Byte Dim increment As Boolean Dim x As Long, y As Long Dim Buffer As clsBuffer Dim SpellCastType As Long DidCast = False ' Prevent subscript out of range If spellslot MAX_PLAYER_SPELLS Then Exit Sub spellnum = GetPlayerSpell(index, spellslot) mapNum = GetPlayerMap(index) ' Make sure player has the spell If Not HasSpell(index, spellnum) Then Exit Sub MPCost = Spell(spellnum).MPCost ' Check if they have enough MP If GetPlayerVital(index, Vitals.MP) < MPCost Then Call PlayerMsg(index, "Not enough mana!", BrightRed) Exit Sub End If LevelReq = Spell(spellnum).LevelReq ' Make sure they are the right level If LevelReq > GetPlayerLevel(index) Then Call PlayerMsg(index, "You must be level " & LevelReq & " to cast this spell.", BrightRed) Exit Sub End If AccessReq = Spell(spellnum).AccessReq ' make sure they have the right access If AccessReq > GetPlayerAccess(index) Then Call PlayerMsg(index, "You must be an administrator to cast this spell.", BrightRed) Exit Sub End If ClassReq = Spell(spellnum).ClassReq ' make sure the classreq > 0 If ClassReq > 0 Then ' 0 = no req If ClassReq GetPlayerClass(index) Then Call PlayerMsg(index, "Only " & CheckGrammar(Trim$(Class(ClassReq).Name)) & " can use this spell.", BrightRed) Exit Sub End If End If ' find out what kind of spell it is! self cast, target or AOE If Spell(spellnum).Range > 0 Then ' ranged attack, single target or aoe? If Not Spell(spellnum).IsAoE Then SpellCastType = 2 ' targetted Else SpellCastType = 3 ' targetted aoe End If Else If Not Spell(spellnum).IsAoE Then SpellCastType = 0 ' self-cast Else SpellCastType = 1 ' self-cast AoE End If End If ' set the vital Vital = Spell(spellnum).Vital AoE = Spell(spellnum).AoE Range = Spell(spellnum).Range Select Case SpellCastType Case 0 ' self-cast target Select Case Spell(spellnum).Type Case SPELL_TYPE_HEALHP SpellPlayer_Effect Vitals.HP, True, index, Vital, spellnum DidCast = True Case SPELL_TYPE_HEALMP SpellPlayer_Effect Vitals.MP, True, index, Vital, spellnum DidCast = True Case SPELL_TYPE_WARP SendAnimation mapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, index PlayerWarp index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).y SendAnimation GetPlayerMap(index), Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, index DidCast = True End Select Case 1, 3 ' self-cast AOE & targetted AOE If SpellCastType = 1 Then x = GetPlayerX(index) y = GetPlayerY(index) ElseIf SpellCastType = 3 Then If targetType = 0 Then Exit Sub If target = 0 Then Exit Sub If targetType = TARGET_TYPE_PLAYER Then x = GetPlayerX(target) y = GetPlayerY(target) Else x = MapNpc(mapNum).Npc(target).x y = MapNpc(mapNum).Npc(target).y End If If Not isInRange(Range, GetPlayerX(index), GetPlayerY(index), x, y) Then PlayerMsg index, "Target not in range.", BrightRed SendClearSpellBuffer index End If End If Select Case Spell(spellnum).Type Case SPELL_TYPE_DAMAGEHP DidCast = True For I = 1 To Player_HighIndex If IsPlaying(I) Then If I index Then If GetPlayerMap(I) = GetPlayerMap(index) Then If isInRange(AoE, x, y, GetPlayerX(I), GetPlayerY(I)) Then If CanPlayerAttackPlayer(index, I, True) Then SendAnimation mapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, I PlayerAttackPlayer index, I, Vital, spellnum End If End If End If End If End If Next For I = 1 To MAX_MAP_NPCS If MapNpc(mapNum).Npc(I).Num > 0 Then If MapNpc(mapNum).Npc(I).Vital(HP) > 0 Then If isInRange(AoE, x, y, MapNpc(mapNum).Npc(I).x, MapNpc(mapNum).Npc(I).y) Then If CanPlayerAttackNpc(index, I, True) Then SendAnimation mapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_NPC, I PlayerAttackNpc index, I, Vital, spellnum End If End If End If End If Next Case SPELL_TYPE_HEALHP, SPELL_TYPE_HEALMP, SPELL_TYPE_DAMAGEMP If Spell(spellnum).Type = SPELL_TYPE_HEALHP Then VitalType = Vitals.HP increment = True ElseIf Spell(spellnum).Type = SPELL_TYPE_HEALMP Then VitalType = Vitals.MP increment = True ElseIf Spell(spellnum).Type = SPELL_TYPE_DAMAGEMP Then VitalType = Vitals.MP increment = False End If DidCast = True For I = 1 To Player_HighIndex If IsPlaying(I) Then If GetPlayerMap(I) = GetPlayerMap(index) Then If isInRange(AoE, x, y, GetPlayerX(I), GetPlayerY(I)) Then SpellPlayer_Effect VitalType, increment, I, Vital, spellnum End If End If End If Next For I = 1 To MAX_MAP_NPCS If MapNpc(mapNum).Npc(I).Num > 0 Then If MapNpc(mapNum).Npc(I).Vital(HP) > 0 Then If isInRange(AoE, x, y, MapNpc(mapNum).Npc(I).x, MapNpc(mapNum).Npc(I).y) Then SpellNpc_Effect VitalType, increment, I, Vital, spellnum, mapNum End If End If End If Next End Select Case 2 ' targetted If targetType = 0 Then Exit Sub If target = 0 Then Exit Sub If targetType = TARGET_TYPE_PLAYER Then x = GetPlayerX(target) y = GetPlayerY(target) Else x = MapNpc(mapNum).Npc(target).x y = MapNpc(mapNum).Npc(target).y End If If Not isInRange(Range, GetPlayerX(index), GetPlayerY(index), x, y) Then PlayerMsg index, "Target not in range.", BrightRed SendClearSpellBuffer index Exit Sub End If Select Case Spell(spellnum).Type Case SPELL_TYPE_DAMAGEHP If targetType = TARGET_TYPE_PLAYER Then If CanPlayerAttackPlayer(index, target, True) Then If Vital > 0 Then SendAnimation mapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, target PlayerAttackPlayer index, target, Vital, spellnum DidCast = True End If End If Else If CanPlayerAttackNpc(index, target, True) Then If Vital > 0 Then SendAnimation mapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_NPC, target PlayerAttackNpc index, target, Vital, spellnum DidCast = True End If End If End If Case SPELL_TYPE_DAMAGEMP, SPELL_TYPE_HEALMP, SPELL_TYPE_HEALHP If Spell(spellnum).Type = SPELL_TYPE_DAMAGEMP Then VitalType = Vitals.MP increment = False ElseIf Spell(spellnum).Type = SPELL_TYPE_HEALMP Then VitalType = Vitals.MP increment = True ElseIf Spell(spellnum).Type = SPELL_TYPE_HEALHP Then VitalType = Vitals.HP increment = True End If If targetType = TARGET_TYPE_PLAYER Then If Spell(spellnum).Type = SPELL_TYPE_DAMAGEMP Then If CanPlayerAttackPlayer(index, target, True) Then SpellPlayer_Effect VitalType, increment, target, Vital, spellnum End If Else SpellPlayer_Effect VitalType, increment, target, Vital, spellnum End If Else If Spell(spellnum).Type = SPELL_TYPE_DAMAGEMP Then If CanPlayerAttackNpc(index, target, True) Then SpellNpc_Effect VitalType, increment, target, Vital, spellnum, mapNum End If Else SpellNpc_Effect VitalType, increment, target, Vital, spellnum, mapNum End If End If End Select End Select If DidCast Then Call SetPlayerVital(index, Vitals.MP, GetPlayerVital(index, Vitals.MP) - MPCost) Call SendVital(index, Vitals.MP) ' send vitals to party if in one If TempPlayer(index).inParty > 0 Then SendPartyVitals TempPlayer(index).inParty, index TempPlayer(index).SpellCD(spellslot) = GetTickCount + (Spell(spellnum).CDTime * 1000) Call SendCooldown(index, spellslot) SendActionMsg mapNum, Trim$(Spell(spellnum).Name) & "!", BrightRed, ACTIONMSG_SCROLL, GetPlayerX(index) * 32, GetPlayerY(index) * 32 End If End Sub ```
  9. the Problem is on Range^^ if I it so adjusting it is (Self-cast)
  10. ``` Public Sub CastSpell(ByVal spellslot As Long) Dim Buffer As clsBuffer ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' Check for subscript out of range If spellslot < 1 Or spellslot > MAX_PLAYER_SPELLS Then Exit Sub End If If SpellCD(spellslot) > 0 Then AddText "Spell has not cooled down yet!", BrightRed Exit Sub End If If PlayerSpells(spellslot) = 0 Then Exit Sub ' Check if player has enough MP If GetPlayerVital(MyIndex, Vitals.MP) < Spell(PlayerSpells(spellslot)).MPCost Then Call AddText("Not enough MP to cast " & Trim$(Spell(PlayerSpells(spellslot)).Name) & ".", BrightRed) Exit Sub End If If PlayerSpells(spellslot) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then If Player(MyIndex).Moving = 0 Then Set Buffer = New clsBuffer Buffer.WriteLong CCast Buffer.WriteLong spellslot SendData Buffer.ToArray() Set Buffer = Nothing SpellBuffer = spellslot SpellBufferTimer = GetTickCount Else Call AddText("Cannot cast while walking!", BrightRed) End If End If Else Call AddText("No spell here.", BrightRed) End If ' Error handler Exit Sub errorhandler: HandleError "CastSpell", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` Added code tags. -Yami :)
  11. The Cool down Time isnt working…. I have a Spell number 20 The Spell Have a Coldown time (41 sec.) The Coldown time is not working in the game.... (I stardet the Spell20 in the game... The Spell loadet and Heal my and now Dosent working the Coldowntime)
  12. I mean CoolDown Time (Spell) Spell number 1 *working properly* Spell number 20 *does not work* (*has no cooldown time*) it lacks the cooldown time in Spell cooldown time it does not go
  13. I have a question. Can it be that the reload (Cool Down) Time Spell 2-XX does not work? When Spell * 1 * * Go * *Google Translator*
  14. Thank you for fast help *Yami* *erkro1* :cheesy:
×
×
  • Create New...