Forums | Chat | News | Contact Us | Register | PSU Social |
PSU: format c: *.*
Forums | Chat | News | Contact Us | Register | PSU Social |
Home | Forum | Chat | Wiki | Social | AGN | PS2 Stats |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
2013-05-30, 09:47 PM | [Ignore Me] #1 | ||
Private
|
So, I am trying to create an "at a glance" roster to host on our outfit website. So far, with the help of these forums and the Wiki I have gotten most of the information I want... the only information I am still lacking is weather the person as "Spawn Beacon" (id=7) or smoke (aka Rally Point, but doesn't seem to be listed in the item_list yet).
How can I use c:show to pull just the Spawn Beacon (and smoke, when it shows up). Here is the test page I am working from: http://projectxfire.com/russ_test/ps2_search.php Below is the source code for people that want it Code:
<?php $api = "https://census.soe.com"; $outfit_id = ""; //fill in your own outfit_id $format = "json"; $service_id = ""; //fill in your own service_id $verb = "get"; $game = "ps2-beta"; $collection = "outfit"; $query = "c:resolve=member_online_status,member_character(name.first,experience.rank,stats.update_time,times.last_login)"; $ApiLink = $api . "/" . $service_id . "/" . $format . "/" . $verb . "/" . $game . "/" . $collection . "/" . $outfit_id . "/?" . $query; $json_decode = (json_decode(file_get_contents($ApiLink), true)); $outfit_output = $json_decode["outfit_list"]; foreach ($outfit_output as $key => $value) { $get_outfit_name = $value["name"]; $get_outfit_alias = $value["alias"]; echo $get_outfit_name . ' (' . $get_outfit_alias . ') <br />'; $character_output = $value["members"]; } ?> <table border=1> <tr> <td>Character</td> <td>Battle Rank</td> <td>Outfit Rank</td> <td>Spawn Beacon?</td> <td>Smoke?</td> <td>Last Online</td> <td>Last Update</td> </tr> <?php foreach ($character_output as $key => $value) { $get_character = $value["name"]["first"]; $get_rank = $value["rank"]; $get_online = $value["online_status"]; $get_update = $value["stats"]["update_time"]; $get_last_on = $value["times"]["last_login"]; $get_character_id = $value["character_id"]; $br_output = $value["experience"]; $TimeZoneNameFrom="UTC"; $TimeZoneNameTo="America/Los_Angeles"; foreach ($br_output as $key => $value) { $get_br = $value["rank"]; } if ($get_online == 1) { $online = "Online Now!"; } else { $dt = new DateTime("@$get_last_on"); // $online = $dt->format('d-M-Y \a\t H:i T'); $TimeStr=$dt->format("d-M-Y H:i T"); $online = date_create($TimeStr, new DateTimeZone($TimeZoneNameFrom)) -> setTimezone(new DateTimeZone($TimeZoneNameTo))->format("d-M-Y \@ H:i \G\M\T O"); } $last_update = date_create($get_update, new DateTimeZone($TimeZoneNameFrom)) -> setTimezone(new DateTimeZone($TimeZoneNameTo))->format("d-M-Y \@ H:i \G\M\T O"); $char_link = "http://www.planetside-universe.com/character-" . $get_character_id . ".php"; // $collection = "character"; // $query = "c:resolve=item_list(name.en)"; // $item_link = $api . "/" . $service_id . "/" . $format . "/" . $verb . "/" . $game . "/" . $collection . "/" . $get_character_id . "/?" . $query; // $json_decode = (json_decode(file_get_contents($item_link), true)); // $outfit_output = $json_decode["outfit_list"]; echo "<tr><td><a href=\"$char_link\" target=\"_blank\">" . $get_character . "</a></td><td>" . $get_br . "</td><td>" . $get_rank . "</td><td>Becon</td><td>Smoke</td><td>" . $online . "</td><td>" . $last_update . "</tr>"; } ?> </table> <?php ?> Last edited by Razzun; 2013-05-31 at 02:43 PM. |
||
|
2013-06-01, 10:42 PM | [Ignore Me] #2 | ||
Private
|
I am thinking it is a simple addition to the resolve to add items.. then use if statement or in foreach to pool the items looking for the item with 7 or another that you would want to check for doing a little look up on PSU sandbox.. but should be simple once you get it in the same pool of information to take what you will out of it..
Edit: Well I am having no luck as well I thought was a simple thing had done it for a few other things playing around but looks like I don't see either in the item list like you said (missed that earlier) so I am at a loss sorry Last edited by Saladin; 2013-06-01 at 10:59 PM. Reason: reseached |
||
|
2013-06-02, 04:13 PM | [Ignore Me] #3 | ||
Private
|
skill_list in the API has the list of certs, which seems to be what you need.
ids 3948-3951: Rally Point - Orange, Green, Purple, Yellow 3947 Spawn Beacon, lowest lvl , 3955-3958 are "Priority Deployment", upgrading the Spawn Beacon (only the highest ID is shown) 3946 Request Reinforcements 3952 Squad Objectives 3953 Command Comm. Channel however, this list might be VS only. There are other identical entries with other IDs - each of the above IDs +14 or +28, idk which one is which. (so, basically make yourself an array of smoke and an array of beacon ids, and check in_array) |
||
|
|
Bookmarks |
Thread Tools | Search this Thread |
Display Modes | |
|
|