Jump to content

Syon

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Syon

  1. Player was getting stuck when clicking on CANCEL instead of choosing an option. If you ever face this issue in your own server, you can change the following: }while( .@select != 4 && .@select != 255 ); close; Instead of close; you should add an end; }while( .@select != 4 && .@select != 255 ); end;
  2. Thanks, @rongmauhong! The solution provided by @sader1992 works great and it's easy to read. Here's the solution he provided working just like I wanted: @rongmauhong your first solution helped me a lot to get what I wanted. Keep up the good work! - script respawnMvp -1,{ OnInit: setarray .mob_id[0],1857,1002,1031,1113,1613,1836; .monster = .mob_id[rand(getarraysize(.mob_id))]; monster "prontera",154,172,"--en--", .monster, 1, "respawnMvp::OnKill"; announce "MVP "+getmonsterinfo(.monster, 0)+" has spawned!",0; end; OnKill: announce getmonsterinfo(.monster, 0)+ " was killed by "+strcharinfo(0)+".",0; sleep 15000; .monster = .mob_id[rand(getarraysize(.mob_id))]; monster "prontera",154,172,"--en--", .monster, 1, "respawnMvp::OnKill"; announce "MVP "+getmonsterinfo(.monster, 0)+" has spawned!",0; end; } Now the MVP will spawn randomly. If the MVP is dead, it will wait 15 seconds to spawn a new one from the setarray. This topic can be closed! Thanks,
  3. Thank you, rongmauhong. Your script helped me to solve part of my problem with the first version shared above. Thanks a ton! Here is what happened when I tested your script: Results: It didn't spawn another MVP while the current MVP was still live. Great! But 2 things are not working properly : - The message "MVP Amon Ra has been spawned" wasn't working after the first MVP(the one when I use @reloadscript) is dead. It didn't work for the other MVPs, but just for the very first. - It was spawning a new Amon Ra too fast. Your script with a few modifications: - script respawnMvp -1,{ OnInit: setarray .mob_id[0],1002,1857,1031,1113,1613,1836; set .size, getarraysize(.mob_id); set .random, rand(.size); set .amount, 1; // amount of monster spawned set .monster, .mob_id[.random]; while (true) { if (mobcount("prontera", "respawnMvp::OnKill") < 1) { monster "prontera",154,172,getmonsterinfo(.monster, 0), .monster, .amount, "respawnMvp::OnKill"; announce "O MVP "+getmonsterinfo(.monster, 0)+" acabou de nascer!",0; } else{sleep 10000;} } end; OnKill: announce "O MVP "+getmonsterinfo(.monster, 0)+ " foi eliminado "+ (Sex?"pelo":"pela")+" "+ (Sex?"jogador":"jogadora")+" "+strcharinfo(0)+".",0; end; } Here is what happened when I tested the version above (PLEASE MUTE VOLUME? Results: Positive: - It didn't spawn a new MVP too fast(I'm using porings for testing purposes); - The message "MVP has spawned" is working no matter how many times I kill the MVP; - The MVP is spawning every 10 seconds*(check negative). Negative: - The random variable(set .random, rand(.size);) is only working when I @reloadscript and not every time the current MVP is killed. Case: If a player kills the current MVP, it should run the random variable again so another random MVP from the array can be spawned. Right now is spawning the same MVP as a result from the first time the random variable got a random number. - The 10 seconds trigger is running over and over again. Case: If I kill the MVP as soon as it's spawned, it will count 10 seconds, but If I wait a few seconds to kill the MVP it will spawn in less than 10 seconds. Why? Because the 10 seconds trigger is running over and over again. I'm expecting the trigger to start counting only after the MVP is killed and not while it's still alive. Thank you!
  4. Hello rAthena Community, Before anything else, here's the script I want to edit. - script respawnMvp -1,{ OnInit: setarray .mob_id[0],1511; set .size, getarraysize(.mob_id); set .random, rand(.size); set .amount, 1; // amount of monster spawned set .monster, .mob_id[.random]; end; OnMinute00: OnMinute01: OnMinute02: OnMinute03: OnMinute04: OnMinute05: OnMinute06: OnMinute07: OnMinute08: OnMinute09: OnMinute10: OnMinute11: OnMinute12: OnMinute13: OnMinute14: OnMinute15: OnMinute16: OnMinute17: OnMinute18: OnMinute19: OnMinute20: OnMinute21: OnMinute22: OnMinute23: OnMinute24: OnMinute25: OnMinute26: OnMinute27: OnMinute28: OnMinute29: OnMinute30: OnMinute31: OnMinute32: OnMinute33: OnMinute34: OnMinute35: OnMinute36: OnMinute37: OnMinute38: OnMinute39: OnMinute40: OnMinute41: OnMinute42: OnMinute43: OnMinute44: OnMinute45: OnMinute46: OnMinute47: OnMinute48: OnMinute49: OnMinute50: OnMinute51: OnMinute52: OnMinute53: OnMinute54: OnMinute55: OnMinute56: OnMinute57: OnMinute58: OnMinute59: monster "prontera",154,172,getmonsterinfo(.monster, 0),.monster,.amount,strnpcinfo(0)+ "::OnKill"; announce "O MVP "+getmonsterinfo(.monster, 0)+" acabou de nascer!",0; end; OnKill: announce "O MVP "+getmonsterinfo(.monster, 0)+ " foi eliminado "+ (Sex?"pelo":"pela")+" "+ (Sex?"jogador":"jogadora")+" "+strcharinfo(0)+".",0; end; } How does it work? The script will spawn a random MVP in "prontera 154 172" every minute, such MVPs are stored in an array called .mob_id[0]. The only MVP right now for testing purposes is Amon Ra(1511). When the MVP is spawned, it will show a global message: MPV Amon Ra has been spawned in prontera. Also, when the MVP is killed, it will show the following message: Amon Ra has been killed. It spawns only 1 MVP at a time. What am I looking for? I don't want the script to spawn a new MVP every minute when the previous one is still alive. Case: If Amon Ra has been spawned, it will only spawn a new Amon Ra when the previous one has been killed. It will keep checking every minute to see if the current Amon Ra(or any MVP in .mob_id[0] array) is alive. If the current MVP is alive, it will spawn a new one, if not, it will hold until the current one is dead. What have I tried already? I was checking the MVPs in LHZ_DUN03, but I couldn't understand how they work. A new MVP in lhz_dun03 only spawn after the current MVP is dead. Also, I was checking how the MVP in other maps works, but they're just using the declaration boss_monster. I've tried to add it to the script above, but I got an error. I changed: monster "prontera",154,172,getmonsterinfo(.monster, 0),.monster,.amount,strnpcinfo(0)+ "::OnKill"; to boss_monster "prontera",154,172,getmonsterinfo(.monster, 0),.monster,.amount,strnpcinfo(0)+ "::OnKill"; Thanks, respawn-mvp.txt
  5. Muito obrigado por sua resposta. No meu arquivo está normal. 5107# Um elmo nobre criado à orgulhosa imagem de uma crocante torrada. Usá-lo faz com que você se sinta como parte de um café da manhã balanceado. Tipo: ^777777Equipamento para a cabeça^000000 Defesa: ^7777770^000000 Equipa em: ^777777Baixo^000000 Peso: ^7777775^000000 Profissões que utilizam: ^777777Todas^000000 # Teria um outro lugar para corrigir? Já percebi que é só na descrição mesmo, pois não da o efeito que diz na descrição. Fico no aguardo,
  6. Olá gente, Estou intrigado por conta de alguns itens que estão bastante editados no meu servidor. Por exemplo, tem esse item: Eu não sei por que está assim, pois não editei nada. E tem outros que estão modificados também como, RWC e alguns mantos. Poderiam me dar uma luz de como consertar? Já olhei no item_db no meu banco de dados, mas tá normal. Fico no aguardo,
  7. Hi everyone! I'd like to know if you could help me with that script. I'd like to mix up the platium skills npc with the rental npc If it's possible to add a menu for the player too. Regards, //= Universal Rental NPC //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.2 //===== Description: ========================================= //= One-click automatic mount rentals. //= Replaced 'close' with 'end' [Streusel] //= Fixed 'close' issues. [Joseph] //============================================================ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{ /* TODO: This can be optimized with just setmount(), as it can auto-detect the proper mount for the class/skills. */ if (hascashmount()) { message strcharinfo(0),"You must first remove your mount."; end; } else if ((eaclass()&EAJ_THIRDMASK) == EAJ_RANGER && !countitem(Wolf's_Flute)) { if (!checkfalcon() && getskilllv(HT_FALCON) && !checkwug()) { if (select(" ~ Falcon: ~ Warg") == 1) setfalcon; else getitem Wolf's_Flute, 1; specialeffect2 EF_TEIHIT3; close; } else { getitem Wolf's_Flute,1; } } else if ((eaclass()&EAJ_THIRDMASK) == EAJ_MECHANIC && !checkcart() && getskilllv(MC_PUSHCART)) { if (!checkmount() != MOUNT_MADO && getskilllv(NC_MADOLICENCE)) { if (select(" ~ Cart: ~ Mado") == 1) { setcart; } else { setmount(MOUNT_MADO); } specialeffect2 EF_TEIHIT3; close; } else { setcart; } } else if (!checkcart() && getskilllv(MC_PUSHCART)) { setcart; } else if (!checkfalcon() && getskilllv(HT_FALCON) && !checkwug()) { setfalcon; } else if (checkmount() != MOUNT_PECO && getskilllv(KN_RIDING)) { setmount; // Peco or Dragon } else if (checkmount() != MOUNT_MADO && getskilllv(NC_MADOLICENCE)) { setmount(MOUNT_MADO); } else { message strcharinfo(0),"You do not meet requirements to rent."; end; } specialeffect2 EF_TEIHIT3; end; } //============================================================ // Old changelog //============================================================ //= A Free PecoPeco and Falcon Breeder //= 1.1 FIXED checkriding/cart/falcon funcs [Lupus] //= 1.2 Added Rebirth/Advanced Class support [Mass Zero] //= 1.3 Simplified the checks of job [Silentdragon] //= 1.3a Fixed a Typo Error. [Samuray22] //= Thanks to ~AnnieRuru~. //= 1.4 Optimized Script. No need for 50 million Labels. [Spre] //============================================================ prontera,150,160,5 script inunhi 56,{ skill 142,1,0; switch(BaseClass) { case 0: if (Class !=23) skill 143,1,0; break; case 1: skill 144,1,0; skill 145,1,0; skill 146,1,0; break; case 2: skill 157,1,0; break; case 3: skill 147,1,0; skill 148,1,0; break; case 4: skill 156,1,0; break; case 5: skill 153,1,0; skill 154,1,0; skill 155,1,0; break; case 6: skill 149,1,0; skill 150,1,0; skill 151,1,0; skill 152,1,0; break; default: break; } switch(BaseJob) { case 7: skill 1001,1,0; break; case 8: skill 1014,1,0; break; case 9: skill 1006,1,0; break; case 10: skill 1012,1,0; skill 1013,1,0; break; case 11: skill 1009,1,0; break; case 12: skill 1003,1,0; skill 1004,1,0; break; case 14: skill 1002,1,0; break; case 15: skill 1015,1,0; skill 1016,1,0; break; case 16: skill 1007,1,0; skill 1008,1,0; skill 1017,1,0; skill 1018,1,0; skill 1019,1,0; break; case 17: skill 1005,1,0; break; case 18: skill 238,1,0; break; case 19: skill 1010,1,0; break; case 20: skill 1011,1,0; break; default: break; } end; }
  8. Thanks! It's working now.
  9. Someone can help me with this issue? Why is this error occurring? I want to set up an woe schedule, but it's not working. It's says that is activated, but it is not. Regards from Brazil
×
×
  • Create New...