Tiendas WoD - Información técnica - Primeros pasos

De World of Dungeons - Enzykloplaedia

Contenido

WoD-Transfer - the digital gateway to the World of Dungeons

The exchange of data between WoD and your shop take place through HTTP-Request links. This is referred to as WoD-Transfer and is the basis of the information port for World of Dungeons.

You receive a password that you may under NO circumstances pass on to a third party.

Your WoD Shop will be accessible over the URL http://YOUR_SHOP_ID.wod-partner.net. Here you will find the necessary step-by-step instructions on how players enter your shop.

There is also an overview of all transactions that a Partner Shop can perform with World-of-Dungeons. Übersicht über alle Transaktionen,

Players enter your shop

The players can enter your shop by clicking Bazaar => Partner Shops. They can then open a link and transmit the following information::

 http: //YOUR_SHOP_ID.wod-partner.de
       ?uname=HERONAME
       &uid=HEROID
       &world=WORLD
       &gold=GOLD
       &transfer_id=TRANSFER_ID
       &items=ITEMS
       &server=SERVER
       &userpass=USERPASS
       &imagepath=IMG_URL
       &stylepath=CSS_URL
       &https=ON_OFF


Of course the original URL is in one line without spaces. It was only displayed in this format to give it a clear overview. In addition, the following parameters are sent:

Parameter Mysql-Datatype Description
uname

the base64decoded name is: varchar(31)

the base64encoded name of the hero. In PHP you can see the name of the hero by using:

$heroname = base64_decode( str_replace( ' ', '+', $_GET['uname']) );
uid int(10) unsigned the unique ID of the hero
world varchar(7) ID the world (max 7 characters), that the hero is in. example: EA, EB
gold int(11) signed The amount of gold the hero is attempting to transfer to your shop. It can be 0 by default.
transfer_id int(10) unsigned A unique integer to counter-check the transfer amount (to prevent fraud)
items jede id ist:
int(10) unsigned
IDs of the items the player is sending into your shop. These are comma delimited. Example: items=112,334,556

You can retrieve an array of the item ids with the PHP function:

$items = explode(',', $_GET['items']);
server varchar(31) The server from which the shop was requested. Example: wea1.world-of-dungeons.net. This is important, as you MUST select the correct server for the following reasons:
  1. WoD consists of more than one world. You have your own account in EACH WoD world! It is important to send the correct information to the correct world by using this parameter in your queries.
  2. Also use these servers to return the player to WoD. If the player has activated cookies, they will be logged in automatically when they return to WoD from your shop.
userpass varchar(15) A random password that identifies the hero. This is not the players account password, but a session ID of sorts that identifies the player in the system. This is re-generated each time the player logs out and back in to your partner shop.
imagepath varchar(127) URL to the current graphic package the hero is using. The URL to the YES icon can be opened as follows:
urldecode($_GET['imagepath']) . 'icons/yes.gif';
stylepath varchar(127) URL to the current CSS Style Sheet the player is using. You can query this via:
urldecode($_GET['stylepath']) . 'styles.css';
https bit on or off - displays if the player is accessing the game over the SSL (https) URL.


Example

 http: //bank.wod-partner.net
       ?uname=QnJ1ZGVyIFRhY2s
       &uid=123
       &world=EA
       &gold=30
       &transfer_id=332
       &items=112,334,556
       &server=wea1.world-of-dungeons.net

Validating the players information

You can query the players status from your page. If you do not do this, you risk having players ruin your shop by cheating! You will most likely end up losing a lot of money and items!

To check if the information is correct, open the following link from your shop:

 http: //SERVER/wod/spiel/wodpartner/transfer.php
       ?partner=YOUR_PARTNER_ID
       &password=PASSWORD
       &action=validate
       &uid=UID
       &userpass=USERPASS
       &gold=GOLD
       &transfer_id=TRANSFER_ID
       &items=ITEMS

In addition to this, add the following parameters:

partner: the unique id that is assigned to your partner shop.
password: the password to your partner shop.
action: the transaction that is taking place. ('validateâ' = confirm the players submitted information)

Example

 http: //wea1.world-of-dungeons.net/wod/spiel/wodpartner/transfer.php
       ?partner=rudi
       &password=dke13x7d3hVsd07dyxs3f
       &action=validate
       &uid=123
       &userpass=V9LFPRLX7Q
       &gold=30
       &transfer_id=1323
       &items=112,334,556

If the password and amount of gold are correct, you will receive the follwing response:

       world: WEA
       worldname: Aberon
       user: Bruder Tack
       level: 17
       class: Priest
       people: Gnome
       player: root
       player_id: 1
       group_id: 1234
       group_name: The first heroes
       clan_id: 123
       clan_name: The first clan
       login: ok
       gold: ok
       item 112: type=23; usage=0/0; hp=25/25; cond=6; \
         value=100/100; price=210; prev_owner=123; \
         name="buckler"; classes="Shield"; where="shield hand"
       item 334: type=45; usage=0/0; hp=15/15; cond=6; \
         value=6/6; price=210; prev_owner=1; \
         name="bread knife"; classes="Knives"; where="any hand"
       item 556: type=67; usage=3/3; hp=10/10; cond=6; \
         value=500/500; price=210; prev_owner=123; \
         name="healing potion"; classes="healing potions"; \
         where="pocket"
       balance: 1256


