Vous êtes sur la page 1sur 12

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

1(12)

Johan Wolff

2003-04-01

External Project Entropia Auction script API


Introduction
Today there is no support for inter-player trade. The players have solved this by unattached PE web pages and very annoying public advertisements of items for sale. By providing this function within PE, we will centralize PE-attached activity and remove possibilities of trade fraud.

Created

Saved

Printed

Document name

Title

Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

1 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

2(12)

Johan Wolff

2003-04-01

Content
EXTERNAL PROJECT ENTROPIA AUCTION SCRIPT API............................................ 1 Introduction........................................................................................................................ 1 Content ............................................................................................................................... 2 FUNCTIONS ............................................................................................................................. 3 AuctionCreateAuctionItem .................................................................................................. 3 AuctionDeleteAuctionItem .................................................................................................. 3 AuctionPlaceBid ................................................................................................................. 3 AuctionSearchItem.............................................................................................................. 4 AuctionGetAuctionItem....................................................................................................... 4 AuctionGetAuctionItemHistory ........................................................................................... 5 AuctionPlayerAuctions ....................................................................................................... 5 AuctionGetLatestAuctionItems............................................................................................ 5 AuctionStartUp ................................................................................................................... 5 AuctionCloseDown ............................................................................................................. 6 EVENTS ................................................................................................................................... 7 OnAuctionCreateAuctionItem ............................................................................................. 7 OnAuctionDelete ................................................................................................................ 7 OnAuctionPlaceBid ............................................................................................................ 7 OnAuctionSearchItem ......................................................................................................... 8 OnAuctionAuctionItemInfo.................................................................................................. 8 OnAuctionGetAuctionItemHistory....................................................................................... 9 OnAuctionPlayerAuctions................................................................................................... 9 OnAuctionLatestAuctionItems............................................................................................. 9 OnAuctionStartUp ............................................................................................................ 10 OnAuctionAuctionUpdate ................................................................................................. 10 OnAuctionLoadInstance.................................................................................................... 11 DOCUMENT HISTORY ............................................................................................................. 12 History.............................................................................................................................. 12

Created

Saved

Printed

Document name

Title

Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

2 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

3(12)

Johan Wolff

2003-04-01

Functions
AuctionCreateAuctionItem
void AuctionCreateAuctionItem(int iPlayerId, int iItemId, int iValidDays, int iStartPrice, int iBuyOutPrice, int iCategory) Parameter iPlayerId iItemId iValidDays iStartPrice iBuyOutPrice iCategory

Id of player Id of item Number of days the auction is valid Start price of the auction item (the total price if more than one item is for sale) The auction ends and a transaction is made if this price is met Category of item

Receipt The event OnAuctionCreateAuctionItem is sent back with an id of the auction item. Description Create a new auction item. An auction cannot be active for more than seven days. If the bidder matched the buy out price, then is the auction closed and a transaction is made. Set iBuyOutPrice to 1 if no such price should exist. The player can only sell items from his inventory, i.e. items that he is carrying. There is a limit of not more than five auction items per player. The player can only sell one item per auction.

AuctionDeleteAuctionItem
void AuctionDeleteAuctionItem(int iPlayerId, int iAuctionItem) Parameter iPlayerId iAuctionItem

Id of player Id of an auction item created with AuctionCreateAuctionItem()

Receipt The event OnAuctionDelete is sent back. Description Delete an active auction item. All items are moved from deposition to the players carried inventory. A player can only delete one of his own auction items. An auction item can only be deleted if there are no bids on it.

AuctionPlaceBid
void AuctionPlaceBid(int iPlayerId, int iAuctionItem, int iBidPrice)
Created Saved Printed Document name Title Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

3 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

4(12)

Johan Wolff

2003-04-01

Parameter iPlayerId iAuctionItem iBidPrice

Id of player placing the bid Id of an auction item created with AuctionCreateAuctionItem() The players bid

Receipt The event OnAuctionPlaceBid is sent back. Description Place a bid for a player. If a bid is placed within five minutes of the closing time, then the closing time is being extended with five minutes.

