Jump to content

deafity

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by deafity

  1. Hello everyone, I just wanted to take a moment to warmly thank the rAthena community for all the invaluable help you provide every day. Thanks to your clear answers, your sharing of scripts and your technical explanations, I've been able to make considerable progress on my project. Whether it's documentation, scripting tips or optimization suggestions, you are truly an invaluable resource for all Ragnarok Online enthusiasts. Thank you to all those who take the time to reply, correct, test or even just encourage. You bring this community to life and make development so much more enjoyable! All the best to everyone, and see you soon on the forum!
  2. Hello, I would like to create an NPC that invokes MVPs using their ID, but I would like the invoked monster to be dynamically modified (HP, ATK, etc.) without having to modify the whole mob_db.yml. I've seen that you can use setunitdata for this, but I'm not sure of the right way to use it in this context. Could someone please help me? Many thanks to the rAthena team for your hard work and invaluable help! mes "[MVP Invoker]"; mes "Dis-moi l'ID du MVP que tu veux invoquer."; input .@mvp_id; if ( getmonsterinfo(.@mvp_id, MOB_NAME) == "" ) { mes "Cet ID ne correspond à aucun monstre."; close; mes "[MVP Invoker]"; mes "Dis-moi l'ID du MVP que tu veux invoquer."; input .@mvp_id; if ( getmonsterinfo(.@mvp_id, MOB_NAME) == "" ) { mes "Cet ID ne correspond à aucun monstre."; close; } mes "Veux-tu vraiment invoquer " + getmonsterinfo(.@mvp_id, MOB_NAME) + " pour 1 000 000 Zeny ?"; if ( select("Oui:Non") == 2 ) { mes "Très bien, une autre fois peut-être."; close; } if ( Zeny < 1000000 ) { mes "Tu n'as pas assez de Zeny. Il te faut 1 000 000 Z."; close; } Zeny -= 1000000; // Invoquer le monstre et modifier ses stats dans le même contexte (PAS via callfunc) .@mob_gid = monster("db_room", 106, 62, getmonsterinfo(.@mvp_id, MOB_NAME), .@mvp_id, 1); sleep 500; // Laisse le temps au monstre d'apparaître if (.@mob_gid > 0) { setunitdata(.@mob_gid, UDT_HP, 20000000); setunitdata(.@mob_gid, UDT_MAXHP, 20000000); setunitdata(.@mob_gid, UDT_ATK1, 10000); setunitdata(.@mob_gid, UDT_ATK2, 15000); setunitdata(.@mob_gid, UDT_DEF, 200); setunitdata(.@mob_gid, UDT_MDEF, 200); setunitdata(.@mob_gid, UDT_AGI, 150); setunitdata(.@mob_gid, UDT_STR, 200); setunitdata(.@mob_gid, UDT_VIT, 200); setunitdata(.@mob_gid, UDT_INT, 150); } mes "Le MVP a été invoqué et ses statistiques ont été ajustées pour être vraiment puissantes !"; close;
  3. Hello everyone, I'm currently working on an rAthena server and I'd like to modify the source code to increase players' ATK and MATK. My goal is to make players more powerful in terms of damage without affecting the stats of MVPs or other monsters. I've got a few ideas, but I'd like to know where I could find the parts of the code that manage these stats for players, while ensuring that they don't upset the balance of the monsters. If any of you have already done this type of modification, I'd appreciate any advice or suggestions on how best to go about it. Thank you in advance for your help and suggestions. (status.cpp)
  4. prontera,160,189,4 script PVP/MVP 467,{ mes "[PVP Warper]"; mes "Ou veux tu aller?"; mes "Arena PVP [" + getmapusers("pvp_y_1-2") + " / 20]"; menu "Sale PVP",P_room,"Sale MVP",M_room,"Cancel",cancel; close; P_room: next; if (getmapusers("pvp_y_1-2") >= 20) goto L_sorry; warp "pvp_y_1-2",0,0; close; M_room: next; warp "db_room",0,0; close; cancel: close; L_sorry: next; mes "[ ^ff0000Warper^000000 ]"; mes "Désolé, la salle PVP est pleine."; close; } // Contador de mortes PVP pvp_y_1-2,0,0,0 script PVPKillCounter -1,{ OnPCLoadMapEvent: if (strcharinfo(3) == "pvp_y_1-2") { // Initialiser le compteur de morts pour chaque joueur set @pvp_kill_count, 0; } end; OnPCKillEvent: if (strcharinfo(3) == "pvp_y_1-2") { // Vérifie si le joueur est dans la carte PVP if (killerrid != getcharid(3)) { // Vérifie que le tueur n'est pas lui-même set @pvp_kill_count, @pvp_kill_count + 1; dispbottom "Nombre de joueurs morts : " + @pvp_kill_count; if (@pvp_kill_count >= 5) { getitem 22869, 1; // Donne l'item spécial (ID 22869) dispbottom "Vous gagnerez un ticket spécial pour avoir tué 5 ennemis."; set @pvp_kill_count, 0; // Réinitialiser le compteur } } } end; OnInit: setmapflag "pvp_y_1-2", mf_pvp; // Définit la carte comme PVP end; } Here is the result of the end of my script without any error ! Thank you for your help! I'm going to add an announcement to the script! For the moment I've agreed to let you have my script! Have a nice evening
  5. hello i would like to create a script to have a special item when i kill 5 players in pvp i have no error but it doesn't work Thanks for your help prontera,160,189,4 script PVP/MVP 467,{ mes "[PVP Warper]"; mes "Où veux-tu aller ?"; mes "PVP Arena [" + getmapusers("pvp_y_1-2") + " / 20]"; menu "PVP Room",P_room,"MVP Room",M_room,"Annuler",cancel; close; P_room: next; if (getmapusers("pvp_y_1-2") >= 20) goto L_sorry; // Retirer l'extension .gat warp "pvp_y_1-2",0,0; close; M_room: next; warp "db_room",0,0; close; cancel: close; L_sorry: next; mes "[ ^ff0000Warper^000000 ]"; mes "Désolé, la salle PVP est pleine."; close; } //PVP Kill Counter pvp_y_1-2,0,0,0 script PVPKillCounter -1,{ // This script tracks a player's number of kills on the PVP map OnInit: // Initialize kill counter set .@kill_count, 0; end; OnPVPEvent: // Event for player-to-player kills // Check if a player has been killed if (killed_id != 0) { //Increment the kill counter set .@kill_count, .@kill_count + 1; // Display number of kills to player dispbottom "Nombre de kills: " + .@kill_count; if (.@kill_count >= 5) { // If the player kills 5 enemies getitem 22869, 1; // Give item with ID 22869 dispbottom "Congratulations! You've been awarded a Roulette Ticket for killing 5 enemies."; set .@kill_count, 0; // Reset the kill counter to zero } } end; // End of OnPVPEvent } // End of PVPKillCounter script
×
×
  • Create New...