ItemIcon

Version 3 (nimetu, 12/18/2013 02:12 pm) → Version 4/5 (nimetu, 02/01/2014 08:59 pm)

h1. ItemIcon

h2. Base URL

* http://api.ryzom.com/item_icon.php

h2. URL Parameters

h3. @sheetid@

It's the id of an item that you can find in the [[Character]] xml file. For example, @iczahp_3.sitem@ is a valid @sheetid@ (
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem!

h3. @c@ (optional)

The color of the item. It's a value between 0 and 7
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=0! !http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=1! !http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=2! !http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=3! !http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=4! !http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=5! !http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=6! !http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&c=7!

h3. @q@ (optional)

The quality of the item.
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&q=120!

h3. @s@ (optional)

Default is 1.

The size of the stack.
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&s=10!

h3. @sap@ (optional)

Default is -1.
The number of sap of the item.

| -1 | No sap icon, no number | !http://api.ryzom.com/item_icon.php?sheetid=icfm2ms_3.sitem&c=-1&q=100&s=1&sap=-1! |
| 0 | sap icon, no number | !http://api.ryzom.com/item_icon.php?sheetid=icfm2ms_3.sitem&c=-1&q=100&s=1&sap=0! |
| 1 | sap icon number 0 | !http://api.ryzom.com/item_icon.php?sheetid=icfm2ms_3.sitem&c=-1&q=100&s=1&sap=1! |
| 2 | sap icon number 1 | !http://api.ryzom.com/item_icon.php?sheetid=icfm2ms_3.sitem&c=-1&q=100&s=1&sap=2! |
| 3 | sap icon number 2 | !http://api.ryzom.com/item_icon.php?sheetid=icfm2ms_3.sitem&c=-1&q=100&s=1&sap=3! |

h3. @destroyed@ (optional)

Default is @0@.
* @0@: nothing special
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&destroyed=0!
* @1@: display the item as if it was destroyed (with a red cross)
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&destroyed=1!

h2. @label@ (optional)

Default is @1@
* @0@: hide icon text
!http://api.ryzom.com/item_icon.php?sheetid=m0021dxapd01.sitem&label=0!
* @1@: draw text if sheet has one
!http://api.ryzom.com/item_icon.php?sheetid=m0021dxapd01.sitem&label=1!

h3. @locked@ (optional)

Default is @0@.
* @0@: nothing special
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&locked=0!
* @1@: display the item as if it was locked by the owner
!http://api.ryzom.com/item_icon.php?sheetid=iczahp_3.sitem&locked=1!

h2.
Cache Duration

It's cached for ever. Since the icon is unique and never change. For a specific icon, it'll always return the same image.

h2. PHP Interface

h3. @ryzom_item_icon_url($sheetid, $c=-1, $q=-1, $s=-1, $sap=-1, $destroyed=false, $label=true, $locked=false)@ $destroyed=false)@

Returns a string that contains the url to display a item icon.