AuctionSearchItem
void AuctionSearchItem(int iPlayerId, int iCategory, int iStart, int iNbrOfHits) Parameter iPlayerId iCategory iStart iNbrOfHits

Id of player Id of category Start of hit list Limit the search to iNbrOfHits hits

Receipt The event OnAuctionSearchItem is sent back for every hit. Description Search for a group of items in the PE Auction. Use parameter iNbrOfHits to limit the number of hits, i.e. events sent back to the client. Parameter iStart can be used to retrieve chunks of hits, e.g. if iNbrOfHits is set to 20 and a search results in 37 hits; set iStart to 0 for the first 20 hits and iStart to 21 for the remaining 17 hits. If iNbrOfHits is set to 1, then all search hits are sent back.

AuctionGetAuctionItem
void AuctionGetAuctionItem(int iPlayerId, int iAuctionItem) Parameter iPlayerId iAuctionItem

Id of player placing the bid Id of an auction item created with AuctionCreateAuctionItem()

Receipt The event OnAuctionAuctionItemInfo is sent back. Description Get information about a specific auction item.

Created

Saved

Printed

Document name

Title

Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

4 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

5(12)

Johan Wolff

2003-04-01

AuctionGetAuctionItemHistory
void AuctionGetAuctionItemHistory(int iPlayerId, int iAuctionItem, int iStart, int iNbrOfBids) Parameter iPlayerId iAuctionItem iStart iNbrOfBids

Id of player placing the bid Id of an auction item created with AuctionCreateAuctionItem() Start of hit list Get only iNbrOfBids bids

Receipt The event OnAuctionGetAuctionItemHistory is sent back for every auction item. Description Get auction history for a specific auction item. Set parameter iNbrOfBids to 1 if all bids should be received. Parameter iStart works exactly like the iStart parameter in function AuctionSearchItem (see above).

AuctionPlayerAuctions
void AuctionPlayerAuctions(int iPlayerId) Parameter iPlayerId

Id of player

Receipt The event OnAuctionPlayerAuctions is sent for each and every auction item. Description Get all active auction items for a player.

AuctionGetLatestAuctionItems
void AuctionGetLatestAuctionItems(int iPlayerId) Parameter iPlayerId

Id of player

Receipt The event OnAuctionLatestAuctionItems is sent back. Description Get the ten latest created auction items.

AuctionStartUp
void AuctionStartUp(int iPlayerId)
Created Saved Printed Document name Title Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

5 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

6(12)

Johan Wolff Parameter iPlayerId

2003-04-01

Id of player

Receipt The event OnAuctionStartUp is sent back. Description This function is called when a player open the auction interface, the function report to the player if any auctions has been closed since the last time the interface was open (auction items the player owned or had a bid on). The following checks are made: If the player had the highest bid and won the auction, then the item is transferred to the players inventory. If the player is no longest the highest bidder, he will be giving a chance to place a new bid. The player will receive his deposit. If the player had an auction that was closed, money is added to the players account balance. If an auction has been marked invalid due to passed end date (and no player has placed a bid), then the item is moved from the deposition to the players carried inventory. Money and items are not transferred to the players accounts and inventories until the players opens the auction interface, even if the auction has already been committed.

AuctionCloseDown
void AuctionCloseDown(int iPlayerId) Parameter iPlayerId Receipt No receipt is sent back. Description Call this function when a player closes down the PE Auction interface. This function is used to update an internal list in the server of users that have the auction interface open. The purpose is to know which users to send event to when an auction item has be altered, e.g. new highest bid.

Id of player

Created

Saved

Printed

Document name

Title

Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

6 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

7(12)

Johan Wolff

2003-04-01

Events
All events are sent to the client except for OnAuctionLoadInstance, which is sent to the server.

OnAuctionCreateAuctionItem
OnAuctionCreateAuctionItem(int iAuctionItem) Parameters iAuctionItem

Id of newly created auction item

Description This event is sent back when a new auction item has been created. iAuctionItem is -1 if an error has occurred and 0 if the player already have five auctions (an auction item is not created in that case).

