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

[EO 2 & 3]Target-Details Tutorial


abhi2011
 Share

Recommended Posts

> If the client wants to hack client values then they can go ahead it won't do anything…
>
> The vitals come directly from the server and you can display the information through targeting or combat system... i don't see how that is delayed..

The data can get corrupted while writing it. The packet can get lost.
Link to comment
Share on other sites

> The data can get corrupted while writing it. The packet can get lost.

If that is happening then combat fails, so if you have combat failing why add more stress on the server asking for target details which could be "corrupted while writing it"
Link to comment
Share on other sites

Fixed the problem you guys were having.

Replace SendTargetDetails (Server side modServerTCP) with

```

Public Sub SendtargetDetails(ByVal index As Long)

Dim Buffer As clsBuffer

Dim target As Long, targetType As Long

Dim i As Long

target = TempPlayer(index).target

targetType = TempPlayer(index).targetType

Set Buffer = New clsBuffer

Buffer.WriteLong stargetdetails

Select Case targetType

Case TARGET_TYPE_PLAYER

Buffer.WriteString GetPlayerName(target)

Buffer.WriteByte GetPlayerLevel(target)

Buffer.WriteLong GetPlayerMaxVital(target, HP)

Buffer.WriteLong GetPlayerVital(target, HP)

For i = 1 To Stats.Stat_Count - 1

Buffer.WriteByte Player(target).stat(i)

Next i

Case TARGET_TYPE_NPC

With Npc(MapNpc(GetPlayerMap(index)).Npc(target).Num)

Buffer.WriteString Trim$(.Name)

Buffer.WriteByte .Level

Buffer.WriteLong .HP

Buffer.WriteLong MapNpc(GetPlayerMap(index)).Npc(target).Vital(HP)

For i = 1 To Stats.Stat_Count - 1

Buffer.WriteByte .stat(i)

Debug.Print .stat(i)

Next i

End With

Case TARGET_TYPE_NONE

Buffer.WriteString vbNullString

Buffer.WriteByte 1

Buffer.WriteLong 0

Buffer.WriteLong 0

For i = 1 To Stats.Stat_Count - 1

Buffer.WriteByte 0

Next i

End Select

SendDataTo index, Buffer.ToArray

Set Buffer = Nothing

End Sub

```
Rather than referencing the NPC Num for mapNpc I used the Target num. (Target variable is for MapNpcValue)
Link to comment
Share on other sites

> Fixed the problem you guys were having.
>
> Replace SendTargetDetails (Server side modServerTCP) with
>
> ```
>
> Public Sub SendtargetDetails(ByVal index As Long)
>
> Dim Buffer As clsBuffer
>
> Dim target As Long, targetType As Long
>
> Dim i As Long
>
> target = TempPlayer(index).target
>
> targetType = TempPlayer(index).targetType
>
> Set Buffer = New clsBuffer
>
> Buffer.WriteLong stargetdetails
>
> Select Case targetType
>
> Case TARGET_TYPE_PLAYER
>
> Buffer.WriteString GetPlayerName(target)
>
> Buffer.WriteByte GetPlayerLevel(target)
>
> Buffer.WriteLong GetPlayerMaxVital(target, HP)
>
> Buffer.WriteLong GetPlayerVital(target, HP)
>
> For i = 1 To Stats.Stat_Count - 1
>
> Buffer.WriteByte Player(target).stat(i)
>
> Next i
>
> Case TARGET_TYPE_NPC
>
> With Npc(MapNpc(GetPlayerMap(index)).Npc(target).Num)
>
> Buffer.WriteString Trim$(.Name)
>
> Buffer.WriteByte .Level
>
> Buffer.WriteLong .HP
>
> Buffer.WriteLong MapNpc(GetPlayerMap(index)).Npc(target).Vital(HP)
>
> For i = 1 To Stats.Stat_Count - 1
>
> Buffer.WriteByte .stat(i)
>
> Debug.Print .stat(i)
>
> Next i
>
> End With
>
> Case TARGET_TYPE_NONE
>
> Buffer.WriteString vbNullString
>
> Buffer.WriteByte 1
>
> Buffer.WriteLong 0
>
> Buffer.WriteLong 0
>
> For i = 1 To Stats.Stat_Count - 1
>
> Buffer.WriteByte 0
>
> Next i
>
> End Select
>
> SendDataTo index, Buffer.ToArray
>
> Set Buffer = Nothing
>
> End Sub
>
> ```
> Rather than referencing the NPC Num for mapNpc I used the Target num. (Target variable is for MapNpcValue)

This work now :3!!! Nicee! thanks!.
Link to comment
Share on other sites

  • 2 weeks later...
This will work flawlessly with 3.0 because 3.0 doesn't use DX8 for the GUI but rather pictureboxes. If you are using engines like CS:DE EA or ER then you will have to render it.

Check out how the other GUI's are being rendered and do it the same way.
Link to comment
Share on other sites

It is pretty simple to do. You declare a texture. Then you load the texture on to memory, then on a loop render the need stuff like pictures and stuff. Make sure this is done only if the tab for the Target Details is visible.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...