mourette Modératrice
Messages : 2399
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 13:26 | |
| Pas mal ce petit ranking ^^ | |
|
SatanThief Master Death Teddy
Messages : 1496 Serveur : Kradia
Job/Métier : Corsair | Wind Breaker | Cannoneer Level : 161 | 120 | 137
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 14:23 | |
| Yanisse, pense à rajouter une entrée pour qu'on puisse mettre nous même nos persos.
(Puis toi en tant qu'admin tu pourras virer ceux useless... car il va certainement en avoir vu certains membres) | |
|
mourette Modératrice
Messages : 2399 Serveur : Kradia
Job/Métier : Wild Hunter~Flame Wizard Level : 15x~8x
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 14:36 | |
| oui car ma petite Moera n'y est pas =D | |
|
Koshifti Red Snail
Messages : 14 Serveur : Kradia
Job/Métier : Dragon Knight Level : 106
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 14:49 | |
| - SatanThief a écrit:
- Yanisse, pense à rajouter une entrée pour qu'on puisse mettre nous même nos persos.
(Puis toi en tant qu'admin tu pourras virer ceux useless... car il va certainement en avoir vu certains membres) Bonne idée, je vais m'en occuper tout de suite :p | |
|
mourette Modératrice
Messages : 2399 Serveur : Kradia
Job/Métier : Wild Hunter~Flame Wizard Level : 15x~8x
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 15:11 | |
| Il faudrait que Nexon enlève les bugs concernant les images quand même, c'est lourd à force =D | |
|
xGodlyArrows Yeti & Pepe
Messages : 907 Serveur : Kradia
Job/Métier : Marksman Level : 205
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 16:28 | |
| C'est sympa comme ranking | |
|
SinBert Bain
Messages : 1549 Serveur : Kradia
Job/Métier : Hunter Level : 6x
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 17:57 | |
| Hep Mouton ! je ne sais pas si ça va pourvoir t'aider, mais j'avais utilisé (il y a longtemps) la classe de Dynamo pour aller chercher les infos sur le ranking officiel. - Spoiler:
- Code:
-
<?php
// MapleTrackEms PHP Class v1.0 include_once("inc/HttpClient.class.php"); class MapleTrackEms { var $char_status;
var $char_name;
var $char_img;
var $char_pet;
var $char_rank;
var $char_rank_status;
var $char_rank_new;
var $char_server;
var $char_job;
var $char_level;
var $char_exp;
var $char_pourcent;
function MapleTrackEms($name) {
include "inc/exp.php";
// Begin of Get Data
$client = new HttpClient("en.maplestory.nexoneu.com");
$client->setUserAgent("Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)");
$client->get("/modules/Rank.aspx?__EVENTTARGET=_uc_GameRank%24imgTopBtnSearch&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUKMjA5ODc2MjgxOQ9kFgJmDw8WBB4OaW50UHJldlJhbmtJRFgFAi00Hg5pbnROZXh0UmFua0lEWAUBNmQWAmYPZBYiZg9kFgQCAQ8PFgIeB1Zpc2libGVoZGQCAw9kFgICAQ8PFgIeBFRleHQFI1BsZWFzZSBsb2cgaW4gdG8gY2hlY2sgeW91ciBzdGF0dXMuZGQCAQ9kFgJmDxYCHgtfIUl0ZW1Db3VudAIDFgZmD2QWDGYPFQKtATxJTUcgU1JDPSJodHRwOi8vYXZhdGFyMS5tYXBsZWV1cm9wZS5jb20vQ2hhcmFjdGVyL0NISU5LSUFCTk1QQU5KREpER0hKTUtFTUhDSEpIUEpLR0pJTEpCTE9NTk5QSkhFQ05MTU9ORkJNQ0tIR0VGRUNMSEpFTElQRkhBTERBQUxNSExORUxORkdBRk9DQUhJQi5naWYiICBhbGlnbj0iYWJzTWlkZGxlIiA%2BB1pjcGFya1hkAgEPFQEGa3JhZGlhZAICDxUBDEZsYW1lIFdpemFyZGQCAw8VARFMZXZlbCA6IDxiPjU2PC9iPmQCBA8VAQYxOSw3NDRkAgUPFQF6PElNRyBTUkM9Imh0dHA6Ly9tc2ltYWdlLm5leG9uZXUuY29tL2F2YXRhci9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hbWVSYW5rJGltZ0JvdEJ0blNlYXJjaCcsJycpOyByZXR1cm4gZmFsc2U7fWQCEA8PFgQfBgUuaHR0cDovL21zaW1hZ2UubmV4b25ldS5jb20vZW4vZm9ydW0vc2VhcmNoLmdpZh8IBQlDaGFyYWN0ZXIWAh8HBQlDaGFyYWN0ZXJkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYIBRxfdWNfR2FtZVJhbmskaW1nVG9wQnRuSnVtcFRvBRpfdWNfR2FtZVJhbmskaW1nVG9wQnRuUHJldgUaX3VjX0dhbWVSYW5rJGltZ1RvcEJ0bk5leHQFHF91Y19HYW1lUmFuayRpbWdUb3BCdG5TZWFyY2gFHF91Y19HYW1lUmFuayRpbWdCb3RCdG5KdW1wVG8FGl91Y19HYW1lUmFuayRpbWdCb3RCdG5QcmV2BRpfdWNfR2FtZVJhbmskaW1nQm90QnRuTmV4dAUcX3VjX0dhbWVSYW5rJGltZ0JvdEJ0blNlYXJjaDSSTCw1rKJpvnBXotCeFLoiqXjS&__EVENTVALIDATION=%2FwEWDQKV9cfjDQKbiuqsCgLA06gUAuzRxo8HAsuSrOkNAqWzjcEJAsa7n5MLApuKosAIAp7Vj8MGAsK%2F5JwJArHKuKABAv2olLAFAuT7oZcLJFhyGWosmudsB1LPj10hV5aTfr4%3D&_uc_GameRank%24tbTopJumpRank=1&_uc_GameRank%24tbTopCharacterName=" . utf8_encode($name) . "&_uc_GameRank%24tbBotJumpRank=1&_uc_GameRank%24tbBotCharacterName=");
$client->setMaxRedirects(3);
$contents = $client->getContent();
// End of Get Data
// Begin of Format Data
if (eregi("ranking_list_bg03", $contents)) { $this->char_status = TRUE; $contents = strchr($contents, "ranking_list_bg03"); $contents = strchr($contents, "ranking_list_bg02 cen\" width=\"81\">"); $pos = strpos($contents,"<td class=\"") - 45; $this->char_rank = substr($contents,34,$pos); $contents = strchr($contents, "http://avatar1.mapleeurope.com/Pet/"); $pos = strpos($contents,".gif\"") + 4; $this->char_pet = substr($contents,0,$pos); $contents = strchr($contents, "http://avatar1.mapleeurope.com/Character/"); $pos = strpos($contents,".gif\"") + 4; $this->char_img = substr($contents,0,$pos); $contents = strchr($contents, "ranking_list_bg02 cen\" width=\"128\">"); $pos = strpos($contents,"<td class=\"") - 46; $this->char_name = substr($contents,35,$pos); $contents = strchr($contents, "ranking_list_bg02 cen\" width=\"99\">"); $pos = strpos($contents,"<td class=\"") - 45; $this->char_job = substr($contents,34,$pos); $contents = strchr($contents, ".gif\" alt=\""); $pos = strpos($contents,"<td class=\"") - 39; $this->char_server = substr($contents,11,$pos); $contents = strchr($contents, "ranking_list_bg02 cen\" width=\"90\"><div><B>"); $pos = strpos($contents,"</B><br><SPAN CLASS=rank_info01>") - 42; $this->char_level = substr($contents,42,$pos); $contents = strchr($contents, "<SPAN CLASS=rank_info01>("); $pos = strpos($contents,")</SPAN><br>") - 25; $this->char_exp = substr($contents,25,$pos); $contents = strchr($contents, "<SPAN CLASS=menu>"); $pos = strpos($contents,"</span></TD>"); $rankinfo = substr($contents,0,$pos); if (eregi("msimage.nexon.net", $rankinfo)) { $rankinfo = strchr($rankinfo, "Ranking/ranking_"); $pos = strpos($rankinfo,".gif\" ALIGN=\"absmiddle\"") - 16; $this->char_rank_status = substr($rankinfo,16,$pos); } else { $this->char_rank_status = FALSE; } if ($this->char_rank_status) { $contents = strchr($contents, " <FONT COLOR=\""); $contents = strchr($contents, "\">"); $pos = strpos($contents,"</FONT></span></TD>") - 2; $this->char_rank_new = substr($contents,2,$pos); } else { $this->char_rank_new = FALSE; } $this->char_pourcent = ereg_replace(",", "", $this->char_exp); $this->char_pourcent = $this->char_pourcent * 100 / $explvl[$this->char_level]; $this->char_pourcent = number_format($this->char_pourcent, 2, '.', ''); } else { $this->char_status = FALSE; } // End of Format Data }
}
?>
Il est possible qu'elle ne fonctionne plus (j'imagine que le ranking officiel à changer depuis le temps) mais on ne sait jamais. Si besoin j'ai aussi celle de GMS. Bonne fin de journée. PS: j'avoue que j'ai pas lu tout le topic donc désolé si cette hypothèse a déjà été soulevée/réfutée. PS2: la classe HttpClient qui est incluse dans MapleTrackEms: - Spoiler:
- Code:
-
<?php
/* Version 0.9, 6th April 2003 - Simon Willison ( http://simon.incutio.com/ ) Manual: http://scripts.incutio.com/httpclient/ */
class HttpClient { // Request vars var $host; var $port; var $path; var $method; var $postdata = ''; var $cookies = array(); var $referer; var $accept = 'text/xml,application/xml,application/xhtml+xml,text/html,text/plain,image/png,image/jpeg,image/gif,*/*'; var $accept_encoding = 'gzip'; var $accept_language = 'en-us'; var $user_agent = 'Incutio HttpClient v0.9'; // Options var $timeout = 20; var $use_gzip = true; var $persist_cookies = true; // If true, received cookies are placed in the $this->cookies array ready for the next request // Note: This currently ignores the cookie path (and time) completely. Time is not important, // but path could possibly lead to security problems. var $persist_referers = true; // For each request, sends path of last request as referer var $debug = false; var $handle_redirects = true; // Auaomtically redirect if Location or URI header is found var $max_redirects = 5; var $headers_only = false; // If true, stops receiving once headers have been read. // Basic authorization variables var $username; var $password; // Response vars var $status; var $headers = array(); var $content = ''; var $errormsg; // Tracker variables var $redirect_count = 0; var $cookie_host = ''; function HttpClient($host, $port=80) { $this->host = $host; $this->port = $port; } function get($path, $data = false) { $this->path = $path; $this->method = 'GET'; if ($data) { $this->path .= '?'.$this->buildQueryString($data); } return $this->doRequest(); } function post($path, $data) { $this->path = $path; $this->method = 'POST'; $this->postdata = $this->buildQueryString($data); return $this->doRequest(); } function buildQueryString($data) { $querystring = ''; if (is_array($data)) { // Change data in to postable data foreach ($data as $key => $val) { if (is_array($val)) { foreach ($val as $val2) { $querystring .= urlencode($key).'='.urlencode($val2).'&'; } } else { $querystring .= urlencode($key).'='.urlencode($val).'&'; } } $querystring = substr($querystring, 0, -1); // Eliminate unnecessary & } else { $querystring = $data; } return $querystring; } function doRequest() { // Performs the actual HTTP request, returning true or false depending on outcome if (!$fp = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout)) { // Set error message switch($errno) { case -3: $this->errormsg = 'Socket creation failed (-3)'; case -4: $this->errormsg = 'DNS lookup failure (-4)'; case -5: $this->errormsg = 'Connection refused or timed out (-5)'; default: $this->errormsg = 'Connection failed ('.$errno.')'; $this->errormsg .= ' '.$errstr; $this->debug($this->errormsg); } return false; } socket_set_timeout($fp, $this->timeout); $request = $this->buildRequest(); $this->debug('Request', $request); fwrite($fp, $request); // Reset all the variables that should not persist between requests $this->headers = array(); $this->content = ''; $this->errormsg = ''; // Set a couple of flags $inHeaders = true; $atStart = true; // Now start reading back the response while (!feof($fp)) { $line = fgets($fp, 4096); if ($atStart) { // Deal with first line of returned data $atStart = false; if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) { $this->errormsg = "Status code line invalid: ".htmlentities($line); $this->debug($this->errormsg); return false; } $http_version = $m[1]; // not used $this->status = $m[2]; $status_string = $m[3]; // not used $this->debug(trim($line)); continue; } if ($inHeaders) { if (trim($line) == '') { $inHeaders = false; $this->debug('Received Headers', $this->headers); if ($this->headers_only) { break; // Skip the rest of the input } continue; } if (!preg_match('/([^:]+):\\s*(.*)/', $line, $m)) { // Skip to the next header continue; } $key = strtolower(trim($m[1])); $val = trim($m[2]); // Deal with the possibility of multiple headers of same name if (isset($this->headers[$key])) { if (is_array($this->headers[$key])) { $this->headers[$key][] = $val; } else { $this->headers[$key] = array($this->headers[$key], $val); } } else { $this->headers[$key] = $val; } continue; } // We're not in the headers, so append the line to the contents $this->content .= $line; } fclose($fp); // If data is compressed, uncompress it if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] == 'gzip') { $this->debug('Content is gzip encoded, unzipping it'); $this->content = substr($this->content, 10); // See http://www.php.net/manual/en/function.gzencode.php $this->content = gzinflate($this->content); } // If $persist_cookies, deal with any cookies if ($this->persist_cookies && isset($this->headers['set-cookie']) && $this->host == $this->cookie_host) { $cookies = $this->headers['set-cookie']; if (!is_array($cookies)) { $cookies = array($cookies); } foreach ($cookies as $cookie) { if (preg_match('/([^=]+)=([^;]+);/', $cookie, $m)) { $this->cookies[$m[1]] = $m[2]; } } // Record domain of cookies for security reasons $this->cookie_host = $this->host; } // If $persist_referers, set the referer ready for the next request if ($this->persist_referers) { $this->debug('Persisting referer: '.$this->getRequestURL()); $this->referer = $this->getRequestURL(); } // Finally, if handle_redirects and a redirect is sent, do that if ($this->handle_redirects) { if (++$this->redirect_count >= $this->max_redirects) { $this->errormsg = 'Number of redirects exceeded maximum ('.$this->max_redirects.')'; $this->debug($this->errormsg); $this->redirect_count = 0; return false; } $location = isset($this->headers['location']) ? $this->headers['location'] : ''; $uri = isset($this->headers['uri']) ? $this->headers['uri'] : ''; if ($location || $uri) { $url = parse_url($location.$uri); // This will FAIL if redirect is to a different site return $this->get($url['path']); } } return true; } function buildRequest() { $headers = array(); $headers[] = "{$this->method} {$this->path} HTTP/1.0"; // Using 1.1 leads to all manner of problems, such as "chunked" encoding $headers[] = "Host: {$this->host}"; $headers[] = "User-Agent: {$this->user_agent}"; $headers[] = "Accept: {$this->accept}"; if ($this->use_gzip) { $headers[] = "Accept-encoding: {$this->accept_encoding}"; } $headers[] = "Accept-language: {$this->accept_language}"; if ($this->referer) { $headers[] = "Referer: {$this->referer}"; } // Cookies if ($this->cookies) { $cookie = 'Cookie: '; foreach ($this->cookies as $key => $value) { $cookie .= "$key=$value; "; } $headers[] = $cookie; } // Basic authentication if ($this->username && $this->password) { $headers[] = 'Authorization: BASIC '.base64_encode($this->username.':'.$this->password); } // If this is a POST, set the content type and length if ($this->postdata) { $headers[] = 'Content-Type: application/x-www-form-urlencoded'; $headers[] = 'Content-Length: '.strlen($this->postdata); } $request = implode("\r\n", $headers)."\r\n\r\n".$this->postdata; return $request; } function getStatus() { return $this->status; } function getContent() { return $this->content; } function getHeaders() { return $this->headers; } function getHeader($header) { $header = strtolower($header); if (isset($this->headers[$header])) { return $this->headers[$header]; } else { return false; } } function getError() { return $this->errormsg; } function getCookies() { return $this->cookies; } function getRequestURL() { $url = 'http://'.$this->host; if ($this->port != 80) { $url .= ':'.$this->port; } $url .= $this->path; return $url; } // Setter methods function setUserAgent($string) { $this->user_agent = $string; } function setAuthorization($username, $password) { $this->username = $username; $this->password = $password; } function setCookies($array) { $this->cookies = $array; } // Option setting methods function useGzip($boolean) { $this->use_gzip = $boolean; } function setPersistCookies($boolean) { $this->persist_cookies = $boolean; } function setPersistReferers($boolean) { $this->persist_referers = $boolean; } function setHandleRedirects($boolean) { $this->handle_redirects = $boolean; } function setMaxRedirects($num) { $this->max_redirects = $num; } function setHeadersOnly($boolean) { $this->headers_only = $boolean; } function setDebug($boolean) { $this->debug = $boolean; } // "Quick" static methods function quickGet($url) { $bits = parse_url($url); $host = $bits['host']; $port = isset($bits['port']) ? $bits['port'] : 80; $path = isset($bits['path']) ? $bits['path'] : '/'; if (isset($bits['query'])) { $path .= '?'.$bits['query']; } $client = new HttpClient($host, $port); if (!$client->get($path)) { return false; } else { return $client->getContent(); } } function quickPost($url, $data) { $bits = parse_url($url); $host = $bits['host']; $port = isset($bits['port']) ? $bits['port'] : 80; $path = isset($bits['path']) ? $bits['path'] : '/'; $client = new HttpClient($host, $port); if (!$client->post($path, $data)) { return false; } else { return $client->getContent(); } } function debug($msg, $object = false) { if ($this->debug) { print '<div style="border: 1px solid red; padding: 0.5em; margin: 0.5em;"><strong>HttpClient Debug:</strong> '.$msg; if ($object) { ob_start(); print_r($object); $content = htmlentities(ob_get_contents()); ob_end_clean(); print '<pre>'.$content.'</pre>'; } print '</div>'; } } }
?>
| |
|
Gatsu Zombie Mushmom
Messages : 300 Serveur : Kradia
Job/Métier : Mage I/L & Crusader & Mercedes Level : 70 & 90 & 30
| Sujet: Re: Ranking francophone : tatement de terrain Lun 9 Juil 2012 - 19:37 | |
| J'laise mes IGN quand même.
GatsuRx/Elfen Diez | |
|
Super-Mouton Modérateur
Messages : 3869 Serveur : Broa
| Sujet: Re: Ranking francophone : tatement de terrain Mar 10 Juil 2012 - 5:17 | |
| Coucou,
Encore pas eu le temps travailler là-dessus...
@Satan Le lien ne fonctionne pas, comme c'est un no-ip j'imagine que ça veut dire que l'ordi est fermé.
Merci SinBert mais en fait cette partie là je me l'étais déjà tappé par moi-même et elle fonctionnait à 100% :p et l'ajout de perso par formulaire + base de données aussi, il me restait le ranking avec les différentes options à programmer. C'est juste une question d'avoir le temps... :/
Je vous tiens au courant dès que ça avance. | |
|
SatanThief Master Death Teddy
Messages : 1496 Serveur : Kradia
Job/Métier : Corsair | Wind Breaker | Cannoneer Level : 161 | 120 | 137
| Sujet: Re: Ranking francophone : tatement de terrain Mar 10 Juil 2012 - 8:19 | |
| En effet, certainement hébergé en local par notre Essinay national | |
|
Super-Mouton Modérateur
Messages : 3869 Serveur : Broa
| Sujet: Re: Ranking francophone : tatement de terrain Mer 11 Juil 2012 - 1:22 | |
| Et là c'est "Espace VIP". Pas de ranking. Hm. | |
|
lolxpmdr Werewolf
Messages : 739 Serveur : kradia/arcania
Job/Métier : aran/sniper Level : 131/80
| Sujet: Re: Ranking francophone : tatement de terrain Mer 11 Juil 2012 - 1:24 | |
| tu peu oublier devolgaz, il n'existe plus | |
|
Super-Mouton Modérateur
Messages : 3869 Serveur : Broa
| Sujet: Re: Ranking francophone : tatement de terrain Mer 11 Juil 2012 - 1:44 | |
| Ok, bah de toute manière mon ranking ne rankera pas les persos qui n'existent pas. :p | |
|
SatanThief Master Death Teddy
Messages : 1496 Serveur : Kradia
Job/Métier : Corsair | Wind Breaker | Cannoneer Level : 161 | 120 | 137
| Sujet: Re: Ranking francophone : tatement de terrain Mer 11 Juil 2012 - 8:48 | |
| Mouais, je ne sais pas ce qu'il fait le mignon | |
|
Koshifti Red Snail
Messages : 14 Serveur : Kradia
Job/Métier : Dragon Knight Level : 106
| Sujet: Re: Ranking francophone : tatement de terrain Jeu 12 Juil 2012 - 3:40 | |
| Désolé les filous, j'ai du hebergé le "squelette" du site que je devais offrir à ma copine ... J'ai remis le ranking : http://renaissance-guilde.no-ip.org/
Edit : j'ai supprimé toutes les informations, n'importe qui peut y entrer son pseudo maintenant et garre aux floodeurs, m'obligez pas à mettre un captcha ^_^ | |
|
mourette Modératrice
Messages : 2399 Serveur : Kradia
Job/Métier : Wild Hunter~Flame Wizard Level : 15x~8x
| Sujet: Re: Ranking francophone : tatement de terrain Jeu 12 Juil 2012 - 9:22 | |
| Super ^^ Par contre il faudrait ajouter un petit bouton qui permet de revenir sur le classement quand le nom n'existe pas
d'ailleurs je ne comprends pas pourquoi il ne veut pas ma petite Moera ^^ Les Mercedes sont actif sur le classement ? | |
|
SatanThief Master Death Teddy
Messages : 1496 Serveur : Kradia
Job/Métier : Corsair | Wind Breaker | Cannoneer Level : 161 | 120 | 137
| Sujet: Re: Ranking francophone : tatement de terrain Jeu 12 Juil 2012 - 10:03 | |
| Je te rassure... Moi là c'est Page inaccessible... Vive les DNS Dynamic qui foirent @Yanisse, si besoin d'un vrai hébergement, faut voir si on peut faire un formulaire Forumactif | |
|
Koshifti Red Snail
Messages : 14 Serveur : Kradia
Job/Métier : Dragon Knight Level : 106
| Sujet: Re: Ranking francophone : tatement de terrain Jeu 12 Juil 2012 - 13:28 | |
| - mourette a écrit:
- Super ^^
Par contre il faudrait ajouter un petit bouton qui permet de revenir sur le classement quand le nom n'existe pas
d'ailleurs je ne comprends pas pourquoi il ne veut pas ma petite Moera ^^ Les Mercedes sont actif sur le classement ? Les Mercedes ne sont pas encore actif dans le classement de Nexon ^^ | |
|
mourette Modératrice
Messages : 2399 Serveur : Kradia
Job/Métier : Wild Hunter~Flame Wizard Level : 15x~8x
| Sujet: Re: Ranking francophone : tatement de terrain Jeu 12 Juil 2012 - 13:32 | |
| ah bon ? bah snif pourtant je me vois sur maplestory europe méchant nexon lol
merci à toi pour ce ranking de Renaissance ^^ | |
|
Koshifti Red Snail
Messages : 14 Serveur : Kradia
Job/Métier : Dragon Knight Level : 106
| Sujet: Re: Ranking francophone : tatement de terrain Jeu 12 Juil 2012 - 23:32 | |
| - mourette a écrit:
- ah bon ? bah snif pourtant je me vois sur maplestory europe méchant nexon lol
merci à toi pour ce ranking de Renaissance ^^ Oui je viens de vérifier en fait le nom de la classe est pas encore disponible sur le ranking de nexon ( qui devrait être "Bowman" ) je vais faire en sorte que ça marche ! Edit : voila problème corrigé, on peut maintenant entrer nos mercedes ! | |
|
SatanThief Master Death Teddy
Messages : 1496 Serveur : Kradia
Job/Métier : Corsair | Wind Breaker | Cannoneer Level : 161 | 120 | 137
| Sujet: Re: Ranking francophone : tatement de terrain Ven 13 Juil 2012 - 8:15 | |
| Toutes les images bug... ça craint sur le site officiel :@ | |
|