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

Valek

Members
  • Posts

    58
  • Joined

  • Last visited

    Never

Posts posted by Valek

  1. IF you are actually afraid for your safety you can continue to file "useless" reports with the police, and then when something actually happens and you can prove that its her doing this… maybe by setting up a video camera or something. The police will be much more willing to assist having had prior reports from you about this individual. Its not much but at least you can feel safe that if she cuts your head off and eats it. They will come for her :)
  2. I was wondering where in the source code I would look at to begin adding new classes and setting it to display multiple sprite choices (Male/Female)

    I was looking for a tutorial on this process but haven't been able to locate one.
  3. @Chuchoide:

    > That colors are for the Color Access.
    > Anyways, thanks for the edited code.

    Yeah, but it appears that the text color of the "level: ##" appears to be the same as the color of the players access level. I was just wondering if it was possible to change the color that it displays as.
  4. @adr990:

    > This one will work with EO CE(1.2.0):
    >
    > ```
    > Public Sub DrawPlayerName(ByVal Index As Long)
    > Dim TextA As Long
    > Dim TextB As Long
    > Dim TextX As Long
    > Dim TextY As Long
    > Dim color As Long
    > Dim Name As String
    >
    >     ' Check access level
    >     If GetPlayerPK(Index) = NO Then
    >
    >         Select Case GetPlayerAccess(Index)
    >             Case 0
    >                 color = RGB(255, 96, 0)
    >             Case 1
    >                 color = QBColor(DarkGrey)
    >             Case 2
    >                 color = QBColor(Cyan)
    >             Case 3
    >                 color = QBColor(BrightGreen)
    >             Case 4
    >                 color = QBColor(Yellow)
    >         End Select
    >
    >     Else
    >         color = QBColor(BrightRed)
    >     End If
    >    
    >     Name = Trim$(Player(Index).Name)
    >     If GetPlayerSprite(Index) < 1 Or GetPlayerSprite(Index) > NumCharacters Then
    >         TextA = ConvertMapX(GetPlayerX(Index) * PIC_X) + Player(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(GetPlayerName(Index))))
    >         TextB = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - 5
    >         TextX = ConvertMapX(GetPlayerX(Index) * PIC_X) + Player(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(Name)))
    >         TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - 16
    >     Else
    >         ' Determine location for text
    >         TextA = ConvertMapX(GetPlayerX(Index) * PIC_X) + Player(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(GetPlayerName(Index))))
    >         TextB = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - (DDSD_Character(GetPlayerSprite(Index)).lHeight / 4) + 5
    >         TextX = ConvertMapX(GetPlayerX(Index) * PIC_X) + Player(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(GetPlayerName(Index))))
    >         TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - (DDSD_Character(GetPlayerSprite(Index)).lHeight / 4) + 16
    >     End If
    >
    >     ' Draw name
    >     Call DrawText(TexthDC, TextA, TextB, "Level: " & GetPlayerLevel(Index), color)
    >     Call DrawText(TexthDC, TextX, TextY, GetPlayerName(Index), color)
    >
    > End Sub
    > ```
    > ~Adr990

    is it possible to change the color? I assume it has to do this with the color cases? And it looks like the color is different based on player access level.

       ```
    color = RGB(255, 96, 0)
                Case 1
                    color = QBColor(DarkGrey)
                Case 2
                    color = QBColor(Cyan)
                Case 3
                    color = QBColor(BrightGreen)
                Case 4
                    color = QBColor(Yellow)
    ```
  5. @Ertzel:

    > Its just text based display, nothing hard to do.
    >
    > **- Server Side -**
    > Replace -
    > ```
    > Sub UpdatePartyData(ByVal Leader As Long, ByVal Member As Long)
    > Dim buffer As clsBuffer
    > Dim LeaderName As String, MemberName As String, LeaderLv As String, MemberLv As String
    >
    >     LeaderName = GetPlayerName(Leader)
    >     LeaderLv = GetPlayerLevel(Leader)
    >     MemberName = GetPlayerName(Member)
    >     MemberLv = GetPlayerLevel(Member)
    >    
    >     Set buffer = New clsBuffer
    >                
    >     buffer.WriteLong SSendPartyMembers
    >     buffer.WriteString LeaderName
    >     buffer.WriteString LeaderLv
    >     buffer.WriteString MemberName
    >     buffer.WriteString MemberLv
    >    
    >     'send to member
    >     SendDataTo Member, buffer.ToArray()
    >     Set buffer = Nothing
    >    
    >     Set buffer = New clsBuffer
    >     buffer.WriteLong SSendPartyMembers
    >    
    >     buffer.WriteString LeaderName
    >     buffer.WriteString LeaderLv
    >     buffer.WriteString MemberName
    >     buffer.WriteString MemberLv
    >     'send to leader
    >     SendDataTo Leader, buffer.ToArray()
    >    
    >     Set buffer = Nothing
    > End Sub
    >
    > Sub PartyEnd(ByVal Leader As Long, ByVal Member As Long)
    > Dim buffer As clsBuffer
    >
    > Set buffer = New clsBuffer
    >
    > buffer.WriteLong SPartyEnd
    >
    > 'send to leader
    > SendDataTo Leader, buffer.ToArray()
    >
    > Set buffer = Nothing
    >
    > Set buffer = New clsBuffer
    >
    > buffer.WriteLong SPartyEnd
    > 'send to member
    > SendDataTo Member, buffer.ToArray()
    >
    > Set buffer = Nothing
    > End Sub
    > ```with
    > ```
    > Sub UpdatePartyData(ByVal Leader As Long, ByVal member As Long)
    > Dim Buffer As clsBuffer
    > Dim LeaderName As String, MemberName As String, LeaderHp As String, MemberHp As String
    >
    >     LeaderName = GetPlayerName(Leader)
    >     LeaderHp = GetPlayerVital(Leader, Vitals.HP) & "/" & GetPlayerMaxVital(Leader, Vitals.HP)
    >     MemberName = GetPlayerName(member)
    >     MemberHp = GetPlayerVital(member, Vitals.HP) & "/" & GetPlayerMaxVital(member, Vitals.HP)
    >    
    >     Set Buffer = New clsBuffer
    >                
    >     Buffer.WriteLong SSendPartyMembers
    >     Buffer.WriteString LeaderName
    >     Buffer.WriteString LeaderHp
    >     Buffer.WriteString MemberName
    >     Buffer.WriteString MemberHp
    >    
    >     'send to member
    >     SendDataTo member, Buffer.ToArray()
    >     Set Buffer = Nothing
    >    
    >     Set Buffer = New clsBuffer
    >     Buffer.WriteLong SSendPartyMembers
    >    
    >     Buffer.WriteString LeaderName
    >     Buffer.WriteString LeaderHp
    >     Buffer.WriteString MemberName
    >     Buffer.WriteString MemberHp
    >     'send to leader
    >     SendDataTo Leader, Buffer.ToArray()
    >    
    >     Set Buffer = Nothing
    > End Sub
    > ```
    > **- Client Side -**
    > Replace -
    > ```
    > Private Sub HandleSendPartyMembers(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    > Dim LeaderName As String, MemberName As String, LeaderLv As String, MemberLv As String
    > Dim buffer As clsBuffer
    >
    > Set buffer = New clsBuffer
    > buffer.WriteBytes Data()
    >
    > LeaderName = buffer.ReadString
    > LeaderLv = buffer.ReadString
    > MemberName = buffer.ReadString
    > MemberLv = buffer.ReadString
    >
    > With frmMainGame
    >     .lblLeader.Caption = LeaderName & ", Lv: " & LeaderLv
    >     .lblMember.Caption = MemberName & ", Lv: " & MemberLv
    >     .imgPartyData.Left = 568
    >     .imgPartyData.Top = 427
    >    
    >     .txtMyChat.width = 349
    >     .txtChat.width = 349
    >     .imgPartyData.Visible = True
    > End With
    >
    > Set buffer = Nothing
    > End Sub
    >
    > Private Sub HandlePartyEnd(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    > Dim buffer As clsBuffer
    >
    > Set buffer = New clsBuffer
    > buffer.WriteBytes Data()
    >
    > With frmMainGame
    >     .imgPartyData.Visible = False
    >     .txtMyChat.width = 478
    >     .txtChat.width = 478
    > End With
    >
    > Set buffer = Nothing
    > End Sub
    > ```with
    > ```
    > Private Sub HandleSendPartyMembers(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    > Dim LeaderName As String, MemberName As String, LeaderHp As String, MemberHp As String
    > Dim Buffer As clsBuffer
    >
    > Set Buffer = New clsBuffer
    > Buffer.WriteBytes Data()
    >
    > LeaderName = Buffer.ReadString
    > LeaderHp = Buffer.ReadString
    > MemberName = Buffer.ReadString
    > MemberHp = Buffer.ReadString
    >
    > With frmMainGame
    >     .lblLeader.Caption = LeaderName & ", Hp: " & LeaderHp
    >     .lblMember.Caption = MemberName & ", Hp: " & MemberHp
    >     .imgPartyData.Visible = True
    > End With
    >
    > Set Buffer = Nothing
    > End Sub
    > ```

    I am still learning how to use VB6, its obviously a pretty powerful tool. I like to think I learn pretty fast but the learning curve here is pretty crazy, especially considering how many talented people are floating around the forums.

    anyways, thanks for posting that. I managed to get it to work, thank you.
  6. @adr990:

    > I used this:
    >
    > 'Position bar - 225 = Below Char, 154 = Above Name, 172 Between Name and Char
    >
    > And worked fine for me.. All thought, ofcourse, a name between the Sprite and Name doesn't look good haha IMO.
    >
    > Just try it out to check. (Unless you changed your window size, this should work in EO CE(1.2.0) )

    You'll have to be more specific with me.
    My code looks like this, what does yours look like?

    >! ```
    ' Calculate the X coordinate to place the name
        X = MapNpc(Index).X * PIC_X + MapNpc(Index).XOffset

        If Sprite < 1 Or Sprite > NumCharacters Then
            y = MapNpc(Index).y * PIC_Y + MapNpc(Index).YOffset - 50
        Else
            y = MapNpc(Index).y * PIC_Y + MapNpc(Index).YOffset - (DDSD_Character(Sprite).lHeight) + 50
        End If
    ```
  7. @Ertzel:

    > This works great, thx for making this tutorial. I did everything you did just changed it to showing the other members Health instead of Level.

    Would be nice if you explained how you made it so it displays Health instead of level.. Might be helpful to others :)
  8. @Athagekin:

    > The positions are based on pixel units.  Your offsets are probably too high or too low.  Did you modify any of the code that was shown in the tutorial?

    No I didn't modify any of it. I just followed it step by step. The health bar is displaying, however when I change the coordinates and recompile, it doesn't move at all. Not even a pixel in either direction. So its confusing to me. Even if my offsets were too high or too low I should be able to compensate by modifying the coords.
  9. **I am having a bit of trouble changing the position of the health bar on my NPC's..

    this is what the HP bar looks like on the NPC.**

    >! ![](http://i116.photobucket.com/albums/o10/masterofmoo/HPBAR.png)

    **This is what my code looks like.**

    >! ```
    ' Calculate the X coordinate to place the name
        X = MapNpc(Index).X * PIC_X + MapNpc(Index).XOffset

        If Sprite < 1 Or Sprite > NumCharacters Then
            y = MapNpc(Index).y * PIC_Y + MapNpc(Index).YOffset - 50
        Else
            y = MapNpc(Index).y * PIC_Y + MapNpc(Index).YOffset - (DDSD_Character(Sprite).lHeight) + 50
        End If
    ```

    **It says in the tutorial that I can move the placement by changing the coordinates displaced in these lines of code, however I am have changing them and haven't really had any luck moving it at all.

    Any help would be great!**
  10. @Chuchoide:

    > u have a sub in a sub. u replaced BltNpc with BltNpcHP. U needa go to the End Sub command of BltNpc, press enter, and then paste the BltNpcHP sub.
    >
    > Like:
    >
    > Public Sub BltNpc
    > -Code-
    > End Sub
    >
    > Public Sub BltNpcHP
    > -Code-
    > End Sub

    I got it working, thank you for the extra help! MUCH appreciated.
  11. I'm a little bit stuck on this step.

    Here is the error I am getting:

    >! ![](http://i116.photobucket.com/albums/o10/masterofmoo/DangerWillRobinson.png)

    My Gut says that the error "Expected End Sub" means that it wants me to place and End Sub for that specific line?

    However I don't want to do anything without clarification until I become confident in VB6 :)
  12. @Chuchoide:

    > You can use the Exp INI Sys by Ballie, it can  be found in Source Code Tuts.

    Its compatible with EO? I didn't know that. - I will check it out. Thanks!

    EDIT: ya Robin, I agree it would be a faster update. But since I don't understand the logic of the forumla I will be at a loss. My only option will probably be to use the INI sys by Ballie.
  13. @Robin:

    > No. It's a formula.

    Okay, I think I see how it works..
    ```
    GetPlayerNextLevel = (50 / 3) * ((GetPlayerLevel(Index) + 1) ^ 3 - (6 * (GetPlayerLevel(Index) + 1) ^ 2) + 17 * (GetPlayerLevel(Index) + 1) - 12)
    ```
    Can you break it down for me a little bit?
    I see that it is running the function "GetPlayerNextLevel" I am not really sure on the logic of the formula though..
    'is it "50" because that is the max level a player can attain in my game. I feel so dumb. :(
  14. I was wondering if anyone knew where I would find the experience and level code in the source. I am looking in the server source code and can't seem to be able to find it.

    CTRL + F hasn't been nice to me in this case, I keep ending up with "Option Explicit" code as opposed to "Experience"

    Any help would be appreciated and I will continue to look. Thanks :)
  15. @Zetta:

    > in some countries using DDOS is illegal. Run a whois search on the ip, if its from Netherlands, its a 6 year sentence

    In most cases you can report it to their internet provider. This usually goes against their terms of service and usually results in a stern phone call or their internet being shut off. Especially if you can provide logs of the attacks. (if they are dumb enough to do it from their own connection and not use a proxy)
  16. @JS1:

    > Same modem.
    >
    > Router: Linksys WRT54G
    >
    > Windows 7, old computer was XP.
    >
    > Turning Windows Firewall off doesn't help.
    >
    > -JS1

    Unless that port is specifically allowed through your firewall it needs to be turned off. Also some routers have a built in firewall that needs to be turned off via the gateway page.

    Also, you might wish to try running your router in DMZ mode and see if it allows you to connect that way, if not its probably a firewall issue. If it does then you know that the ports were not forwarded correctly…

    Another possibility is that the port you have forwarded isn't the one you are using in your client. I would go to the config file for your client and see what port you have it set to use... you may have forwarded 4000 for example but your client might be set to 7000\.

    Example:

    >! [Options]
    Username=YOUR USER NAME
    Password=
    SavePass= 0
    IP=YOUR IP ADDRESS
    Port= 4000
    MenuMusic=
    Music= 1
    Sound= 1
    Debug= 0

    Good luck man I hope you figure it out!
×
×
  • Create New...