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

erkro1

Members
  • Posts

    2678
  • Joined

  • Last visited

Everything posted by erkro1

  1. erkro1

    Arker

    What is done looks slick imo. :cheesy:
  2. ![](http://www.touchofdeathforums.com/community/ccs_files/file_host/741bd6b49d0faabe5827b0b20f5dc4be.JPG)
  3. @zerohero: > ![](http://fuzionblog.files.wordpress.com/2011/01/ronseal.jpg) Ehm thanks I guess?
  4. @Joyce: > There's a cap on the amount of packets a player without admin rights can send to prevent flooding. ;] Might want to look into that, the map data is HUGE and causes quite a bit of strain on the server, and it recognizes this as a user trying to spam it to death, and pretty much closes that player off. Ah, I already thought something like that, but I didn't knew where to find it, now I know, thank you. ;)
  5. This will fix the bug that when you use a consumable item through the hotbar it won't dissapear from the hotbar. **Server side** In modHandleData, in Sub HandleHotbarUse find: ``` Case 1 ' inventory For i = 1 To MAX_INV If Player(index).Inv(i).Num > 0 Then If Player(index).Inv(i).Num = Player(index).Hotbar(Slot).Slot Then UseItem index, i Exit Sub End If End If Next ``` Replace it with: ``` Case 1 ' inventory For i = 1 To MAX_INV If Player(Index).Inv(i).Num > 0 Then If Player(Index).Inv(i).Num = Player(Index).Hotbar(Slot).Slot Then If Item(Player(Index).Inv(i).Num).Type = ITEM_TYPE_CONSUME Then Player(Index).Hotbar(Slot).Slot = 0 Player(Index).Hotbar(Slot).sType = 0 SendHotbar Index End If UseItem Index, i Exit Sub End If End If Next ```
  6. I have another problem with my House system, when I save a house map as a player (it works when admin) it doesn't save, and the server won't recieve any packets anymore. Client side packet that sends the map to server: ``` Public Sub HouseEditorSend() ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Call SendMap InMapEditor = False InHouseEditor = False Unload frmEditor_House ' Error handler Exit Sub errorhandler: HandleError "HouseEditorSend", "modGameEditors", Err.number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` Sub SendMap: ``` Public Sub SendMap() Dim packet As String Dim X As Long Dim Y As Long Dim i As Long Dim Buffer As clsBuffer ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer CanMoveNow = False With Map Buffer.WriteLong CMapData Buffer.WriteString Trim$(.Name) Buffer.WriteString Trim$(.Music) Buffer.WriteByte .Moral Buffer.WriteLong .Up Buffer.WriteLong .Down Buffer.WriteLong .Left Buffer.WriteLong .Right Buffer.WriteLong .BootMap Buffer.WriteByte .BootX Buffer.WriteByte .BootY Buffer.WriteByte .MaxX Buffer.WriteByte .MaxY End With For X = 0 To Map.MaxX For Y = 0 To Map.MaxY With Map.Tile(X, Y) For i = 1 To MapLayer.Layer_Count - 1 Buffer.WriteLong .Layer(i).X Buffer.WriteLong .Layer(i).Y Buffer.WriteLong .Layer(i).tileset Next Buffer.WriteByte .Type Buffer.WriteLong .Data1 Buffer.WriteLong .Data2 Buffer.WriteLong .Data3 Buffer.WriteByte .DirBlock End With Next Next With Map For X = 1 To MAX_MAP_NPCS Buffer.WriteLong .NPC(X) Next Buffer.WriteString Trim$(.Owner) Buffer.WriteLong .BossNpc Buffer.WriteLong .Weather Buffer.WriteLong .Intensity End With SendData Buffer.ToArray() Set Buffer = Nothing CanMoveNow = True 'House Editor ' Error handler Exit Sub errorhandler: HandleError "SendMap", "modClientTCP", Err.number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` Server side HandleMapData: ``` ' ::::::::::::::::::::: ' :: Map data packet :: ' ::::::::::::::::::::: Sub HandleMapData(ByVal Index As Long, ByRef Data() As Byte) Dim i As Long Dim MapNum As Long Dim mapowner As String Dim mapowner2 As String Dim X As Long Dim Y As Long Dim Buffer As clsBuffer ' Prevent hacking If Not Trim$(Map(Player(Index).Map).Owner) = GetPlayerName(Index) Then If Not GetPlayerAccess(Index) < ADMIN_MAPPER Then GoTo continue Else Exit Sub End If End If continue: Set Buffer = New clsBuffer Buffer.WriteBytes Data() MapNum = GetPlayerMap(Index) mapowner = Trim$(Map(MapNum).Owner) i = Map(MapNum).Revision + 1 Call ClearMap(MapNum) Map(MapNum).Name = Buffer.ReadString Map(MapNum).Music = Buffer.ReadString Map(MapNum).Revision = i Map(MapNum).Moral = Buffer.ReadByte Map(MapNum).Up = Buffer.ReadLong Map(MapNum).Down = Buffer.ReadLong Map(MapNum).Left = Buffer.ReadLong Map(MapNum).Right = Buffer.ReadLong Map(MapNum).BootMap = Buffer.ReadLong Map(MapNum).BootX = Buffer.ReadByte Map(MapNum).BootY = Buffer.ReadByte Map(MapNum).MaxX = Buffer.ReadByte Map(MapNum).MaxY = Buffer.ReadByte ReDim Map(MapNum).Tile(0 To Map(MapNum).MaxX, 0 To Map(MapNum).MaxY) For X = 0 To Map(MapNum).MaxX For Y = 0 To Map(MapNum).MaxY For i = 1 To MapLayer.Layer_Count - 1 Map(MapNum).Tile(X, Y).Layer(i).X = Buffer.ReadLong Map(MapNum).Tile(X, Y).Layer(i).Y = Buffer.ReadLong Map(MapNum).Tile(X, Y).Layer(i).Tileset = Buffer.ReadLong Next Map(MapNum).Tile(X, Y).Type = Buffer.ReadByte Map(MapNum).Tile(X, Y).Data1 = Buffer.ReadLong Map(MapNum).Tile(X, Y).Data2 = Buffer.ReadLong Map(MapNum).Tile(X, Y).Data3 = Buffer.ReadLong Map(MapNum).Tile(X, Y).DirBlock = Buffer.ReadByte Next Next For X = 1 To MAX_MAP_NPCS Map(MapNum).NPC(X) = Buffer.ReadLong Call ClearMapNpc(X, MapNum) Next mapowner2 = Buffer.ReadString If mapowner = GetPlayerName(Index) Then Call SendEditHousePanel(Index, 1) End If Map(MapNum).Owner = Trim$(mapowner) Map(MapNum).BossNpc = Buffer.ReadLong Map(MapNum).Weather = Buffer.ReadLong Map(MapNum).Intensity = Buffer.ReadLong Call SendMapNpcsToMap(MapNum) Call SpawnMapNpcs(MapNum) ' Clear out it all For i = 1 To MAX_MAP_ITEMS Call SpawnItemSlot(i, 0, 0, GetPlayerMap(Index), MapItem(GetPlayerMap(Index), i).X, MapItem(GetPlayerMap(Index), i).Y) Call ClearMapItem(i, GetPlayerMap(Index)) Next ' Respawn Call SpawnMapItems(GetPlayerMap(Index)) ' Save the map Call SaveMap(MapNum) Call MapCache_Create(MapNum) Call ClearTempTile(MapNum) Call CacheResources(MapNum) ' Refresh map for everyone online For i = 1 To Player_HighIndex If IsPlaying(i) And GetPlayerMap(i) = MapNum Then Call PlayerWarp(i, MapNum, GetPlayerX(i), GetPlayerY(i)) End If Next i Set Buffer = Nothing End Sub ``` If you need more information/subs, just ask.
  7. @dead-wolf: > no i mean im going to go with u not mrsean. Ow yeah sorry, I understood it wrong.
  8. @dead-wolf: > we do dont worry. Ow :( well have fun. *evil laugh*
  9. @dead-wolf: > lets go eat them at the aquarium :D NOOO! YOU BETRAYED ME, I THOUGHT WE HAD A DATE!
  10. @crzyone9584: > Idiot…. that is considered a stupid question when i clearly say dot net... and C#... a google for C# ide or .net ide would have worked. You are now black listed along with the 4 others. I know it was not the smartest question but I thought maybe you need a specific IDE or something. Think about a nicer Eclipse.
  11. Lol, Socuine is one of the less persons here who doesn't look like a complete nerd. xD Also, The Netherlands ftw.
  12. Which programm do you use to make this?
  13. @Lumiere: > Even if someone accept this challenge doesn't mean it would have to give the modified engine or the system to him I actually just sended him the code. @Joyce: > Hardly an expert challenge, just cast a loop call from current position into the direction you're facing, and teleport to the first blocked tile you can -1. Thats exactly what I thought, this is the code I came up with: ``` ' check if left map If x > Map.MaxX Or y > Map.MaxY Or x < 0 Or y < 0 Then ClearProjectile Index, PlayerProjectile Exit Sub End If ' check if we hit a block If Map.Tile(x, y).Type = TILE_TYPE_BLOCKED Then If getplayerequipment(Index, Weapon) = 7 Then Select Case TempPlayer(Index).ProjecTile(PlayerProjectile).Direction Case DIR_DOWN Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x, TempPlayer(Index).ProjecTile(PlayerProjectile).y - 1) Case DIR_UP Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x, TempPlayer(Index).ProjecTile(PlayerProjectile).y + 1) Case DIR_RIGHT Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x - 1, TempPlayer(Index).ProjecTile(PlayerProjectile).y) Case DIR_LEFT Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x + 1, TempPlayer(Index).ProjecTile(PlayerProjectile).y) End Select End If ClearProjectile Index, PlayerProjectile Exit Sub End If ' check for player hit For i = 1 To Player_HighIndex If x = GetPlayerX(i) And y = GetPlayerY(i) Then ' they're hit, remove it If Not x = Player(MyIndex).x Or Not y = GetPlayerY(MyIndex) Then If getplayerequipment(Index, Weapon) = 7 Then Select Case TempPlayer(Index).ProjecTile(PlayerProjectile).Direction Case DIR_DOWN Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x, TempPlayer(Index).ProjecTile(PlayerProjectile).y - 1) Case DIR_UP Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x, TempPlayer(Index).ProjecTile(PlayerProjectile).y + 1) Case DIR_RIGHT Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x - 1, TempPlayer(Index).ProjecTile(PlayerProjectile).y) Case DIR_LEFT Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x + 1, TempPlayer(Index).ProjecTile(PlayerProjectile).y) End Select End If ClearProjectile Index, PlayerProjectile Exit Sub End If End If Next ' check for npc hit For i = 1 To MAX_MAP_NPCS If x = MapNpc(i).x And y = MapNpc(i).y Then If getplayerequipment(Index, Weapon) = 7 Then Select Case TempPlayer(Index).ProjecTile(PlayerProjectile).Direction Case DIR_DOWN Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x, TempPlayer(Index).ProjecTile(PlayerProjectile).y - 1) Case DIR_UP Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x, TempPlayer(Index).ProjecTile(PlayerProjectile).y + 1) Case DIR_RIGHT Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x - 1, TempPlayer(Index).ProjecTile(PlayerProjectile).y) Case DIR_LEFT Call playerwarp(Index, GetPlayerMap(Index), TempPlayer(Index).ProjecTile(PlayerProjectile).x + 1, TempPlayer(Index).ProjecTile(PlayerProjectile).y) End Select End If ' they're hit, remove it ClearProjectile Index, PlayerProjectile Exit Sub End If Next ``` Not sure if it works, I just typed it real quick in Notepad.
  14. Haha, very sneaky way of asking it. :P Anyway, like Abhi2011 said its not that hard, if you have Wabbits projectile system it can be easily implemented, just add a warp that warps you 1 tile away from the thing your grappling hook is attached to, in front of the ClearProjectile's.
  15. @Niffler: > Oh my goodness! This works! Thank you so much for all your help. You're the best :D > Would it be too much to ask you what exactly you did, in hopes that I could learn something? Well, I think you understand the things with the End If case, which checks the map song with the playing song, but I only added Music_Playing = Filename in: ``` If Splitmusic(1) = "mp3" Then OpenDShowFile (App.Path & MUSIC_PATH & Filename) PlayMp3 Music_Playing = Filename Exit Sub ElseIf Splitmusic(1) "mid" Then Exit Sub End If ```
  16. @Niffler: > CurSong causes Compile Error: Variable not defined. Ah, keep it Music_Playing and replace PlayMidi with this: ``` Public Sub PlayMidi(ByVal Filename As String) Dim Splitmusic() As String ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Options.Music = 0 Then Exit Sub Splitmusic = Split(Filename, ".", , vbTextCompare) If Performance Is Nothing Then Exit Sub If LenB(Trim$(Filename)) < 1 Then Exit Sub If UBound(Splitmusic) 1 Then Exit Sub If Not FileExist(App.Path & MUSIC_PATH & Filename, True) Then Exit Sub If Not Music_On Then Exit Sub If Music_Playing = Filename Then Exit Sub If Splitmusic(1) = "mp3" Then OpenDShowFile (App.Path & MUSIC_PATH & Filename) PlayMp3 Music_Playing = Filename Exit Sub ElseIf Splitmusic(1) "mid" Then Exit Sub End If Set Segment = Nothing Set Segment = Loader.LoadSegment(App.Path & MUSIC_PATH & Filename) ' repeat midi file Segment.SetLoopPoints 0, 0 Segment.SetRepeats 100 Segment.SetStandardMidiFile Performance.PlaySegment Segment, 0, 0 Music_Playing = Filename ' Error handler Exit Sub errorhandler: If InGame Then HandleError "PlayMidi - Ingame = True - Map#= " & Player(MyIndex).Map & " - Filename = " & Filename & " - Filepath Length= " & Len(App.Path & MUSIC_PATH & Filename), "modSound", Err.Number, Err.Description, Err.Source, Err.HelpContext Else HandleError "PlayMidi - Ingame = False - Filename = " & Filename & " - Filepath Length= " & Len(App.Path & MUSIC_PATH & Filename), "modSound", Err.Number, Err.Description, Err.Source, Err.HelpContext End If Err.Clear Exit Sub End Sub ```
  17. Change Music_Playing to CurSong
  18. @Niffler: > Okay, thanks – I just tried putting the Then in. But it doesn't seem to make any difference at all, the song still stops and restarts. Would Music_Playing, even be the right... thing? (do they call that a variable or a string or... I don't even know.) Put a breakpoint on this line: ``` If Not MusicFile = Music_Playing Then ``` Then try doing it, it will stop at that line and the line will turn yellow, when you move your mouse over MusicFile and Music_Playing you will see there comes a tooltip (text in a yellow bar), tell us the text it displays for both MusicFile and Music_Playing.
  19. @Niffler: > That's a good idea, thanks. But unfortunately I'm terrible at coding. What exactly would that check look like? > > Would it be something like this? Or would that just break my game? > ``` > MusicFile = Trim$(Map.Music) > If Not MusicFile = Music_Playing > If Not MusicFile = "None." Then > PlayMidi MusicFile > Else > StopMidi > End If > End If > > ``` This might work yeah (I've put a missing Then in, I've not testedthe code) ``` MusicFile = Trim$(Map.Music) If Not MusicFile = Music_Playing Then If Not MusicFile = "None." Then PlayMidi MusicFile Else StopMidi End If End If ```
  20. @Niffler: > Thanks, this is a great tutorial. But when I switch maps, even if both maps have the same background music, the song will stop and restart from the beginning again. Is there any way to make it so the song simply continues to play? This is what happened when I used midis, and I very much enjoyed that. If you could offer any assistance, I would really appreciate it. Client side, in modHandleData, in sub HandleMapDone: ``` MusicFile = Trim$(Map.Music) If Not MusicFile = "None." Then PlayMidi MusicFile Else StopMidi End If ``` You should add a check there to check if the current song playing is the map music, and if that is the case dont stop the music.
  21. @GoldSide: > You Know What the Wrong My Converter Modified ? @Erwin: > EDIT: I already see the problem, in modTypes you should add in all the Rec's and MapRec in the server, and in modTypes2 where you want to convert it into. > > EDIT2: Found another problem, you also need to edit, LoadMap to load up all the things in MapRec, SaveMap to Save it in the new 'format', and ConvertMap to convert all the variables. > You have to do more than only change the MapRec and add a few mores.
  22. @Zopto: > robin engein? what engein? cs:de? Well, Robin's Amazing Package has a weather system too.
  23. @GoldSide: > I Try It But not working ,, Are You Use the EO3 ? I'm using EO2 for my game, but the convertor works for all versions of Eclipse as long as you fill in the correct UDT's.
  24. @GoldSide: > Can you make this for me :'( No lol, I already gave you an example of a convertor, easier for you isn't gonna get. I already explained to you what you should edit.
×
×
  • Create New...