| Pages: 1 :: [one page] |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Bishop Vic
|
Posted - 2006.06.21 07:23:00 -
[1]
basicly when i return the value it comes out as 13332678123898368
how do i equate that into the individual rolls that i have, or how to check if i have a specific role?
thanks :)
|

Femaref
|
Posted - 2006.06.21 11:54:00 -
[2]
Edited by: Femaref on 21/06/2006 11:54:08 Shm. ****. plz delete^^
|

Femaref
|
Posted - 2006.06.21 11:54:00 -
[3]
I'm a link. Click me! Just scroll abit down.
|

Bishop Vic
|
Posted - 2006.06.21 16:37:00 -
[4]
yea, i ahve that page, but i dont know how it gets all the parts together and then how to seperate them out.
this guy figured it out, but i cant figure out his logic and go from a huge long number to individual roles.
http://oldforums.eveonline.com/?a=topic&threadID=286355
if i can figure out how to break up the long number then i can tell what roles people have.
|

elFarto
|
Posted - 2006.06.21 19:57:00 -
[5]
You can't split the number up per-se, but you can find out if the user is in a specific role:
CORPROLE & 128 (personel mananger) will equals 0 if they do not have the role, or 128 if they do. (You don't )
The & operator is the Bitwise AND operator. Click here for and explaination of how it works. Also, the bitwise and operator is & in PHP, and most other common languages I know.
Regards elFarto
npc.elfarto.com > Ingame NPC database Mal: No grenades. Jayne: Whatà? Aw! |

Saphirix
|
Posted - 2006.06.29 21:47:00 -
[6]
Here is the code I use for PHP:
<?php
$char = "<b>Character Name</b>"; $roles = 72057594037927809; // CORPROLE_ID
echo "Calculating role for $char<p>";
if (($roles & 1) || $roles == 72057594037927809) { echo "$char is a Director<BR>"; }
if ($roles & (128)) { echo "$char is a Personnel Manager<BR>"; }
if ($roles & (256)) { echo "$char is an Accountant<BR>"; }
if ($roles & (512)) { echo "$char is a Security Manager<BR>"; }
if ($roles & (1024)) { echo "$char is a Factory Manager<BR>"; }
if ($roles & (2048)) { echo "$char is a Station Manager<BR>"; }
if ($roles & (4096)) { echo "$char is an Auditor<BR>"; }
if ($roles & (8192)) { echo "$char Can take from division 1 hangar<BR>"; }
if ($roles & (16384)) { echo "$char Can take from division 2 hangar<BR>"; }
if ($roles & (32768)) { echo "$char Can take from division 3 hangar<BR>"; }
if ($roles & (65536)) { echo "$char Can take from division 4 hangar<BR>"; }
if ($roles & (131072)) { echo "$char Can take from division 5 hangar<BR>"; }
if ($roles & (262144)) { echo "$char Can take from division 6 hangar<BR>"; }
if ($roles & (524288)) { echo "$char Can take from division 7 hangar<BR>"; }
if ($roles & (1048576)) { echo "$char Can query division 1 hangar<BR>"; }
if ($roles & (2097152)) { echo "$char Can query division 2 hangar<BR>"; }
if ($roles & (4194304)) { echo "$char Can query division 3 hangar<BR>"; }
if ($roles & (8388608)) { echo "$char Can query division 4 hangar<BR>"; }
if ($roles & (16777216)) { echo "$char Can query division 5 hangar<BR>"; }
if ($roles & (33554432)) { echo "$char Can query division 6 hangar<BR>"; }
if ($roles & (67108864)) { echo "$char Can query division 7 hangar<BR>"; }
if ($roles & (134217728)) { echo "$char Can take from division 1 accounts<BR>"; }
if ($roles & (268435456)) { echo "$char Can take from division 2 accounts<BR>"; }
if ($roles & (536870912)) { echo "$char Can take from division 3 accounts<BR>"; }
if ($roles & (1073741824)) { echo "$char Can take from division 4 accounts<BR>"; }
if ($roles & (2147483648)) { echo "$char Can take from division 5 accounts<BR>"; }
if ($roles & (4294967296)) { echo "$char Can take from division 6 accounts<BR>"; }
if ($roles & (8589934592)) { echo "$char Can take from division 7 accounts<BR>"; }
if ($roles & (17179869184)) { echo "$char Can query division 1 accounts<BR>"; }
if ($roles & (34359738368)) { echo "$char Can query division 2 accounts<BR>"; }
if ($roles & (68719476736)) { echo "$char Can query division 3 accounts<BR>"; }
if ($roles & (137438953472)) { echo "$char Can query division 4 accounts<BR>"; }
if ($roles & (274877906944)) { echo "$char Can query division 5 accounts<BR>"; }
if ($roles & (549755813888)) { echo "$char Can query division 6 accounts<BR>"; }
if ($roles & (1099511627776)) { echo "$char Can query division 7 accounts<BR>"; }
if ($roles & (2199023255552)) { echo "$char Equipment config/Deploy space<BR>"; }
?>
|
| |
|
| Pages: 1 :: [one page] |