Jewelcrafter addon

Display what gems jewelcrafters can make

Moderator: titan99

Jewelcrafter addon

Postby lunzet » Thu May 24, 2007 4:13 pm

anyone there? everything working four you?
User avatar
lunzet
WR.net Journeyman
WR.net Journeyman
 
Posts: 119
Joined: Sat Jan 13, 2007 1:23 pm

Re: Jewelcrafter addon

Postby Tyradil » Thu May 24, 2007 11:53 pm

The problem is the result of a change in the new 2.1.0 patch:
The jewelcrafting UI now has gems split up by color so it is easier to find gems of a specific color to create.


Gemme is expecting them in a category "Gems", now there are categories for every color, so Gemme needs to be changed in how it's looking up for gems.

I think I'll post an inofficial update till weekend. ;-)
author of the addon "Faction Rewards" - http://www.wowroster.net/Forums/viewforum/f=102.html

Image
User avatar
Tyradil
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 35
Joined: Thu Oct 26, 2006 5:13 pm

Re: Jewelcrafter addon

Postby lunzet » Fri May 25, 2007 12:21 am

thanks thats great news.
User avatar
lunzet
WR.net Journeyman
WR.net Journeyman
 
Posts: 119
Joined: Sat Jan 13, 2007 1:23 pm

Re: Jewelcrafter addon

Postby Tyradil » Fri May 25, 2007 7:09 pm

Here is my attempt of a fix, done in some minutes. Gems are now only shown in its category. So no green or purple gems shown along with blue ones.

replace lang/enUS.php line 21-24:

Code: Select all
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['meta']="meta";


with:

Code: Select all
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['green']="Green";
$Gem_info['enUS']['type']['orange']="Orange";
$Gem_info['enUS']['type']['purple']="Purple";
$Gem_info['enUS']['type']['meta']="Meta";


(Other languages must be changed in the same way. Keep in mind all colors should start with a capital letter, as they do in your jewelcrafting profession window.)

insert index.php, line 24 (before "$header_title = ..."):

Code: Select all
function gemlookup($locales, $color)
{
   global $wowdb,$Gem_info;

   $query = "SELECT DISTINCT `recipe_name`, `reagents`, `recipe_type`, `recipe_tooltip`, `recipe_texture`, `item_color`
      FROM `".ROSTER_RECIPESTABLE."`
      WHERE (`recipe_type` = '".$Gem_info[$locales[0]]['type'][$color]."'
      AND `skill_name` = '".$Gem_info[$locales[0]]['sill']."') ";
   for ($i = 1; $i<count($locales); $i++)
   {
     if ($locales[$i] != '')
          $query .= " OR (`recipe_type` = '".$Gem_info[$locales[$i]]['type'][$color]."'
      AND `skill_name` = '".$Gem_info[$locales[$i]]['sill']."') ";
   }
   $query .=       "ORDER BY `reagents`,`recipe_name` ";

   $result = $wowdb->query($query) or die_quietly($wowdb->error(),'Database Error', basename(__FILE__),__LINE__,$query);

   $count = 0;
   $temp = array();
   while($row = $wowdb->fetch_array($result))
   {
        $temp[$count]=$row;
   $count++;
   }

   return $temp;
}


replace index.php, line 40-100:

Code: Select all
$query = "SELECT DISTINCT `recipe_name` , `reagents`, `recipe_tooltip`, `recipe_texture`, `item_color`
      FROM `".ROSTER_RECIPESTABLE."`
      WHERE (`recipe_type` = '".$Gem_info[$clientLocales[0]]['Gem']."'
      AND `skill_name` = '".$Gem_info[$clientLocales[0]]['sill']."') ";
for ($i = 1; $i<count($clientLocales); $i++)
{
   if ($clientLocales[$i] != '')
      $query .= " OR (`recipe_type` = '".$Gem_info[$clientLocales[$i]]['Gem']."'
        AND `skill_name` = '".$Gem_info[$clientLocales[$i]]['sill']."') ";
}
$query .=       "ORDER BY `reagents` ASC";

$result = $wowdb->query($query) or die_quietly($wowdb->error(),'Database Error', basename(__FILE__),__LINE__,$query);

$type['bleu']=array();
$type['red']=array();
$type['yellow']=array();
$type['meta']=array();

$countR=$countB=$countY=$countM=0;

while($row = $wowdb->fetch_array($result))
{
   $matchBlue=$matchRed=$matchYellow=$matchMeta=false;
        for ($i = 0; $i<count($clientLocales); $i++)
   {
           if(ereg($Gem_info[$clientLocales[$i]]['type']['blue'], $row['recipe_tooltip']))
               $matchBlue=true;
      if(ereg($Gem_info[$clientLocales[$i]]['type']['red'], $row['recipe_tooltip']))
               $matchRed=true;
      if(ereg($Gem_info[$clientLocales[$i]]['type']['yellow'], $row['recipe_tooltip']))
               $matchYellow=true;
      if(ereg($Gem_info[$clientLocales[$i]]['type']['meta'], $row['recipe_tooltip']))
               $matchMeta=true;
        }

        //first checking for a metagem, because it matches the other colors too ;-)
        if ($matchMeta == true)
        {
      $type['meta'][$countM]=$row;
      $countM++;
        } else
        {
          if ($matchBlue == true)
          {
      $type['blue'][$countB]=$row;
      $countB++;
          }
     if ($matchRed == true)
          {
      $type['red'][$countR]=$row;
      $countR++;
          }
     if ($matchYellow == true)
          {
      $type['yellow'][$countY]=$row;
      $countY++;
         }
       }

}


