View Full Version : stumped...
mByte
06-30-2002, 10:51 AM
I am up to th last part of my online item wizard and im trying to get the race, class working correctly
here is the PHP line I use to pull from the blob in the raw_data field for the race.
it returns a value but I cannot find anywhere in the source code how it is stored or what the values mean.
$itemRace = hexdec(bin2hex(substr($row[0],272,1)));
I pulled up a simple item "Golden Leaf Brestplate" this item is ranger only Half Elf, Human, Wood Elf but I only got "73" Should there be one more number or did I miss somthing in my extraction?
Lurker_005
06-30-2002, 11:40 AM
Race, class, and diety are bitwise expressions. Someone else will have to give you the code, but here is an example.
THIS IS NOT THE REAL VALUES, just an example for 4 races.
decimal 4 is 0100 in binary
if the races were human halfelf highelf and woodelf
reading right to left:
first digit 0 is for humans
second digit 0 is for woodelf
third digit 1 is for half elf - wearable
forth digit 0 is for highelf
73 in binary is 1001001 the 3 1's represent your 3 races that can wear it. Not sure which is which though.
Oh, wait Stormgod's EQ treasures web stuff should have what you need in it.... http://www.stormgod-online.com/
stormgod
06-30-2002, 11:56 AM
nah trumpcard never finished the item part lol its missing exactly the races /classes /deity stuff , but I will update and finish the whole thing soon as I'm finishing my session exams the next three days :)
mByte
06-30-2002, 11:58 AM
Thanks - I never even thought to check binary /bonk me
Lurker_005
06-30-2002, 12:11 PM
sigh oh well, here is a code idea.
race <- decimal of race value
sudo code, you'll have to wright it to work right for PHP and also get the races correct for the correct bit
racetext = ""
if race >= 2^15 then
racetext = racetext + "BAR "
race = race - 2^15
end if
if race >= 2^14 then
racetext = racetext + "HUM "
race = race - 2^14
end if
if race >= 2^13 then
racetext = racetext + "OGR "
race = race - 2^13
end if
....
if race >= 2^0 then
racetext = racetext + "EUR "
race = race - 2^0
end if
if race <> 0 ERROR somewhere
You can do the same for class and diety.
mByte
06-30-2002, 02:32 PM
well i got the Binary numbers :)
now to find what belongs to what.
Trumpcard
06-30-2002, 02:56 PM
Damn, someone's actually using that thing! LOL..
I got most of the way through it, then started working on something else... I'll actually finish it if anyone cares..
After seeing Hogie and Lyn's stuff though I got depressed, theres was really neat...
stormgod
07-01-2002, 03:26 AM
it may be neat but they keep it for themselves so others cant have something right now , anyway I will work on it if you finish the code I will try to do some layout looking well
mByte
07-01-2002, 04:32 AM
Dosnt work for me but here is what I get. I was using the Kunark only and planner gear to test with they all return the same values but isnt it suppose to have only one 1 and 16 0's?
any help be great :)
below some stuff i alerted to get see the values.
All - 00000000010010101? I thought would be all 1's
Confused me
-----------------------------------------
Wiz reads 00000000000000000
shm reads 00000000000000000
bard reads 00000000001001001
SK - 00000000000010110
Read's Fine I think....
---------------------------------
war - 00000000000000001
cleric - 00000000000000010
pal - 00000000000000100
rang - 00000000000001000
Thats all I have checked
Trumpcard
07-01-2002, 04:55 AM
I'll see about finishing those sections up this week sometime Storm, and I'll mail it back to you... Shouldnt take too long..
stormgod
07-01-2002, 03:26 PM
hehe ok I'll try to update the whole code for 0.3.4 as soon as I finish my exams
mByte for the code look into the sources of eq emu editor(visual basic 6) (on my web site ) or those of 2.5 or 2.6 ( forgot number of latest version ) of FQadmin(delphi)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.