Ananke
-
Posts
49 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Calendar
Posts posted by Ananke
-
-
9565
-
-
-
-
-
-
-
-
1,6-1 * 43/2 = ?
-
-
-
-
-
-
-
-
Ah it's auto-target when you use non AOE spell, but still, i want it to target the nearest NPC, or at last NPC in spell range.
or maybe you know how to do AoE spell doesn't require auto-target?
ps:
Missed code (in modgamelogic):
```
Function FindNPCInRange(ByVal Index As Long, ByVal mapnum As Long, ByVal Range As Long)
Dim x As Long, y As Long
Dim npcX As Long, npcY As Long
Dim i As Long
FindNPCInRange = 0
For i = 1 To MAX_MAP_NPCS
x = GetPlayerX(Index)
y = GetPlayerY(Index)
npcX = MapNpc(mapnum).NPC(i).x
npcY = MapNpc(mapnum).NPC(i).y
If isInRange(Range, x, y, npcX, npcY) Then
If MapNpc(mapnum).NPC(i).Num > 0 Then
If NPC(MapNpc(mapnum).NPC(i).Num).Behaviour = NPC_BEHAVIOUR_ATTACKONSIGHT Or NPC(MapNpc(mapnum).NPC(i).Num).Behaviour = NPC_BEHAVIOUR_ATTACKWHENATTACKED Then
FindNPCInRange = i
Exit Function
End If
End If
End If
Next i
End Function
``` -
i know that now, find solution, But it's not searching NPC in spell range, but any NPC on map…
-
bump
-
I'm using EO 3
-
I put this X to this code, it was eariel 2 i think so.
-
```
Sub CheckPlayerLevelUp(ByVal index As Long)
Dim i As Long
Dim expRollover As Long
Dim level_count As Long
level_count = 0
Do While GetPlayerExp(index) >= GetPlayerNextLevel(index)
expRollover = GetPlayerExp(index) - GetPlayerNextLevel(index)
' can level up?
If Not SetPlayerLevel(index, GetPlayerLevel(index) + 1) Then
Exit Sub
End If
Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + x) "<- change this"
Call SetPlayerExp(index, expRollover)
level_count = level_count + 1
Loop
If level_count > 0 Then
If level_count = 1 Then
'singular
GlobalMsg GetPlayerName(index) & " has gained " & level_count & " level!", Brown
Else
'plural
GlobalMsg GetPlayerName(index) & " has gained " & level_count & " levels!", Brown
End If
SendEXP index
SendPlayerData index
End If
End Sub
``` -
i have a little problem, the NPC doesn't damage, only at the time when I attack them.
-
I did it, it was easier than I thought :)
Quick! Admins are asleep! Count as high as possible!
in Forum Games
Posted