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

SeeingBlue

Members
  • Posts

    221
  • Joined

  • Last visited

    Never

SeeingBlue's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Well yea, & I was just saying maybe we should actively find them before the wrong people do, but you seem pretty confident that there is no reason for that.
  2. That's like saying I can't learn from other peoples mistakes. & "other games" aren't all the same either….
  3. I don't know. It's been a problem in the past with other games. Exploiting latency in the server while changing maps. Something like do a trade & change maps at the perfect time when the server gives you the item & hasn't taken it away from the original player yet. People used to disconnect their internet to try & exploit this also. My community doesn't even have that much but that doesn't mean I'm less interested in the possibilities. I've always been very interested in the GM tools. It's all a learning experience either way.
  4. The only idea that comes to mind is the possibility of duping on map change or exploiting player saves. Don't know if it's possible, but with a dummy terminal, that's what you are reduced to. Plus bots, but I for one, am really interested in building GM features to help catch them.
  5. Well the server has all the data, so it can't be fooled. That's the idea.
  6. I had something more along the lines of moving the paperdoll from a property of an item to the property of the player. The use items to assign & change those.
  7. That's assuming your server code is solid. My point was more about detecting cheats I guess.
  8. ``` Function CanNpcMove(ByVal mapNum As Long, ByVal mapNpcNum As Long, ByVal Dir As Byte) As Boolean Dim i As Long Dim n As Long Dim x As Long Dim y As Long ' Check for subscript out of range If mapNum MAX_MAPS Or mapNpcNum MAX_MAP_NPCS Or Dir < DIR_UP Or Dir > DIR_RIGHT Then Exit Function End If x = MapNpc(mapNum).Npc(mapNpcNum).x y = MapNpc(mapNum).Npc(mapNpcNum).y CanNpcMove = True Select Case Dir Case DIR_UP ' Check to make sure not outside of boundries If y > 0 Then n = Map(mapNum).Tile(x, y - 1).Type ' Check to make sure that the tile is walkable If n TILE_TYPE_WALKABLE And n TILE_TYPE_ITEM And n TILE_TYPE_NPCSPAWN Then CanNpcMove = False Exit Function End If ' Check to make sure that there is not a player in the way For i = 1 To Player_HighIndex If IsPlaying(i) Then If (GetPlayerMap(i) = mapNum) And (GetPlayerX(i) = MapNpc(mapNum).Npc(mapNpcNum).x) And (GetPlayerY(i) = MapNpc(mapNum).Npc(mapNpcNum).y - 1) Then CanNpcMove = False Exit Function End If End If Next ' Check to make sure that there is not another npc in the way For i = 1 To MAX_MAP_NPCS If (i mapNpcNum) And (MapNpc(mapNum).Npc(i).Num > 0) And (MapNpc(mapNum).Npc(i).x = MapNpc(mapNum).Npc(mapNpcNum).x) And (MapNpc(mapNum).Npc(i).y = MapNpc(mapNum).Npc(mapNpcNum).y - 1) Then CanNpcMove = False Exit Function End If Next ' Directional blocking If isDirBlocked(Map(mapNum).Tile(MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y).DirBlock, DIR_UP + 1) Then CanNpcMove = False Exit Function End If Else CanNpcMove = False End If Case DIR_DOWN ' Check to make sure not outside of boundries If y < Map(mapNum).MaxY Then n = Map(mapNum).Tile(x, y + 1).Type ' Check to make sure that the tile is walkable If n TILE_TYPE_WALKABLE And n TILE_TYPE_ITEM And n TILE_TYPE_NPCSPAWN Then CanNpcMove = False Exit Function End If ' Check to make sure that there is not a player in the way For i = 1 To Player_HighIndex If IsPlaying(i) Then If (GetPlayerMap(i) = mapNum) And (GetPlayerX(i) = MapNpc(mapNum).Npc(mapNpcNum).x) And (GetPlayerY(i) = MapNpc(mapNum).Npc(mapNpcNum).y + 1) Then CanNpcMove = False Exit Function End If End If Next ' Check to make sure that there is not another npc in the way For i = 1 To MAX_MAP_NPCS If (i mapNpcNum) And (MapNpc(mapNum).Npc(i).Num > 0) And (MapNpc(mapNum).Npc(i).x = MapNpc(mapNum).Npc(mapNpcNum).x) And (MapNpc(mapNum).Npc(i).y = MapNpc(mapNum).Npc(mapNpcNum).y + 1) Then CanNpcMove = False Exit Function End If Next ' Directional blocking If isDirBlocked(Map(mapNum).Tile(MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y).DirBlock, DIR_DOWN + 1) Then CanNpcMove = False Exit Function End If Else CanNpcMove = False End If Case DIR_LEFT ' Check to make sure not outside of boundries If x > 0 Then n = Map(mapNum).Tile(x - 1, y).Type ' Check to make sure that the tile is walkable If n TILE_TYPE_WALKABLE And n TILE_TYPE_ITEM And n TILE_TYPE_NPCSPAWN Then CanNpcMove = False Exit Function End If ' Check to make sure that there is not a player in the way For i = 1 To Player_HighIndex If IsPlaying(i) Then If (GetPlayerMap(i) = mapNum) And (GetPlayerX(i) = MapNpc(mapNum).Npc(mapNpcNum).x - 1) And (GetPlayerY(i) = MapNpc(mapNum).Npc(mapNpcNum).y) Then CanNpcMove = False Exit Function End If End If Next ' Check to make sure that there is not another npc in the way For i = 1 To MAX_MAP_NPCS If (i mapNpcNum) And (MapNpc(mapNum).Npc(i).Num > 0) And (MapNpc(mapNum).Npc(i).x = MapNpc(mapNum).Npc(mapNpcNum).x - 1) And (MapNpc(mapNum).Npc(i).y = MapNpc(mapNum).Npc(mapNpcNum).y) Then CanNpcMove = False Exit Function End If Next ' Directional blocking If isDirBlocked(Map(mapNum).Tile(MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y).DirBlock, DIR_LEFT + 1) Then CanNpcMove = False Exit Function End If Else CanNpcMove = False End If Case DIR_RIGHT ' Check to make sure not outside of boundries If x < Map(mapNum).MaxX Then n = Map(mapNum).Tile(x + 1, y).Type ' Check to make sure that the tile is walkable If n TILE_TYPE_WALKABLE And n TILE_TYPE_ITEM And n TILE_TYPE_NPCSPAWN Then CanNpcMove = False Exit Function End If ' Check to make sure that there is not a player in the way For i = 1 To Player_HighIndex If IsPlaying(i) Then If (GetPlayerMap(i) = mapNum) And (GetPlayerX(i) = MapNpc(mapNum).Npc(mapNpcNum).x + 1) And (GetPlayerY(i) = MapNpc(mapNum).Npc(mapNpcNum).y) Then CanNpcMove = False Exit Function End If End If Next ' Check to make sure that there is not another npc in the way For i = 1 To MAX_MAP_NPCS If (i mapNpcNum) And (MapNpc(mapNum).Npc(i).Num > 0) And (MapNpc(mapNum).Npc(i).x = MapNpc(mapNum).Npc(mapNpcNum).x + 1) And (MapNpc(mapNum).Npc(i).y = MapNpc(mapNum).Npc(mapNpcNum).y) Then CanNpcMove = False Exit Function End If Next ' Directional blocking If isDirBlocked(Map(mapNum).Tile(MapNpc(mapNum).Npc(mapNpcNum).x, MapNpc(mapNum).Npc(mapNpcNum).y).DirBlock, DIR_RIGHT + 1) Then CanNpcMove = False Exit Function End If Else CanNpcMove = False End If End Select End Function ``` ``` Sub NpcMove(ByVal mapNum As Long, ByVal mapNpcNum As Long, ByVal Dir As Long, ByVal movement As Long) Dim packet As String Dim Buffer As clsBuffer ' Check for subscript out of range If mapNum MAX_MAPS Or mapNpcNum MAX_MAP_NPCS Or Dir < DIR_UP Or Dir > DIR_RIGHT Or movement < 1 Or movement > 2 Then Exit Sub End If MapNpc(mapNum).Npc(mapNpcNum).Dir = Dir Select Case Dir Case DIR_UP MapNpc(mapNum).Npc(mapNpcNum).y = MapNpc(mapNum).Npc(mapNpcNum).y - 1 Set Buffer = New clsBuffer Buffer.WriteLong SNpcMove Buffer.WriteLong mapNpcNum Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).x Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).y Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).Dir Buffer.WriteLong movement SendDataToMap mapNum, Buffer.ToArray() Set Buffer = Nothing Case DIR_DOWN MapNpc(mapNum).Npc(mapNpcNum).y = MapNpc(mapNum).Npc(mapNpcNum).y + 1 Set Buffer = New clsBuffer Buffer.WriteLong SNpcMove Buffer.WriteLong mapNpcNum Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).x Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).y Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).Dir Buffer.WriteLong movement SendDataToMap mapNum, Buffer.ToArray() Set Buffer = Nothing Case DIR_LEFT MapNpc(mapNum).Npc(mapNpcNum).x = MapNpc(mapNum).Npc(mapNpcNum).x - 1 Set Buffer = New clsBuffer Buffer.WriteLong SNpcMove Buffer.WriteLong mapNpcNum Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).x Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).y Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).Dir Buffer.WriteLong movement SendDataToMap mapNum, Buffer.ToArray() Set Buffer = Nothing Case DIR_RIGHT MapNpc(mapNum).Npc(mapNpcNum).x = MapNpc(mapNum).Npc(mapNpcNum).x + 1 Set Buffer = New clsBuffer Buffer.WriteLong SNpcMove Buffer.WriteLong mapNpcNum Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).x Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).y Buffer.WriteLong MapNpc(mapNum).Npc(mapNpcNum).Dir Buffer.WriteLong movement SendDataToMap mapNum, Buffer.ToArray() Set Buffer = Nothing End Select End Sub ``` ``` Sub NpcDir(ByVal mapNum As Long, ByVal mapNpcNum As Long, ByVal Dir As Long) Dim packet As String Dim Buffer As clsBuffer ' Check for subscript out of range If mapNum MAX_MAPS Or mapNpcNum MAX_MAP_NPCS Or Dir < DIR_UP Or Dir > DIR_RIGHT Then Exit Sub End If MapNpc(mapNum).Npc(mapNpcNum).Dir = Dir Set Buffer = New clsBuffer Buffer.WriteLong SNpcDir Buffer.WriteLong mapNpcNum Buffer.WriteLong Dir SendDataToMap mapNum, Buffer.ToArray() Set Buffer = Nothing End Sub ```
  9. Omg, This thread is pissing me off, I have tried to fix that post twice now & it keeps fucking up.
  10. Here is everything that should be related. ``` Public Sub TryNpcAttackPlayer(ByVal mapNpcNum As Long, ByVal index As Long) Dim mapNum As Long, npcNum As Long, blockAmount As Long, Damage As Long ' Can the npc attack the player? If CanNpcAttackPlayer(mapNpcNum, index) Then mapNum = GetPlayerMap(index) npcNum = MapNpc(mapNum).Npc(mapNpcNum).Num ' check if PLAYER can avoid the attack If CanPlayerDodge(index) Then SendActionMsg mapNum, "Dodge!", Pink, 1, (Player(index).x * 32), (Player(index).y * 32) Exit Sub End If If CanPlayerParry(index) Then SendActionMsg mapNum, "Parry!", Pink, 1, (Player(index).x * 32), (Player(index).y * 32) Exit Sub End If ' Get the damage we can do Damage = GetNpcDamage(npcNum) ' if the player blocks, take away the block amount blockAmount = CanPlayerBlock(index) Damage = Damage - blockAmount ' take away armour Damage = Damage - RAND(1, (GetPlayerStat(index, Agility) * 2)) ' randomise for up to 10% lower than max hit Damage = RAND(1, Damage) ' * 1.5 if crit hit If CanNpcCrit(index) Then Damage = Damage * 1.5 SendActionMsg mapNum, "Critical!", BrightCyan, 1, (MapNpc(mapNum).Npc(mapNpcNum).x * 32), (MapNpc(mapNum).Npc(mapNpcNum).y * 32) End If If Damage > 0 Then Call NpcAttackPlayer(mapNpcNum, index, Damage) End If End If End Sub ``` ``` Function CanNpcAttackPlayer(ByVal mapNpcNum As Long, ByVal index As Long) As Boolean Dim mapNum, npcNum, DistanceX, DistanceY As Long ' Check for subscript out of range If mapNpcNum MAX_MAP_NPCS Or Not IsPlaying(index) Then Exit Function End If ' Check for subscript out of range If MapNpc(GetPlayerMap(index)).Npc(mapNpcNum).Num MapNpc(mapNum).Npc(x).StunTimer + (MapNpc(mapNum).Npc(x).StunDuration * 1000) Then MapNpc(mapNum).Npc(x).StunDuration = 0 MapNpc(mapNum).Npc(x).StunTimer = 0 End If Else target = MapNpc(mapNum).Npc(x).target targetType = MapNpc(mapNum).Npc(x).targetType ' Check to see if its time for the npc to walk 'If Npc(npcNum).Behaviour NPC_BEHAVIOUR_SHOPKEEPER Then If targetType = 1 Then ' player ' Check to see if we are following a player or not If target > 0 Then ' Check if the player is even playing, if so follow'm If IsPlaying(target) And GetPlayerMap(target) = mapNum Then DidWalk = False target_verify = True TargetY = GetPlayerY(target) TargetX = GetPlayerX(target) Else MapNpc(mapNum).Npc(x).targetType = 0 ' clear MapNpc(mapNum).Npc(x).target = 0 End If End If ElseIf targetType = 2 Then 'npc If target > 0 Then If MapNpc(mapNum).Npc(target).Num > 0 Then DidWalk = False target_verify = True TargetY = MapNpc(mapNum).Npc(target).y TargetX = MapNpc(mapNum).Npc(target).x Else MapNpc(mapNum).Npc(x).targetType = 0 ' clear MapNpc(mapNum).Npc(x).target = 0 End If End If End If If target_verify Then i = Int(Rnd * 5) ' Lets move the npc Select Case i Case 0 ' Up If MapNpc(mapNum).Npc(x).y > TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_UP) Then Call NpcMove(mapNum, x, DIR_UP, MOVING_WALKING) DidWalk = True End If End If ' Down If MapNpc(mapNum).Npc(x).y < TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_DOWN) Then Call NpcMove(mapNum, x, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If ' Left If MapNpc(mapNum).Npc(x).x > TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_LEFT) Then Call NpcMove(mapNum, x, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If ' Right If MapNpc(mapNum).Npc(x).x < TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_RIGHT) Then Call NpcMove(mapNum, x, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If Case 1 ' Right If MapNpc(mapNum).Npc(x).x < TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_RIGHT) Then Call NpcMove(mapNum, x, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If ' Left If MapNpc(mapNum).Npc(x).x > TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_LEFT) Then Call NpcMove(mapNum, x, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If ' Down If MapNpc(mapNum).Npc(x).y < TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_DOWN) Then Call NpcMove(mapNum, x, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If ' Up If MapNpc(mapNum).Npc(x).y > TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_UP) Then Call NpcMove(mapNum, x, DIR_UP, MOVING_WALKING) DidWalk = True End If End If Case 2 ' Down If MapNpc(mapNum).Npc(x).y < TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_DOWN) Then Call NpcMove(mapNum, x, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If ' Up If MapNpc(mapNum).Npc(x).y > TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_UP) Then Call NpcMove(mapNum, x, DIR_UP, MOVING_WALKING) DidWalk = True End If End If ' Right If MapNpc(mapNum).Npc(x).x < TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_RIGHT) Then Call NpcMove(mapNum, x, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If ' Left If MapNpc(mapNum).Npc(x).x > TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_LEFT) Then Call NpcMove(mapNum, x, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If Case 3 ' Left If MapNpc(mapNum).Npc(x).x > TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_LEFT) Then Call NpcMove(mapNum, x, DIR_LEFT, MOVING_WALKING) DidWalk = True End If End If ' Right If MapNpc(mapNum).Npc(x).x < TargetX And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_RIGHT) Then Call NpcMove(mapNum, x, DIR_RIGHT, MOVING_WALKING) DidWalk = True End If End If ' Up If MapNpc(mapNum).Npc(x).y > TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_UP) Then Call NpcMove(mapNum, x, DIR_UP, MOVING_WALKING) DidWalk = True End If End If ' Down If MapNpc(mapNum).Npc(x).y < TargetY And Not DidWalk Then If CanNpcMove(mapNum, x, DIR_DOWN) Then Call NpcMove(mapNum, x, DIR_DOWN, MOVING_WALKING) DidWalk = True End If End If End Select ' Check if we can't move and if Target is behind something and if we can just switch dirs If Not DidWalk Then If MapNpc(mapNum).Npc(x).x - 1 = TargetX And MapNpc(mapNum).Npc(x).y = TargetY Then If MapNpc(mapNum).Npc(x).Dir DIR_LEFT Then Call NpcDir(mapNum, x, DIR_LEFT) End If DidWalk = True End If If MapNpc(mapNum).Npc(x).x + 1 = TargetX And MapNpc(mapNum).Npc(x).y = TargetY Then If MapNpc(mapNum).Npc(x).Dir DIR_RIGHT Then Call NpcDir(mapNum, x, DIR_RIGHT) End If DidWalk = True End If If MapNpc(mapNum).Npc(x).x = TargetX And MapNpc(mapNum).Npc(x).y - 1 = TargetY Then If MapNpc(mapNum).Npc(x).Dir DIR_UP Then Call NpcDir(mapNum, x, DIR_UP) End If DidWalk = True End If If MapNpc(mapNum).Npc(x).x = TargetX And MapNpc(mapNum).Npc(x).y + 1 = TargetY Then If MapNpc(mapNum).Npc(x).Dir DIR_DOWN Then Call NpcDir(mapNum, x, DIR_DOWN) End If DidWalk = True End If ' We could not move so Target must be behind something, walk randomly. If Not DidWalk Then i = Int(Rnd * 2) If i = 1 Then i = Int(Rnd * 4) If CanNpcMove(mapNum, x, i) Then Call NpcMove(mapNum, x, i, MOVING_WALKING) End If End If End If End If Else i = Int(Rnd * 4) If i = 1 Then i = Int(Rnd * 4) If CanNpcMove(mapNum, x, i) Then Call NpcMove(mapNum, x, i, MOVING_WALKING) End If End If End If 'End If End If End If ```
  11. I'm not able to see where my problem is. I even have the source printed out & I've been marking on it, trying to break it down so I can understand what's going on, but I'm not able to figure out what makes the difference in an NPC standing N, S, E, or W. from an NPC standing diagonal from you. As far as I know, all my distance checks include
  12. I have no idea what you are trying to ask, but I will take this time to say that if we worked on our own hacks in this forum, we could better combat them.
  13. Im not a digital artist but I believe the important features & the ones that could make or break your image is the border. Notice the very thin black line & then another border similar(lighter) to the color of the background. I think if you follow that pattern, you'll have a good start.
  14. Am I supposed to be looking in modServerLoop under UpdateMapLogic?
  15. Completely possible. Just give your character paperdolls.
×
×
  • Create New...