Jump to content
  • 0

Updated item images?


tonn

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   1
  • Joined:  10/10/20
  • Last Seen:  

Is there an updated version of the item images that's posted here? https://code.google.com/archive/p/fluxcp/downloads

That one looks like it only covers up to item id 22012

I'm planning on using those images to display cash shop items (which are mostly new-ish) on flux

Thanks!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.01
  • Content Count:  271
  • Reputation:   62
  • Joined:  02/04/19
  • Last Seen:  

Open lib/Flux/Template.php

Search

/**
	 *
	 */
	public function iconImage($itemID)
	{
		$path = sprintf(FLUX_DATA_DIR."/items/icons/".Flux::config('ItemIconNameFormat'), $itemID);
		$link = preg_replace('&/{2,}&', '/', "{$this->basePath}/$path");
		return file_exists($path) ? $link : false;
	}
	
	/**
	 *
	 */
	public function itemImage($itemID)
	{
		$path = sprintf(FLUX_DATA_DIR."/items/images/".Flux::config('ItemImageNameFormat'), $itemID);
		$link = preg_replace('&/{2,}&', '/', "{$this->basePath}/$path");
		return file_exists($path) ? $link : false;
	}

 	/**
 	 *
 	 */
	public function monsterImage($monsterID)
	{
		$path = sprintf(FLUX_DATA_DIR."/monsters/".Flux::config('MonsterImageNameFormat'), $monsterID);
		$link = preg_replace('&/{2,}&', '/', "{$this->basePath}/$path");
		return file_exists($path) ? $link : false;
	}

Change to:
 

    /**
     *
     */
    public function iconImage($itemID)
    {
        $path = sprintf(FLUX_DATA_DIR."/items/icons/".Flux::config('ItemIconNameFormat'), $itemID);
        $link = preg_replace('&/{2,}&', '/', "{$this->basePath}/$path");
        return file_exists($path) ? $link : sprintf('https://static.divine-pride.net/images/items/item/'.Flux::config('ItemIconNameFormat'), $itemID);
    }
    
    /**
     *
     */
    public function itemImage($itemID)
    {
        $path = sprintf(FLUX_DATA_DIR."/items/images/".Flux::config('ItemImageNameFormat'), $itemID);
        $link = preg_replace('&/{2,}&', '/', "{$this->basePath}/$path");
        return file_exists($path) ? $link : sprintf('https://static.divine-pride.net/images/items/collection/'.Flux::config('ItemImageNameFormat'), $itemID);
    }

     /**
      *
      */
    public function monsterImage($monsterID)
    {
        $path = sprintf(FLUX_DATA_DIR."/monsters/".Flux::config('MonsterImageNameFormat'), $monsterID);
        $link = preg_replace('&/{2,}&', '/', "{$this->basePath}/$path");
        return file_exists($path) ? $link : sprintf('https://static.divine-pride.net/images/mobs/png/'.Flux::config('MonsterImageNameFormat'), $monsterID);
    }

In config/application.php

change "MonsterImageNameFormat" .gif to .png

	'MonsterImageNameFormat'	=> '%d.png',				// The filename format for monster images (defaults to {monsterid}.gif).


This will automatically pull images of divine-pride items and mobs.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

I did a pack dated 12-08-2014: 

 

Other than that, I haven't seen any. There are tools around to be able to do extract the images yourself though, if you search enough.

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   1
  • Joined:  10/10/20
  • Last Seen:  

@M a p l e that is actually pretty smart, thanks!

@Akkarin we could probably update that based on Maple's divine-pride suggestion. I could write a little script that downloads all those images based on the current item IDs I can grab off rathena. For custom items from a custom server, however, it might need some manual labor via the GRF editor, I presume?

Link to comment
Share on other sites

×
×
  • Create New...