with:

Code: Select all
$type['blue']=gemlookup($clientLocales, 'blue');
$type['red']=gemlookup($clientLocales, 'red');
$type['yellow']=gemlookup($clientLocales, 'yellow');
$type['purple']=gemlookup($clientLocales, 'purple');
$type['green']=gemlookup($clientLocales, 'green');
$type['orange']=gemlookup($clientLocales, 'orange');
$type['meta']=gemlookup($clientLocales, 'meta');


Tell me if I missed some errors. ;-)
Last edited by Tyradil on Fri May 25, 2007 7:10 pm, edited 1 time in total.
author of the addon "Faction Rewards" - http://www.wowroster.net/Forums/viewforum/f=102.html

Image
User avatar
Tyradil
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 35
Joined: Thu Oct 26, 2006 5:13 pm

Jewelcrafter addon

Postby lunzet » Fri May 25, 2007 7:51 pm

looks fine. only the colorcode is not working for the new categories like green (fontcolor is not green)..but at least its back working. Thx
User avatar
lunzet
WR.net Journeyman
WR.net Journeyman
 
Posts: 119
Joined: Sat Jan 13, 2007 1:23 pm

Jewelcrafter addon

Postby Subxero » Fri May 25, 2007 8:15 pm

lunzet try add to localization.php line27

Code: Select all
$color['green']="#33CC33";
$color['orange']="#FF9900";
$color['purple']="#CC00FF";


and works like a charm ;)

Its not better only 3 color category ?
User avatar
Subxero
WR.net Artisan
WR.net Artisan
 
Posts: 234
Joined: Thu Jul 06, 2006 4:08 pm
Realm: Zul'jin (PvE) - US

Jewelcrafter addon

Postby lunzet » Fri May 25, 2007 8:48 pm

now its perfect...thanks a lot
User avatar
lunzet
WR.net Journeyman
WR.net Journeyman
 
Posts: 119
Joined: Sat Jan 13, 2007 1:23 pm

Re: Jewelcrafter addon

Postby Tyradil » Fri May 25, 2007 8:52 pm

Subxero wrote:Its not better only 3 color category ?


You want 3 color style? You get it. ;-)

add in the new index.php (needs changes above), line 75 (after the gemlookups) :

Code: Select all
if (!empty($type['purple']))
{
    $type['blue']= array_merge($type['blue'],$type['purple']);
    $type['red']= array_merge($type['red'],$type['purple']);
}
if (!empty($type['green']))
{
    $type['blue']= array_merge($type['blue'],$type['green']);
    $type['yellow']= array_merge($type['yellow'],$type['green']);
}
if (!empty($type['orange']))
{
    $type['yellow']= array_merge($type['yellow'],$type['orange']);
    $type['red']= array_merge($type['red'],$type['orange']);
}


insert also in the resulting line 96 (between the "foreach(...) {" and the "?>"):

Code: Select all
  if (($keyColor == 'blue') || ($keyColor == 'red') || ($keyColor == 'yellow')  || ($keyColor == 'meta'))
  {


and last, insert in the resulting line 175 (between "<?php" and "}// end foreach(...)"):

Code: Select all
 }
author of the addon "Faction Rewards" - http://www.wowroster.net/Forums/viewforum/f=102.html

Image
User avatar
Tyradil
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 35
Joined: Thu Oct 26, 2006 5:13 pm

Re: Jewelcrafter addon

Postby Borsti » Fri May 25, 2007 9:59 pm

Tyradil wrote:
You want 3 color style? You get it. ;-)



Can anyone share this 3 color sorted index.php?
I think a maked all changes but my roster shows only gems for one socket color no gem with 2 socket colors will shown there :(

and sorry for my english, comes from germany
User avatar
Borsti
WR.net Journeyman
WR.net Journeyman
 
Posts: 87
Joined: Sat Jul 08, 2006 11:37 am
Location: Hamburg/Germany

Re: Jewelcrafter addon

Postby Tyradil » Fri May 25, 2007 10:18 pm

Np, I attached my version. :-)

Did you also change the lang/deDE.php? I only postet the changes for enUS.php.

------
More detailed awnser in german:

Kein Problem Borsti, ich hab meine Version angehängt.

Hast du auch die lang/deDE.php angepasst? Ich hab oben nur die Änderungen für die enUS.php gepostet. Da ich aber leider mit dem englischen Client spiele, weiß ich nicht genau wie die Farben auf deutsch heißen, Orange und Grün, und Violett? Dann sollte die deDE.php ab Zeile 20 wie folgt aussehen:

Code: Select all
//color
$Gem_info['deDE']['type']['blue']="Blau";
$Gem_info['deDE']['type']['red']="Rot";
$Gem_info['deDE']['type']['yellow']="Gelb";
$Gem_info['deDE']['type']['green']="Grün"; //Aufpassen mit der Codierung!
$Gem_info['deDE']['type']['orange']="Orange";
$Gem_info['deDE']['type']['purple']="Violett";
$Gem_info['deDE']['type']['meta']="Meta";


Wenn es noch nicht geht musst du eventuell die Farben dort nochmal ändern.
Attachments
index.php.txt
my index.php with all the changes above
(5.73 KiB) Downloaded 486 times
Last edited by Tyradil on Sat May 26, 2007 3:10 am, edited 1 time in total.
author of the addon "Faction Rewards" - http://www.wowroster.net/Forums/viewforum/f=102.html

Image
User avatar
Tyradil
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 35
Joined: Thu Oct 26, 2006 5:13 pm

Re: Jewelcrafter addon

Postby Borsti » Fri May 25, 2007 11:15 pm

Tyradil wrote:Np, I attached my version. :-)



Thanks for your upload, i`ve forgoten to change the enUs, i´ve edit only the deDe :oops:
User avatar
Borsti
WR.net Journeyman
WR.net Journeyman
 
Posts: 87
Joined: Sat Jul 08, 2006 11:37 am
Location: Hamburg/Germany

Jewelcrafter addon

Postby dallyn » Sat May 26, 2007 9:07 pm

Bonjour tout le monde ,

Désolé mais je ne parle pas anglais :(

J'ai effectué la mise a jour mais les méta-gemmes n'apparaissent pas .

http://www.underworld-paradise.info/ros ... name=Gemme

Pourriez-vous me dire ou je me suis trompé .
Merci pour votre aide
Last edited by dallyn on Sat May 26, 2007 9:08 pm, edited 1 time in total.
dallyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Fri Aug 18, 2006 1:26 am

Re: Jewelcrafter addon

Postby Yoshette » Tue May 29, 2007 1:41 am

dallyn wrote:Bonjour tout le monde ,
Désolé mais je ne parle pas anglais :(

J'ai effectué la mise a jour mais les méta-gemmes n'apparaissent pas .

http://www.underworld-paradise.info/ros ... name=Gemme

Pourriez-vous me dire ou je me suis trompé .
Merci pour votre aide



Il faut que tu changes le nom des métagemmes dans le parser. Il a changé. Il te faut mettre

Code: Select all
$Gem_info['frFR']['type']['blue']="Bleue";
$Gem_info['frFR']['type']['red']="Rouge";
$Gem_info['frFR']['type']['yellow']="Jaune";
$Gem_info['frFR']['type']['green']="Verte";
$Gem_info['frFR']['type']['orange']="Orange";
$Gem_info['frFR']['type']['purple']="Violette";
$Gem_info['frFR']['type']['meta']="Méta";


dans le fichier lang/frFR.php
Last edited by Yoshette on Tue May 29, 2007 1:41 am, edited 1 time in total.
Yoshette
WR.net Apprentice
WR.net Apprentice
 
Posts: 41
Joined: Fri Oct 06, 2006 2:14 am
Location: Boston, MA, USA

Re: Jewelcrafter addon

Postby dallyn » Wed May 30, 2007 5:31 am

Merci de ton ca fonctionne correctement a présent :thumright:
dallyn
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Fri Aug 18, 2006 1:26 am

Jewelcrafter addon

Postby meisou » Tue Jul 24, 2007 8:01 pm

it seems my gems install is only showing exact color matches not gems like "Radiant Talasite (Blue or Yellow)"... Idealy I would like a Radiant Talasite to show up in the Blue and Yellow list as it qualifies for either... (I think my guildies wouldn't get the concept of green gems in its own category... >_< (though i can't get that to show either)

Installed Mod:
http://www.oppression.ws/roster/addon.p ... name=Gemme

Member with more than mod is showing:
http://www.oppression.ws/roster/char.ph ... on=recipes

Edit... nevermind its fixed.. apparently as of the 7.24.07 download the enUS local didn't have the Green / Orange / Purple colors in the list...

look in enUS.php orig code starting line 20:

Code: Select all
//color
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['meta']="meta";


added around line 23 change it to:
Code: Select all
//color
$Gem_info['enUS']['type']['blue']="Blue";
$Gem_info['enUS']['type']['red']="Red";
$Gem_info['enUS']['type']['yellow']="Yellow";
$Gem_info['enUS']['type']['green']="Green";
$Gem_info['enUS']['type']['orange']="Orange";
$Gem_info['enUS']['type']['purple']="Purple";
$Gem_info['enUS']['type']['meta']="meta";


Now it works for me 8)
Last edited by meisou on Tue Jul 24, 2007 8:07 pm, edited 2 times in total.
meisou
WR.net Apprentice
WR.net Apprentice
 
Posts: 1
Joined: Fri Jul 14, 2006 7:14 pm

Previous

Return to Gems Display

Who is online

Users browsing this forum: No registered users and 1 guest

cron