These are broken down as follows:

login: ok
means that the player has entered your shop and the password is correct.

player: NAME
name of the players account

player_id: NR
a number that uniquely identifies the player in their world.

group_id: NNN
a number that uniquely identifies the group of the hero. This number is the same for all members of that group. If the hero is not in a group, this parameter will not exist.

group_name: NAME
a name that uniquely identifies the group of the hero. This number is the same for all members of that group. If the hero is not in a group, this parameter will not exist.

clan_id: NNN
a number that uniquely identifies the clan of the hero. This number is the same for all members of that clan. If the hero is not in a clan, this parameter will not exist.

clan_name: TEXT
a name that uniquely identifies the clan of the hero. This number is the same for all members of that clan. If the hero is not in a clan, this parameter will not exist..

gold: ok
means that the amount of gold reported as being sent to your partner shop was correct. This will be shown as GOLD (top left) being sent to your shop.

balance: NNNN
the current balance within your partner shop.

item NNNN: ...
Every item that has been listed is reflected here. If the item is in your shops warehouse, and is from this player, it will be displayed in detail. The 3 lines are written together without the \ at the end of the line. The first number NNNN is an ID that identifies the item uniquely. A hero can have 2 daggers for example with IDs of 1000001 and 1000002.

Each parameter means:

Parameter Mysql-Datatype Description
type int(10) unsigned ID of the item. Example, all daggers have the type 123.
usage je smallint(5) unsigned uses remaining / uses total
hp je smallint(5) unsigned hit points remaining / hit points total
cond tinyint(1) unsigned what shape the item is in. 0 is almost destroyed, 6 is in perfect condition (undamaged). The icons that display this are located here:
http: //wea1.world-of-dungeons.net/ wod/design/default/icons/zustand_N.gif
where N = 0,1,2,3,4,5,6
value int(10) unsigned the current value / maximum value of the item. *Please note, this should never be higher than 990!! If the players can sell items in your shop, be sure to cap each individual item at 990 gold.
price int(10) unsigned this is what your shop will be able to sell an item for. It is generated from a mixture of the current market price and is usually a bit higher than the value.
prev_owner int(10) unsigned ID of the hero that is sending the item into your shop (see parameters above for more info)
name varchar(127) name of the item, example „dagger“
classes jeweils varchar(31) the classes the item belongs to (comma delimited) Example:

„Knives,Grafting: Stone Weapons“

where varchar(15)

determines where the item is being worn. Possible values include:

  • Head
  • Eyes
  • Ears
  • Neck
  • Torso
  • Cloak
  • Gloves
  • Arms
  • Legs
  • Feet
  • Ring
  • Weapon hand
  • Shield hand
  • Both hands
  • Either hand
  • Medals
  • Belt
  • Pocket
price int(10) unsigned this is the price your shop can fixed-sell an item for. It is usually a bit higher than the current market price.
sold_count int(10) unsigned the amount of this type of item that have been sold in game. This will only be transmitted if the option has been activated for your shop.
unique varchar(23) if the item is unique, it will be noted in this field. Possible values include:
  • Hero Unique
  • Group Unique
  • Clan Unique
sold_price int(10) unsigned the average price this item was sold at in game, rounded to the nearest hundredth. This price is only good for evaluation when it is higher than 100. The statistics displayed are from the last 3 weeks on the market. This will only be transmitted if the option has been activated for your shop.




If the password is incorrect, you will receive:

   world: WEA
   worldname: Aberon
   login: error

if the amount of gold is incorrect, you will receive:

   world: WEA
   player: root
   player_id: 1
   user: Bruder Tack
   login: ok
   gold: error
   balance: 1256

Now you have determined:

  1. the heroes name
  2. the player name and ID
  3. if the player/hero is authenticated with a password
  4. if the player has a Premium-Plus account for your shop (used for discounts and other advantages in your shop)
  5. if the player has transferred a certain amount (this can also be 0)
  6. if and which items they have transferred to your shop

Now the hero should be able to spend gold in your shop :)

Paying gold to the players

Your shop will only attract players if they can take gold back out of the shop and into WoD! If you want to assign gold to a player, do so with the following link:

 http: //SERVER/wod/spiel/wodpartner/transfer.php
       ?partner=PARTNER_ID
       &password=PASSWORD
       &action=transfer
       &uid=UID
       &gold=GOLD
  • PARTNER_ID: your partner shop ID (i.e. pnshop)
  • PASSWORD: your shop password
  • UID: Id of the hero receiving the gold
  • GOLD: the amount of gold to be transferred.

example:

 http: //wea1.world-of-dungeons.net/wod/spiel/wodpartner/transfer.php
       ?partner=pnshop
       &password=dke39xjd3hVsl0kdyxsdf
       &action=transfer
       &uid=123
       &gold=100

Response:

       world: WORLD ABBREVIATION
       worldname: WORLD NAME
       user: NAME OF THE HERO
       gold: ok
       balance: NNN

When paying gold to a player, taxes do not apply. Taxes only apply when bringing gold IN to the partner shops.

Véase también

Herramientas personales