Jump to content

jaBote

Members
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by jaBote

  1. Just change any unprefixed variable ( variable, character variable ) to a sharp-prefixed variable ( #variable, account variable ): [same code as Bahmut managed to reply before I did] There you go: try it.
  2. You can add it to an already existing NPC (any NPC script) or if you want you can make a new one with this code and then load it: - script GMdontwarptoGvG -1,{ OnPCLoadMapEvent: getmapxy (.@map$,.@x,.@y,0); if( getgmlevel() && (gemapflag(.@map$,"mf_gvg")) || (gemapflag(.@map$,"mf_gvg_noparty")) || (gemapflag(.@map$,"mf_gvg_castle")) || (gemapflag(.@map$,"mf_gvg_dungeon")) ) warp "SavePoint"; end; } mapname mapflag loadevent // Add this mapflag to every map that also has mapflag gvg of any kind AND you want this script to be run mapname2 mapflag loadevent mapname3 mapflag loadevent mapname4 mapflag loadevent mapname5 mapflag loadevent mapname6 mapflag loadevent mapname7 mapflag loadevent I personally would use a separate NPC. P.S.: Careful, the script I made on the other post has unbalanced brackets and that's an error, that piece of code won't run.
  3. Just copy the content of the file (or PhpMyAdmin lets you upload the file) and run it on your DB. This already has the queries you have to use.
  4. Nope, I'll take the lead of Emistry and fix the little problem it had. This should work: instead of a map name check I've used a mapflag check: OnPCLoadMapEvent: getmapxy (.@map$,.@x,.@y,0); if( getgmlevel() && (gemapflag(.@map$,"mf_gvg") || (gemapflag(.@map$,"mf_gvg_noparty") || (gemapflag(.@map$,"mf_gvg_castle") || (gemapflag(.@map$,"mf_gvg_dungeon")) ) warp "SavePoint"; end; mapname mapflag loadevent // Add this mapflag to every map that also has mapflag gvg of any kind AND you want this script to be run Try this one.
  5. I think you should add a map name check, because if the loadevent mapflag is set on another map it'll warp the GM anyways.
  6. In code boxes colors are not shown, but you have to change the 0x91 value on that line. Let's analyse it: 0x91 is the sum of 0x80 + 0x10 + 0x01 which means that mob can move (0x01), cast sensor (0x10) and that it can attack (0x80). So you'll have to sum the values of what you want the mob to do. If you want to make the mob to change target when it's in chase mode you'll have to sum that to the existing mode the mob has so you'll have to sum 0x91 + 0x400 which is 0x491 and place it on the mode column of the monster. Then save the file, @reloadmobdb (or restart the server if it doesn't work) and chew the new behavior of Mi Gao. Then see if it fits your needs or else experiment with the rest of the modes a mob can have. Hope it helped.
  7. Well, for disabling renewal you can go to /src/config/renewal.h in your rAthena folder and comment out the definitions there. You just need to put a double slash (//) at the start of the definitions. You'll have the new maps once you compile your server (it doesn't matter if you put renewal or not). Unfortunately, for using the new monster and items you'll have to edit them yourself. As long as I know, any customization regarding that hasn't ever been made (please correct me Support Leaders if I'm wrong).
  8. You can do that yourself by changing the monster mode in the /db/{re or pre-re}/mob_db.txt. You can help yourself of what are those modes taking a look at /doc/mob_db_mode_list.txt
  9. I've just updated map_msg_es to the latest revision by now. P.S.: Edited, misread it
  10. ¿Descargas de dónde? ¿Del foro? Yo no tengo problema ninguno para descargar las cosas. Intenta postear alguna que otra foto de lo que te ocurre a ver si podemos echarte una mano, aunque en principio esto deberías hablarlo con algún administrador del foro o en la sección de sugerencias y bugs del foro. Eso sí, tiene que ser en inglés...
  11. Lo importante es que funciona. Y el problema con eso es que estás consumiendo una variable permanente de personaje, y tienes solo 256 a menos que lo edites en mmo.h. Además esa consulta SQL te puede servir para reproducir tu ranking en la web con PHP por ejemplo. Creo que voy a adoptar otra solución cuando haga otro servidor, porque voy a tener rankings incluso para morir xD
  12. No sé si he dado con lo que tenía que dar, parece que sí. Prueba a usar esto en tu casero desde PhpMyAdmin (o en tu servidor después de hacer un backup), que no puedo testearlo ahora mismo en un casero porque no dispongo de nadie con quien usarlo. Aun así un SELECT no debería nunca fastidiarte la base de datos: SELECT `char`.`name` AS `nombre`, `global_reg_value`.`value` AS `puntos` FROM `global_reg_value` LEFT JOIN `char` ON `global_reg_value`.`char_id` = `char`.`char_id` WHERE `global_reg_value`.`type` =3 AND `global_reg_value`.`str` = 'punto' ORDER BY `puntos` DESC, `nombre` ASC LIMIT 10 Una vez compruebes que funciona (¡Importante!) inserta dicha consulta en un NPC, la cual en una sentencia de scripting sería: query_sql "SELECT `char`.`name` AS `nombre`, `global_reg_value`.`value` AS `puntos` FROM `global_reg_value` LEFT JOIN `char` ON `global_reg_value`.`char_id` = `char`.`char_id` WHERE `global_reg_value`.`type` = 3 AND `global_reg_value`.`str` = 'punto' ORDER BY `puntos` DESC, `nombre` ASC LIMIT 10", .@nombre$, .@puntos; Y creo que ya sabrías qué hacer con los arrays .@nombre$ y .@puntos. Ahora cuando pruebes me cuentas. Malditos JOINs y su enrevesada sintaxis...
  13. Hay una consulta SQL que pueda hacerse desde la tabla `char` ampliada que pueda recoger los valores de los puntos otorgados, pero ahora mismo no doy con la tecla. Hay que pelearse con consultas SQL anidadas que sepan hacerlo o bien genera un web script que te las inserte. Voy a intentar buscar cómo se hacía para obtener esas 10 posiciones sin "trampa". Mientras tanto mantén activa la petición en scripting Support a ver si alguien logra encontrar la solución antes que yo. Simplemente para responder diciendo que no sirve di que no valía o algo.
  14. You can try the E-Inquiry script Emistry made. An e-mail isn't sent, but it's like a ticket system built on a RO server via scripting.
  15. I've just replied you in the Spanish section of this forum. Didn't know you posted this when I already replied there, sorry. Check if that works and if not I'll improvise another solution.
  16. ¡Buenas! Siento tardar en la respuesta, pero ayer la tenía redactada al completo y se me borró justo cuando la iba a enviar, me enfadé porque la hice bastante completita. Soy consciente de que es una respuesta larga, pero además pretendo ser didáctico. (Antes de que lo que redacté durante alrededor de una hora se desvaneciera) Te propuse una segunda solución, mucho más sencilla y rápida de hacer pero menos elegante, la cual usé en mi último servidor sin ningún problema y me simplificaba muchísimo la creación de rankings. Además facilitaba también el visionado de los mismos rankings desde la propia web del servidor. Esta segunda solución pasa por crear un nuevo campo en la tabla `char`, de valor entero, el cual para este ejemplo llamaré `puntosranking`. Esto deberías hacerlo desde PhpMyAdmin con un usuario que tenga privilegios para alterar tablas de la base de datos que uses en el emulador (supongo que ya sabes que es la que por defecto se llama `ragnarok`). Entonces, deberías ejecutar esto en la base de datos `ragnarok`: ALTER TABLE `char` ADD `puntosranking` INT NOT NULL DEFAULT '0'; Tranquilo, a menos que actualicen las bases de datos no tendrás nunca ningún problema con esto. Este es el primer motivo por el que no se trata de una solución elegante. Entonces ya con esto tienes las dos variables que necesitas (nombre y puntos) en la misma tabla, de tal manera que ya puedes olvidarte por completo de usar JOINs (que no es tan complicado pero a veces se las trae). Ahora necesitamos una consulta SQL que recoja la información que buscamos de la forma que queremos. Entonces podemos usar un SELECT básico para recoger los datos que queremos. En este caso la consulta sería: SELECT `name`, `puntosranking` FROM `char` ORDER BY `puntosranking` DESC, `name` ASC LIMIT 10 La cual devuelve el nombre y los puntos del ranking almacenados en nuestra tabla, ordenada primero por puntos del ranking y en caso de empate se ordena alfabéticamente (podrías ordenarlo por account_id ascendente si quieres dar esa ventaja a los usuarios más viejos o incluso pasar de esta segunda ordenación, pero siempre conviene mantener un orden estricto en los resultados de las consultas). Ahora necesitamos implementarlo en una consulta SQL que pueda usar un NPC y recoger sus resultados. ¿Como? Suponiendo que sabes usar la estructura del script command query_sql, la cual es: query_sql "your MySQL query", <array variable> {,<array variable>, ...}; Y teniendo cuidado de que la consulta se mantenga en una sola línea, nos queda: query_sql "SELECT `name`, `puntosranking` FROM `char` ORDER BY `puntosranking` DESC, `name` ASC LIMIT 10", .@nombres$, .@puntos; Donde .@nombres$ es un array que contiene los nombres de los 10 usuarios con más puntos y .@puntos es otro array que contiene sus respectivos puntos. Ya puedes usar esos arrays para lo que necesites a través de scripting. Pero... ¿cómo añades o restas puntos a un jugador si las variables permanentes de PJ normales no funcionan así? Pues estamos ante el otro motivo por el que tampoco esta solución es elegante. Hay que usar otra consulta SQL para esto (a menos que sepas modificar el source y usarlo directamente como variable de PJ, en cuyo caso te pediría que compartieras el resultado si puedes porque también lo necesitaría). Afortunadamente, las consultas SQL para añadir o restar puntos son sencillas y directas, aunque estas pueden ejecutarse solo a través de scripting desde el juego, si quieres hacerla directamente en la base de datos es más rápido hacerlas a través de PhpMyAdmin. query_sql "UPDATE `char` SET `puntosranking` = `puntosranking` + 1 WHERE `char_id` = " + getcharid(0) + " LIMIT 1"; Esta consulta SQL añade un punto para el ranking al PJ desde el que se ejecute el script. Para variar la cantidad de puntos o añadir puntos a otros jugadores que no sea el que ejecuta el script el procedimiento es análogo. Supongo que sabiendo esto ya podrás integrarlo sin problemas en tus scripts. Si aún así prefieres la solución elegante, intentaré echarle un vistazo. ¡Un saludo!
  17. LoL, forgot that was an option. Looked this up but didn't find and posted my alternate solution. Well Brynner, you simply have to look up for failedrefitem in your script and then change all occurrences of it to downrefitem and you'll have what you want.
  18. Are the rest of the NPCs in the castle loaded? In both cases (yes and no) Try to restart your server and see the NPC loads to look for any warning or error in the NPCs.
  19. Check you have a group with group ID 99 in /conf/groups.conf. This error sounds strange to me unless you have changed the "Admin" group ID and not the group ID ingame before doing it.
  20. Well, it should be possible. First you save all item attributes on temporary variables some way (I'm right now thinking of using getrefine and getequipcardid function, and if you wanna save the element too you'll need to search for a coincidence by using getinventorylist) and on fail you just do the failedrefitem then a getitem2 with the same item but with the same refine -1. I don't know if I have explained myself, or if you need the script done, but that's what I thought you need to do on the refiner script. Then you'll obviously have to modify the dialogue or the refiner would surely say they destroyed the item.
  21. Go to your MySQL administration tool and give your 'ragnarok' user SELECT, INSERT, UPDATE and DELETE permissions for the `scavenger` table and you'll be good to go.
  22. Capuche said that if you change that in the first line of the announcer script and add the loadevent mapflag to the pvp_arena2 map you can solve your error. The announcer is indeed a script of a NPC. An invisible one, though.
  23. Por defecto se guarda siempre la última posición del PJ, a menos que el mapa tenga activado el mapflag nosave. En tal caso al reloguear el servidor te envía de vuelta a tu savepoint. Por favor, observa que en ninguno de los scripts que tengas con efecto en tu nuevo mapa haya presencia del mapflag nosave, o que no hayas hecho modificación al source para que todos los mapas sean nosave excepto los que tú marques personalmente. Podías eliminar el mapflag nosave del mapa (en caso de que estuviera activo) sin necesidad de reiniciar el servidor ni crear un script que lo instale yendo como GM al mapa en cuestión y ejecutando "@mapflag nosave 0", (sin comillas), que elimina el mapflag nosave del mapa.
  24. No, to 10000 (ten thousands). And please read the rest of the comments in the file, it's clearly specified in there.
  25. It's quite difficult to explain these here. Just look up the item ID or name and you can help yourself on editing them by seeing the item bonuses you can grant by seeing /trunk/doc/item_bonus.txt You can also use some script commands, but it's more advanced. No client hexing required. At most you should alter the description of the item in your client side to make it reflect what you have made, but it's optional. You can refer to the custom item addition on the Wiki (you can read between lines there and know how to edit item bonuses), the item_bonus.txt and the script_commands.txt (it's for more advanced items as I said) to get more information, which is all the information you need.
×
×
  • Create New...