OnAuctionDelete
OnAuctionDelete(int iResult) Parameters iResult

Id of the item that was deleted, 1 if an error occurred and 0 if the removal couldnt be made because there are bidders on the auction

Description This event is sent back when function AuctionDeleteAuctionItem is called. An auction can only be deleted if there are no bidders.

OnAuctionPlaceBid
OnAuctionPlaceBid(int iAuctionItem, int iStatus) Parameters iAuctionItem iStatus

Id of auction item Status of bid

Description This event is sent when the function AuctionPlaceBid is called. The status flag can have the following values: iStatus -1 0 2 3
Created Saved

Description On error occurred, the bid has been cancelled. Bid has been accepted and the player has the current highest bid. Bid lower than start price The bid is not higher than the current highest
Printed Document name Title Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

7 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

8(12)

Johan Wolff 4 5 6 7 8 Bid has been accepted and the auction has ended since the player matched the buy out price. The bid was placed too late, auction already ended The player owns the auction The player has the current highest bid The player does not have enough PED to place in deposition

2003-04-01

Comments If the player has the current highest bid, i.e. iStatus is 0, then the amount specified in function call AuctionPlaceBid has been moved to a deposition. If iStatus is 4, then a transaction has been made and the player will have the item in his inventory, the players account is decreased with the correct amount.

OnAuctionSearchItem
OnAuctionSearchItem(string sItem, string sCloseDate, int iAuctionItem, int iCurrentPrice, int iBids) Parameters sItem sCloseDate iAuctionItem iCurrentPrice iBids

Name of item Date until the auction is closed Id of auction item (e.g. used when deleting) Current bid price Number of bids since the auction started

Description This event is sent back when the function AuctionSearchItem is called. One event is sent for each search match. Checks must be made to see if more than one event has same iAuctionItem value. If that is the case, then that auction item contain more than one item. The last event has the values OnAuctionSearchItem(, , 0, 0, 0).

OnAuctionAuctionItemInfo
OnAuctionAuctionItemInfo(int iAuctionItem, int iItemId, int iAgdaClass, int iTTValue, int iStartBid, string sItem, string sSeller, string sStartDate, string sCloseDate) Parameters iAuctionItem iItemId iAgdaClass iTTValue iStartBid sItem sSeller sStartDate sCloseDate Description
Created Saved Printed Document name Title Page

Id of auction item (e.g. used when deleting) Id of item for sale Agda class id Trade terminal value of item Start bid Name of item for sale name of seller Date when the auction item started Date until the auction item is closed

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

8 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

9(12)

Johan Wolff Gather information about an single auction item.

2003-04-01

OnAuctionGetAuctionItemHistory
OnAuctionGetAuctionItemHistory(string sBidder, string sBidDate, int iPrice) Parameters sBidder sBidDate iPrice

Name of bidder Date and time when the bid was made The bidders price

Description This event is received when function AuctionGetAuctionItemHistory is called. One event is sent for every bidding action. The last event is OnAuctionGetAuctionItemHistory(, , 0), indicating no more events.

OnAuctionPlayerAuctions
OnAuctionPlayerAuctions(int iAuctionItem, int iStartBid, int iBids, int iCurrentBid, int iDummy, string sItem, string sStartDate, string, sCloseDate, int iDummy) Parameters iAuctionItem iStartBid iBids iCurrentBid iDummy sItem sStartDate sCloseDate iDummy

Id of auction item (e.g. used when deleting) Start price of auction item Number of bids since auction started Current bid price Dummy variable set to 0 Name of item for sale Date when the auction started Date until the auction is closed Dummy variable set to 0

Description This event is sent back when the function AuctionPlayerItems is called. One event is sent for each active auction the player has. Checks must be made to see if more than one event has same iAuctionItem value. If that is the case, then that auction item contain more than one item. The last event is OnAuctionActivePlayerAuctions(0, 0, 0, 0, 0, , , , 0).

