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

westin444

Members
  • Posts

    723
  • Joined

  • Last visited

    Never

Everything posted by westin444

  1. Because Eclipse Origins is the one you should be using. Less bugs. [http://www.touchofdeathforums.com/smf/index.php/topic,49913.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,49913.0.html) (I do believe that ES = EE2.8, and this does have the source.)
  2. I like it. Its simple and clean and not distracting. The button font could be a bit easier to read though.
  3. Yep, Ubuntu runs great on my computer, which is similar to yours.
  4. If you want a different layout you need vb6\. [EO]If you want a different background you need vb6 [EE/ES]If you want a different backgorund edit the pictures in Client/GUI
  5. westin444

    Item Stats

    If you can't fix it just set them backwards. EG: magescrl bar is speed and speedbar is mage.
  6. @Robin: > Dear God… Yes I know its a bad code, I just put it up if someone wanted to look at it or learn from it.
  7. Like I said, this just does the pathfinder. Not the movement, just the calculation. It may be a little slow but…. ``` Option Explicit Private Type Node Row As Integer Col As Integer ParId As Integer ScoreF As Integer ScoreG As Integer ScoreH As Integer Closed As Boolean End Type Dim OpenList() As Node Dim TargetNode As Node Public Function AstarTile(ByVal x As Integer, ByVal y As Integer) As Integer If isblocked(x - 1, y - 1) Then AstarTile = -1 Exit Function Else AstarTile = 0 Exit Function End If End Function Sub Pathfinder_A_star(PathEndX As Integer, PathEndy As Integer) Dim i As Long, j As Long, k As Long, N As Long, M As Long, NM As Long Dim Msg As String, k_best As Long, k1 As Long, k2 As Long, Nrow As Long, Ncol As Long Dim Goal As Boolean, Cutting_Corners As Boolean, ris As Boolean Dim CurrNode As Node N = MAX_MAPY M = MAX_MAPX NM = N * M N = MAX_MAPX + 1 M = MAX_MAPY + 1 ReDim OpenList(NM) OpenList(1).Row = GetPlayerX(MyIndex) + 1 OpenList(1).Col = GetPlayerY(MyIndex) + 1 TargetNode.Row = PathEndX + 1 TargetNode.Col = PathEndy + 1 Cutting_Corners = True k1 = 1 Compute_Score OpenList(k1) Do PickUp_TheBest_Node k_best If k_best = 0 Then 'No path =( Exit Sub End If k2 = k2 + 1 OpenList(k_best).Closed = True Nrow = OpenList(k_best).Row Ncol = OpenList(k_best).Col For i = Nrow - 1 To Nrow + 1 For j = Ncol - 1 To Ncol + 1 If ((j - Ncol = 0) Or (i - Nrow = 0)) Then If i > 0 And i 0 And j = 0 And (i Nrow Or j Ncol) Then ris = False If (Not Cutting_Corners) Then ris = CheckCuttingCorner(Nrow, Ncol, i, j) If Not ris Then k = getNode(i, j) If k > 0 Then If Not OpenList(k).Closed Then CurrNode.Row = i CurrNode.Col = j CurrNode.ParId = k_best Compute_Score CurrNode If CurrNode.ScoreF < OpenList(k).ScoreF Then OpenList(k) = CurrNode End If End If Else CurrNode.Row = i CurrNode.Col = j CurrNode.ParId = k_best Compute_Score CurrNode k1 = k1 + 1 OpenList(k1) = CurrNode If i = TargetNode.Row And j = TargetNode.Col Then Goal = True k2 = k2 + 1 OpenList(k1).Closed = True Exit Do End If End If End If End If End If End If Next j, i Loop i = k1: k = 0 Do k = k + 1 i = OpenList(i).ParId Loop Until i = 0 ReDim PathToWalk(1 To k, 1 To 2) i = k1 k = 0 Do k = k + 1 PathToWalk(k, 1) = OpenList(i).Row - 1 PathToWalk(k, 2) = OpenList(i).Col - 1 i = OpenList(i).ParId Loop Until i = 0 isWalkingPath = True PathIndex = k End Sub Private Function getNode(Nrow, Ncol) Dim k As Long getNode = 0 Do k = k + 1 If OpenList(k).Col = 0 Then Exit Do If OpenList(k).Col = Ncol And OpenList(k).Row = Nrow Then getNode = k End If Loop End Function Private Sub PickUp_TheBest_Node(k_best As Long) Dim ScoreMin As Long, k As Long, k_min As Long Do k = k + 1 If OpenList(k).Col = 0 Then Exit Do If Not OpenList(k).Closed Then If k_min = 0 Or ScoreMin >= OpenList(k).ScoreF Then ScoreMin = OpenList(k).ScoreF k_min = k End If End If Loop k_best = k_min End Sub Private Sub Compute_Score(P As Node) Dim L As Long, di As Long, dj As Long If P.ParId > 0 Then L = AstarTile(P.Row, P.Col) If L < 0 Then L = 100000 P.ScoreG = OpenList(P.ParId).ScoreG If OpenList(P.ParId).Row = P.Row Or OpenList(P.ParId).Col = P.Col Then P.ScoreG = P.ScoreG + 10 + 10 * L Else P.ScoreG = P.ScoreG + 14 + 14 * L End If End If di = Abs(P.Row - TargetNode.Row) dj = Abs(P.Col - TargetNode.Col) If dj > di Then P.ScoreH = 4 * di + 10 * dj Else P.ScoreH = 10 * di + 4 * dj End If P.ScoreF = P.ScoreG + P.ScoreH End Sub Private Function CheckCuttingCorner(Nrow, Ncol, i, j) As Boolean Dim di As Long, dj As Long, ris As Boolean di = i - Nrow dj = j - Ncol If di = 0 Or dj = 0 Then Exit Function If AstarTile(Nrow + di, Ncol) < 0 Or AstarTile(Nrow, Ncol + dj) < 0 Then CheckCuttingCorner = True Exit Function End If End Function ```
  8. I'm no expert, but it really matters what your wanting to do. heres is one person's opinion: > The sprite class in DirectX8 has more functionality behind it than all of DirectDraw in DX7\. It has hardware accelerated rotation, scaling and alpha blending. It has easy to use color modulation. If you are doing all 2D then there is absolutly NO reason to go through the bother of the DrawPrimitive approach. You gain nothing by that method and you introduce needless complications which means more dev time and more bugs. > The D3DXSprite is not meant to be a "sprite class". It is useful as a Blitter. You make your own sprite class (using textures as the image data) and use D3DXSprite.Draw to blit your sprites. But I think for tilemaps DrawPrimitiveUP is fine.
  9. If its a range of ports you can usually portforward a range…
  10. you would have to make a displayquestmsg packet type, and a picture box client side to draw the text to.
  11. @Urame: > Search and delete in **modConstants**: > ``` > Public Const MAX_LEVELS As Byte = 100 > ``` > Now, in **modGlobals** add: > > > Public MAX_LEVELS As **Byte** Byte, not bye ;)
  12. your getting that error because you well… didn't define the variable! @DJMaxus: > Underneath "Dim I As Long" Add: > ``` > Dim DropIndex As Long > ```
  13. Lol that findplayer call is very unnecessary ``` n = TempPlayer(index).Target Name = Trim$(Player(n).Name) Call PlayerMsg(index, "You attached to " & Name & ".", Yellow) Call AddLog(GetPlayerName(index) & " attached to " & Name & ".", ADMIN_LOG) ``` That ;D Make sure to target your player first.
  14. Then Add some stuff before the call to exit sub.
  15. Add before Name = Trim$…. Something like: If n < 1 or > MAX_PLAYERS Then Exit Sub
  16. is autoredraw for your picture box set to true?
  17. [http://portforward.com/](http://portforward.com/)
  18. are your spell icons .bmp like all the other ones?
  19. Sub drawPlayername in modText
  20. you could if you really wanted to do so make a new surface for blitting to the backpack with transparency if your really wanted to do so.
  21. yeah I think there's something wrong with your source…
×
×
  • Create New...