Jump to content

Yuna

Members
  • Posts

    96
  • Joined

  • Last visited

Posts posted by Yuna

  1. This is the enchanting script I'm using.

    Spoiler

    //= Novice Equipment Enchanter
    //============================================================ 

    nground,174,196,4    script    Apprentice Craftsman    73,{
        disable_items;
        mes "[Apprentice Craftsman]";
        if (Zeny >= 400000) {
            mes "I've been studying ways to enhance an armor to maximize its capability.";
            next;
            mes "[Apprentice Craftsman]";
            mes "Enchanting is an awesome skill that infuses a mysterious status powers into the armor's hidden socket.";
            next;
            mes "[Apprentice Craftsman]";
            mes "However, you have to keep in mind that if there are two armors of the same kind in your possession, the Enchantment will be applied in the order they are placed in your inventory.";
            next;
            mes "[Apprentice Craftsman]";
            mes "In that case, the Enchantment may be applied to an item which you didn't mean to Enchant. So just bring ^5555ffONE Armor^000000 you want enchanted to be safe...";
            next;
            mes "[Apprentice Craftsman]";
            mes "I'm not responsible for what would happen if you have more than one of the same kind in your inventory.";
            next;
            switch(select("Non Slotted Armor.:Slotted Armor.:High Grade Armor.:Maybe next time.")) {
            case 1:
                setarray .@Items[0],2307,2309,2314,2316,2321,2325,2327,2328,2330,2332,2334,2335,2341,2344,2346,2348,2350,2337,2386,2394,2395,2396;
                set .@j,50;
                break;
            case 2:
                setarray .@Items[0],2311,2318,2319,2320,2308,2310,2315,2317,2322,2324,2326,2331,2333,2336,2342,2345,2347,2349,2351;
                set .@j,55;
                set .@k,1;
                break;
            case 3:
                setarray .@Items[0],2364,2365,2391,2374,2375,2376,2377,2378,2379,2380,2381,2382,2387,2388,2389,2390;
                set .@j,60;
                break;
            case 4:
                mes "[Apprentice Craftsman]";
                mes "Please come back when you have any interest in enchanting your armor.";
                close;
            }
            set .@menu$,"";
            for(set .@i,0; .@i<getarraysize(.@Items); set .@i,.@i+1)
                set .@menu$, .@menu$+getitemname(.@Items[.@i])+((.@k)?" [1]":"")+":";
            callsub S_EnchantArmor, .@Items[select(.@menu$)-1], .@j;
            end;
        }
        mes "I am in charge of Enchanting Armors. Simply put, I've been studying ways to power-up armor.";
        next;
        mes "[Apprentice Craftsman]";
        mes "If by any chance, you would want to enchant your armor, bring me 400,000 zeny and the armor you want to enchant and you are all set to go.";
        close;

    S_EnchantArmor:
        set .@itemid,getarg(0);
        set .@failrate,getarg(1);
        mes "[Apprentice Craftsman]";

       if (getequipcardid(EQI_ARMOR,1)) {
            mes "This item has already been enchanted. I can't enchant this any further.";
            close;
        }
        if (countitem(.@itemid) == 1) {
            mes "Socket enchant will cost you 400,000 zeny. And there will be a random option enchanted. Of course, there is a chance of breaking your armor.";
            next;
            mes "[Apprentice Craftsman]";
            mes "First and most importantly.";
            mes "^ff5555Existing Refine Level of the Armor";
            mes "and Cards will be GONE.^000000";
            mes "Do you still want to try an Enchant?";
            next;
            if(select("Hmm... Let me think it over.:Go ahead.") == 1) {
                mes "[Apprentice Craftsman]";
                mes "Well, I can't blame you. Safety first, eh?";
                mes "Now you have a nice day.";
                close;
            }
            mes "[Apprentice Craftsman]";
            mes "Quite of an adventurer huh? Well, shall we?";
            close2;
            specialeffect2 EF_MAPPILLAR;
            if (Zeny < 400000) {
                mes "[Apprentice Craftsman]";
                mes "Sorry, but you don't have enough zeny.";
                close;
            }
            progressbar "ffff00",7;
            set Zeny, Zeny-400000;
            delitem .@itemid,1;
            switch (rand(1,.@failrate)) {
                case 1: set .@addpart,4702;break;
                case 2: set .@addpart,4712;break;
                case 3: set .@addpart,4722;break;
                case 4: set .@addpart,4732;break;
                case 5: set .@addpart,4742;break;
                case 6: set .@addpart,4752;break;
                case 7:
                case 8: set .@addpart,4701;break;
                case 9:
                case 10: set .@addpart,4711;break;
                case 11:
                case 12: set .@addpart,4721;break;
                case 13:
                case 14: set .@addpart,4731;break;
                case 15:
                case 16: set .@addpart,4741;break;
                case 17:
                case 18: set .@addpart,4751;break;
                case 19:
                case 20:
                case 21: set .@addpart,4700;break;
                case 22:
                case 23:
                case 24: set .@addpart,4710;break;
                case 25:
                case 26:
                case 27: set .@addpart,4720;break;
                case 28:
                case 29:
                case 30: set .@addpart,4730;break;
                case 31:
                case 32:
                case 33: set .@addpart,4740;break;
                case 34:
                case 35:
                case 36: set .@addpart,4750;break;
                default:
                    specialeffect2 EF_PHARMACY_FAIL;
                    mes "[Apprentice Craftsman]";
                    mes "Well that's too bad.";
                    mes "The requested equipment has failed to enchant.";
                    close;
            }
            getitem2 .@itemid, 1, 1, 0, 0, 0, .@addpart, 0, 0;
        }
        else {
            mes "Hmm? There's nothing to be enchanted!";
            mes "Please come back with just ONE equipment to be enchanted.";
            close;
        }
    }

     

    The script did't have a check to see if the item has an enchantment, so I wrote this part:

     

    Quote

       if (getequipcardid(EQI_ARMOR,1)) {
            mes "This item has already been enchanted. I can't enchant this any further.";
            close;
        }

    But it does't work, the npc can re-enchant the armor over and over.
    Any help would be appreciated.

  2. Does petskillbonus/petskillattack/petrecovery effects for pets work without having pet attack on in conf?

    Because, I have pet attack off (which is official) but these effects aren't working.

    I also tried making the pet loyal and equipping the pet accessory, and still didn't work. The pets I tried out were Smokie and Sohee.

  3. I have never used the VIP system before and I have a question regarding the storage space given by it.

    What happens to the storaged items that are saved on the extra slots given by vip after the time expires?

  4. So, I added the following:

    script_set_constant("Eff_Hallucination",SC_HALLUCINATION,false);

    Tested it out, but got the following error:

    [Error]: pc_bonus2: SP_RESEFF: 52 is invalid effect.

    There seems to be more to edit. I am playin around tryna figure out. Meanwhile, if you have any other suggestions let me know, thanks!

  5. I'm looking for a way to have Immunity for Hallucination since there in no script for this in item_bonus.txt

    I know that you are able to disable the hallucination effect through client diffing, but this is not what I am looking for.
     

    Can this be done through a script perhaps?

  6. 1 hour ago, Emistry said:

    recheck all the custom entry of your quest LUB files.

    make sure all the quest info are configured correctly in these LUB files.

     

    Where can I find the latest Lua files?

     

    Fixed~ :) Updated lua files.

  7. 18 minutes ago, devcloud said:

    rAthena/Src/Map/atcommand.c

    
    sprintf(atcmd_output, msg_txt(sd,270), sd->status.name, tempmes);	// *%s %s*

    Change to

    
    sprintf(atcmd_output, "* %s *"), tempmes);

    It errored..

    Tried the following, didn't work:

    sprintf(atcmd_output, ("* %s *"), tempmes);
    sprintf(atcmd_output, "* %s *", tempmes);

     

  8. 23 minutes ago, Neffletics said:

    Did you patch Ignore Missing Palette Error and Ignore Resource Errors on your client? Try rediffing your client and check the error message. 

    The client is set to show errors, however there is no error shown with these ones..

  9. When viewing some of the quests that are on the quest window crashes the client. For example the mora quests, when trying to view the quest info it keeps crashing the client.

    15032790_290907371309649_694783300891386

    I'm guessing I am missing some sort of lua file, but I'm not sure which. Any help?

  10.  

     

    the menu I have is:

    menu "Option 1",opt1,
    "Option 2",opt2,
    "Option 3",opt3;
    

    with an apple it should be

     

    menu "Option 4",opt4,
    "Option 5",opt5,
    "Option 6",opt6;

    Did you try Emistry's solution? It already looks like it will suit your needs.

     

     

     

    I did (it errored)

    also, my menu is different, it's using menu instead of select.

     

    How would I do what emistry suggested with a menu like what I post is what I'm asking.

  11. Im trying to make this npc give out 2 different menu options depending on if you carry a certain item.

     

    for example:

     

    by default the menu is offering (option 1:option 2:option 3)

     

    but if you have an apple for example in your inventory the menus options would change to  (option 4:option 5:option 6)

     

    Not sure how to do it, the ways i tried out didn't work, hoping somebody is able to help :)

     

    Thank you!

×
×
  • Create New...