Jump to content
  • 0
tonn

Updated item images?

Question

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!

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

@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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.