Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-14-2008, 12:12 PM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default skills in the database?

is there a way to extract skills from the database?

maybe something i could use in a php script

maybe skill id/value i was looking at the old magelo clone and it has something in there about it but it looks like it bases it off you lvl verses item bonuses. not the actual skills itself.

here is the code they use maybe you can modify it?

Code:
$results = mysql_query("SELECT * from character_ where name='$charName' limit 1;");
$row = mysql_fetch_array($results);
$charID = $row['id'];
$profile = $row['profile'];		

$profile = bin2hex($profile);

function getSkillName($skill) {
    switch($skill) {
     case '0': return "1H Blunt"; break;
     case '1': return "1H Slashing"; break;
     case '2': return "2H Blunt"; break;
     case '3': return "2H Slashing"; break;
     case '4': return "Abjuration"; break;
     case '5': return "Alteration"; break;
     case '6': return "Apply Poison"; break;
     case '7': return "Archery"; break;
     case '8': return "Backstab"; break;
     case '9': return "Bind Wound"; break;
     case '10': return "Bash"; break;
     case '11': return "Block"; break;
     case '12': return "Brass Instuments"; break;
     case '13': return "Channeling"; break;
     case '14': return "Conjuration"; break;
     case '15': return "Defense"; break;
     case '16': return "Disarm"; break;
     case '17': return "Disarm Traps"; break;
     case '18': return "Divination"; break;
     case '19': return "Dodge"; break;
     case '20': return "Double Attack"; break;
     case '21': return "Dragon Punch"; break;
     case '22': return "Dual Wield"; break;
     case '23': return "Eagle Strike"; break;
     case '24': return "Evocation"; break;
     case '25': return "Feign Death"; break;
     case '26': return "Flying Kick"; break;
     case '27': return "Forage"; break;
     case '28': return "Hand to Hand"; break;
     case '29': return "Hide"; break;
     case '30': return "Kick"; break;
     case '31': return "Meditate"; break;
     case '32': return "Mend"; break;
     case '33': return "Offense"; break;
     case '34': return "Parry"; break;
     case '35': return "Pick Lock"; break;
     case '36': return "Piercing"; break;
     case '37': return "Riposte"; break;
     case '38': return "Round Kick"; break;
     case '39': return "Safe Fall"; break;
     case '40': return "Sense Heading"; break;
     case '41': return "Singing"; break;
     case '42': return "Sneak"; break;
     case '43': return "Specialize Abjuration"; break;
     case '44': return "Specialize Alteration"; break;
     case '45': return "Specialize Conjuration"; break;
     case '46': return "Specialize Divination"; break;
     case '47': return "Specialize Evocation"; break;
     case '48': return "Pick Pocket"; break;
     case '49': return "Stringed Instruments"; break;
     case '50': return "Swimming"; break;
     case '51': return "Throwing"; break;
     case '52': return "Tiger Claw"; break;
     case '53': return "Tracking"; break;
     case '54': return "Wind Instruments"; break;
     case '55': return "Fishing"; break;
     case '56': return "Make Poison"; break;
     case '57': return "Tinkering"; break;
     case '58': return "Research"; break;
     case '59': return "Alchemy"; break;
     case '60': return "Baking"; break;
     case '61': return "Tailoring"; break;
     case '62': return "Sense Traps"; break;
     case '63': return "Blacksmithing"; break;
     case '64': return "Fletching"; break;
     case '65': return "Brewing"; break;
     case '66': return "Alchohol Tolerance"; break;
     case '67': return "Begging"; break;
     case '68': return "Jewelry"; break;
     case '69': return "Pottery"; break;
     case '70': return "Percussion Instruments"; break;
     case '71': return "Intimidation"; break;
     case '72': return "Berserking"; break;
     case '73': return "Taunt"; break;
    }
}

$skills = array();

for($i = 0; $i < 74; $i++) {
	$skills[$i] = 0;
}	

#for($i = 5984, $j = 0; $i < 5984 + (8 * 75); $i += 8, $j++) {
for($i = 7664, $j = 0; $i < 7664 + (8 * 75); $i += 8, $j++) {
  $skill = hexdec(substr($profile, $i, 2));

  $skill += floor($skill * $itemSkills[$j] / 100);
  
  $skills[$j] = $skill;
}
?>
<table border="0" width="210" cellspacing="0" cellpadding="0" id="table1">
	<tr>
		<td align="left" width="100" valign="top">
		<font face="Arial" style="font-size: 8pt" color="#6699FF">Skill Name</font><font face="Arial" style="font-size: 8pt" color="#FFFFFF"><br>

<?php for($i = 0; $i < 74; $i++) {
	  if($skills[$i] != 0)
        echo getSkillName($i) . '<br>';
    }
?>	
        </font></td>
		<td width="10" align="right" valign="top">
		<font face="Arial" style="font-size: 8pt" color="#6699FF">Value</font><font face="Arial" style="font-size: 8pt" color="#FFFFFF"><br>

<?php for($i = 0; $i < 74; $i++) {
	  if($skills[$i] != 0) {
	    if($itemSkills[$i] != 0) { echo "<font color=\"#00FF00\">"; }

        echo "$skills[$i]<br>";

        if($itemSkills[$i] != 0) echo "</font>";
	  }
	  
}
?>	
		</font></td>
		<td width="45" align="right" valign="top">
		<font face="Arial" style="font-size: 8pt" color="#6699FF">Bonus</font><font face="Arial" style="font-size: 8pt" color="#FFFFFF"><br>

<?php for($i = 0; $i < 74; $i++) {
	  if($itemSkills[$i] != 0)
        echo "$itemSkills[$i]%";
        
      if($skills[$i] != 0)
        echo "<br>";
    }
?>	
		
		</font></td>
	</tr>
</table>
i get it to print out like it should useing this and some code from the table script. but it list all the skills and then sets them to 255 and thats not the skills the char has.
Reply With Quote
 


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 01:31 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3