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

Draco.exe

Members
  • Posts

    260
  • Joined

  • Last visited

    Never

Posts posted by Draco.exe

  1. well…i'm not having errors with the events, so is not a code bug. maybe you can check and uncheck the walkthrough of each event and see if that works for stoping the walkthrough of events...and the NPCs, maybe you can delete the NPCs of the map and then adding them again
  2. i'll check that in some mins, thx for the info

    Update:
    I tested the last update of the Dragon Eclipse 2.0 i i'm not having errors with the walkthrough over NPCs and/or Events…you should make a backup of your npc and maps folders and then delete all the content of that folders in the server data files folder (dont delete the folders, just the .dat files)

    test if that work
  3. @marlongb:

    > BUG* –PET Buttom dont work in Resolution 640x480/800x600 only in 480x384

    ok, thanks for the bug! i'll check that now…wait some mins and i'll upload the fix

    Update:

    go to frmMain (code)
    find this:
    ```
        imgButton(8).Left = 603 + (ComboResolution.ListIndex * 160)

    ```
    paste below:
    ```
        imgButton(9).Left = 523 + (ComboResolution.ListIndex * 160)
    ```
    _**The new version with the warp fix and the pet button fix is ready to download**_
  4. i added the code before for any1 who knows how to edit that in VB, but i didn't uploaded a new version with the fix…but **now i have uploaded the third version of Dragon eclipse 2.0 with the warp fix** :)

    Check the download link in the first message!

    –--------------------------------------------

    The old version have almost all the fixes except this one of the warp i think...but i think you can just copy and paste the same fix for the Directx7 version

    PS: post Nº100 ^^
  5. **UPDATE!!!**

    **I Fixed the warp crash problem!! :D** (it was some buggy codes from pet system and quest system with sub player warp…it was my error to just copy and paste the code)
    After this edits the warps from attribute, map border warp and event warp worked for me in maps with events.
    _Added the fix to the first message_

    **Server Side:**
    Replace **Sub PlayerWarp** with this one:

    ```
    Sub PlayerWarp(ByVal index As Long, ByVal MapNum As Long, ByVal x As Long, ByVal y As Long)
        Dim shopNum As Long
        Dim OldMap As Long
        Dim I As Long
        Dim Buffer As clsBuffer

        ' Check for subscript out of range
        If IsPlaying(index) = False Or MapNum <= 0 Or MapNum > MAX_MAPS Then
            Exit Sub
        End If

        ' Check if you are out of bounds
        If x > Map(MapNum).MaxX Then x = Map(MapNum).MaxX
        If y > Map(MapNum).MaxY Then y = Map(MapNum).MaxY
        If x < 0 Then x = 0
        If y < 0 Then y = 0

        ' if same map then just send their co-ordinates
        If MapNum = GetPlayerMap(index) Then
            SendPlayerXYToMap index
            Call CheckTasks(index, QUEST_TYPE_GOREACH, MapNum)
        End If

        TempPlayer(index).EventProcessingCount = 0
        TempPlayer(index).EventMap.CurrentEvents = 0

        ' clear target
        TempPlayer(index).target = 0
        TempPlayer(index).targetType = TARGET_TYPE_NONE
        SendTarget index

        ' Save old map to send erase player data to
        OldMap = GetPlayerMap(index)

        If OldMap <> MapNum Then
            Call SendLeaveMap(index, OldMap)
        End If

        UpdateMapBlock OldMap, GetPlayerX(index), GetPlayerY(index), False
        Call SetPlayerMap(index, MapNum)
        Call SetPlayerX(index, x)
        Call SetPlayerY(index, y)
        UpdateMapBlock MapNum, x, y, True

        'If 'refreshing' map
        If (OldMap <> MapNum) And TempPlayer(index).TempPetSlot > 0 Then
            'switch maps
          PetDisband index, OldMap
            SpawnPet index, MapNum, Trim$(Player(index).Pet.SpriteNum)
            PetFollowOwner index

            If PetMapCache(OldMap).UpperBound > 0 Then
                For I = 1 To PetMapCache(OldMap).UpperBound
                    If PetMapCache(OldMap).Pet(I) = TempPlayer(index).TempPetSlot Then
                        PetMapCache(OldMap).Pet(I) = 0
                    End If
                Next
            Else
                PetMapCache(OldMap).Pet(1) = 0
            End If
        End If

        'View Current Pets on Map
        If PetMapCache(Player(index).Map).UpperBound > 0 Then
            For I = 1 To PetMapCache(Player(index).Map).UpperBound
                Call NPCCache_Create(index, Player(index).Map, PetMapCache(Player(index).Map).Pet(I))
            Next
        End If

        ' send player's equipment to new map
        SendMapEquipment index

        ' send equipment of all people on new map
        If GetTotalMapPlayers(MapNum) > 0 Then
            For I = 1 To Player_HighIndex
                If IsPlaying(I) Then
                    If GetPlayerMap(I) = MapNum Then
                        SendMapEquipmentTo I, index
                    End If
                End If
            Next
        End If

        ' Now we check if there were any players left on the map the player just left, and if not stop processing npcs
        If GetTotalMapPlayers(OldMap) = 0 Then
            PlayersOnMap(OldMap) = NO

            ' Regenerate all NPCs' health
            For I = 1 To MAX_MAP_NPCS

                If MapNpc(OldMap).NPC(I).Num > 0 Then
                    MapNpc(OldMap).NPC(I).Vital(Vitals.HP) = GetNpcMaxVital(MapNpc(OldMap).NPC(I).Num, Vitals.HP)
                End If

            Next

        End If

        ' Sets it so we know to process npcs on the map
        PlayersOnMap(MapNum) = YES
        TempPlayer(index).GettingMap = YES
        Call CheckTasks(index, QUEST_TYPE_GOREACH, MapNum)
        Set Buffer = New clsBuffer
        Buffer.WriteLong SCheckForMap
        Buffer.WriteLong MapNum
        Buffer.WriteLong Map(MapNum).Revision
        SendDataTo index, Buffer.ToArray()
        Set Buffer = Nothing
    End Sub

    ```
    and replace **Sub SpawnNpc** with this one (idk if this is affecting the problem, but i fixed some lines of code that may affect others events)

    ```
    Public Sub SpawnNpc(ByVal mapNpcNum As Long, ByVal MapNum As Long, Optional ForcedSpawn As Boolean = False, Optional ByVal SetX As Long, Optional ByVal SetY As Long)
        Dim Buffer As clsBuffer
        Dim npcNum As Long
        Dim I As Long
        Dim x As Long
        Dim y As Long
        Dim Spawned As Boolean

        ' Check for subscript out of range
        If mapNpcNum <= 0 Or mapNpcNum > MAX_MAP_NPCS Or MapNum <= 0 Or MapNum > MAX_MAPS Then Exit Sub
        npcNum = Map(MapNum).NPC(mapNpcNum)
        If ForcedSpawn = False And Map(MapNum).NpcSpawnType(mapNpcNum) = 1 Then npcNum = 0
        If npcNum > 0 Then

            MapNpc(MapNum).NPC(mapNpcNum).Num = npcNum
            MapNpc(MapNum).NPC(mapNpcNum).target = 0
            MapNpc(MapNum).NPC(mapNpcNum).targetType = 0 ' clear

            MapNpc(MapNum).NPC(mapNpcNum).Vital(Vitals.HP) = GetNpcMaxVital(npcNum, Vitals.HP)
            MapNpc(MapNum).NPC(mapNpcNum).Vital(Vitals.MP) = GetNpcMaxVital(npcNum, Vitals.MP)

            MapNpc(MapNum).NPC(mapNpcNum).Dir = Int(Rnd * 4)

            'Check if theres a spawn tile for the specific npc
            For x = 0 To Map(MapNum).MaxX
                For y = 0 To Map(MapNum).MaxY
                    If Map(MapNum).Tile(x, y).Type = TILE_TYPE_NPCSPAWN Then
                        If Map(MapNum).Tile(x, y).Data1 = mapNpcNum Then
                            MapNpc(MapNum).NPC(mapNpcNum).x = x
                            MapNpc(MapNum).NPC(mapNpcNum).y = y
                            MapNpc(MapNum).NPC(mapNpcNum).Dir = Map(MapNum).Tile(x, y).Data2
                            Spawned = True
                            Exit For
                        End If
                    End If
                Next y
            Next x

            If Not Spawned Then

                ' Well try 100 times to randomly place the sprite
                For I = 1 To 100
                    x = Random(0, Map(MapNum).MaxX)
                    y = Random(0, Map(MapNum).MaxY)

                    If x > Map(MapNum).MaxX Then x = Map(MapNum).MaxX
                    If y > Map(MapNum).MaxY Then y = Map(MapNum).MaxY

                    ' Check if the tile is walkable
                    If NpcTileIsOpen(MapNum, x, y) Then
                        MapNpc(MapNum).NPC(mapNpcNum).x = x
                        MapNpc(MapNum).NPC(mapNpcNum).y = y
                        Spawned = True
                        Exit For
                    End If

                Next

            End If

            ' Didn't spawn, so now we'll just try to find a free tile
            If Not Spawned Then

                For x = 0 To Map(MapNum).MaxX
                    For y = 0 To Map(MapNum).MaxY

                        If NpcTileIsOpen(MapNum, x, y) Then
                            MapNpc(MapNum).NPC(mapNpcNum).x = x
                            MapNpc(MapNum).NPC(mapNpcNum).y = y
                            Spawned = True
                        End If

                    Next
                Next

            End If

            ' If we suceeded in spawning then send it to everyone
            If Spawned Then
                Set Buffer = New clsBuffer
                Buffer.WriteLong SSpawnNpc
                Buffer.WriteLong mapNpcNum
                Buffer.WriteLong MapNpc(MapNum).NPC(mapNpcNum).Num
                Buffer.WriteLong MapNpc(MapNum).NPC(mapNpcNum).x
                Buffer.WriteLong MapNpc(MapNum).NPC(mapNpcNum).y
                Buffer.WriteLong MapNpc(MapNum).NPC(mapNpcNum).Dir
                Buffer.WriteByte MapNpc(MapNum).NPC(mapNpcNum).IsPet
                Buffer.WriteString MapNpc(MapNum).NPC(mapNpcNum).PetData.Name
                Buffer.WriteLong MapNpc(MapNum).NPC(mapNpcNum).PetData.Owner
                SendDataToMap MapNum, Buffer.ToArray()
                Set Buffer = Nothing
                UpdateMapBlock MapNum, MapNpc(MapNum).NPC(mapNpcNum).x, MapNpc(MapNum).NPC(mapNpcNum).y, True
            End If

            SendMapNpcVitals MapNum, mapNpcNum
        Else
            MapNpc(MapNum).NPC(mapNpcNum).Num = 0
            MapNpc(MapNum).NPC(mapNpcNum).target = 0
            MapNpc(MapNum).NPC(mapNpcNum).targetType = 0 ' clear
            ' send death to the map
            Set Buffer = New clsBuffer
            Buffer.WriteLong SNpcDead
            Buffer.WriteLong mapNpcNum
            SendDataToMap MapNum, Buffer.ToArray()
            Set Buffer = Nothing
        End If

    End Sub

    ```
  6. @Ganjika:

    > How would make it so that the npc's names always show even if there isn't a mouse pointer over them and/or where folks cant walk through npcs? btw, thanks again for putting out a great engine - this works wonderfully.

    client side
    replace this:
    ```
                ' draw npc names
                    For I = 1 To Npc_HighIndex
                        If MapNpc(I).num > 0 Then
                            If CurX = MapNpc(I).X And CurY = MapNpc(I).y Then
                                Call DrawNpcName(I)
                            End If
                        End If
                    Next
    ```
    with the original one:
    ```
                ' draw npc names
                For i = 1 To Npc_HighIndex
                    If MapNpc(i).num > 0 Then
                        Call DrawNpcName(i)
                    End If
                Next
    ```
    The walk through is only for players (players can walkthrough players) and only in safe zones.

    check the source tutorial index for most of the tutorials added to this engine, so you can edit it as you want: http://www.touchofdeathforums.com/smf2/index.php/topic,75901.0.html
  7. ok, i tested the warp with attributes, admin warp, and "map border" warp, (without any event on the map) and i'm not having any problems…you should delete all the maps files and the event files from the server folder (delete all the files inside the map folder) then launch the server and test the warps...it should work. About the event walkthrough, this should be fixed deleting the events of the map folder in server.

    Anyways, when you create an event in the same map you are warping, it's lool like the server crash without any reason...i'll check that. (PS: after the server crash i started it again, i deleted the events for te map and the warp started to work again without problems)

    ----------------------------------------------------

    About the description of the Currency, it's just an edit of the new item description window...you shoudl check the tutorial and look how you add the description for the currency again.

    And the projectiles...idk really xD maybe you can post that in the projectile tutorial and see if someone have the answer.

    ----------------------------------------

    about the admin panel, i know that's happening...but it's easy to fix, just open the frm_main in VB and right click on the admin panel, then click on "bring to Front".

    ----------------------------------------

    about the last post of DarkBeast, i think you didn't read this:
    @Eragon2589:

    > **PLEASE don't ask me (or send MPs) if i can add more things like pets, quests, guilds, two handed weapons, etc…i'm doing this because i want to help new guys for free, and i want to finish my own game too. So if you want to add new stuff, install VB and follow the tutorials, i'ts just practice ;)**

    i'm going to add new features ONLY if i have time in the future…now i'm at University again and i need to finish my game too, so i don't have too much time now.
  8. 1) i didn't touched the event system
    2) i have no errors when wharping to other area…i had a bug about that when i didn't finished an event. If you can post the highlighted line when you have this error in vb maybe i can help and check the error.
  9. @Jumpahead:

    > Another 2 bugs to report.
    >
    > 1.I can walk through events even although I have not selected Walk through.
    > 2.When I enter a new area it says Subscript out of Range.

    which version are you using? (if you're using v1.1 i won't help you because that's an old version…sorry)
  10. an easy way to check which version are you using: the dx7 uses .bmp images (for characters, items, etc.) and the dx8 uses .png images…if you're using the dx7 version, i'm sorry but i said that version is unsupported and i won't create new updates or fixes to that version because i created a new version based on Nightly Eclipse. If you liked the older version, you can download the Original Event System of jcsnider, and then start adding all the stuff you want. It's not very difficult to add the source tutorials in VB ;)
  11. @Jumpahead:

    > Another bug which will stop me making an MORPG.
    > Picture explains the problem.

    well, that's because you're using an old image of Item Description. You need to use this one:

    > ![](http://img11.imageshack.us/img11/8382/descriptionitem.jpg)

    –-------------

    @DarkBeast:

    > I don't want to complain cause I would have never done something like this for the community but this is way to buggy.1) When I make a event it says runtime or also when I make a shop it won't take money when the players purchase items please fix this.

    which engine are you using? v1.1 (Dx7) or 2.0 (Dx8)?
    **PS: the 1.1 version won't have new updates or fixes because now i'm working on version 2.0 wich is based on nightly eclipse.**
  12. @marlongb:

    > But if you type "/ help" error appears.

    In modConstants (server and client must be the same) find: ' text color constants
    and replace all the "capri" with any other color like cyan, white, blue, green, red, etc. (you can change for any other color excepting goldenyellow and capri i think)

    i tried to add that color to the help command, but when i changed the help color to other worked again.
    **UPDATE:

    I uploaded the second relase of Dragon Eclipse 2.0\. This one have a few more features like Pets. This is probably the last relase of the engine, so you need to add the others features by yourself. I think this version is more stable than the others, and with the features you can create a good MMORPG.

    The download link and new features are in the first message of the thread**
  13. NPCs:
    http://www.touchofdeathforums.com/smf2/index.php/topic,75158.0.html

    Players:
    http://www.touchofdeathforums.com/smf2/index.php/topic,67213.0.html
    http://www.touchofdeathforums.com/smf2/index.php/topic,73619.0.html

    (note all of this tutorials are for EO 2.0)
×
×
  • Create New...