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

Wucker

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Wucker's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Wucker

    [CS:DE]MiniMap

    maybe if you search a bit you'll find one. >.> http://www.touchofdeathforums.com/smf/index.php/topic,77535.0.html
  2. just use If Not GetPlayerLevel(Index) < 5 when the item dropping sub is called in a npc's death. Its not hard.
  3. make a text file in the server, then make the server load it, then make a new packet (modEnumerations), store news in a string, send the string to the client, make the client receive it and then make it display on start up
  4. because the picScreen is where Engine_BltFast draws to. if you want it not to be in picScreen, then use Engine_BltToDC, but you won't be able to mask
  5. Wucker

    D3D textures

    OK, thanks for the help
  6. Wucker

    D3D textures

    so you mean I should just leave the extra space there and just use the size of the image im actually going to use?
  7. Wucker

    D3D textures

    im using textures in D3D, but ive come to a point I need to have dynamic sprites, but POT being a must for textures prevents me to is there a way that: 1\. You set a texture to its normal size, non-POT. 2\. when the texture is loaded, fill in memory what is left to make it POT. is it possible? If so, what's the way to do it?
  8. theres no such thing as "DD8", it's D3D8\. also, its not hard to use DD to draw on the screen. you just make the buttons a .bmp, then draw it to the screen, and then program the mouse events
  9. if you using a jpg then you cant, but if you using bmp and drawing on screen then you can mask it with something like ``` Engine_BltFast X, Y, DDS_Button, sRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY ``` or just make the background of the gui image you're putting that button black.
  10. @Growlith1223: > To resize the picScreen(Game screen), You would have to code it in i think or you can just move the cursor to the edge of the picScreen and hold and resize it. http://www.touchofdeathforums.com/smf/index.php/topic,66374.0.html On-topic: you need to resize picScreen to a size that is divisible by 32\. then whatever size it is, you need to divide it by 32 and substract 1\. then on modConstants on both client and server, change MAX_MAPX to the result of the width divison and MAX_MAPY to the result of the height division. then you'd need to delete your maps, in both client and server folders. so, it's something like: (picScreenWidth / 32) - 1 = this would be MAX_MAPX (picScreenHeight / 32) - 1 = this would be MAX_MAPY also keep in mind picScreenWidth and picScreenHeight are not existing variables, i just used for example
  11. sorry to say, but i really don't know what you mean. i really haven't done such thing as caching by myself, and i don't get what you mean by incoming packets. Would doing this increase performance or something?
  12. You mean something like this? ``` Public Sub DrawMinimap() Dim x As Long, y As Long, minimap_x As Long, minimap_y As Long, MaxX As Long, MaxY As Long Dim i As Long Dim MapNum As Long MapNum = Player(MyIndex).Map MaxX = Map.MaxX MaxY = Map.MaxY ' render For x = 0 To MaxX For y = 0 To MaxY minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) Select Case Map.Tile(x, y).Type Case TILE_TYPE_BLANK RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 0, 4, 4, 4, 4 Case TILE_TYPE_WALKABLE, TILE_TYPE_NPCAVOID RenderTexture Tex_Minimap, minimap_x, minimap_y, 4, 4, 4, 4, 4, 4 Case TILE_TYPE_BLOCKED RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 8, 4, 4, 4, 4 End Select ' dir blocks If Map.Tile(x, y).DirBlock >= 1 Then RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 8, 4, 4, 4, 4 End If Next Next ' players For i = 1 To MAX_PLAYERS If Player(i).Vital(1) > 0 Then x = Player(i).x y = Player(i).y minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 4, 0, 4, 4, 4, 4 End If Next ' npcs For i = 1 To MAX_MAP_NPCS If MapNpc(i).num > 0 Then x = MapNpc(i).x y = MapNpc(i).y minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 4, 4, 4, 4, 4 End If Next End Sub ```
  13. welcome to my first tutorial :cheesy: yami told me to mess with the d3d code of CS:DE, and i also needed the minimap system 7 made for EO, so i just rewrote the thing which came out in about 10 mins. Tutorial: Goto the modDirectX8 and after ``` Public Tex_Fader As Long ```add ``` Public Tex_Minimap As Long ``` now in EngineCacheTextures, after ``` Tex_Shadow = SetTexturePath(App.path & Path_Graphics & "shadow.png") ```add ``` Tex_Minimap = SetTexturePath(App.path & Path_Graphics & "minimap.png") ``` then at the bottom of the mod, paste this: ``` Public Sub DrawMinimap() Dim x As Long, y As Long, minimap_x As Long, minimap_y As Long, maxX As Long, maxY As Long Dim i As Long Dim mapnum As Long mapnum = Player(MyIndex).Map maxX = Map.maxX maxY = Map.maxY ' render For x = 0 To maxX For y = 0 To maxY Select Case Map.Tile(x, y).Type Case TILE_TYPE_BLANK minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 0, 4, 4, 4, 4 Case TILE_TYPE_WALKABLE, TILE_TYPE_NPCAVOID minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 4, 4, 4, 4, 4, 4 Case TILE_TYPE_BLOCKED minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 8, 4, 4, 4, 4 End Select Next Next ' dir blocks For x = 0 To maxX For y = 0 To maxY If Map.Tile(x, y).DirBlock >= 1 Then minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 8, 4, 4, 4, 4 End If Next Next ' players For i = 1 To MAX_PLAYERS If Player(i).Vital(1) > 0 Then x = Player(i).x y = Player(i).y minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 4, 0, 4, 4, 4, 4 End If Next ' npcs For i = 1 To MAX_MAP_NPCS If MapNpc(i).num > 0 Then x = MapNpc(i).x y = MapNpc(i).y minimap_x = Camera.left + 600 + (x * 4) minimap_y = Camera.top + 25 + (y * 4) RenderTexture Tex_Minimap, minimap_x, minimap_y, 0, 4, 4, 4, 4, 4 End If Next End Sub ``` then in modText, in DrawMapAttributes, before the End Select, add ``` Case TILE_TYPE_BLANK RenderText Font_Default, "BL", tX, tY, White ``` then in modConstants, below (AND IN SERVER TOO) ``` Public Const TILE_TYPE_CHAT As Byte = 15 ```add ``` Public Const TILE_TYPE_BLANK As Byte = 16 ``` then in modGlobals, at the bottom add ``` ' minimap flag Public bMinimap As Boolean ``` Then in modDirectX8, RenderGraphics, after ``` ' draw the messages For i = 1 To MAX_BYTE If chatBubble(i).active Then DrawChatBubble i End If Next ```add ``` If bMinimap Then DrawMinimap ``` Now in frmEditor_Map, in fraAttributes, add an opttion named optBlank. then, in modGameEditors, MapEditorMouseDown, add, before the End With: ``` If frmEditor_Map.optBlank.value Then .Type = TILE_TYPE_BLANK ```and finally in modInput, HandleKeyPresses, before ``` ' // Monitor Admin Commands // ```add ``` Case "/minimap" bMinimap = Not bMinimap ``` also, download this and put it in your data files/graphics/ folder: http://i.imgur.com/njjuK.png Hope you enjoy, and tell me if anything goes wrong EDIT: screenshot: ![](http://i.imgur.com/uu49v.png)
×
×
  • Create New...