Version 1/5 - Next ยป - Current version
vl, 04/24/2009 03:19 pm


ItemIcon

Base URL

URL Parameters

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 (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem").

c (optional)

The color of the item. It's a value between 0 and 7 (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem&c=2").

q (optional)

The quality of the item (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem&q=120").

s (optional)

Default is 1.

The size of the stack (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem&s=10").

sap (optional)

Default is 0.
The number of sap of the item.
  • 0: No sap icon (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem&sap=0").
  • 1: sap icon with no number (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem&sap=1").
  • 2: sap icon with number 1 (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem&sap=2").
  • 3: sap icon with number 2 (example:"http://atys.ryzom.com/api/item_icon.php?sheetid=iczahp_3.sitem&sap=3").

destroyed (optional)

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

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.

PHP Interface

ryzom_item_icon_image($sheetid, $c=-1, $q=-1, $s=-1, $sap=-1, $destroyed=false)

Returns a string that contains the html code to display a item icon.

ryzom_item_icon_url($sheetid, $c=-1, $q=-1, $s=-1, $sap=-1, $destroyed=false)

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

ryzom_item_icon_image_from_simplexml($item, $add_text='')

  • $item is a simplexml object that contains the item.
  • add_text is an additional text you want to add in tooltip.

Returns a string that contains the html code to display a item icon depending of the content of $item.

ryzom_item_icon($sheetid, $c, $q, $s, $sap, $destroyed)

Returns the image data of the item icon. You should never use it except if you want to use the image to combine with another image for example.

Real Examples

If you have a website that use this Ryzom API, tell it in the forum and we'll add it.