Jump to content

jaBote

Community Contributors
  • Content Count

    2037
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by jaBote

  1. Eu não sou Português ou Brasileiro, e não podo encontrar uma guia para resolver conflitos no git. Procure no Google.
  2. Memory leaks have nothing to do with database values. Seems char server deletes the table only on server startup, any changes will just insert a new row on it. Try to get the last row only, or perform an edit to remove the contents of the table prior to insert it. I don't understand the char server's code very much, but if you've got only one server (since that index seems to change on the amount of servers you've active on your machine) try the following: src/char/char.c if( SQL_ERROR == SQL->Query(sql_handle, "INSERT INTO `%s` SET index`='%d',`name`='%s',`exp`='%d',`jexp`='%d',`drop`='%d'", ragsrvinfo_db, fd, esc_server_name, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10)) ) Sql_ShowDebug(sql_handle); Add just BEFORE that: if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s`", ragsrvinfo_db) ) Sql_ShowDebug(sql_handle); And recompile your char server. This way you'll only have 1 entry on your SQL table at a time since any other entries will get deleted, then the line will be inserted. Please perform this on a backup: I haven't tested it and, I repeat, I've got no experience with char server.
  3. The values of the `ragsvrinfo` tables are set via this function in src/map/chrif.c on the map server, which sends it to the char server to store: /*========================================== * Send rates to char server [Wizputer] * S 2b16 <base rate>.L <job rate>.L <drop rate>.L *------------------------------------------*/bool chrif_ragsrvinfo(int base_rate, int job_rate, int drop_rate) { chrif_check(false); WFIFOHEAD(chrif->fd,14); WFIFOW(chrif->fd,0) = 0x2b16; WFIFOL(chrif->fd,2) = base_rate; WFIFOL(chrif->fd,6) = job_rate; WFIFOL(chrif->fd,10) = drop_rate; WFIFOSET(chrif->fd,14); return true;} These rates are placed on server boot and seem (not sure) to get instantly updated when you issue the GM @reloadbattleconf atcommand on the server. It just sends base, job and common item drop rates to the table. You can give it a try.
  4. Abra a consola do servidor e use: git pull na pasta do emulador.
  5. Eu editei mas vi que voçe resolveu seu proprio erro. Parabéns!
  6. I can right now answer you to the first one question (the '&' operator) so that you'll have it nice and clear. & is the bitwise AND operator, and it's done between two numbers. This means the operator does a bit-by-bit AND comparing both numbers. AND operator means: something is true (1) if A AND B are both true. Else something is false (0). Let's make an example to it. What's 5 & 11? First, let's place the numbers in binary form: 05 is 0101 in binary form; 11 is 1011 in binary form. Now let's compare them bit by bit. A bit result is 1 if that bit from the first operand and from the second operand are both true, so: 0101 <--- 5 1011 <--- 11 ----- 0001 <--- 1 Now you see 5 & 11 = 1. Try for example what (4 & 11), (6 & 11) and (7 & 11) operations yield. I'll leave the rest of the questions to miss Annie ;P
  7. It should, but I think it isn't quite wise to add a mapflag that automatically sets other zone. It'd be better to inherit it so that you'll avoid all possibilities of conflicting.
  8. Oh, you can avoid using mapflag zone pvp if you make your mapflag zone PVP_no_calling inherit the pvp zone.
  9. Tente accesar a uma pagina não existente no seu navegador. Pode ser a page do erro 404.
  10. You can cap a variable under certain limits. Check input script command at https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt#L1560 *input(<variable>{,<min>{,<max>}}) Or, if you don't trust the auto capping, you can reiterate it until you get a number you want from the user by using a do...while: do { mes "Please, insert a number between 0 and 100!!"; input .@number;} while (.@number < 0 || .@number > 100); Hope this helps. P.S.: I don't know what happens if you expect a number but enter a string or a single character, but I think it gets converted to the decimal ASCII value of the number or so.
  11. Lmao! I just laughed out loud on that one I hate you both.
  12. You mean something HERCsome?
  13. O parser tira erros. Voçe pode soluciona-los facilmente devido a que acho que somente tem erros de maiúsculas e minúsculas. Use http://haru.ws/scriptchecker/ como companheiro.
  14. It's a converter issue. Currently all `sc_data` gets pruned because of a safety measure, since rAthena SC IDs aren't the same as ours. Since carts are SCs, all merchants will have their carts released, much like Knights Peco Pecos or Hunters Falcons. Even people in Jail (SC_JAILED) get free, but there's currently no way to help with that. Think that, if we kept the current SC IDs, maybe you could permanently give SC_CASH_RECEIVEITEM (double exp rate for the user who has it) to someone that was jailed, for example (didn't check the numbers, this is just an exaggeration). Will discuss with the rest of the staff for a way to get the most SCs as possible saved.
  15. Have all these NPCs and scripts been loaded at least? Is that a problem with some specific NPCs or you can't see any NPC at all? Are you using pre-renewal mode in the server? Navigation system corresponds to actual NPCs on the official server (not your private server) unless you modify the system yourself in the clientside (which I don't know where it is to be honest).
  16. I think the SQL structure utilizes that of the regular storage (except for the `bound` and `unique_id` fields, maybe because it's old?). I don't reccommend to use it since it lacks that data and your users could have that way of cheating through this script. However, if you still want to use it AT YOUR OWN RISK. Possible vulnerabilities I've seen from this script: The first missing field from the table may make possible that your users can place bound items through this storage and get it without any bound restrictions (get a restriction-free item); The second missing field may ease the possibility of duping items on the servers (while still hard to do in current revisions) and make you unable to notice them since it removes the unique_id of these items; Placing always a 0 on the `expire_time` column (see line 105, last column on the insert, after the last card comes the expire time on the SQL) gives me the chills. The NPC table, in case you still want to use it, is specified on the NPC script, but you should make a correction. Here's the correct version: CREATE TABLE `custom_storage` SELECT * FROM storage;ALTER TABLE `custom_storage` ADD PRIMARY KEY ( `id` );ALTER TABLE `custom_storage` CHANGE `id` `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT;TRUNCATE TABLE `custom_storage`;
  17. Did you get any compilation errors? Did you add the plugin on plugins.conf so that it'll get loaded on server start?
  18. jaBote

    @hatredreset?

    Go look in src/map/atcommand.c Basically, add it after another atcommand code has finished (for example, after the ACMD(skdebug) code) and you've got to also add a definition. For adding an atcommand definition, just search this on the file: ACMD_DEF(skdebug), and add an the corresponding definition for the atcommand after it: ACMD_DEF(hatereset), That's it.
  19. Todos os comandos de scripting devem ficar em minúsculas sempre. Mude "Case" para "case" e tudo outro comando de scripting que tire erros.
  20. Check conf/battle/party.conf at line 13: // Interval before updating the party-member map mini-dots (milliseconds)party_update_interval: 1000
  21. You can't actually do much regarding this via scripting. SQL values are saved from time to time, so there's not much else to do unless you force to save the char or get his bank vault data saved on RAM from the server process itself.
  22. Oh, bummer, I forgot it. Use sleep2 script command instead of sleep, since sleep detaches the RID; sleep2 keeps it after the waiting time.
  23. Seems you're killing the moba without a player charactrr. The error appears because of that. If the NPC is placed on a map (isn't a floating NPC) and you don't mind about not having a player attached, you can change all these bc_map to bc_map|bc_npc and you'll broadcast with the NPC as source, not a possibly unattached player character.
×
×
  • Create New...

Important Information

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