Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Tools

Development::Tools 3rd Party Tools for EQEMu (DB management tools, front ends, etc...)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-01-2015, 07:30 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default Super simple dragitem to *.gif stripping code

This is a ack together that takes the latest *.dds files from live (dragitem#.dds) and turns them into item_###.gif files (that reflect the item icon ID). It's total hack, but works.

Requirements: convert
http://www.imagemagick.org/script/convert.php

My version is on a unix based system, but you can easily do windows just changing the convert commands to convert.exe, and any / to \'s.
And cp to copy.

You also need to run php code. (It's a hack!)

Code:
<?php
for ($id = 1; $id < 218; $id++) {
	echo "$id\n";	
	if (!file_exists($id)) mkdir($id);
	exec("convert dragitem$id.dds -crop 40x40 +repage +adjoin $id/item_%02d.gif");
}

$baseCounter = 500;
if (!file_exists('out')) mkdir('out');

for ($i = 1; $i < 218; $i++) {

	$files = scandir($i);

	//$row = 1;
	$numFiles = 0;
	
	$fileCounter = 0;
	$counter = $baseCounter;
	foreach ($files as $file) {

		if ($file == "." || $file == "..") continue;
		if (filesize("$i/$file") < 100) {

			continue;
		}
		$name = $fileCounter+$counter;
		
		//echo "$file = $name";
		exec("cp $i/$file out/item_$name.gif");

		$fileCounter += 6;

		if ($fileCounter >= 31) {
			$fileCounter = 0;
			$counter++;
		}
	}
	$baseCounter += 36; 

}
If you'd rather just get a dump of every item icon let me know.

There's ~7800 icon images
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:01 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3