OnAuctionLatestAuctionItems
OnAuctionLatestAuctionItems(string sItem, string sCloseDate, int iAuctionItem, int iCurrentPrice, int iBids, int iItemId) Parameters sItem sCloseDate iAuctionItem iCurrentPrice
Created Saved Printed

Name of item Date until the auction is closed Id of auction item Current bid price
Document name Title Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

9 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

10(12)

Johan Wolff iBids iItemId Number of bids since the auction started Id of item for sale

2003-04-01

Description One event is sent for at most 10 auction items. Checks must be made to see if more than one event has same iAuctionItem value. If that is the case, then that auction item contain more than one item. The last event has the values OnAuctionLatestAuctionItems(, , 0, 0, 0, 0).

OnAuctionStartUp
OnAuctionStartUp(int iAuctionItem, int iItemId, int iAction, int iPrice, string sItem) Parameters iAuctionItem iItemId iAction iPrice sItem

Id of auction item Id of item See below Total price Name of item in auction

Description This event is sent when function AuctionStartUp is being called. Parameter iAction can have the following values: iAction -1 0 1 2 3 Description Error. Auction temporarily unavailable Auction has been closed, money is transferred to the players account balance An auction has been closed and the player had the highest bid, item is moved to players inventory The player does no longer have the highest bid, money is moved back from deposition to the account balance Auction has been closed, but no bid was placed (item is moved back to the players inventory)

Checks must be made to see if more than one event has same iAuctionItem value. If that is the case, then that auction item contain more than one item. As with case of the function AuctionCreateAuctionItem, the iPrice parameter represents the price of the entire auction item, not single items within the auction. The last event sent is OnAuctionStartUp(0, 0, , 0).

OnAuctionAuctionUpdate
OnAuctionAuctionUpdate(int iMainCategory, int iCategory) Parameters iMainCategory iCategory Description
Created Saved Printed Document name Title Page

Id of main category Id of category

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

10 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

11(12)

Johan Wolff

2003-04-01

This event is sent to all players that have logged on to the PE Auction. A player is logged on when he have called function AuctionStartUp, the player must log of with function AuctionCloseDown. The event is sent in the following cases: An auction item has been closed An auction item has been deleted An auction item has a new highest bidder (and maybe extended stop time) An new auction item has been created This event is currently not implemented.

OnAuctionLoadInstance
OnAuctionLoadInstance(int iItemId, int iPlayerId) Parameters iItemId iPlayerId

Id of instance (item) Id of player (mind id)

Description This event is sent to the server just before events OnAuctionLatestAuctionItems and OnAuctionAuctionItemInfo are sent to the client. The event is a confirmation that one or several instances have been loaded into memory on the server. Even though event OnAuctionLatestAuctionItems can contain up to 20 items/instances, this event is sent only once.

Created

Saved

Printed

Document name

Title

Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

11 (12)

Company

Title

Registration number

External Project Entropia Auction script API


Revision Page

PA1
Author Subject Update date

12(12)

Johan Wolff

2003-04-01

Document history
History
Copy the top empty row and past it on the same row, so there always is an empty line at the top. If you need more than one line for your description just keep on writing in the same cell. The history table shall be in reversed chronological order. Date 2003-04-01 2003-03-21 2003-03-18 Event The event OnAuctionLoadInstance New function headers New function and event; AuctionGetItemCategory and OnAuctionItemCategory. New parameter list for function AuctionSearchItem. New status flag in event OnAuctionPlaceBid New functions AuctionGetLatestAuctionItems and AuctionCloseDown. New event OnAuctionAuctionUpdate. Document created Ver 1.5 1.4 1.3 Sign JW JW JW

2003-03-13 2003-03-04 2003-03-03

1.2 1.1 1.0

JW JW JW

Created

Saved

Printed

Document name

Title

Page

02-11-05 10:43
MA Small v1.7

03-04-08 21:12

14-02-17 18:37

D:\Fraps\Oblivion 2\Old Auction and Society Documents\auction and society\auction\Dokument\Auction System API.doc

External Auction System script API

12 (12)

Vous aimerez peut-être aussi