Jump to content

Velda

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by Velda

  1. On 2/4/2024 at 11:12 AM, Questune said:

    Can you add the monster database for this one? also the updated sql files 🙂 

    Hello, if you mean the whole SQL DB of monsters i prefer not to. The reason is that i have adjustments in my DB and also other people can have adjustments in their DB. So that's the reason i decided to provide only "SQL INSERTS" for new mobs (you can find it in the ZIP file).

    • Love 1
  2. Poring Hell - custom instance by Velda


    Hey there,
    all of necessarry info i already mentioned in project releases topic here:


    I'm adding this to downloads section so everyone can find it here.
    I had to divide .zip file into 3 files since here is restricted size 30MB for one file. Enjoy.


     

  3. 21 hours ago, Frost Diver said:

    I cant see the link

     

    Well, i don't have a clue how long this approval takes.. And since i'm unpatient person and i want to conclude this project i already edited the first post - you can find download sources at the end.
    Today i also made custom cards and MVP cards so i added them too.

    • Love 1
  4. Hello everyone,
    few days ago i finished my custom instance - Poring Hell. Since i put some time into it i don't want to keep it just for myself. But it's a lots of adjustments on server-side and client-side too. Right know i'm making this topic just to show it. But, if anyone will be interested, please let me know and i will edit the post and provide all of the files i used along with the readme file how to make it work and which files need to be edited etc.

    Some more info about it:
    - NPCs are briefly dubbed using AI, i used soundeffect command there (so it really talks to you a bit if you have sound effects ON)!
    - There are custom BGM music (the music in the video is the actual music used for maps not a stream music).
    - I added few 4th class skills to monsters, created stats for them, made the whole story, NPC scripts, etc...
    - The maps i used are existing RO maps.

    - Skills need definitely a bit adjustment (lots of Dragon Breath and Gale Storm spam as you can see on the video lol)

    - I used illustrations found on the internet (from Honkai, manga etc..). I'm not owner nor creator of these materials!

    - Since it is my first (and probably last) RO custom instance i made, i used instance tutorial by Skorm (thank you) and some of sprites that i found on rAthena or Hercules forums for download. I just edited some sprites little bit but i did not create them by myself. So i also thanks to people who created them.

    - The instance is made for 2022+ Renewal client (and rAthena) like an end-game instance by default. So mobs are strong in general - but this can be adjusted as needed by changing in the DB of course.

    Requirements:
    - Instance is made for 2022+ Renewal client and rAthena (4th jobs included). My own server was PACKETVER 20220331.
    - Using SQL Client (like HeidiSQL or MySQL Workbench) and SQL DB.

    - Custom sprites provided by other users which you have to download. Download them here (step 16. in the install instructions):

    Poring Collection by Emistry: https://rathena.org/board/files/file/2987-poring-collection/

    Teeth Poring by Wurg: https://rathena.org/board/files/file/4249-chattering-teeth-poring/

    Blazering: https://board.herc.ws/files/file/463-blazering/

    Custom Pack by Mihael: https://rathena.org/board/files/file/4335-400-custons-20-custom-weapons-by-mihael/

    NPC Collection by Syouji: https://rathena.org/board/files/file/2388-configurations-npcs-100-different-npcs/



    - Mapcache editor: https://rathena.org/board/files/file/3858-mapcache-editor

    - GRF Editor: https://rathena.org/board/files/file/2766-grf-editor/

    - Act Editor if you want to edit sprites in the future: https://rathena.org/board/files/file/3304-act-editor/



    Update:
    Version 2.0.0 -
    Added also custom cards and MVP cards (without illustrations - maybe in the future if i'll be in mood ^^)

    Version 2.1.0 - Removed sprites already provided by other users. Added instructions to download and import them after that instead.

    Version 2.1.1- Fixed player attachment error in instance script. Merged cards into common ZIP.

    NOTE: Don't forget to add cards to the monsters drop in DB! Custom cards are not in the drop of monsters by default.

     

     

     


    So once again, if anyone will like it and want it, let me know and i'll add sources here - for free of course. ^^

    EDIT: I added sources with install instructions into downloads section:

    Enjoy.^^

     

     

    poring_hell_full_v2.1.1.rar

    • Upvote 1
    • Like 2
  5. Problem SOLVED. I figured it out by myself. ^^

    When i was testing it i deleted statuses in the status.c in the meantime when i tested NoRemoveOnDead flag but than i found out that both of these things have to be changed.


    In case that someone will have similar problem:
    You have to change status.c and you have to add NoRemoveOnDead flag into your status.yml DB file (also be sure that your server reads the right status.yml DB file).
    If it's added on both places than it's working properly and status is not removed after dead.

  6. Hey guys,
    i'm having hard times to make status effects persist after death. Right now even cash foods are dispelled after death. I already asked on Discord but no one provided me with solution..


    What i already tried:
    1) I tried to modify status.c file following this:


    2) I checked my db/re/status.yml and i also copied it into import folder

    image.png


    3) I checked that my server reads statuses from status.yml files
    image.png

    4) I checked my status.conf file:
    image.png

    It seems to me like NoRemoveOnDead flag is not working at all...
    My server is renewal and none of these steps above worked.. I don't believe that all of you people are using setup with all statuses dispelled after death. So please, advice me how to set status effect to not be removed after death. Thanks in advance for any kind of help!

  7. Thanks for your replies, all of you! ^^
    In the time i started the topic i didn't notice that map-server gives me real-time feedback after i @reloadnpcfile. I thought that i must always start the server anew lol. So yea, later i found that checking map-server console right after script reload is enough for me. Also i set c++ syntax in notepad++. @Winterfox's advice for VSC plugin seems useful too. Thanks again!

  8. For everyone who want to use it with newer clients and bodystyle change doesn't work:
    You need to blacklist other classes otherwise client will crash. Also the script has an error at row number 114 - there should be "EAJ_THIRDMASK" not "EAJ_THIRD".
    This is corrected script by me and it's working (tested). Of course you must also add alternative outfits into GRF and edit your .lub files:
     

    prontera,162,184,4    script    Super Stylist    509,{
        doevent "super_stylist_main::OnTalk";
    }
    
    
    -    script    super_stylist_main    -1,{
        OnTalk:
            .@eac = eaclass();
            .@gm_level = getgmlevel();
        cutin "prm_1",2;
        mes "^FF0000[ Super Stylist - Introduction ]^000000";
        mes "Hi "+strcharinfo(0)+", I'm [LoNRO]'s super stylist.";
        mes "I can change your character appearance ";
        switch (select(
            "Open Dress Room",
            "Cancel"
        )) {
            case 1:
                next;
                opendressroom(0);
    
                Lmain:
                    mes "^FF0000[ Super Stylist - Dress Room ]^000000";
                    mes "Ok, use the dress room to pick a style";
                    switch (select(
                        "Change Hairstyle",
                        "Change Hairdye",
                        "Change Cloth Color",
                        "Change Bodystyle"
                    )) {
                        case 1:
                            set .@hairstylemin,getBattleFlag("min_hair_style");
                            if (.@eac != EAJL_SUMMONER) {
                            set .@hairstylemaxf,97;
                            set .@hairstylemaxm,82;
                            } else {
                                set .@hairstylemaxf,6;
                                set .@hairstylemaxm,6;
                            }
                            next;
                            mes "^FF0000[ Super Stylist - Hairstyle ]^000000";
                            mes "Insert a hairstyle number";
                            if (Sex) {
                                mes "Hairstyles: " +.@hairstylemin+ " to " +.@hairstylemaxm;
                            } else {
                                mes "Hairstyles: " +.@hairstylemin+ " to " +.@hairstylemaxf;
                            }
                            input .@hairstyle;
                            if (Sex) {
                                if (.@hairstyle < .@hairstylemin || .@hairstyle > .@hairstylemaxm) {
                                set .@hairstyle,0;
                                }
                            } else {
                                if (.@hairstyle < .@hairstylemin || .@hairstyle > .@hairstylemaxf) {
                                set .@hairstyle,0;
                                }
                            }
                            setlook LOOK_HAIR,.@hairstyle;
                            next;
                            break;
                        case 2:
                            next;
                            set .@hairdyemin,getBattleFlag("min_hair_color");
                            set .@hairdyemax,getBattleFlag("max_hair_color");
                            mes "^FF0000[ Super Stylist - Hairdye ]^000000";
                            mes "Insert a hairdye number";
                            mes "Hairdyes: " +.@hairdyemin+ " to " +.@hairdyemax;
                            input .@hairdye;
                            if (.@hairdye < .@hairdyemin || .@hairdye > .@hairdyemax) {
                            set .@hairdye,0;
                            }
                            setlook LOOK_HAIR_COLOR,.@hairdye;
                            next;
                            break;
                        case 3:
                            next;
                            set .@clothcolormin,getBattleFlag("min_cloth_color");
                            set .@clothcolormax,getBattleFlag("max_cloth_color");
                            mes "^FF0000[ Super Stylist - Cloth Color ]^000000";
                            mes "Insert a cloth color number";
                            mes "Cloth Colors: " +.@clothcolormin+ " to " +.@clothcolormax;
                            input .@clothcolor;
                            if (.@clothcolor < .@clothcolormin || .@clothcolor > .@clothcolormax) {
                            set .@clothcolor,0;
                            }
                            setlook LOOK_CLOTHES_COLOR,.@clothcolor;
                            next;
                            break;
                        case 4:
                            next;
                            set .@blacklist,roclass(.@eac&EAJ_THIRDMASK) == 0 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 1 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 2 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 3 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 5 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 6 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 7 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 8 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 9 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 10 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 11 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 12 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 13 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 14 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 15 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 16 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 17 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 18 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 19 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 20 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4001 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4002 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4003 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4004 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4005 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4006 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4007 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4008 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4009 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4010 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4011 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4012 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4013 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4014 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4015 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4016 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4017 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4018 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4019 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4020 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4021 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 23 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 24 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 25 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4045 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4046 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4047 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4049 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4190 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4191 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4211 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4212 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4215 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4218 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4239 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4240 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4302 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4303 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4304 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4305 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4306 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4307 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4308 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4023 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4024 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4025 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4026 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4027 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4028 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4029 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4030 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4031 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4032 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4032 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4033 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4034 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4035 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4036 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4037 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4038 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4039 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4040 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4041 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4042 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4043 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4220 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4222 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4223 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4224 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4225 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4226 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4227 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4228 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4229 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4241 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4242 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4028 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4029 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4030 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4031 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4032 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4032 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4033 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4034 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4035 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4036 ||
                                            roclass(.@eac&EAJ_THIRDMASK) == 4037;
                            if (.@eac&EAJ_THIRDMASK && !.@blacklist) {                         
                                mes "^FF0000[ Super Stylist - Bodystyle ]^000000";
                                mes "Insert a bodystyle number";
                                mes "Bodystyles: 0 to 1";
                                input .@bodystyle;
                                if (.@bodystyle < 0 || .@bodystyle > 1) {
                                    set .@bodystyle,0;
                                }
                                setlook LOOK_BODY2,.@bodystyle;
                                next;
                                break;
                            } else {
                                mes "This service isn't avaible for " +jobname(roclass(.@eac));
                                next;
                                break;
                            }
                    }
                    goto Lmain;
            case 2:
                break;
        }
        cutin "",255;
        close2;
        end;
    }
    
    

    Anyways, i also thank you for the original script. ^^

    EDIT: Also be careful when changing colors and alt outfits. If you haven't got matched color palettes in your GRF for outfits you will also crash.

    • Upvote 1
  9. On 3/10/2022 at 8:37 PM, Frozek said:

    Hello guys, I'm making this EDDA enchantment NPC, I would like to put it to have the fixed enchantment option, but I'm having a little difficulty with it, can anyone help me?

     

      Hide contents

    //============================================================
    //====== start npc
    //============================================================
    yuno,210,343,3    script    Encantos de Edda    105,{
        setArray .@weapons[0],21051,21052,32023,1333,16092,28138,28765,28766,28044,28042,26158,2055,2056,26161,16095,18185,18187,18186,32350,32024,32025,32351,16093,16094,28767,28768,18184,28633,26159,26160,1865,1866,16096,18188,26212,26213,32107,32108;
        setArray .@enchant1[0],4832,4833,4834,4808,4820,4821,4818,4817,4816,4863,4864,4865,4815,4814,4813;
        setArray .@enchant2[0],29594,29595,29596,29598,29599,29600,29601,29602,29603,29604,29605,29606,29607;
        
        .@isEdda = 0;
        
        mes "[Encantos de Edda]";
        .@weap = getequipid(EQI_HAND_R);
        .@refine = getequiprefinerycnt(EQI_HAND_R);
        .@card0 = getequipcardid(EQI_HAND_R,0);
        .@card1 = getequipcardid(EQI_HAND_R,1);
        .@card2 = getequipcardid(EQI_HAND_R,2);
        .@card3 = getequipcardid(EQI_HAND_R,3);
        
        
        
        for(.@i = 0; .@i < 38; .@i++) {
            if(.@weapons[.@i] == .@weap){
                .@isEdda = 1;
            } 
        }
        if(.@isEdda == 0) {
            mes "Vamos lá, você precisa de uma arma Edda Equipada.";
        
            end;
        }

        if(.@card2 != 0 && .@card3 != 0){
            mes "você deseja reencantar o seu equipamento Edda?";
            
            switch(select("Sim 3º Slot", "Sim 4º Slot", "Nenhum")){
                case 1:
                    mes "O modo Normal irá custar 500 Documento de Pesquisa Biológica e 500 Fragmento de Experiência Biológica.";
                    mes "Com uma chance de 5% que falhe e quebre sua Arma!";
                    next;
                    mes "O modo Seguro irá custar 2000 Documento de Pesquisa Biológica e 2000 Fragmento de Experiência Biológica.";
                    mes "No modo Seguro sua Arma não se quebrará!";
                    next;
                    mes "O modo Específico irá custar 5000 Documento de Pesquisa Biológica.";
                    mes "No modo Específico você pode escolher o Encantamento que desejar.!";
                    
                    switch(select("Modo Normal", "Modo Seguro", "Modo Específico")){
                        case 1:
                            if(countitem(25786) < 500 && countitem(25787) < 500) {
                                mes "Você não tem a quantidade de itens suficientes. ";
                                end;
                            }
                            delitem 25786,500;
                            delitem 25787,500;
                            if(rand(20) == 1){
                                delequip EQI_HAND_R;
                                mes "Que Pena...";
                                end;
                            }
                            .@card2 = .@enchant2[rand(13)];
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                        case 2:
                            .@card2 = .@enchant2[rand(13)];
                            if(countitem(25786) < 2000 && countitem(25787) < 2000) {
                                mes "Você não tem a quantidade de itens suficientes.";
                                end;
                            }
                            delitem 25786,2000;
                            delitem 25787,2000;
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                    case 3:
                        mes "Você quer dizer trocar o encantamento, certo?";
                        mes "Vamos lá, você precisa de uma arma Edda Equipada.";
                        next;
                        mes "[Encantos de Edda]";
                if(.@isEdda == 1) {
                    mes "Qual bônus de encantamento você deseja atualizar?";
                    next;
                    switch (select("Memória de Seyren:Memória de Howard's:Memória de Eremes:Memória de Kathryne:Memória de Margaretha:Memória de Cecil:Memória de Randel:Memória de Flamel:Memória de Gertie:Memória de Celia:Memória de Chen:Memória de Trentini:Memória de Alphoccio:Deixa pra lá.")) {
                    case 1: callsub S_Upgrade,"Seyren",29594;
                    case 2: callsub S_Upgrade,"Howard's",29595;
                    case 3: callsub S_Upgrade,"Eremes",29596;
                    case 4: callsub S_Upgrade,"Kathryne",29598;
                    case 5: callsub S_Upgrade,"Margaretha",29599;
                    case 6: callsub S_Upgrade,"Cecil",29600;
                    case 7: callsub S_Upgrade,"Randel",29601;
                    case 8: callsub S_Upgrade,"Flamel",29602;
                    case 9: callsub S_Upgrade,"Gertie",29603;
                    case 10: callsub S_Upgrade,"Celia",29604;
                    case 11: callsub S_Upgrade,"Chen",29605;
                    case 12: callsub S_Upgrade,"Trentini",29606;
                    case 13: callsub S_Upgrade,"Alphoccio",29607;
                    case 14:
                        mes "[Encantos de Edda]";
                        mes "Por quê? Vai ser melhor do que é.";
                        mes "De qualquer forma, só podemos oferecer um Encanto.";
                        next;
                        mes "[Encantos de Edda]";
                        mes "O que você faz com isso é com você.";
                        close;
                    }
                }
                mes "Primeiro venha com a Arma que você quer que eu atualize.";
                mes "Certifique-se de que está em equipada, entendeu?";
                close;
            }
        S_Upgrade:
                mes "[Encantos de Edda]";
                mes "Entendo.";
                mes "vou atualizar seu Equipamento.";
                mes "Tem certeza?";
                next;
                switch (select("Sim, eu tenho.:Não espere.")) {
            case 1:
                mes "[Encantos de Edda]";
                mes "Vou começar a troca ^4d4dffAtualizando "+ getarg(0) +"^000000..";
                next;
                mes "[Encantos de Edda]";
                mes "Olha Você aqui.";
                delitem 25786,5000;
                getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,getarg(1),.@card3;
                close;
            case 2:
                mes "[Encantos de Edda]";
                mes "Você não quer trocar?";
                close;
                }
                break;
                case 2:
                    mes "O modo Normal lhe custará 200 Documentos de Pesquisa Biológica e 200 Fragmentos de Experiência Biológica";
                    mes "com 5% de quebrar sua arma!";
                    next;
                    mes "O modo Seguro lhe custará 1000 Documento de Pesquisa Biológica e 1000 Fragmento de Experiência Biológica";
                    mes "sem chance de quebrar sua arma!";
                    
                    switch(select("Modo Normal", "Modo Seguro")){
                        case 1:
                            if(countitem(25786) < 200 && countitem(25787) < 200) {
                                mes "Você não tem a quantidade de itens suficientes.";
                                end;
                            }
                            delitem 25786,200;
                            delitem 25787,200;
                            if(rand(20) == 1){
                                delequip EQI_HAND_R;
                                mes "Que pena...";
                                end;
                            }
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                        case 2:
                            .@card3 = .@enchant1[rand(15)];
                            delitem 25786,1000;
                            delitem 25787,1000;
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                    }
                break;
                
                case 3:end;
            }
            
            end;
        }
        //@item 2056

        switch(select("Sim","não")){
            case 1:
                switch(select("Modo Normal", "Modo Seguro", "cancelar")){
                    case 1:
                        .@safe = 0;
                        break;
                    case 2:
                        .@safe = 1;
                        break;
                    case 3: end;
                }
            
            
                if(.@card3 == 0) {
                    if(.@safe == 0) mes "isto custará 50 Documentos de Pesquisa Biológica e 50 Fragmentos de Experiências Biológicas";
                    else {
                        mes "isto custará 500 Documento de Pesquisa Biológica e 500 Fragmento de Experiência Biológica";
                        next;
                        mes "há uma pequena mudança para quebrar sua arma, quer continuar?";
                    }
                    next;
                    switch(select("Sim","Não")){
                        case 1:
                            // 30% of the player loses the weapon;
                            if(rand(20) <= 2 && .@safe == 0){
                                delequip EQI_HAND_R;
                                mes "Que pena...";
                                end;
                                
                            }
                            break;
                        
                        case 2: 
                            mes "Ok...";
                            end;
                    }
                    
                    if(countitem(25786) < 50 && countitem(25787) < 50){
                        mes "você não tem os materiais suficientes.";
                        end;
                    }
                    if(.@safe == 1){
                        delitem 25786,500;
                        delitem 25787,500;
                    }
                    else {
                        delitem 25786,50;
                        delitem 25787,50;
                    }
                    .@card3 = .@enchant1[rand(15)];
                    break;
                }
                
                if(.@card2 == 0) {
                    if(.@safe == 0) mes "isto custará 50 Documentos de Pesquisa Biológica e 50 Fragmentos de Experiências Biológicas";
                    else {
                        mes "isto custará 500 Documento de Pesquisa Biológica e 500 Fragmento de Experiência Biológica";
                        next;
                        mes "há uma pequena mudança para quebrar sua arma, quer continuar?";
                    }
                    next;
                    switch(select("Sim","Não")){
                        // 30% of the player loses the weapon;
                        case 1:
                            if(rand(20) <= 2 && .@safe == 0){
                                delequip EQI_HAND_R;
                                mes "Que pena...";
                                end;
                            }
                            break;
                        case 2: 
                            mes "Ok...";
                            end;
                    }
                    
                    if(.@safe == 1){
                        if(countitem(25786) < 500 && countitem(25787) < 500){
                            mes "você não tem os materiais suficientes";
                            end;
                        }
                        delitem 25786,500;
                        delitem 25787,500;
                    }
                    else {
                        if(countitem(25786) < 50 && countitem(25787) < 50){
                            mes "você não tem os materiais suficientes";
                            end;
                        }
                        delitem 25786,50;
                        delitem 25787,50;
                    }
                    
                    .@card2 = .@enchant2[rand(13)];
                    break;
                }
                end;
            case 2:
                mes "ok...";
                end;
        }
        delequip EQI_HAND_R;
        getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
        end;
    }

    in the subcall I tried to put the Enchantment IDs, but it is not changing the enchantment. 

    look in switch "Modo Específico"

    Hey there, i'm happy to tell you that i fixed this! ^^
    The problem was, that after callsub, every .@variable is null again so you have to define them again in "callsub S_Upgrade:". That is the reason why getitem2 doesn't return correct values and so you will get no weapon at all. The only value that is specified in "S_Upgrade:" is that one returned by getarg(1) but the other variables are empty.

    So to fix this, just define your variables again in "S_Upgrade:"

    Script after my correction (working - tested):

    
    
    //============================================================
    //====== start npc
    //============================================================
    yuno,210,343,3	script	Encantos de Edda	105,{
        setArray .@weapons[0],21051,21052,32023,1333,16092,28138,28765,28766,28044,28042,26158,2055,2056,26161,16095,18185,18187,18186,32350,32024,32025,32351,16093,16094,28767,28768,18184,28633,26159,26160,1865,1866,16096,18188,26212,26213,32107,32108;
        setArray .@enchant1[0],4832,4833,4834,4808,4820,4821,4818,4817,4816,4863,4864,4865,4815,4814,4813;
        setArray .@enchant2[0],29594,29595,29596,29598,29599,29600,29601,29602,29603,29604,29605,29606,29607;
        
        .@isEdda = 0;
        
        mes "[Encantos de Edda]";
        .@weap = getequipid(EQI_HAND_R);
        .@refine = getequiprefinerycnt(EQI_HAND_R);
        .@card0 = getequipcardid(EQI_HAND_R,0);
        .@card1 = getequipcardid(EQI_HAND_R,1);
        .@card2 = getequipcardid(EQI_HAND_R,2);
        .@card3 = getequipcardid(EQI_HAND_R,3);
        
        
        
        for(.@i = 0; .@i < 38; .@i++) {
            if(.@weapons[.@i] == .@weap){
                .@isEdda = 1;
            } 
        }
        if(.@isEdda == 0) {
            mes "Vamos lá, você precisa de uma arma Edda Equipada.";
        
            end;
        }
    
        if(.@card2 != 0 && .@card3 != 0){
            mes "você deseja reencantar o seu equipamento Edda?";
            
            switch(select("Sim 3º Slot", "Sim 4º Slot", "Nenhum")){
                case 1:
                    mes "O modo Normal irá custar 500 Documento de Pesquisa Biológica e 500 Fragmento de Experiência Biológica.";
                    mes "Com uma chance de 5% que falhe e quebre sua Arma!";
                    next;
                    mes "O modo Seguro irá custar 2000 Documento de Pesquisa Biológica e 2000 Fragmento de Experiência Biológica.";
                    mes "No modo Seguro sua Arma não se quebrará!";
                    next;
                    mes "O modo Específico irá custar 5000 Documento de Pesquisa Biológica.";
                    mes "No modo Específico você pode escolher o Encantamento que desejar.!";
                    
                    switch(select("Modo Normal", "Modo Seguro", "Modo Específico")){
                        case 1:
                            if(countitem(25786) < 500 && countitem(25787) < 500) {
                                mes "Você não tem a quantidade de itens suficientes. ";
                                end;
                            }
                            delitem 25786,500;
                            delitem 25787,500;
                            if(rand(20) == 1){
                                delequip EQI_HAND_R;
                                mes "Que Pena...";
                                end;
                            }
                            .@card2 = .@enchant2[rand(13)];
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                        case 2:
                            .@card2 = .@enchant2[rand(13)];
                            if(countitem(25786) < 2000 && countitem(25787) < 2000) {
                                mes "Você não tem a quantidade de itens suficientes.";
                                end;
                            }
                            delitem 25786,2000;
                            delitem 25787,2000;
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                    case 3:
                        mes "Você quer dizer trocar o encantamento, certo?";
                        mes "Vamos lá, você precisa de uma arma Edda Equipada.";
                        next;
                        mes "[Encantos de Edda]";
                if(.@isEdda == 1) {
                    mes "Qual bônus de encantamento você deseja atualizar?";
                    next;
                    switch (select("Memória de Seyren:Memória de Howard's:Memória de Eremes:Memória de Kathryne:Memória de Margaretha:Memória de Cecil:Memória de Randel:Memória de Flamel:Memória de Gertie:Memória de Celia:Memória de Chen:Memória de Trentini:Memória de Alphoccio:Deixa pra lá.")) {
                    case 1: callsub S_Upgrade,"Seyren",29594;
                    case 2: callsub S_Upgrade,"Howard's",29595;
                    case 3: callsub S_Upgrade,"Eremes",29596;
                    case 4: callsub S_Upgrade,"Kathryne",29598;
                    case 5: callsub S_Upgrade,"Margaretha",29599;
                    case 6: callsub S_Upgrade,"Cecil",29600;
                    case 7: callsub S_Upgrade,"Randel",29601;
                    case 8: callsub S_Upgrade,"Flamel",29602;
                    case 9: callsub S_Upgrade,"Gertie",29603;
                    case 10: callsub S_Upgrade,"Celia",29604;
                    case 11: callsub S_Upgrade,"Chen",29605;
                    case 12: callsub S_Upgrade,"Trentini",29606;
                    case 13: callsub S_Upgrade,"Alphoccio",29607;
                    case 14:
                        mes "[Encantos de Edda]";
                        mes "Por quê? Vai ser melhor do que é.";
                        mes "De qualquer forma, só podemos oferecer um Encanto.";
                        next;
                        mes "[Encantos de Edda]";
                        mes "O que você faz com isso é com você.";
                        close;
                    }
                }
                mes "Primeiro venha com a Arma que você quer que eu atualize.";
                mes "Certifique-se de que está em equipada, entendeu?";
                close;
            }
        S_Upgrade:
    		.@weap = getequipid(EQI_HAND_R); //Define variables in callsub again
    		.@refine = getequiprefinerycnt(EQI_HAND_R);
    		.@card0 = getequipcardid(EQI_HAND_R,0);
    		.@card1 = getequipcardid(EQI_HAND_R,1);
    		.@card2 = getequipcardid(EQI_HAND_R,2);
    		.@card3 = getequipcardid(EQI_HAND_R,3);
                mes "[Encantos de Edda]";
                mes "Entendo.";
                mes "vou atualizar seu Equipamento.";
                mes "Tem certeza?";
                next;
                switch (select("Sim, eu tenho.:Não espere.")) {
            case 1:
                mes "[Encantos de Edda]";
                mes "Vou começar a troca ^4d4dffAtualizando "+ getarg(0) +"^000000..";
                next;
                mes "[Encantos de Edda]";
                mes "Olha Você aqui.";
                delitem 25786,5000;
                getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,getarg(1),.@card3;
                close;
            case 2:
                mes "[Encantos de Edda]";
                mes "Você não quer trocar?";
                close;
                }
                break;
                case 2:
                    mes "O modo Normal lhe custará 200 Documentos de Pesquisa Biológica e 200 Fragmentos de Experiência Biológica";
                    mes "com 5% de quebrar sua arma!";
                    next;
                    mes "O modo Seguro lhe custará 1000 Documento de Pesquisa Biológica e 1000 Fragmento de Experiência Biológica";
                    mes "sem chance de quebrar sua arma!";
                    
                    switch(select("Modo Normal", "Modo Seguro")){
                        case 1:
                            if(countitem(25786) < 200 && countitem(25787) < 200) {
                                mes "Você não tem a quantidade de itens suficientes.";
                                end;
                            }
                            delitem 25786,200;
                            delitem 25787,200;
                            if(rand(20) == 1){
                                delequip EQI_HAND_R;
                                mes "Que pena...";
                                end;
                            }
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                        case 2:
                            .@card3 = .@enchant1[rand(15)];
                            delitem 25786,1000;
                            delitem 25787,1000;
                            delequip EQI_HAND_R;
                            getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
                            end;
                    }
                break;
                
                case 3:end;
            }
            
            end;
        }
        //@item 2056
    
        switch(select("Sim","não")){
            case 1:
                switch(select("Modo Normal", "Modo Seguro", "cancelar")){
                    case 1:
                        .@safe = 0;
                        break;
                    case 2:
                        .@safe = 1;
                        break;
                    case 3: end;
                }
            
            
                if(.@card3 == 0) {
                    if(.@safe == 0) mes "isto custará 50 Documentos de Pesquisa Biológica e 50 Fragmentos de Experiências Biológicas";
                    else {
                        mes "isto custará 500 Documento de Pesquisa Biológica e 500 Fragmento de Experiência Biológica";
                        next;
                        mes "há uma pequena mudança para quebrar sua arma, quer continuar?";
                    }
                    next;
                    switch(select("Sim","Não")){
                        case 1:
                            // 30% of the player loses the weapon;
                            if(rand(20) <= 2 && .@safe == 0){
                                delequip EQI_HAND_R;
                                mes "Que pena...";
                                end;
                                
                            }
                            break;
                        
                        case 2: 
                            mes "Ok...";
                            end;
                    }
                    
                    if(countitem(25786) < 50 && countitem(25787) < 50){
                        mes "você não tem os materiais suficientes.";
                        end;
                    }
                    if(.@safe == 1){
                        delitem 25786,500;
                        delitem 25787,500;
                    }
                    else {
                        delitem 25786,50;
                        delitem 25787,50;
                    }
                    .@card3 = .@enchant1[rand(15)];
                    break;
                }
                
                if(.@card2 == 0) {
                    if(.@safe == 0) mes "isto custará 50 Documentos de Pesquisa Biológica e 50 Fragmentos de Experiências Biológicas";
                    else {
                        mes "isto custará 500 Documento de Pesquisa Biológica e 500 Fragmento de Experiência Biológica";
                        next;
                        mes "há uma pequena mudança para quebrar sua arma, quer continuar?";
                    }
                    next;
                    switch(select("Sim","Não")){
                        // 30% of the player loses the weapon;
                        case 1:
                            if(rand(20) <= 2 && .@safe == 0){
                                delequip EQI_HAND_R;
                                mes "Que pena...";
                                end;
                            }
                            break;
                        case 2: 
                            mes "Ok...";
                            end;
                    }
                    
                    if(.@safe == 1){
                        if(countitem(25786) < 500 && countitem(25787) < 500){
                            mes "você não tem os materiais suficientes";
                            end;
                        }
                        delitem 25786,500;
                        delitem 25787,500;
                    }
                    else {
                        if(countitem(25786) < 50 && countitem(25787) < 50){
                            mes "você não tem os materiais suficientes";
                            end;
                        }
                        delitem 25786,50;
                        delitem 25787,50;
                    }
                    
                    .@card2 = .@enchant2[rand(13)];
                    break;
                }
                end;
            case 2:
                mes "ok...";
                end;
        }
        delequip EQI_HAND_R;
        getitem2 .@weap,1,1,.@refine,0,.@card0,.@card1,.@card2,.@card3;
        end;
    }

    Just minor advice for future similar problems - to debugging this it is helpful to print variables using "mes .@weap" etc. in different rows of the script. This way you can easily find out where you are getting wrong values.

    Hope that i helped. Have a good one! ^^

  10. Hey guys,

    maybe my question is dumb but since i'm newbie in rAthena scripting i would like to ask you if there is some compiling tool for rAthena which can give me feedback if script is working at all or not. I mean besides running script right in the game. How can i verify for example syntax mistakes, functionality etc. ? Or is there some method to run script in some other compilator?

    Thanks in advance for answer. ^^

  11. On 8/25/2020 at 8:51 AM, Patskie said:

    Try below script. I didn't test it too much

    -	script	MVP_vs_MVP	FAKE_NPC,{
    	
    	OnMinute00:
    		if (gettime(DT_HOUR) % 2 || .start) end;
    		goto OnStart;
    		end;
    	
    	OnStart:
    		mapwarp "1@dth3", "prontera", 150, 150;
    		killmonster "1@dth3", "All";
    		.start = 1;
    		announce .npc$ + " We are going to have a MVP vs MVP Event.", bc_all;
    		sleep 7000;
    		announce .npc$ + " For those who want to join, you can participate by using @mvpjoin", bc_all;
    		sleep 7000;
    		announce .npc$ + " We will start the event after 1 minute", bc_all;
    		sleep 60000;
    		announce .npc$ + " The entry to the event is now closed", bc_all;
    		.start = 2;
    		sleep 7000;
    		
    		if (getmapusers("1@dth3") < 1) {
    			announce .npc$ + " Not enough participants to continue the event", 0;
    			.start = 0;
    			end;
    		}
    		
    		mapannounce "1@dth3", .npc$ + " The rules for this event is simple", bc_map;
    		sleep 7000;
    		mapannounce "1@dth3", .npc$ + " Two MVP's will spawn at the center of the map and will attack each other", bc_map;
    		sleep 7000;
    		mapannounce "1@dth3", .npc$ + " Before these MVP's spawn, I will give you 1 minute to make a bet", bc_map;
    		sleep 7000;
    		mapannounce "1@dth3", .npc$ + " The bet cost for this event is " + F_InsertComma(.bet_cost) + "z and when your chosen MVP wins you'll get as much as " + F_InsertComma(.bet_rewd) + "z !!!", bc_map;
    		sleep 7000;
    		mapannounce "1@dth3", .npc$ + " All good?? Let's start betting !!!", bc_map;
    		sleep 7000;
    		mapannounce "1@dth3", .npc$ + " To make a bet please use @mvpbet command, I will give 1 minute for you guys to make a bet", bc_map;
    		
    		.start = 3;
    		sleep 55000;
    		mapannounce "1@dth3", .npc$ + " Betting will close in 5...", bc_map;
    		sleep 1000;
    		mapannounce "1@dth3", .npc$ + " 4...", bc_map;
    		sleep 1000;
    		mapannounce "1@dth3", .npc$ + " 3...", bc_map;
    		sleep 1000;
    		mapannounce "1@dth3", .npc$ + " 2...", bc_map;
    		sleep 1000;
    		mapannounce "1@dth3", .npc$ + " 1...", bc_map;
    		sleep 1000;
    		.start = 4;
    		mapannounce "1@dth3", .npc$ + " Betting is now closed !!!", bc_map;
    		
    		sleep 7000;
    		mapannounce "1@dth3", .npc$ + " Let's get ready to RUMBLE !!!", bc_map;
    		
    		.@mid = .MVP[rand(.size)];
    		monster "1@dth3", 68, 68, "MVP A", .@mid, 1, strnpcinfo(1) + "::OnDie1", Size_Small, AI_NONE;
    		.ma = $@mobid;
    		monster "1@dth3", 71, 68, "MVP B", .@mid, 1, strnpcinfo(1) + "::OnDie2", Size_Small, AI_ATTACK;
    		.mb = $@mobid;
    		end;
    		
    	OnDie1:
    		unittalk .mb, "[MVP B] Mwahaha!~ Such a weak opponent!";
    		sleep 7000;
    		killmonster "1@dth3", "All";
    		.start = 0;
    		addrid(5, 0, "1@dth3");
    		
    		if (2 == @mvp_bet) {
    			message strcharinfo(0),"Congratulations! You won the event, Good choice!";
    			Zeny += .bet_rewd;
    		}
    		
    		@mvp_bet = 0;
    		setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false;
    		warp "SavePoint", 0, 0;
    		end;
    		
    	OnDie2:
    		unittalk .ma, "[MVP A] Mwahaha!~ Such a weak opponent!";
    		sleep 7000;
    		killmonster "1@dth3", "All";
    		.start = 0;
    		addrid(5, 0, "1@dth3");
    		
    		if (1 == @mvp_bet) {
    			message strcharinfo(0),"Congratulations! You won the event, Good choice!";
    			Zeny += .bet_rewd;
    		}
    		
    		@mvp_bet = 0;
    		setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false; 
    		warp "SavePoint", 0, 0;
    		end;
    	
    	OnEventBet:
    		mes .npc$;
    		if (!.start)
    			mes "The event is not active.";
    		else if (.start != 3)
    			mes "The event cannot accept bets at the moment.";
    		else if (Zeny < .bet_cost)
    			mes "You don't have enough zeny to make a bet.";
    		else if (@mvp_bet)
    			mes "You already placed your bet.";
    		else if (strcharinfo(3) != "1@dth3")
    			mes "Hmm~";
    		else {
    			mes "Which mvp will you bet on this match???";
    			next;
    			.@s = select("MVP A:MVP B");
    			mes .npc$;
    			mes "Are you sure you want to bet " + F_InsertComma(.bet_cost) + " on " + (.@s == 1 ? "MVP A" : "MVP B") + "?";
    			next;
    			if (select("Yes:No") & 2) end;
    			if (.start != 3) { // in case they delay the select ???
    				setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false;
    				warp "SavePoint", 0, 0;
    				end;
    			}
    			mes .npc$;
    			mes "Good luck and have fun!";
    			Zeny -= .bet_cost;
    			@mvp_bet = .@s;
    		}
    		end;
    	
    	OnEventJoin:
    		if (!.start)
    			message strcharinfo(0), "The event is not active.";
    		else if (.start != 1)
    			message strcharinfo(0), "The event is not yet allowing participants to enter.";
    		else {
    			setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, true;
    			switch (rand(1,4)) {
    				case 1:
    					warp "1@dth3", 49, 50;
    					break;
    				case 2:
    					warp "1@dth3", 49, 88;
    					break;
    				case 3:
    					warp "1@dth3", 89, 88;
    					break;
    				case 4:
    					warp "1@dth3", 89, 50;
    					break;
    			}
    		}
    		end;
    	
    	OnInit:
    		bindatcmd "mvpjoin", strnpcinfo(1) + "::OnEventJoin";
    		bindatcmd "mvpbet", strnpcinfo(1) + "::OnEventBet";
    		bindatcmd "mvpstart", strnpcinfo(1) + "::OnStart", 99, 99;
    		
    		// List of MVP's
    		setarray .MVP[0], 1112, 1115, 1147, 1150, 1157, 1159;
    		.size = getarraysize(.MVP);
    	
    		.npc$ = "[MVP vs MVP Event]";
    		
    		.bet_cost = 5000; // 5,000z to bet in the event
    		.bet_rewd = 1000000; // 1,000,000z if bet wins
    		
    		end;
    }
    
    1@dth3	mapflag	monster_noteleport
    1@dth3	mapflag	noskill
    1@dth3	mapflag	noloot
    1@dth3	mapflag	noitemconsumption
    1@dth3	mapflag	nomemo
    1@dth3	mapflag	nosave	SavePoint
    1@dth3	mapflag	nowarpto
    1@dth3	mapflag	nowarp
    1@dth3	mapflag	noteleport

     

    There are mistakes, unfortunately.

  12. On 11/15/2022 at 5:55 AM, aysus said:

    why do i get this error and mob_db has errors too... 

    rand.png

    hey guys... please share knowledge about here.. T_T

     

    The files attached are for older version of rAthena i suppose.. Author said (first post):
    Requirement (for athena before  bf2461f  28/04/2107)
    and in Installation instructions there is: "replace mob_drops.txt".. I haven't got this file in my rAthena folder at all, soo.. Also there are .txt files and i've got all in .yml structure.
    I've got errors too but it's obvious that it's because server expects yml i guess. Maybe someone more experienced can advise us how to make this work with newer version of rAthena. I'm curious about it too. So thanks in advance. ^^

×
×
  • Create New...