Jump to content

CarlosHenrq

Members
  • Content Count

    11
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by CarlosHenrq

  1. CarlosHenrq

    php-grf

    I don't know the code from ROChargenPHP, but I suppose yes. He reads GRF or a data folder extracted. This is only for reading and writing at GRF files. Not for parsing .spr, .act or .pal files. We can create an PHPGrfEditor with this one :v I've searched a little and found this Grf class in ROChargenPHP https://github.com/ScDarko/ROChargenPHP/blob/master/loaders/class.Grf.php Just for update, this now reads and writes grf files.
  2. CarlosHenrq

    php-grf

    Hi! As I'm building an updater (like thor patcher), this can allow me to create new features like check files inside GRF comparing local files with server files and download only files not equals to the server. Another practical application is something like RoChargenPHP.
  3. CarlosHenrq

    php-grf

    Hi guys, I'm here to share with you my new project php-grf, with this guy you can use PHP to read and write grf files. This only supports grf files with version 0x200; This supports read and writing in grf files; This code is based on https://github.com/MagicalTux/grf The code ahead will show you how to extract all files inside grf. <?php require_once 'php-grf/lib/autoload.php'; // Instance a reader/writer for your grf file $grf = new GrfFile('php-grf/tests/test200.grf'); foreach ($grf->getEntries() as $entry) { $dir = dirname($entry->getFilename()); if (is_dir($dir) === false) mkdir ($dir, 0777, true); $file = str_replace('\\', '/', $entry->getFilename()); $buffer = $entry->getUnCompressedBuffer(); $fp = fopen($file, 'wb'); fwrite($fp, $buffer); fflush($fp); fclose($fp); } // Dispose all resources used $grf = null; Enjoy it, has any issue or problem with the lib? Please report it and help to keep it good for you all use. Repo URL: https://github.com/carloshenrq/php-grf Other useful repositories: https://github.com/arminherling/GRF/ (Read-only C#) https://github.com/MagicalTux/grf (Read-Write C)
  4. First, If you don't keep the ranking in order, you need get the global ranking before anything. My first suggest: -> Create a NPC timer that updates your "global ranking" every 5min, cache it in memory. -> When player type the cmd, he'll see the cached rank for him. My second suggest: -> Create a NPC that reads the "global ranking" and update it manually in the memory, this way, the cache'll be always updated... not need 5min to update. -> When player type the cmd, he'll see the updated rank for him. My last suggest: -> Create a view ordered by you ranking creteria (kills, deaths, points) and put it to show the row... then run select into the view, after it, search char_id and show the exacly position.
  5. Basically you have, in atcommand.c: /*========================================== * *------------------------------------------*/ ACMD(kick) { struct map_session_data *pl_sd; memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); if (!*message) { clif->message(fd, msg_fd(fd,1026)); // Please enter a player name (usage: @kick <char name/ID>). return false; } if ((pl_sd=map->nick2sd(message)) == NULL && (pl_sd=map->charid2sd(atoi(message))) == NULL) { clif->message(fd, msg_fd(fd,3)); // Character not found. return false; } if (pc_get_group_level(sd) < pc_get_group_level(pl_sd)) { clif->message(fd, msg_fd(fd,81)); // Your GM level don't authorize you to do this action on this player. return false; } clif->GM_kick(sd, pl_sd); return true; } Change: clif->GM_kick(sd, pl_sd); To: chrif->charselectreq(pl_sd, sockt->session[pl_sd->fd]->client_addr); And this made the trick...
  6. The "secret" is here: //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); This sends the packet to char-server and char-server should respond with OK or NOT OK. If OK, map-server should disconnect the character and the client'll popup the character selection.
  7. You need to change @kick or create a new one like @kick2charselect In clif.c you have this: static void clif_parse_Restart(int fd, struct map_session_data *sd) { switch(RFIFOB(fd,2)) { case 0x00: pc->respawn(sd,CLR_OUTSIGHT); break; case 0x01: /* Rovert's Prevent logout option - Fixed [Valaris] */ if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] && (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) ) { //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); } else { clif->disconnect_ack(sd, 1); } break; } } Need to use this: //Send to char-server for character selection. chrif->charselectreq(sd, sockt->session[fd]->client_addr); =]
  8. CarlosHenrq

    brACP

    English translation is coming soon :3 Justify: The main project language is Portuguese... We don't stop to create the english translation yet because there some features that we must finish... after it, we pull the trigger and start the translation file and documentations.
  9. CarlosHenrq

    brACP

    Hello guys, i'm brAthena Project Developer (not core, of course) and for a few months i've worked on control panel for us (brAthena Community). I'm still working and i really have little time to develop, it causes lots commits (216 commits right now) and few features. But i'm happy to say it's almost released. So the features for the brACP are: ** Instalation (Need improve) ** reCAPTCHA (https://www.google.com/recaptcha/intro/index.html) ** Themes system **** Default theme has mobile support with CSS3 ** Language system **** We have only pt_BR translation file right now, but we are working on it. ** Cache control (memcache) **** Rankings (Yes, cache sql result prevent MySQL to many request [shiraz, brAthena, hint]), translation and translated files. ** Account management **** Login, Create, Recover **** Administration panel (Still working on it) **** Change pass and e-mail **** Reset appear, position and equipment, **** Donations system (PagSeguro, https://pagseguro.uol.com.br) ** User notification (e-mail) when: **** Create account, changes password or e-mail, for e-mail changes we create log. **** When donation changes status For this control panel, we've used: ** PHP 5.4+ (PHP 7+ not tested) ** Apache 2.4 (IIS not tested) **** mod_rewrite must be enabled ** MySQL 5.5+ (MySQL 7+ not tested) ** PHP Composer **** To install our dependences of course! And the frameworks or extensions we've used to make it works: ** Slim Framework v3.1.0 ** Smarty v3.1.29 ** Guzzle v6.1.1 ** Doctrine v2.4.2 ** SwiftMailer v5.4.1 ** PECL::MEMCACHE v3.0.8 (Optional, https://pecl.php.net/package/memcache) Live version? Here is: http://carloshenrq.com/brACP/ Note¹.: The current live version is 0.2.1-alpha Note².: Once a week i update the live version, so some features you won't find right now there... Beta version? https://github.com/carloshenrq/brACP/releases/tag/0.1.1-beta Note¹.: This portuguese version only and the version is 0.1.1-beta, the newer is not ready for beta test. GitHub Repository? Here is: https://github.com/carloshenrq/brACP Suggestions, Reviews or Contribute? Please, let me know! If you can post here https://github.com/carloshenrq/brACP/issues will be more easy for us all.
  10. That's my patch for brAthena. You can add to your source, may need some changes if you have other sources changes. It's better you add manually at your source. @edit The final code... config.fullprotect.diff
  11. Hi, i believe this both 'issue' are not bug. For the first: The logical is simple, you can't protect what you don't have. So, you can't protect a weapon if you don't have a weapon equipped. This sounds good for me. For the second: This is not a bug. You may testing it with a high group_id account. In the code, you have: In: pc.c Ln: ~922 Function: int pc_isequip(struct map_session_data *sd,int n) if(pc_has_permission(sd, PC_PERM_USE_ALL_EQUIPMENT)) return 1; This test occours before any check from strip status. So, if your group_id has permission to equip any itens, it'll ignore the strip from stalker. Can you test with a low group_id account for us?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.