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

Jumbofile

Members
  • Posts

    982
  • Joined

  • Last visited

Posts posted by Jumbofile

  1. So here is my DrawInventory() sub, what should I change?

    ```
    Sub DrawInventory()

    Dim I As Long, X As Long, Y As Long, itemnum As Long, itempic As Long
    Dim Amount As Long
    Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRECT As D3DRECT, BlankItemRec As RECT, BlankItemPlaceRec As RECT
    Dim colour As Long
    Dim tmpItem As Long, amountModifier As Long

       ' If debug mode, handle error then exit out
       If Options.Debug = 1 Then On Error GoTo errorhandler

       If Not InGame Then Exit Sub

       ' reset gold label
       'frmMain.lblGold.Caption = "0g"

       Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 0), 1#, 0
       Direct3D_Device.BeginScene

       For I = 1 To MAX_INV
           itemnum = GetPlayerInvItemNum(MyIndex, I)
                       With rec
                           .Top = 0
                           .Bottom = 32
                           .Left = 0
                           .Right = 32
                       End With

                       With rec_pos
                           .Top = InvTop + ((InvOffsetY + 32) * ((I - 1) \ InvColumns))
                           .Bottom = .Top + 32
                           .Left = InvLeft + ((InvOffsetX + 32) * (((I - 1) Mod InvColumns)))
                           .Right = .Left + 32
                       End With

                       With BlankItemRec
                           .Top = 0
                           .Bottom = 34
                           .Left = 0
                           .Right = 34
                       End With

                       With BlankItemPlaceRec
                           .Top = rec_pos.Top - 1
                           .Bottom = .Top + 34
                           .Left = rec_pos.Left - 1
                           .Right = .Left + 34

                       End With
                   RenderTextureByRects Tex_Inv_Item, BlankItemRec, BlankItemPlaceRec

           If itemnum > 0 And itemnum <= MAX_ITEMS Then
                       itempic = Item(itemnum).Pic

               amountModifier = 0
               ' exit out if we're offering item in a trade.
               If InTrade > 0 Then
                   For X = 1 To MAX_INV
                       tmpItem = GetPlayerInvItemNum(MyIndex, TradeYourOffer(X).num)
                       If TradeYourOffer(X).num = I Then
                           ' check if currency
                           If Not Item(tmpItem).Type = ITEM_TYPE_CURRENCY Then
                               ' normal item, exit out
                               GoTo NextLoop
                           Else
                               ' if amount = all currency, remove from inventory
                               If TradeYourOffer(X).Value = GetPlayerInvItemValue(MyIndex, I) Then
                                   GoTo NextLoop
                               Else
                                   ' not all, change modifier to show change in currency count
                                   amountModifier = TradeYourOffer(X).Value
                               End If
                           End If
                       End If
                   Next
               End If

               If itempic > 0 And itempic <= numitems Then
                   If Tex_Item(itempic).Width <= 64 Then ' more than 1 frame is handled by anim sub

                       If itempic > 0 Then
                       'RenderTextureByRects Tex_Inv_Item, BlankItemRec, BlankItemPlaceRec
                       RenderTextureByRects Tex_Item(itempic), rec, rec_pos
                       'Else
                       'RenderTextureByRects Tex_Inv_Item, BlankItemRec, BlankItemPlaceRec
                       End If

                       ' If item is a stack - draw the amount you have
                       If GetPlayerInvItemValue(MyIndex, I) > 1 Then
                           Y = rec_pos.Top + 22
                           X = rec_pos.Left - 4

                           Amount = GetPlayerInvItemValue(MyIndex, I) - amountModifier

                           ' Draw currency but with k, m, b etc. using a convertion function
                           If Amount < 1000000 Then
                               colour = White
                           ElseIf Amount > 1000000 And Amount < 10000000 Then
                               colour = Yellow
                           ElseIf Amount > 10000000 Then
                               colour = BrightGreen
                           End If
                           RenderText Font_Default, Format$(ConvertCurrency(str(Amount)), "#,###,###,###"), X, Y, colour, 0
                           ' Check if it's gold, and update the label
                           If GetPlayerInvItemNum(MyIndex, I) = 1 Then '1 = gold :P
                               'frmMain.lblGold.Caption = Format$(Amount, "#,###,###,###") & "g"
                           End If
                       End If
                   End If

                   'End If

               End If
           End If
    NextLoop:
       Next

       'update animated items
       DrawAnimatedInvItems

       With srcRect
           .x1 = 2
           .x2 = frmMain.picInventory.Width - 2
           .y1 = 0
           .y2 = frmMain.picInventory.Height + .y1
       End With

       With destRECT
           .x1 = 2
           .x2 = frmMain.picInventory.Width - 2
           .y1 = 2
           .y2 = frmMain.picInventory.Height + .y1
       End With

       Direct3D_Device.EndScene
       Direct3D_Device.Present srcRect, destRECT, frmMain.picInventory.hWnd, ByVal (0)

       ' Error handler
       Exit Sub
    errorhandler:
       HandleError "DrawInventory", "modGraphics", Err.Number, Err.Description, Err.Source, Err.HelpContext
       Err.Clear
       Exit Sub
    End Sub
    ```
  2. How would I be able to load pictures on picture boxes like picInventory or picSpells? Right now they are black even though I added a picture through properties.

    ![](http://imgur.com/KrLze7w.png)
  3. Do you, the people of Eclipse prefer as typical class system like you would see in games like World of Warcraft and Rift or would all of you rather see a no class system closer to the resemblance of Skyrim?
    Poll above, extra comments are greatly appreciated.
  4. Im a 16 year old with moderate acne that used to be horrible. Proactive never worked. One thing that worked to a degree was the 

    [Clean & Clear Continuous Control Acne Cleanser](http://www.drugstore.com/products/prod.asp?pid=43877&catid=338324&aid=338666&aparam=43877&kpid=43877&CAWELAID=120142990000011926&CAGPSPN=pla&kpid=43877)
    If you get this only use every other day, the strong acids will hurt your skin.

    Ive been looking for a way to get rid of the rest of my acne so this thread is awesome.
×
×
  • Create New...