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

Auction House System


JohnPony
 Share

Recommended Posts

  • Replies 78
  • Created
  • Last Reply

Top Posters In This Topic

I really don't have the ability to test it, and I've never actually worked with DD7 before, but try this.

```

Public Sub DrawAuctionItemDesc(ByVal ItemNum As Long)

Dim rec As RECT, rec_pos As RECT

Dim itempic As Long

' If debug mode, handle error then exit out

If Options.Debug = 1 Then On Error GoTo errorhandler

ItemNum = GetPlayerInvItemNum(MyIndex, DragInvSlotNum)

If ItemNum > 0 And ItemNum <= MAX_ITEMS Then

itempic = Item(GetPlayerInvItemNum(MyIndex, ItemNum)).Pic

If itempic = 0 Then Exit Sub

With rec

.top = 0

.Bottom = .top + PIC_Y

.Left = DDSD_Item(itempic).lWidth / 2

.Right = .Left + PIC_X

End With

With rec_pos

.top = 0

.Bottom = 64

.Left = 0

.Right = 64

End With

' Load item if not loaded, and reset timer

ItemTimer(itempic) = GetTickCount + SurfaceTimerMax

If DDS_Item(itempic) Is Nothing Then

Call InitDDSurf("Items\" & itempic, DDSD_Item(itempic), DDS_Item(itempic))

End If

Engine_BltToDC DDS_Item(itempic), rec, rec_pos, frmAuctions.picItem, False

End If

' Error handler

Exit Sub

errorhandler:

HandleError "DrawAuctionItemDesc", "modGraphics", Err.Number, Err.Description, Err.Source, Err.HelpContext

Err.Clear

Exit Sub

End Sub

```

Tell me if it throws any problems your way.
Link to comment
Share on other sites

I have read the code and there is some details you could work on a bit,

First, if someone made a first auction of 100$ then remade an other one of 150$ instead of giving only 50dollars he will give 150$ again,

Also it doesn't seem to give back there money to the auction loosers

Very nice though ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png)
Link to comment
Share on other sites

I found a few small bugs with the downloaded version of this. You can set up an auction, select the item to bid for, then drop that item and start the auction. You can also log out of the game with the auction form open. If you auction off an item, and someone buys it, the person who auctioned the item doesn't get the money. Otherwise, a great system!
Link to comment
Share on other sites

> I found a few small bugs with the downloaded version of this. You can set up an auction, select the item to bid for, then drop that item and start the auction. You can also log out of the game with the auction form open. If you auction off an item, and someone buys it, the person who auctioned the item doesn't get the money. Otherwise, a great system!

What's the item number of your currency ?
Link to comment
Share on other sites

ok, it's just that I had to modify a lot of stuff to make it work with the CS:DE, and edited some stuff, like saying the time left, who 'posted' the item, and I ended up modifing a lot of the original one, made it check if player was online, if so give item to his bank, otherwise add to 1 of the 25 auction house variables I made so that he could receive more than just 1 item from the auction house, etc etc ._.
Link to comment
Share on other sites

> If you auction off an item, and someone buys it, the person who auctioned the item doesn't get the money.

I haven't looked at this system in awhile but does this bug only happen when the player who put the item up for auction is logged out when the item is sold, then they don't receive their money, or does it happen even if the seller is online?

Also if you said its happening with the downloaded version, is there a chance that when Gen posted [this bugfix](http://www.touchofdeathforums.com/community/index.php?/topic/130033-auction-house-system/#entry859553),he didn't change the download link to a version with the fix?
Link to comment
Share on other sites

> I may of added a bug fix and simply didn't compile/add in the fix.
>
> I do know the form is glitched, but that is so simple the average person should be able to fix it.

Ah ok. And as for the form, I know it's simple, but I pointed it out just in case you missed it. It should be in the tutorial regardless of how simple it is.
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
it seems like this sub was forgotten

```

Private Sub HandleBid(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

Dim Buffer As clsBuffer

Dim Bid As Long

Dim Num As Long

Set Buffer = New clsBuffer

Buffer.WriteBytes Data

With Buffer

Num = .ReadLong

Bid = .ReadLong

End With

Call BidOnAuction(Index, Bid, Num)

Set Buffer = Nothing

End Sub

```
Link to comment
Share on other sites

> it seems like this sub was forgotten
>
> ```
>
> Private Sub HandleBid(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
>
> Dim Buffer As clsBuffer
>
> Dim Bid As Long
>
> Dim Num As Long
>
> Set Buffer = New clsBuffer
>
>
>
>
>
> Buffer.WriteBytes Data
>
> With Buffer
>
>
>
> Num = .ReadLong
>
> Bid = .ReadLong
>
>
>
> End With
>
> Call BidOnAuction(Index, Bid, Num)
>
> Set Buffer = Nothing
>
> End Sub
>
> ```

It seems it has!

Thanks man.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...