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

Dawntide

Members
  • Posts

    248
  • Joined

  • Last visited

    Never

Posts posted by Dawntide

  1. hey,

    The engine is jealous of all my money

    If i spawn 2 billion gold everything is fine, but if i spawn another billion gold the game crashes.

    debug highlighting:

    ```

    Call SetPlayerInvItemValue(Index, n, GetPlayerInvItemValue(Index, n) + MapItem(mapnum, i).Value)

    ```

    runtime error overflow

    how to fix it and how to set a limit for currency without getting crash if you try to get more money

    thanks!
  2. I can not get it to work, it only works if i create a currency label on the minigame and make its caption the same as frmMain.lblGold.Caption and if its 0 then i disable the button. It's not really save, isn't it?
  3. I have a minigame, you just need to click 1 button, its random if you win or lose. If you win you get 50 gold, if you lose you lose 50 gold.

    i want it to exit the minigame button click Sub when the player has less than X gold.
  4. Yeah saw it, but i do not know how to use it.

    ```

    Public Sub CheckCurrency(ByVal itemamount 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

    Buffer.WriteLong CCheckCurrency

    Buffer.WriteLong itemamount

    SendData Buffer.ToArray()

    Set Buffer = Nothing

    ' Error handler

    Exit Sub

    errorhandler:

    HandleError "CheckCurrency", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext

    Err.Clear

    Exit Sub

    End Sub

    ```

    ```

    Sub HandleCheckCurrency(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

    Dim Buffer As clsBuffer

    Dim itemamount As Long

    Set Buffer = New clsBuffer

    Buffer.WriteBytes Data()

    itemamount = Buffer.ReadLong

    ' check gold

    itemamount = HasItem(index, 1)

    If itemamount < 50 Then

    PlayerMsg index, "Not enough gold.", BrightRed

    Exit Sub

    End If

    Set Buffer = Nothing

    End Sub

    ```

    It does not work ![:(](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/sad.png)
  5. love you guys (no homo ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png))! You helped me understand this a little bit more, thanks.

    What is the deal with the disappeared tutorial? I got the old one in my bookmarks, the thread was named: "[EO] (hopefully) simple packet tutorial"

    How to handle the same exact thing with experience? I mean what to use instead of "giveinvitem"?

    thanks!
  6. I tested it.

    When the player wins the minigame, in the chat appears this text:

    you received0 gold.

    and in my inventory i got the icon of the currency but no amount, i can not drop it either. its just there.

    Here is what i did:

    client side:

    ```

    Public Sub GiveCurrency(ByVal Amount 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

    Buffer.WriteLong CGiveCurrency

    Buffer.WriteLong Amount

    SendData Buffer.ToArray()

    Set Buffer = Nothing

    ' Error handler

    Exit Sub

    errorhandler:

    HandleError "GiveCurrency", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext

    Err.Clear

    Exit Sub

    End Sub

    ```

    modEnumerations:

    ```

    CGiveCurrency

    ```

    Minigame player wins:

    ```

    lblResult = "You Won"

    Call GiveCurrency(50)

    ```

    server side:

    modHandleData

    ```

    HandleDataSub(CGiveCurrency) = GetAddress(AddressOf HandleGiveCurrency)

    ```

    ```

    Sub HandleGiveCurrency(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

    Dim buffer As clsBuffer

    Dim itemnum As Long

    Dim amount As Long

    Set buffer = New clsBuffer

    buffer.WriteBytes Data()

    ' give gold

    GiveInvItem index, 1, amount

    ' send confirmation message

    PlayerMsg index, "You received" & amount & " gold.", BrightGreen

    Set buffer = Nothing

    End Sub

    ```

    modEnumerations:

    ```

    CGiveCurrency

    ```

    Whats wrong?
  7. I do not tested them, you told me i am sending random stuff which i do not use.

    is there a example for the unique ID packet already in the clean copy of eclipse event system 2.3? I could copy and modify it
  8. hey,

    I need your help, i want to create 2 packets, which let me give the player exp and money or take it from him.

    Due to the new forum, the only packet tutorial is gone, so i depend on you!

    Here is my try on give player money/currency:

    client side:

    ```

    Public Sub GiveCurrency(ByVal invslot 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

    Buffer.WriteLong CGiveCurrency

    Buffer.WriteLong invslot

    SendData Buffer.ToArray()

    Set Buffer = Nothing

    ' Error handler

    Exit Sub

    errorhandler:

    HandleError "GiveCurrency", "modClientTCP", Err.Number, Err.Description, Err.Source, Err.HelpContext

    Err.Clear

    Exit Sub

    End Sub

    ```

    server side:

    ```

    Sub HandleGiveCurrency(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

    Dim Buffer As clsBuffer

    Dim invSlot As Long

    Dim itemnum As Long

    Dim Amount As Long

    Set Buffer = New clsBuffer

    Buffer.WriteBytes Data()

    invSlot = Buffer.ReadLong

    ' give gold

    GiveInvItem index, 1, Amount

    ' send confirmation message

    PlayerMsg index, "You received" & Amount & "gold.", BrightGreen

    Set Buffer = Nothing

    End Sub

    ```

    Please fix my errors AND explain me what to do and why i need to do it.

    thanks in advance!
  9. Hey,

    I have seen several games with completely edited gui and window theme, so there are no windows forms anymore, it is just everything custom. The HP Bars are graphical and much more. How to hardcore edit the whole windows?

    I know in vb.net there is a way with importing modules which contain the new custom look, is it possible in vb6 too? Can i use vb.net themes then?

    How to use graphical HP Bars, like in any good game?

    What is the diffrence between onscreen GUI and offscreen gui, is there any advantage with an onscreen Gui?

    thanks in advance!
  10. Sorry i am not sure. But is it even real multiplayer or just limited to a party of players in 1 room? How are you planning to put mutliplayer aspects to it, if you have a classic level system, like in the 2D Mario game, in which you unlock one world after another and have no persistent world?
  11. Hey,

    This game looks indead amazing, but i am new to the whole kingdom hearts universe, so could you please explain how the basic game mechanics work and if they are inspired by the KH games or just your own idea.

    This timeline on the screen lets you select level, doesn't it?

    CPS?

    Hey,

    Whats the deal with the CPS at the server?

    On default its at about 1000, when i click unlock it goes up to 600k.

    What does this say? Should i leave it unlocked?

    thanks!
  12. Do you even read my posts?

    "Yeah but i guess i can not use the event system, because the action takes place in a new form, not frmMain."

    I am using Event System 2.3, but I am using a seperate form, it has nothing to do with frmMain, so the even system will probably not work.
  13. client side:

    ```
    Public Sub WinEXP(ByVal index As Long, ByVal EXP 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
        Buffer.WriteLong CWinEXPPacket
        Buffer.WriteLong index
        Buffer.WriteLong EXP
        SendData Buffer.ToArray()
        Set Buffer = Nothing

    ```
    ```
    Call WinEXP(index, Player(index).EXP, EXPAMOUNT)
    ```
    server side:

    ```
    HandleDataSub(CWinEXPPacket) = GetAddress

    (AddressOf HandleWinEXPPacket)
    ```
    ```
    Private Sub HandleWinEXPPacket(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddR As Long, ByVal ExtraVar As Long)

        ' the variables we store our information in
        Dim player As Long
        Dim EXP As Long

        Dim Buffer As clsBuffer
        Set Buffer = New clsBuffer
        Buffer.WriteBytes Data()

        player = buffer.ReadLong
        EXP = buffer.ReadLong

        GivePlayerEXP index, EXP

        Set Buffer = Nothing
    End Sub
    ```
    Please fix my mistakes, thanks
×
×
  • Create New...