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

Rob's Feature Request Thread!


Rob Janes
 Share

Recommended Posts

Looking for a feature in EO3.X or older? (source to 4.0 is closed, so I cannot help with this unfortunately)

Have VB6, and a little experience, but not sure how to get that neat function in that you've always wanted?

No problem, as long as you can follow instructions clearly, and keep a professional attitude, this post is for you.

Reply here with a feature you want to add, and I'll try my hardest to reply with a step by step solution including code for your feature, or point you in the right direction.

No charge! Just good community building fun!
Link to comment
Share on other sites

  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Could you make an Auction House that is activated by an NPC and PvP Rank System like the one similar to [Vanilla WoW 1.12.1 here for Reference](http://www.wowwiki.com/Honor_system_(pre-2.0)) with a little Title Editor

I do not need these now but I will in about year so you can take your time! 

Thanks for doing this :D
Link to comment
Share on other sites

Sure I'll tackle the Auction House now, so here's my question.

By default, EO uses currency as an inventory item. So do you want it so that when a users posts a new auction, they have to select the type of item they want payment in (for Example: you post an item, and you want the payment currency to be "Gold Coins" or something)?
Link to comment
Share on other sites

Hi Rob.

I'm currently using an eclipse custom version that handle's the character and paperdoll sprites this way:

![](http://i.imgur.com/bLQ2uzq.png)

So it is:

First row looking up, second looking left, third looking down and fourth looking left.

I'd like you to help me to change it to allow this kind of sprites:

![](http://i.imgur.com/AMpPZ5d.png)

First row looking down, second looking left, third right and fourth up (like all normal eclipse origins do).

But i don't know how many lines i have to edit to make it work. If you want, i can send you the source of the engine by PM.

PS: I was suppossed to be the mapper of a game you were going to create like 1 year ago, but you dissappeared and never said something about it.
Link to comment
Share on other sites

> Sure I'll tackle the Auction House now, so here's my question.
>
> By default, EO uses currency as an inventory item. So do you want it so that when a users posts a new auction, they have to select the type of item they want payment in (for Example: you post an item, and you want the payment currency to be "Gold Coins" or something)?

Yea that would be cool. Thanks I will be using mostly likely EO 3.0

You can PM me if u have any other questions
Link to comment
Share on other sites

Peaverin, the way you're asking for is how EO does it by default in 3.0 and older I believe

But if you're using a custom version that uses a different method, it's quite simple to change back.

**[Client Side]**

Step 1: In client, modGraphics, find Sub DrawPlayer, find where it says 'Set the Left and replace it with the following.

```
' Set the left
    Select Case GetPlayerDir(Index)
        Case DIR_UP
            spritetop = 3
        Case DIR_RIGHT
            spritetop = 2
        Case DIR_DOWN
            spritetop = 0
        Case DIR_LEFT
            spritetop = 1
    End Select

```

Step 2: in modGraphics, find DrawNPC, and replace the lines after 'Set the left with the following,

```
' Set the left
    Select Case MapNpc(MapNpcNum).Dir
        Case DIR_UP
            spritetop = 3
        Case DIR_RIGHT
            spritetop = 2
        Case DIR_DOWN
            spritetop = 0
        Case DIR_LEFT
            spritetop = 1
    End Select

```
Link to comment
Share on other sites

Is it possible for a Duel Arena feature similar to RuneScape in EO 3.0? For example both players are inside the designated map where they are allowed to challenge each other (I'd like it so you can't challenge someone anywhere). Both players bet 35 gold and whoever wins gets all 70 gold (Other than gold i'd also like players to be able to bet items). Once they accept and the duel starts they are put in to an arena where they fight. If someone leaves the game or dies whoever didn't leave/die wins the gold and both players are teleported out. Lastly if possible (but not necessary) can there be options such as no helmets allowed, no necklaces allowed, no weapons, no magic, etc. For any more info heres the wiki page. [http://2007.runescape.wikia.com/wiki/Duel_Arena](http://2007.runescape.wikia.com/wiki/Duel_Arena)
Link to comment
Share on other sites

@ Render, still working on it, give me about another hour and I'll paste the tutorial here along with a Zipped version of the code. It's built with a clean EO3.0 and not your source, as it's meant to be a tutorial for everyone ;)

@ Colonello, that's easily doable, but I can get to it tomorrow or Sunday, just remind me ;)
Link to comment
Share on other sites

hey rob i was wondering if you could tell how to go about a house system i've tryed other tutorials and they just don't wanna work for me haha, and so far everything you say works, i want a house system where i can make furniture which they can add to there house they can have people in there house. also i want it that you buy the house but one house can only be built once thanks in advance bro.
Link to comment
Share on other sites

> @ Render, still working on it, give me about another hour and I'll paste the tutorial here along with a Zipped version of the code. It's built with a clean EO3.0 and not your source, as it's meant to be a tutorial for everyone ;)

Nice how about the PvP ranking system. Could you do that?
Link to comment
Share on other sites

@ Render, here's an Auction House System

You'll want to tweak the settings as you want!

It allows you to post items, and the currency, so you can post a Dagger for Example, but set it so that you only want bids in Gold, or Bids in whatever item you want!

There is a button on the Form, but you could easily set this to be activated by an NPC with a little tweaking

Bidding higher than the buyout will automatically give you an item

By default the constants allow bids to be online for 2 hours, you can change this with a single line, same with the maximum number of auctions.

Use drag and drop to auction off items In the Post Auction Window.

When an auction ends or someone buys it out, it is up to the seller to check their auctions and claim their reward.

It is up to the seller to check auctions and reclaim any items that have expired.

You can download the complete system here [http://www.canadianparamedicjobs.ca/updater/EOWithAuctions.zip](http://www.canadianparamedicjobs.ca/updater/EOWithAuctions.zip)

![](http://www.canadianparamedicjobs.ca/updater/auction1.png)

![](http://www.canadianparamedicjobs.ca/updater/auction2.png)

![](http://www.canadianparamedicjobs.ca/updater/auction3.png)

Otherwise, this is the tutorial (you'll need to copy the Control Objects like the Listboxes and Picture Boxes from the source I've attached!)

**SERVER SIDE**

In modHandleData, at the bottom of InitMessages add

```
HandleDataSub(CSaveAuction) = GetAddress(AddressOf HandleSaveAuction)
HandleDataSub(CAuctionBid) = GetAddress(AddressOf HandleAuctionBid)
HandleDataSub(CClaimAuction) = GetAddress(AddressOf HandleClaimAuction)

```
In modServerLoop, after it does the top dim's for dim tmr1000, add the following

```
'For Auction house
Dim Seconds As Long

```
Further down in the Sub ServerLoop, after tmr1000 = GetTickCount + 1000 add.

```
Seconds = Seconds + 1
If Seconds >= 60 Then
CheckAuctions
Seconds = 0
End If

```
In modPlayer, find Sub JoinGame, after it sends the welcome message, add

```
Call SendAuctionsToAll

```
In modGeneral, Sub InitServer, after Load SystemTray, add

```
Call SetStatus("Loading Auctions...")
Call LoadAuctions

```
In subHandleData, at the bottom Add a new Sub

```
Sub HandleSaveAuction(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim AuctionSlot As Long
Dim buffer As clsBuffer, i As Long
Dim FoundAuction As Boolean

Set buffer = New clsBuffer
buffer.WriteBytes Data()

'Default Auction Slot
FoundAuction = False

'First let's see if we have any available slots open for a new auction! (We will find any with a Claimed status and reuse it!
For i = 1 To MAX_AUCTIONS
If FoundAuction = False Then
If Auction(i).ItemNum = 0 Then
FoundAuction = True
AuctionSlot = i
End If
End If
Next i

'We have room!
If AuctionSlot > 0 Then
'Let's see if we can take the item,

Auction(AuctionSlot).ItemNum = buffer.ReadLong
Auction(AuctionSlot).Amount = buffer.ReadLong
Auction(AuctionSlot).Current_Bid = buffer.ReadLong
Auction(AuctionSlot).Buyout_Bid = buffer.ReadLong
Auction(AuctionSlot).Currency_ItemNum = buffer.ReadLong
Auction(AuctionSlot).Owner = GetPlayerName(index)
Auction(AuctionSlot).Current_Bid_Owner = GetPlayerName(index)
Auction(AuctionSlot).Status = Auction_Running
Auction(AuctionSlot).Claimed = NO
Auction(AuctionSlot).MinuteCounter = 1
TakeInvItem index, Auction(AuctionSlot).ItemNum, 1
Call SaveAuctions
Call PlayerMsg(index, "Auction Posted!", BrightGreen)
End If

'No room for auctions, tell the user!
If AuctionSlot = 0 Then
Call PlayerMsg(index, "There is no more room for any auctions at the moment, wait until current auctions end or contact an Administrator!", BrightRed)
End If

Set buffer = Nothing

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

Dim ViewAuctionNum As Long
Dim ViewAuctionBid As Long
Dim TakeItemNum As Long
Dim buffer As clsBuffer, i As Long
Set buffer = New clsBuffer

buffer.WriteBytes Data()
ViewAuctionNum = buffer.ReadLong
ViewAuctionBid = buffer.ReadLong
TakeItemNum = Auction(ViewAuctionNum).Currency_ItemNum
Call PlayerMsg(index, "You've bid " & ViewAuctionBid & " " & Trim(Item(Auction(ViewAuctionNum).Currency_ItemNum).Name) & " on " & Trim(Item(Auction(ViewAuctionNum).ItemNum).Name), BrightGreen)
If TakeInvItem(index, TakeItemNum, ViewAuctionBid) = False Then

'Let's see if we only bid, or if we paid the Bought Out!
If ViewAuctionBid < Auction(ViewAuctionNum).Buyout_Bid Then
Auction(ViewAuctionNum).Current_Bid = ViewAuctionBid
Auction(ViewAuctionNum).Current_Bid_Owner = Trim(GetPlayerName(index))
Call SendAuctionsToAll
Call PlayerMsg(index, "You successfully bid on " & Trim(Item(Auction(ViewAuctionNum).ItemNum).Name), BrightGreen)
End If

'If we bought out the item!
If ViewAuctionBid >= Auction(ViewAuctionNum).Buyout_Bid Then
Auction(ViewAuctionNum).Current_Bid = ViewAuctionBid
Auction(ViewAuctionNum).Current_Bid_Owner = Trim(GetPlayerName(index))
Auction(ViewAuctionNum).Status = Auction_Successful
GiveInvItem index, Auction(ViewAuctionNum).ItemNum, 1, True
Call SendAuctionsToAll
Call PlayerMsg(index, "You successfully bought out " & Trim(Item(Auction(ViewAuctionNum).ItemNum).Name), BrightGreen)
End If
Else
Call PlayerMsg(index, "Not enough " & Trim(Item(TakeItemNum).Name) & "!", BrightRed)
End If

End Sub
Sub HandleClaimAuction(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim buffer As clsBuffer, i As Long
Set buffer = New clsBuffer
buffer.WriteBytes Data()

Dim ViewAuctionNum As Long
Dim ViewAuctionReward As Long
Dim GiveItemNum As Long

ViewAuctionNum = buffer.ReadLong
'Exit out if it's not a real auction
If ViewAuctionNum <= 0 Then Exit Sub

'If it was a successul auction
If Auction(ViewAuctionNum).Status = Auction_Successful Then

'If the username is the same as the owner of the auction, let's give them their currency reward
If Trim(GetPlayerName(index)) = Trim(Auction(ViewAuctionNum).Owner) Then
GiveItemNum = Auction(ViewAuctionNum).Currency_ItemNum
ViewAuctionReward = Auction(ViewAuctionNum).Current_Bid
GiveInvItem index, GiveItemNum, ViewAuctionReward, True
Auction(ViewAuctionNum).Amount = 0
Auction(ViewAuctionNum).ItemNum = 0
Auction(ViewAuctionNum).Claimed = YES
Auction(ViewAuctionNum).Buyout_Bid = 0
Auction(ViewAuctionNum).MinuteCounter = 0
Auction(ViewAuctionNum).Currency_ItemNum = 0
End If
'if the username is the same as the highest bidder, we give them the item!
If Trim(GetPlayerName(index)) = Trim(Auction(ViewAuctionNum).Owner) Then
GiveItemNum = Auction(ViewAuctionNum).ItemNum
ViewAuctionReward = 1
GiveInvItem index, GiveItemNum, ViewAuctionReward, True
Auction(ViewAuctionNum).Amount = 0
Auction(ViewAuctionNum).ItemNum = 0
Auction(ViewAuctionNum).Claimed = YES
Auction(ViewAuctionNum).Buyout_Bid = 0
Auction(ViewAuctionNum).MinuteCounter = 0
Auction(ViewAuctionNum).Currency_ItemNum = 0
End If
End If
If Auction(ViewAuctionNum).Status = Auction_Expired Then
'If the username is the same as the owner of the auction, let's give them their currency reward
If Trim(GetPlayerName(index)) = Trim(Auction(ViewAuctionNum).Owner) Then
GiveItemNum = Auction(ViewAuctionNum).ItemNum
ViewAuctionReward = 1
GiveInvItem index, GiveItemNum, ViewAuctionReward, True
Auction(ViewAuctionNum).Amount = 0
Auction(ViewAuctionNum).ItemNum = 0
Auction(ViewAuctionNum).Claimed = YES
Auction(ViewAuctionNum).Buyout_Bid = 0
Auction(ViewAuctionNum).MinuteCounter = 0
Auction(ViewAuctionNum).Currency_ItemNum = 0
End If
End If
Call SendAuctionsToAll
Set buffer = Nothing
End Sub

```
Create a brand new module and paste the following code in

```
'Max Number of Auctions on going at any one time, this must match client and server!
Public Const MAX_AUCTIONS As Long = 20
'How long Auctions Appear in the Auction House for (in minutes)
Public Const MAX_AUCTION_TIME As Long = 120
'Auction DataType
Public Type AuctionRec
ItemNum As Long
Amount As Long
Owner As String
Current_Bid As Long
Current_Bid_Owner As String
Buyout_Bid As Long
Currency_ItemNum As Long
MinuteCounter As Long
Status As Byte
Claimed As Byte
End Type

'Auction Array
Public Auction(1 To MAX_AUCTIONS) As AuctionRec
'Used to Determine Auction Status when player comes back to the Auction House to see if anything has sold.
Public Const Auction_Running As Byte = 0
Public Const Auction_Successful As Byte = 1
Public Const Auction_Expired As Byte = 2
Public Sub CheckAuctions()
Dim i As Integer
For i = 1 To MAX_AUCTIONS
'We only check auctions that are currently running
If Auction(i).Status = Auction_Running Then

'Increase the Auction Minute Counter
Auction(i).MinuteCounter = Auction(i).MinuteCounter + 1

'We've hit the end of the timer for this auction,
If Auction(i).MinuteCounter >= MAX_AUCTION_TIME Then

'Let's see if we have a winner!
If Auction(i).Current_Bid > 0 And Auction(i).Current_Bid_Owner <> "" Then
Auction(i).Status = Auction_Successful
Auction(i).Claimed = NO
End If

'We didn't have a winner!
If Auction(i).Current_Bid = 0 And Auction(i).Current_Bid_Owner = "" Then
Auction(i).Status = Auction_Expired
Auction(i).Claimed = NO
End If

End If

End If

Next i
Call SendAuctionsToAll
End Sub
Public Sub SendAuctionsToAll()
Dim buffer As clsBuffer
Dim i As Long
Set buffer = New clsBuffer
buffer.WriteLong SSendAuctions
'Loop through and send each auction
For i = 1 To MAX_AUCTIONS
buffer.WriteLong Auction(i).ItemNum
buffer.WriteLong Auction(i).Amount
buffer.WriteString Auction(i).Owner
buffer.WriteLong Auction(i).Current_Bid
buffer.WriteString Auction(i).Current_Bid_Owner
buffer.WriteLong Auction(i).Buyout_Bid
buffer.WriteLong Auction(i).Currency_ItemNum
buffer.WriteLong Auction(i).MinuteCounter
buffer.WriteByte Auction(i).Status
buffer.WriteByte Auction(i).Claimed
Next i
SendDataToAll buffer.ToArray()
Set buffer = Nothing
End Sub
Public Sub SendAuctionsToIndex(ByVal index As Long)
Dim buffer As clsBuffer
Dim i As Long
Set buffer = New clsBuffer
buffer.WriteLong SSendAuctions
'Loop through and send each auction
For i = 1 To MAX_AUCTIONS
buffer.WriteLong Auction(i).ItemNum
buffer.WriteLong Auction(i).Amount
buffer.WriteString Auction(i).Owner
buffer.WriteLong Auction(i).Current_Bid
buffer.WriteString Auction(i).Current_Bid_Owner
buffer.WriteLong Auction(i).Buyout_Bid
buffer.WriteLong Auction(i).Currency_ItemNum
buffer.WriteLong Auction(i).MinuteCounter
buffer.WriteLong Auction(i).Status
buffer.WriteLong Auction(i).Claimed
Next i
SendDataTo index, buffer.ToArray()
Set buffer = Nothing
End Sub
Public Sub SaveAuctions()
'Vars
Dim FileName As String
Dim i As Long
'The Auction File stored in your server's app.data path
FileName = App.path & "\data\auctions.dat"
'Loop through each auction and save it in the file
For i = 1 To MAX_AUCTIONS
Call PutVar(FileName, "AUCTION" & i, "ItemNum", STR(Auction(i).ItemNum))
Call PutVar(FileName, "AUCTION" & i, "Amount", STR(Auction(i).Amount))
Call PutVar(FileName, "AUCTION" & i, "Owner", Auction(i).Owner)
Call PutVar(FileName, "AUCTION" & i, "Current_Bid", STR(Auction(i).Current_Bid))
Call PutVar(FileName, "AUCTION" & i, "Current_Bid_Owner", Auction(i).Current_Bid_Owner)
Call PutVar(FileName, "AUCTION" & i, "Buyout_Bid", STR(Auction(i).Buyout_Bid))
Call PutVar(FileName, "AUCTION" & i, "Currency_ItemNum", STR(Auction(i).Currency_ItemNum))
Call PutVar(FileName, "AUCTION" & i, "MinuteCounter", STR(Auction(i).MinuteCounter))
Call PutVar(FileName, "AUCTION" & i, "Status", STR(Auction(i).Status))
Call PutVar(FileName, "AUCTION" & i, "Claimed", STR(Auction(i).Claimed))
Next i
Call SendAuctionsToAll
End Sub
Public Sub LoadAuctions()
'Vars
Dim FileName As String
Dim i As Long
'The Auction File stored in your server's app.data path
FileName = App.path & "\data\auctions.dat"
'Loop through each auction and save it in the file
For i = 1 To MAX_AUCTIONS
Auction(i).ItemNum = Val(GetVar(FileName, "AUCTION" & i, "ItemNum"))
Auction(i).Amount = Val(GetVar(FileName, "AUCTION" & i, "Amount"))
Auction(i).Owner = GetVar(FileName, "AUCTION" & i, "Owner")
Auction(i).Current_Bid = Val(GetVar(FileName, "AUCTION" & i, "Current_Bid"))
Auction(i).Current_Bid_Owner = GetVar(FileName, "AUCTION" & i, "Current_Bid_Owner")
Auction(i).Buyout_Bid = Val(GetVar(FileName, "AUCTION" & i, "Buyout_Bid"))
Auction(i).Currency_ItemNum = Val(GetVar(FileName, "AUCTION" & i, "Currency_ItemNum"))
Auction(i).MinuteCounter = Val(GetVar(FileName, "AUCTION" & i, "MinuteCounter"))
Auction(i).Status = Val(GetVar(FileName, "AUCTION" & i, "Status"))
Auction(i).Claimed = Val(GetVar(FileName, "AUCTION" & i, "Claimed"))
Next i
End Sub

```

**Client Side AND Server Side**

In modEnumerations, at the bottom, just ABOVE CMSG_COUNT, add

```
CSaveAuction
CAuctionBid
CClaimAuction

```
In modEnumerations, at the bottom, just ABOVE SMSG_COUNT, add

```
SSendAuctions

```

**CLIENT SIDE**

In modGraphics, Sub DrawGDI, just after where it says If frmMain.picTrade.Visible Then DrawTrade add,

```
If frmMain.picAuction.Visible Then DrawNewAuctionItem
If frmMain.picAuction.Visible Then DrawNewAuctionCurrencyItem
If frmMain.picAuction.Visible Then DrawViewAuctionItem

```
In modHandleData, in Sub InitMessages, at the bottom add

```
HandleDataSub(SSendAuctions) = GetAddress(AddressOf HandleSendAuctions)

```
At the bottom of modHandleData add the following new Sub,

```
Private Sub HandleSendAuctions(ByVal Index As Long, ByRef data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim buffer As clsBuffer
Dim i As Long

'Clear the List of Auctions on the Main Page
frmMain.listAuctions.Clear
Set buffer = New clsBuffer
buffer.WriteBytes data()
For i = 1 To MAX_AUCTIONS
Auction(i).ItemNum = buffer.ReadLong
Auction(i).Amount = buffer.ReadLong
Auction(i).Owner = buffer.ReadString
Auction(i).Current_Bid = buffer.ReadLong
Auction(i).Current_Bid_Owner = buffer.ReadString
Auction(i).Buyout_Bid = buffer.ReadLong
Auction(i).Currency_ItemNum = buffer.ReadLong
Auction(i).MinuteCounter = buffer.ReadLong
Auction(i).Status = buffer.ReadByte
Auction(i).Claimed = buffer.ReadByte
'Add running items to the list
If Auction(i).Status = Auction_Running Then
If Auction(i).ItemNum > 0 Then
frmMain.listAuctions.AddItem Trim(Item(Auction(i).ItemNum).name) & " [Current Bid: " & Auction(i).Current_Bid & " " & Trim(Item(Auction(i).Currency_ItemNum).name) & "] - [Buyout: " & Auction(i).Buyout_Bid & "] " & Trim(Item(Auction(i).Currency_ItemNum).name)
Else
frmMain.listAuctions.AddItem "Available Auction Slot"
End If
End If
'Add successful items to the list
If Auction(i).Status = Auction_Successful Then
If Auction(i).ItemNum > 0 Then
frmMain.listAuctions.AddItem "Ended Successfully - " & Trim(Item(Auction(i).ItemNum).name) & " [Current Bid: " & Auction(i).Current_Bid & " " & Trim(Item(Auction(i).Currency_ItemNum).name) & "]"
Else
frmMain.listAuctions.AddItem "Available Auction Slot"
End If
End If
'Add expired items to the list
If Auction(i).Status = Auction_Expired Then
If Auction(i).ItemNum > 0 Then
frmMain.listAuctions.AddItem "Expired - " & Trim(Item(Auction(i).ItemNum).name) & " [Current Bid: " & Auction(i).Current_Bid & " " & Trim(Item(Auction(i).Currency_ItemNum).name) & "]"
Else
frmMain.listAuctions.AddItem "Available Auction Slot"
End If
End If
Next i
End Sub

```
Create a brand new Module, called modAuctions and paste this code in

```
Public InventoryCurX As Single
Public InventoryCurY As Single
'Max Number of Auctions on going at any one time, this must match client and server!
Public Const MAX_AUCTIONS As Long = 20
'How long Auctions Appear in the Auction House for (in minutes)
Public Const MAX_AUCTION_TIME As Long = 120
'Auction DataType
Public Type AuctionRec
ItemNum As Long
Amount As Long
Owner As String
Current_Bid As Long
Current_Bid_Owner As String
Buyout_Bid As Long
Currency_ItemNum As Long
MinuteCounter As Long
Status As Byte
Claimed As Byte
End Type
'Used to Store info about a new auction we are creating
Public New_Auction As AuctionRec
'Auction Array
Public Auction(1 To MAX_AUCTIONS) As AuctionRec
'Store the ID of the Auction we are viewing
Public ViewAuctionNum As Long
'Used for Dragging from picInventory
Public Auction_InvNum As Long
'Used to Determine Auction Status when player comes back to the Auction House to see if anything has sold.
Public Const Auction_Running As Byte = 0
Public Const Auction_Successful As Byte = 1
Public Const Auction_Expired As Byte = 2
'Save an Auction
Public Sub SaveAuction()
New_Auction.Current_Bid = frmMain.txtStartingAmount.text
New_Auction.Buyout_Bid = frmMain.txtBuyoutAmount.text
New_Auction.Amount = 1
Dim buffer As clsBuffer
Set buffer = New clsBuffer
buffer.WriteLong CSaveAuction
buffer.WriteLong New_Auction.ItemNum
buffer.WriteLong New_Auction.Amount
buffer.WriteLong New_Auction.Current_Bid
buffer.WriteLong New_Auction.Buyout_Bid
buffer.WriteLong New_Auction.Currency_ItemNum
SendData buffer.ToArray()
Set buffer = Nothing
End Sub
Public Sub ClaimAuction()
Dim buffer As clsBuffer
Set buffer = New clsBuffer
buffer.WriteLong CClaimAuction
buffer.WriteLong ViewAuctionNum
SendData buffer.ToArray
Set buffer = Nothing
End Sub
Public Sub BidAuction()
Dim buffer As clsBuffer
Dim AuctionBid As Long
AuctionBid = Val(frmMain.txtAuctionBid.text)
Set buffer = New clsBuffer
buffer.WriteLong CAuctionBid
buffer.WriteLong ViewAuctionNum
buffer.WriteLong AuctionBid
SendData buffer.ToArray
Set buffer = Nothing
End Sub
Public Sub DrawNewAuctionItem()
Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECT
Dim ItemNum As Long, itempic As Long
ItemNum = New_Auction.ItemNum

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

If itempic = 0 Then Exit Sub

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

With rec
.Top = 0
.Bottom = .Top + PIC_Y
.Left = Tex_Item(itempic).Width / 2
.Right = .Left + PIC_X
End With
With rec_pos
.Top = 2
.Bottom = .Top + PIC_Y
.Left = 2
.Right = .Left + PIC_X
End With
RenderTextureByRects Tex_Item(itempic), rec, rec_pos
With frmMain.picNewAuctionItem
.Visible = True
.ZOrder (0)
End With
With srcRect
.x1 = 0
.x2 = 32
.y1 = 0
.y2 = 32
End With
With destRect
.x1 = 2
.y1 = 2
.y2 = .y1 + 32
.x2 = .x1 + 32
End With
Direct3D_Device.EndScene
Direct3D_Device.Present srcRect, destRect, frmMain.picNewAuctionItem.hwnd, ByVal (0)
End If

End Sub
Public Sub DrawNewAuctionCurrencyItem()
Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECT
Dim ItemNum As Long, itempic As Long
ItemNum = New_Auction.Currency_ItemNum

If ItemNum > 0 And ItemNum <= MAX_ITEMS Then
itempic = New_Auction.Currency_ItemNum

If itempic = 0 Then Exit Sub

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

With rec
.Top = 0
.Bottom = .Top + PIC_Y
.Left = Tex_Item(itempic).Width / 2
.Right = .Left + PIC_X
End With
With rec_pos
.Top = 2
.Bottom = .Top + PIC_Y
.Left = 2
.Right = .Left + PIC_X
End With
RenderTextureByRects Tex_Item(itempic), rec, rec_pos
With frmMain.picNewAuctionCurrency
.Visible = True
.ZOrder (0)
End With
With srcRect
.x1 = 0
.x2 = 32
.y1 = 0
.y2 = 32
End With
With destRect
.x1 = 2
.y1 = 2
.y2 = .y1 + 32
.x2 = .x1 + 32
End With
Direct3D_Device.EndScene
Direct3D_Device.Present srcRect, destRect, frmMain.picNewAuctionCurrency.hwnd, ByVal (0)
End If

End Sub
Public Sub DrawViewAuctionItem()
Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECT
Dim ItemNum As Long, itempic As Long
If Not frmMain.picViewAuction.Visible Then Exit Sub
ItemNum = Auction(ViewAuctionNum).ItemNum

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

If itempic = 0 Then Exit Sub

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

With rec
.Top = 0
.Bottom = .Top + PIC_Y
.Left = Tex_Item(itempic).Width / 2
.Right = .Left + PIC_X
End With
With rec_pos
.Top = 2
.Bottom = .Top + PIC_Y
.Left = 2
.Right = .Left + PIC_X
End With
RenderTextureByRects Tex_Item(itempic), rec, rec_pos
With frmMain.picViewAuctionItem
.Visible = True
.ZOrder (0)
End With
With srcRect
.x1 = 0
.x2 = 32
.y1 = 0
.y2 = 32
End With
With destRect
.x1 = 2
.y1 = 2
.y2 = .y1 + 32
.x2 = .x1 + 32
End With
Direct3D_Device.EndScene
Direct3D_Device.Present srcRect, destRect, frmMain.picViewAuctionItem.hwnd, ByVal (0)
End If

End Sub

```
Link to comment
Share on other sites

I use Eclipse Worlds based on EO 3.0 and i want add "surfaces" like CS:DE and Fullscreen Mode with options on/off.

I find this: [http://www.eclipseorigins.com/community/index.php?/topic/133205-emega-how-to-make-an-entrance-animation-equal-to-cs-in-emega-surfaces/?hl=surface](http://www.eclipseorigins.com/community/index.php?/topic/133205-emega-how-to-make-an-entrance-animation-equal-to-cs-in-emega-surfaces/?hl=surface) but it is not compatible.

Whether the pet system is compatible with EO 3.0?

On forum we have "map instances system" so maybe good option will be add "random dungeon finder" like in wow?

For example for 5 players?
[http://www.eclipseorigins.com/community/index.php?/topic/134336-eo-map-instances/?hl=system">http://www.eclipseorigins.com/community/index.php?/topic/134336-eo-map-instances/?hl=system](http://www.eclipseorigins.com/community/index.php?/topic/134336-eo-map-instances/?hl=system)
Link to comment
Share on other sites

Oh wow Rob this is amazing. I can't believe you actually took on that auction system request let alone putting it up for download. Good job man. I'm just hoping you don't get burnt out on doing request before I get to the point where I can to make one. This totally inspires me to start working on my game so I am sure it does for others as well. I'm glad to see you really helping out the community in a big way.
Link to comment
Share on other sites

I'm going to request one that I know many users would want, and had trouble with in the past. How would one go about properly resizing the game screen for a DX7 or DX8 engine? Both would be nice, if possible.
Link to comment
Share on other sites

matt that is good idea!!!

1 vs 1 pvp so when i ask other player on duel and if he click yes then we can start dueling but other ppl cant attack us 

Hit animation so if we attack monster or monster attack us it will show hit animation (but just for critical hit)

Also would be cool to add something like questions on registration and when player forget his password he can answer on that question and get his password back exemple : 

Your dog name : 

he put Buby 

or Your school name etc….

also tnx rob !!!!!  you dont need to do this just ideas ~!
Link to comment
Share on other sites

> Peaverin, the way you're asking for is how EO does it by default in 3.0 and older I believe
>
>  
>
> But if you're using a custom version that uses a different method, it's quite simple to change back.
>
>  
>
> **[Client Side]**
>
>  
>
> Step 1: In client, modGraphics, find Sub DrawPlayer, find where it says 'Set the Left and replace it with the following.
>
> ```
> ' Set the left
>     Select Case GetPlayerDir(Index)
>         Case DIR_UP
>             spritetop = 3
>         Case DIR_RIGHT
>             spritetop = 2
>         Case DIR_DOWN
>             spritetop = 0
>         Case DIR_LEFT
>             spritetop = 1
>     End Select
>
> ```
> Step 2: in modGraphics, find DrawNPC, and replace the lines after 'Set the left with the following,
>
> ```
> ' Set the left
>     Select Case MapNpc(MapNpcNum).Dir
>         Case DIR_UP
>             spritetop = 3
>         Case DIR_RIGHT
>             spritetop = 2
>         Case DIR_DOWN
>             spritetop = 0
>         Case DIR_LEFT
>             spritetop = 1
>     End Select
>
> ```

It's already like this on my custom engine, that's why I don't know how to change it. Here's the source code of my custom engine client so maybe you can see what's the problem here.  [http://www.mediafire.com/download/6b01e5oy4sreco1/Data.rar](http://www.mediafire.com/download/6b01e5oy4sreco1/Data.rar)
Link to comment
Share on other sites

> @ Render, here's an Auction House System
>
>  
>
> You'll want to tweak the settings as you want!
>
>  
>
> It allows you to post items, and the currency, so you can post a Dagger for Example, but set it so that you only want bids in Gold, or Bids in whatever item you want!
>
> There is a button on the Form, but you could easily set this to be activated by an NPC with a little tweaking
>
> Bidding higher than the buyout will automatically give you an item
>
> By default the constants allow bids to be online for 2 hours, you can change this with a single line, same with the maximum number of auctions.
>
> Use drag and drop to auction off items In the Post Auction Window.
>
> When an auction ends or someone buys it out, it is up to the seller to check their auctions and claim their reward.
>
> It is up to the seller to check auctions and reclaim any items that have expired.
>
>  
>
> You can download the complete system here [http://www.canadianparamedicjobs.ca/updater/EOWithAuctions.zip](http://www.canadianparamedicjobs.ca/updater/EOWithAuctions.zip)
>
>
> >! ![](http://www.canadianparamedicjobs.ca/updater/auction1.png)
> >!  
> >! ![](http://www.canadianparamedicjobs.ca/updater/auction2.png)
> >!  
> >! ![](http://www.canadianparamedicjobs.ca/updater/auction3.png)
> >!  
> >! Otherwise, this is the tutorial (you'll need to copy the Control Objects like the Listboxes and Picture Boxes from the source I've attached!)
> >!  
> >!  
> >! **SERVER SIDE**
> >! In modHandleData, at the bottom of InitMessages add
> >! ```
> HandleDataSub(CSaveAuction) = GetAddress(AddressOf HandleSaveAuction)
> HandleDataSub(CAuctionBid) = GetAddress(AddressOf HandleAuctionBid)
> HandleDataSub(CClaimAuction) = GetAddress(AddressOf HandleClaimAuction)
> >! ```
> In modServerLoop, after it does the top dim's for dim tmr1000, add the following
> >! ```
> 'For Auction house
> Dim Seconds As Long
> >! ```
> Further down in the Sub ServerLoop, after tmr1000 = GetTickCount + 1000 add.
> >! ```
> Seconds = Seconds + 1
> If Seconds >= 60 Then
> CheckAuctions
> Seconds = 0
> End If
> >! ```
> In modPlayer, find Sub JoinGame, after it sends the welcome message, add
> >! ```
> Call SendAuctionsToAll
> >! ```
> In modGeneral, Sub InitServer, after Load SystemTray, add
> >! ```
> Call SetStatus("Loading Auctions...")
> Call LoadAuctions
> >! ```
> In subHandleData, at the bottom Add a new Sub
> >! ```
> Sub HandleSaveAuction(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
> Dim AuctionSlot As Long
> Dim buffer As clsBuffer, i As Long
> Dim FoundAuction As Boolean
>  
> Set buffer = New clsBuffer
> buffer.WriteBytes Data()
>  
> 'Default Auction Slot
> FoundAuction = False
>  
> 'First let's see if we have any available slots open for a new auction! (We will find any with a Claimed status and reuse it!
> For i = 1 To MAX_AUCTIONS
> If FoundAuction = False Then
> If Auction(i).ItemNum = 0 Then
> FoundAuction = True
> AuctionSlot = i
> End If
> End If
> Next i
>  
> 'We have room!
> If AuctionSlot > 0 Then
> 'Let's see if we can take the item,
>  
> Auction(AuctionSlot).ItemNum = buffer.ReadLong
> Auction(AuctionSlot).Amount = buffer.ReadLong
> Auction(AuctionSlot).Current_Bid = buffer.ReadLong
> Auction(AuctionSlot).Buyout_Bid = buffer.ReadLong
> Auction(AuctionSlot).Currency_ItemNum = buffer.ReadLong
> Auction(AuctionSlot).Owner = GetPlayerName(index)
> Auction(AuctionSlot).Current_Bid_Owner = GetPlayerName(index)
> Auction(AuctionSlot).Status = Auction_Running
> Auction(AuctionSlot).Claimed = NO
> Auction(AuctionSlot).MinuteCounter = 1
> TakeInvItem index, Auction(AuctionSlot).ItemNum, 1
> Call SaveAuctions
> Call PlayerMsg(index, "Auction Posted!", BrightGreen)
> End If
>  
> 'No room for auctions, tell the user!
> If AuctionSlot = 0 Then
> Call PlayerMsg(index, "There is no more room for any auctions at the moment, wait until current auctions end or contact an Administrator!", BrightRed)
> End If
>  
> Set buffer = Nothing
>  
> End Sub
> Sub HandleAuctionBid(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
>  
> Dim ViewAuctionNum As Long
> Dim ViewAuctionBid As Long
> Dim TakeItemNum As Long
> Dim buffer As clsBuffer, i As Long
> Set buffer = New clsBuffer
>  
>  
>  
> buffer.WriteBytes Data()
> ViewAuctionNum = buffer.ReadLong
> ViewAuctionBid = buffer.ReadLong
> TakeItemNum = Auction(ViewAuctionNum).Currency_ItemNum
> Call PlayerMsg(index, "You've bid " & ViewAuctionBid & " " & Trim(Item(Auction(ViewAuctionNum).Currency_ItemNum).Name) & " on " & Trim(Item(Auction(ViewAuctionNum).ItemNum).Name), BrightGreen)
> If TakeInvItem(index, TakeItemNum, ViewAuctionBid) = False Then
>  
> 'Let's see if we only bid, or if we paid the Bought Out!
> If ViewAuctionBid < Auction(ViewAuctionNum).Buyout_Bid Then
> Auction(ViewAuctionNum).Current_Bid = ViewAuctionBid
> Auction(ViewAuctionNum).Current_Bid_Owner = Trim(GetPlayerName(index))
> Call SendAuctionsToAll
> Call PlayerMsg(index, "You successfully bid on " & Trim(Item(Auction(ViewAuctionNum).ItemNum).Name), BrightGreen)
> End If
>  
> 'If we bought out the item!
> If ViewAuctionBid >= Auction(ViewAuctionNum).Buyout_Bid Then
> Auction(ViewAuctionNum).Current_Bid = ViewAuctionBid
> Auction(ViewAuctionNum).Current_Bid_Owner = Trim(GetPlayerName(index))
> Auction(ViewAuctionNum).Status = Auction_Successful
> GiveInvItem index, Auction(ViewAuctionNum).ItemNum, 1, True
> Call SendAuctionsToAll
> Call PlayerMsg(index, "You successfully bought out " & Trim(Item(Auction(ViewAuctionNum).ItemNum).Name), BrightGreen)
> End If
> Else
> Call PlayerMsg(index, "Not enough " & Trim(Item(TakeItemNum).Name) & "!", BrightRed)
> End If
>  
>  
>  
> End Sub
> Sub HandleClaimAuction(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
> Dim buffer As clsBuffer, i As Long
> Set buffer = New clsBuffer
> buffer.WriteBytes Data()
>
> Dim ViewAuctionNum As Long
> Dim ViewAuctionReward As Long
> Dim GiveItemNum As Long
>  
> ViewAuctionNum = buffer.ReadLong
> 'Exit out if it's not a real auction
> If ViewAuctionNum <= 0 Then Exit Sub
>
>
> 'If it was a successul auction
> If Auction(ViewAuctionNum).Status = Auction_Successful Then
>  
> 'If the username is the same as the owner of the auction, let's give them their currency reward
> If Trim(GetPlayerName(index)) = Trim(Auction(ViewAuctionNum).Owner) Then
> GiveItemNum = Auction(ViewAuctionNum).Currency_ItemNum
> ViewAuctionReward = Auction(ViewAuctionNum).Current_Bid
> GiveInvItem index, GiveItemNum, ViewAuctionReward, True
> Auction(ViewAuctionNum).Amount = 0
> Auction(ViewAuctionNum).ItemNum = 0
> Auction(ViewAuctionNum).Claimed = YES
> Auction(ViewAuctionNum).Buyout_Bid = 0
> Auction(ViewAuctionNum).MinuteCounter = 0
> Auction(ViewAuctionNum).Currency_ItemNum = 0
> End If
> 'if the username is the same as the highest bidder, we give them the item!
> If Trim(GetPlayerName(index)) = Trim(Auction(ViewAuctionNum).Owner) Then
> GiveItemNum = Auction(ViewAuctionNum).ItemNum
> ViewAuctionReward = 1
> GiveInvItem index, GiveItemNum, ViewAuctionReward, True
> Auction(ViewAuctionNum).Amount = 0
> Auction(ViewAuctionNum).ItemNum = 0
> Auction(ViewAuctionNum).Claimed = YES
> Auction(ViewAuctionNum).Buyout_Bid = 0
> Auction(ViewAuctionNum).MinuteCounter = 0
> Auction(ViewAuctionNum).Currency_ItemNum = 0
> End If
> End If
> If Auction(ViewAuctionNum).Status = Auction_Expired Then
> 'If the username is the same as the owner of the auction, let's give them their currency reward
> If Trim(GetPlayerName(index)) = Trim(Auction(ViewAuctionNum).Owner) Then
> GiveItemNum = Auction(ViewAuctionNum).ItemNum
> ViewAuctionReward = 1
> GiveInvItem index, GiveItemNum, ViewAuctionReward, True
> Auction(ViewAuctionNum).Amount = 0
> Auction(ViewAuctionNum).ItemNum = 0
> Auction(ViewAuctionNum).Claimed = YES
> Auction(ViewAuctionNum).Buyout_Bid = 0
> Auction(ViewAuctionNum).MinuteCounter = 0
> Auction(ViewAuctionNum).Currency_ItemNum = 0
> End If
> End If
> Call SendAuctionsToAll
> Set buffer = Nothing
> End Sub
> >! ```
> Create a brand new module and paste the following code in
> >! ```
> 'Max Number of Auctions on going at any one time, this must match client and server!
> Public Const MAX_AUCTIONS As Long = 20
> 'How long Auctions Appear in the Auction House for (in minutes)
> Public Const MAX_AUCTION_TIME As Long = 120
> 'Auction DataType
> Public Type AuctionRec
> ItemNum As Long
> Amount As Long
> Owner As String
> Current_Bid As Long
> Current_Bid_Owner As String
> Buyout_Bid As Long
> Currency_ItemNum As Long
> MinuteCounter As Long
> Status As Byte
> Claimed As Byte
> End Type
>
> 'Auction Array
> Public Auction(1 To MAX_AUCTIONS) As AuctionRec
> 'Used to Determine Auction Status when player comes back to the Auction House to see if anything has sold.
> Public Const Auction_Running As Byte = 0
> Public Const Auction_Successful As Byte = 1
> Public Const Auction_Expired As Byte = 2
> Public Sub CheckAuctions()
> Dim i As Integer
> For i = 1 To MAX_AUCTIONS
> 'We only check auctions that are currently running
> If Auction(i).Status = Auction_Running Then
>  
> 'Increase the Auction Minute Counter
> Auction(i).MinuteCounter = Auction(i).MinuteCounter + 1
>  
> 'We've hit the end of the timer for this auction,
> If Auction(i).MinuteCounter >= MAX_AUCTION_TIME Then
>  
> 'Let's see if we have a winner!
> If Auction(i).Current_Bid > 0 And Auction(i).Current_Bid_Owner <> "" Then
> Auction(i).Status = Auction_Successful
> Auction(i).Claimed = NO
> End If
>  
> 'We didn't have a winner!
> If Auction(i).Current_Bid = 0 And Auction(i).Current_Bid_Owner = "" Then
> Auction(i).Status = Auction_Expired
> Auction(i).Claimed = NO
> End If
>  
> End If
>  
> End If
>  
> Next i
> Call SendAuctionsToAll
> End Sub
> Public Sub SendAuctionsToAll()
> Dim buffer As clsBuffer
> Dim i As Long
> Set buffer = New clsBuffer
> buffer.WriteLong SSendAuctions
> 'Loop through and send each auction
> For i = 1 To MAX_AUCTIONS
> buffer.WriteLong Auction(i).ItemNum
> buffer.WriteLong Auction(i).Amount
> buffer.WriteString Auction(i).Owner
> buffer.WriteLong Auction(i).Current_Bid
> buffer.WriteString Auction(i).Current_Bid_Owner
> buffer.WriteLong Auction(i).Buyout_Bid
> buffer.WriteLong Auction(i).Currency_ItemNum
> buffer.WriteLong Auction(i).MinuteCounter
> buffer.WriteByte Auction(i).Status
> buffer.WriteByte Auction(i).Claimed
> Next i
> SendDataToAll buffer.ToArray()
> Set buffer = Nothing
> End Sub
> Public Sub SendAuctionsToIndex(ByVal index As Long)
> Dim buffer As clsBuffer
> Dim i As Long
> Set buffer = New clsBuffer
> buffer.WriteLong SSendAuctions
> 'Loop through and send each auction
> For i = 1 To MAX_AUCTIONS
> buffer.WriteLong Auction(i).ItemNum
> buffer.WriteLong Auction(i).Amount
> buffer.WriteString Auction(i).Owner
> buffer.WriteLong Auction(i).Current_Bid
> buffer.WriteString Auction(i).Current_Bid_Owner
> buffer.WriteLong Auction(i).Buyout_Bid
> buffer.WriteLong Auction(i).Currency_ItemNum
> buffer.WriteLong Auction(i).MinuteCounter
> buffer.WriteLong Auction(i).Status
> buffer.WriteLong Auction(i).Claimed
> Next i
> SendDataTo index, buffer.ToArray()
> Set buffer = Nothing
> End Sub
> Public Sub SaveAuctions()
> 'Vars
> Dim FileName As String
> Dim i As Long
> 'The Auction File stored in your server's app.data path
> FileName = App.path & "\data\auctions.dat"
> 'Loop through each auction and save it in the file
> For i = 1 To MAX_AUCTIONS
> Call PutVar(FileName, "AUCTION" & i, "ItemNum", STR(Auction(i).ItemNum))
> Call PutVar(FileName, "AUCTION" & i, "Amount", STR(Auction(i).Amount))
> Call PutVar(FileName, "AUCTION" & i, "Owner", Auction(i).Owner)
> Call PutVar(FileName, "AUCTION" & i, "Current_Bid", STR(Auction(i).Current_Bid))
> Call PutVar(FileName, "AUCTION" & i, "Current_Bid_Owner", Auction(i).Current_Bid_Owner)
> Call PutVar(FileName, "AUCTION" & i, "Buyout_Bid", STR(Auction(i).Buyout_Bid))
> Call PutVar(FileName, "AUCTION" & i, "Currency_ItemNum", STR(Auction(i).Currency_ItemNum))
> Call PutVar(FileName, "AUCTION" & i, "MinuteCounter", STR(Auction(i).MinuteCounter))
> Call PutVar(FileName, "AUCTION" & i, "Status", STR(Auction(i).Status))
> Call PutVar(FileName, "AUCTION" & i, "Claimed", STR(Auction(i).Claimed))
> Next i
> Call SendAuctionsToAll
> End Sub
> Public Sub LoadAuctions()
> 'Vars
> Dim FileName As String
> Dim i As Long
> 'The Auction File stored in your server's app.data path
> FileName = App.path & "\data\auctions.dat"
> 'Loop through each auction and save it in the file
> For i = 1 To MAX_AUCTIONS
> Auction(i).ItemNum = Val(GetVar(FileName, "AUCTION" & i, "ItemNum"))
> Auction(i).Amount = Val(GetVar(FileName, "AUCTION" & i, "Amount"))
> Auction(i).Owner = GetVar(FileName, "AUCTION" & i, "Owner")
> Auction(i).Current_Bid = Val(GetVar(FileName, "AUCTION" & i, "Current_Bid"))
> Auction(i).Current_Bid_Owner = GetVar(FileName, "AUCTION" & i, "Current_Bid_Owner")
> Auction(i).Buyout_Bid = Val(GetVar(FileName, "AUCTION" & i, "Buyout_Bid"))
> Auction(i).Currency_ItemNum = Val(GetVar(FileName, "AUCTION" & i, "Currency_ItemNum"))
> Auction(i).MinuteCounter = Val(GetVar(FileName, "AUCTION" & i, "MinuteCounter"))
> Auction(i).Status = Val(GetVar(FileName, "AUCTION" & i, "Status"))
> Auction(i).Claimed = Val(GetVar(FileName, "AUCTION" & i, "Claimed"))
> Next i
> End Sub
> >! ```
>
> >!
> >!
> >! **Client Side AND Server Side**
> >! In modEnumerations, at the bottom, just ABOVE CMSG_COUNT, add
> >! ```
> CSaveAuction
> CAuctionBid
> CClaimAuction
> >! ```
> In modEnumerations, at the bottom, just ABOVE SMSG_COUNT, add
> >! ```
> SSendAuctions
> >! ```
>
> >! **CLIENT SIDE**
> >! In modGraphics, Sub DrawGDI, just after where it says If frmMain.picTrade.Visible Then DrawTrade add,
> >! ```
> If frmMain.picAuction.Visible Then DrawNewAuctionItem
> If frmMain.picAuction.Visible Then DrawNewAuctionCurrencyItem
> If frmMain.picAuction.Visible Then DrawViewAuctionItem
> >! ```
> In modHandleData, in Sub InitMessages, at the bottom add
> >! ```
> HandleDataSub(SSendAuctions) = GetAddress(AddressOf HandleSendAuctions)
> >! ```
> At the bottom of modHandleData add the following new Sub,
> >! ```
> Private Sub HandleSendAuctions(ByVal Index As Long, ByRef data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
> Dim buffer As clsBuffer
> Dim i As Long
>
> 'Clear the List of Auctions on the Main Page
> frmMain.listAuctions.Clear
> Set buffer = New clsBuffer
> buffer.WriteBytes data()
> For i = 1 To MAX_AUCTIONS
> Auction(i).ItemNum = buffer.ReadLong
> Auction(i).Amount = buffer.ReadLong
> Auction(i).Owner = buffer.ReadString
> Auction(i).Current_Bid = buffer.ReadLong
> Auction(i).Current_Bid_Owner = buffer.ReadString
> Auction(i).Buyout_Bid = buffer.ReadLong
> Auction(i).Currency_ItemNum = buffer.ReadLong
> Auction(i).MinuteCounter = buffer.ReadLong
> Auction(i).Status = buffer.ReadByte
> Auction(i).Claimed = buffer.ReadByte
> 'Add running items to the list
> If Auction(i).Status = Auction_Running Then
> If Auction(i).ItemNum > 0 Then
> frmMain.listAuctions.AddItem Trim(Item(Auction(i).ItemNum).name) & " [Current Bid: " & Auction(i).Current_Bid & " " & Trim(Item(Auction(i).Currency_ItemNum).name) & "] - [Buyout: " & Auction(i).Buyout_Bid & "] " & Trim(Item(Auction(i).Currency_ItemNum).name)
> Else
> frmMain.listAuctions.AddItem "Available Auction Slot"
> End If
> End If
> 'Add successful items to the list
> If Auction(i).Status = Auction_Successful Then
> If Auction(i).ItemNum > 0 Then
> frmMain.listAuctions.AddItem "Ended Successfully - " & Trim(Item(Auction(i).ItemNum).name) & " [Current Bid: " & Auction(i).Current_Bid & " " & Trim(Item(Auction(i).Currency_ItemNum).name) & "]"
> Else
> frmMain.listAuctions.AddItem "Available Auction Slot"
> End If
> End If
> 'Add expired items to the list
> If Auction(i).Status = Auction_Expired Then
> If Auction(i).ItemNum > 0 Then
> frmMain.listAuctions.AddItem "Expired - " & Trim(Item(Auction(i).ItemNum).name) & " [Current Bid: " & Auction(i).Current_Bid & " " & Trim(Item(Auction(i).Currency_ItemNum).name) & "]"
> Else
> frmMain.listAuctions.AddItem "Available Auction Slot"
> End If
> End If
> Next i
> End Sub
> >! ```
> Create a brand new Module, called modAuctions and paste this code in
> >! ```
> Public InventoryCurX As Single
> Public InventoryCurY As Single
> 'Max Number of Auctions on going at any one time, this must match client and server!
> Public Const MAX_AUCTIONS As Long = 20
> 'How long Auctions Appear in the Auction House for (in minutes)
> Public Const MAX_AUCTION_TIME As Long = 120
> 'Auction DataType
> Public Type AuctionRec
> ItemNum As Long
> Amount As Long
> Owner As String
> Current_Bid As Long
> Current_Bid_Owner As String
> Buyout_Bid As Long
> Currency_ItemNum As Long
> MinuteCounter As Long
> Status As Byte
> Claimed As Byte
> End Type
> 'Used to Store info about a new auction we are creating
> Public New_Auction As AuctionRec
> 'Auction Array
> Public Auction(1 To MAX_AUCTIONS) As AuctionRec
> 'Store the ID of the Auction we are viewing
> Public ViewAuctionNum As Long
> 'Used for Dragging from picInventory
> Public Auction_InvNum As Long
> 'Used to Determine Auction Status when player comes back to the Auction House to see if anything has sold.
> Public Const Auction_Running As Byte = 0
> Public Const Auction_Successful As Byte = 1
> Public Const Auction_Expired As Byte = 2
> 'Save an Auction
> Public Sub SaveAuction()
> New_Auction.Current_Bid = frmMain.txtStartingAmount.text
> New_Auction.Buyout_Bid = frmMain.txtBuyoutAmount.text
> New_Auction.Amount = 1
> Dim buffer As clsBuffer
> Set buffer = New clsBuffer
> buffer.WriteLong CSaveAuction
> buffer.WriteLong New_Auction.ItemNum
> buffer.WriteLong New_Auction.Amount
> buffer.WriteLong New_Auction.Current_Bid
> buffer.WriteLong New_Auction.Buyout_Bid
> buffer.WriteLong New_Auction.Currency_ItemNum
> SendData buffer.ToArray()
> Set buffer = Nothing
> End Sub
> Public Sub ClaimAuction()
> Dim buffer As clsBuffer
> Set buffer = New clsBuffer
> buffer.WriteLong CClaimAuction
> buffer.WriteLong ViewAuctionNum
> SendData buffer.ToArray
> Set buffer = Nothing
> End Sub
> Public Sub BidAuction()
> Dim buffer As clsBuffer
> Dim AuctionBid As Long
> AuctionBid = Val(frmMain.txtAuctionBid.text)
> Set buffer = New clsBuffer
> buffer.WriteLong CAuctionBid
> buffer.WriteLong ViewAuctionNum
> buffer.WriteLong AuctionBid
> SendData buffer.ToArray
> Set buffer = Nothing
> End Sub
> Public Sub DrawNewAuctionItem()
> Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECT
> Dim ItemNum As Long, itempic As Long
> ItemNum = New_Auction.ItemNum
>  
> If ItemNum > 0 And ItemNum <= MAX_ITEMS Then
> itempic = Item(ItemNum).Pic
>  
> If itempic = 0 Then Exit Sub
>  
> Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 255), 1#, 0
> Direct3D_Device.BeginScene
>  
> With rec
> .Top = 0
> .Bottom = .Top + PIC_Y
> .Left = Tex_Item(itempic).Width / 2
> .Right = .Left + PIC_X
> End With
> With rec_pos
> .Top = 2
> .Bottom = .Top + PIC_Y
> .Left = 2
> .Right = .Left + PIC_X
> End With
> RenderTextureByRects Tex_Item(itempic), rec, rec_pos
> With frmMain.picNewAuctionItem
> .Visible = True
> .ZOrder (0)
> End With
> With srcRect
> .x1 = 0
> .x2 = 32
> .y1 = 0
> .y2 = 32
> End With
> With destRect
> .x1 = 2
> .y1 = 2
> .y2 = .y1 + 32
> .x2 = .x1 + 32
> End With
> Direct3D_Device.EndScene
> Direct3D_Device.Present srcRect, destRect, frmMain.picNewAuctionItem.hwnd, ByVal (0)
> End If
>  
> End Sub
> Public Sub DrawNewAuctionCurrencyItem()
> Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECT
> Dim ItemNum As Long, itempic As Long
> ItemNum = New_Auction.Currency_ItemNum
>  
> If ItemNum > 0 And ItemNum <= MAX_ITEMS Then
> itempic = New_Auction.Currency_ItemNum
>  
> If itempic = 0 Then Exit Sub
>  
> Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 255), 1#, 0
> Direct3D_Device.BeginScene
>  
> With rec
> .Top = 0
> .Bottom = .Top + PIC_Y
> .Left = Tex_Item(itempic).Width / 2
> .Right = .Left + PIC_X
> End With
> With rec_pos
> .Top = 2
> .Bottom = .Top + PIC_Y
> .Left = 2
> .Right = .Left + PIC_X
> End With
> RenderTextureByRects Tex_Item(itempic), rec, rec_pos
> With frmMain.picNewAuctionCurrency
> .Visible = True
> .ZOrder (0)
> End With
> With srcRect
> .x1 = 0
> .x2 = 32
> .y1 = 0
> .y2 = 32
> End With
> With destRect
> .x1 = 2
> .y1 = 2
> .y2 = .y1 + 32
> .x2 = .x1 + 32
> End With
> Direct3D_Device.EndScene
> Direct3D_Device.Present srcRect, destRect, frmMain.picNewAuctionCurrency.hwnd, ByVal (0)
> End If
>  
> End Sub
> Public Sub DrawViewAuctionItem()
> Dim rec As RECT, rec_pos As RECT, srcRect As D3DRECT, destRect As D3DRECT
> Dim ItemNum As Long, itempic As Long
> If Not frmMain.picViewAuction.Visible Then Exit Sub
> ItemNum = Auction(ViewAuctionNum).ItemNum
>  
> If ItemNum > 0 And ItemNum <= MAX_ITEMS Then
> itempic = Item(ItemNum).Pic
>  
> If itempic = 0 Then Exit Sub
>  
> Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 255), 1#, 0
> Direct3D_Device.BeginScene
>  
> With rec
> .Top = 0
> .Bottom = .Top + PIC_Y
> .Left = Tex_Item(itempic).Width / 2
> .Right = .Left + PIC_X
> End With
> With rec_pos
> .Top = 2
> .Bottom = .Top + PIC_Y
> .Left = 2
> .Right = .Left + PIC_X
> End With
> RenderTextureByRects Tex_Item(itempic), rec, rec_pos
> With frmMain.picViewAuctionItem
> .Visible = True
> .ZOrder (0)
> End With
> With srcRect
> .x1 = 0
> .x2 = 32
> .y1 = 0
> .y2 = 32
> End With
> With destRect
> .x1 = 2
> .y1 = 2
> .y2 = .y1 + 32
> .x2 = .x1 + 32
> End With
> Direct3D_Device.EndScene
> Direct3D_Device.Present srcRect, destRect, frmMain.picViewAuctionItem.hwnd, ByVal (0)
> End If
>  
> End Sub
> >! ```
>
>  Its a nice system thanks for doing it. How goes the PVP Rank System and One more thing I would like to request.
>
> Arenas! Like WoW you form only a 2v2 and u can queue for Arenas and such 
>
> Again I dont need these now I'll need them about January maybe March but I'd love to test these to see if its possible.
Link to comment
Share on other sites

@ Matt,

If you want resizable windows, it's pretty straight forward, it's all client side. Note, it's up to you, the developer to code in the position of all your UI elements, the is purely the code to have complete full screen and sizable windows in EO3.0 and lower. That being said, there are also a LOT of Render_Graphics improvements that you should make before using this, as it will greatly diminish FPS without some good changes to support large resolutions, but here's the code!

![](http://www.canadianparamedicjobs.ca/updater/EOSizeable1.png)

![](http://www.canadianparamedicjobs.ca/updater/EOSizeable2.png)

In modConstants, change the 'stuffs to

```
' stuffs
Public HalfX As Integer
Public HalfY As Integer
Public ScreenX As Integer
Public ScreenY As Integer
Public StartXValue As Integer
Public StartYValue As Integer
Public EndXValue As Integer
Public EndYValue As Integer
Public Half_PIC_X As Integer
Public Half_PIC_Y As Integer
```
and also change MAX_MAPX and MAX_MAPY to Bytes

```
Public MAX_MAPX As Byte
Public MAX_MAPY As Byte

```
At the top of modGeneral, add

```
Public Declare Function GetSystemMetrics Lib "user32" _
    (ByVal nIndex As Long) As Long
Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1

```
In modGraphics, sub InitDX8, change two lines to this

```
Direct3D_Window.BackBufferWidth = frmMain.picScreen.ScaleWidth 'Match the backbuffer width with the display width
Direct3D_Window.BackBufferHeight = frmMain.picScreen.ScaleHeight 'Match the backbuffer height with the display height

```
In modGeneral, at the top of Sub Main add

```
    Dim Width As Long, Height As Long
    DoEvents
    Width = GetSystemMetrics(SM_CXSCREEN)
    Height = GetSystemMetrics(SM_CYSCREEN)
    MAX_MAPX = Width / PIC_X
    MAX_MAPY = Height / PIC_Y
    frmMain.picScreen.Width = Width
    frmMain.picScreen.Height = Height
    HalfX = ((MAX_MAPX + 1) / 2) * PIC_X
    HalfY = ((MAX_MAPY + 1) / 2) * PIC_Y
    ScreenX = (MAX_MAPX + 1) * PIC_X
    ScreenY = (MAX_MAPY + 1) * PIC_Y
    StartXValue = ((MAX_MAPX + 1) / 2)
    StartYValue = ((MAX_MAPY + 1) / 2)
    EndXValue = (MAX_MAPX + 1) + 1
    EndYValue = (MAX_MAPY + 1) + 1
    Half_PIC_X = PIC_X / 2
    Half_PIC_Y = PIC_Y / 2

```
On frmMain, set the forms Resize code to

```
picScreen.Top = 0
picScreen.Left = 0
MAX_MAPX = (Me.Width / Screen.TwipsPerPixelX) / 32
MAX_MAPY = (Me.Height / Screen.TwipsPerPixelY) / 32
MAX_MAPY = MAX_MAPY - 1
MAX_MAPX = MAX_MAPX - 1
HalfX = ((MAX_MAPX + 1) / 2) * PIC_X
HalfY = ((MAX_MAPY + 1) / 2) * PIC_Y
ScreenX = (MAX_MAPX + 1) * PIC_X
ScreenY = (MAX_MAPY + 1) * PIC_Y
StartXValue = ((MAX_MAPX + 1) / 2)
StartYValue = ((MAX_MAPY + 1) / 2)
EndXValue = (MAX_MAPX + 1) + 1
EndYValue = (MAX_MAPY + 1) + 1
Half_PIC_X = PIC_X / 2
Half_PIC_Y = PIC_Y / 2
picScreen.Width = Me.Width
picScreen.Height = Me.Height
UpdateCamera
Render_Graphics

```
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...