Mental Potion (about the same as the #asorm spell)

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
Cassy
TMW Adviser
TMW Adviser
Posts: 791
Joined: 09 Mar 2013, 09:39
Location: ♥ Fluffyland ♥
Contact:

Mental Potion (about the same as the #asorm spell)

Post by Cassy »

I thought about creating this item while I was brainstorming about prices for the lottery (it will also be one of the prices there).

The Mental Potion works like the Iron Potion and Concentration Potion, but instead of increasing attack power or attack speed it increases the magic defense temporarily, just like the #asorm spell.
This should cause some balance in PvP - and I think this is quite important (although I don't like PvP it's nice to see how people enjoy Brodomir's Cave :D )

I'll need some help since this requires several things:
-> dyeable icon
-> entry in item_db
-> entry in items.xml
-> Availability at Rauk the Alchemist
-> Availability as monster drop

...and I'm doing all of these things for the first time.
So please check, give me some feedback, tell me what I have forgotten etc. :wink:

Icon: Image
Dyeable version: Image

Note: It's the shape of this potion and the colors of the glas of this potion, so I'm not the creator, just a small contributor :wink:
The blue colors might change a bit because I made this icon before creating a dyeable version.
If you wonder about why creating a new glas when we already have some:
Iron and Concentration Potion have different shapes (b.png and c.png) and the Mental Potion should use another one therefore.
Well, a.png (Cactus Drink, Cactus Potion, Tiny Healing Potion) and d.png (all dyes) are used so much so it's just a question of time when a new shape should be created.



I'll need some help here - entry in item_db (here a link to compare it with the Iron Potion)

Code: Select all

892, MentalPotion, Mental Potion, 0, 500, 250, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {what-should-I-add-here?}, {}

#ID, Name, Label, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
-> Same buy and sell price and also same weight as Iron & Concentration Potion.
-> I have no idea what to put in the brickets there... I guess something to make this icon appear next to the job exp bar just like it appears after casting #asorm, also a number of how much the magic defense shall increase and for how long which is another thing I need some help for...


items.xml (here a link to compare it with the Iron Potion)

Code: Select all

    <item id="892"
        image="use/potions/f.png|G:#011879,0e2eb7,4260e0"
        name="Mental Potion"
        description="Increases your magic defense."
        effect="Magic defense increase (temporary)."
        type="usable"
        weight="10"
        tag="Potions"/>

Rauk the Alchemist (click)
Spoiler:

Code: Select all

// This NPC makes potions and dyes
011-1.gat,117,77,0|script|Rauk|103,
{
    // Setzer quest/monster oil quest participation
    set @SETZER_INITIAL, 0;
    set @SETZER_KNOWS_OIL, 1;
    set @SETZER_KNOWS_STINGER, 2;

    set @Q_MASK, NIBBLE_3_MASK;
    set @Q_SHIFT, NIBBLE_3_SHIFT;

    set @wants_sulphur, (QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK));
    set @wants_ironpowder, (((QUEST_MAGIC & (NIBBLE_6_MASK | NIBBLE_7_MASK)) >> NIBBLE_6_SHIFT) >= 7);
    set @Q_status, (QUEST_Forestbow_state & @Q_MASK) >> @Q_SHIFT;
    // End of Setzer quest/monster oil quest participation

    set @QUEST_CAN_GET_DYE_HERE, 2;
    set @QUEST_HAS_SOLVED_DYE_PUZZLE, 3;
    set @QUEST_GUESS_BASE, 4;

    set @CHOICE_IRON, 0;
    set @CHOICE_CONCENTRATION, 1;
    set @CHOICE_MENTAL, 2;
    set @CHOICE_DYEING_INTRO, 3;
    set @CHOICE_DYE, 4;
    set @CHOICE_MONSTER_OIL, 5;
    set @CHOICE_MANA_POTION, 6;
    set @CHOICE_SULPHUR_POWDER, 7;
    set @CHOICE_IRON_POWDER, 8;
    set @CHOICE_ABORT, 9;

    setarray @menuitems$, "", "", "", "", "", "", "", "";
    set @c, 0;

    set @menuitems$[@c], "Iron potion.";
    set @menuID[@c], @CHOICE_IRON;
    set @c, @c + 1;

    set @menuitems$[@c], "Concentration potion.";
    set @menuID[@c], @CHOICE_CONCENTRATION;
    set @c, @c + 1;

    set @menuitems$[@c], "Mental potion.";
    set @menuID[@c], @CHOICE_MENTAL;
    set @c, @c + 1;

    if (!(MAGIC_FLAGS & MFLAG_KNOWS_MANAPOTION))
        goto L_post_mana_potion_c;
    set @menuitems$[@c], "Mana potion.";
    set @menuID[@c], @CHOICE_MANA_POTION;
    set @c, @c + 1;

L_post_mana_potion_c:
    if (QUEST_clothdyer_knowsdye >= @QUEST_CAN_GET_DYE_HERE)
    goto L_skip_introducing;

    mes "[Rauk the Alchemist]";
    mes "\"I'm learning the ancient science of the alchemy.";
    mes "I already know how to create a couple of potions!!\"";
    mes "\"Do you want me to create one for you?\"";
    next;
    if (QUEST_clothdyer_knowsdye == 1)
        goto L_pre_dyeing;
    goto L_certain_condition;

L_skip_introducing:
    mes "[Rauk the Alchemist]";
    mes "\"Hello, welcome back! Are you interested in dyes again, or in one of my potions?\"";
    next;
    set @menuitems$[@c], "Dye, please.";
    set @menuID[@c], @CHOICE_DYE;
    set @c, @c + 1;
    goto L_certain_condition;

L_pre_dyeing:
    set @menuitems$[@c], "Actually, can you make dye?";
    set @menuID[@c], @CHOICE_DYEING_INTRO;
    set @c, @c + 1;

L_certain_condition:
    if (!@wants_sulphur)
        goto L_post_sulphur_option;
    set @menuitems$[@c], "Can you make sulphur powder?";
    set @menuID[@c], @CHOICE_SULPHUR_POWDER;
    set @c, @c + 1;

L_post_sulphur_option:
    if (!@wants_ironpowder)
        goto L_post_ironpowder_option;
    set @menuitems$[@c], "Can you make iron powder?";
    set @menuID[@c], @CHOICE_IRON_POWDER;
    set @c, @c + 1;

L_post_ironpowder_option:
    if (@Q_status == @SETZER_INITIAL)
        goto L_post_monster_oil;
    set @menuitems$[@c], "Can you make monster oil?";
    set @menuID[@c], @CHOICE_MONSTER_OIL;
    set @c, @c + 1;

L_post_monster_oil:
    set @menuitems$[@c], "No thanks.";
    set @menuID[@c], @CHOICE_ABORT;
    set @c, @c + 1;

L_main_menu:

    menu
        @menuitems$[0], -,
        @menuitems$[1], -,
        @menuitems$[2], -,
        @menuitems$[3], -,
        @menuitems$[4], -,
        @menuitems$[5], -,
        @menuitems$[6], -,
        @menuitems$[7], -;

    set @menu, @menu - 1;

    if (@menu >= @c)
        goto L_abort;
    if (@menuID[@menu] == @CHOICE_IRON)
        goto L_iron;
    if (@menuID[@menu] == @CHOICE_CONCENTRATION)
        goto L_mental;
    if (@menuID[@menu] == @CHOICE_MENTAL)
        goto L_concentration;
    if (@menuID[@menu] == @CHOICE_DYEING_INTRO)
        goto L_dyeing_intro;
    if (@menuID[@menu] == @CHOICE_DYE)
        goto L_pick_colour;
    if (@menuID[@menu] == @CHOICE_MONSTER_OIL)
        goto L_monster_oil;
    if (@menuID[@menu] == @CHOICE_MANA_POTION)
        goto L_mana_potion;
    if (@menuID[@menu] == @CHOICE_SULPHUR_POWDER)
        goto L_sulphur;
    if (@menuID[@menu] == @CHOICE_IRON_POWDER)
        goto L_iron_powder;
    if (@menuID[@menu] == @CHOICE_ABORT)
        goto L_abort;
    goto L_abort;

L_iron_powder:
    mes "[Rauk the Alchemist]";
    mes "\"Iron powder? Hmm, I can extract some iron powder out of a chunk of iron ore, but that will require me to dissolve it. If you give me a chunk of iron ore and 100 GP for the acid, I can do it.\"";
    next;
    menu
        "Never mind.", L_abort,
        "Here you are!", -;
    if (countitem("IronOre") < 1)
        goto L_iron_powder_noore;
    if (Zeny < 100)
        goto L_iron_powder_nozeny;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("IronOre") > 1
        && countitem("IronPowder") < 1)
            goto L_iron_powder_full;
    delitem "IronOre", 1;
    set Zeny, Zeny - 100;
    getitem "IronPowder", 4;
    mes "[Rauk the Alchemist]";
    mes "Rauk places your chunk of ore in a strange glass container, then pours a steaming yellow liquid over it. Before your eyes, the ore dissolves.";
    next;
    mes "[Rauk the Alchemist]";
    mes "Rauk pours another liquid over the resultant mixture, then pours the result through a piece of cloth placed in a funnel, followed by a cup of water. He removes the residual metal powder from the cloth and hands it to you.";
    mes "\"This is about as fine as I can make it without mechanical help.\"";
    close;

L_iron_powder_noore:
    mes "[Rauk the Alchemist]";
    mes "\"I do need a chunk of iron ore. Please return when you have one.\"";
    close;

L_iron_powder_nozeny:
    mes "[Rauk the Alchemist]";
    mes "\"I'm sorry, but I must ask that you pay 100 GP-- the acid I use is not cheap.\"";
    close;

L_iron_powder_full:
    mes "[Rauk the Alchemist]";
    mes "\"I don't think that you have room to carry this. Please come back later.\"";
    close;

L_sulphur:
    mes "[Rauk the Alchemist]";
    mes "\"Oh, that is easy. Bring me three piles of volcanic ash and three mauve leaves, and I will extract twelve piles of sulphur ash for you.\"";
    next;
    menu
        "I will be back.", L_abort,
        "No, I won't!", L_abort,
        "Here you are!", -;

    if (countitem("PileOfAsh") < 3)
        goto L_sulphur_noash;
    if (countitem("MauveHerb") < 3)
        goto L_sulphur_nomauve;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("SulphurPowder") == 0
        && countitem("PileOfAsh") > 3
        && countitem("MauveHerb") > 3)
            goto L_sulphur_nospace;

    delitem "PileOfAsh", 3;
    delitem "MauveHerb", 3;
    getitem "SulphurPowder", 12;
    mes "[Rauk the Alchemist]";
    mes "You watch Rauk burn the mauve leaves in the midst of the ashes. He then dissolves the result and pours it through a filter, finally heating up the residual liquid.";
    next;
    mes "[Rauk the Alchemist]";
    mes "The water having evaporated, only some yellow powder is left over. Rauk carefully pours it into your hand.";
    mes "\"This should be precisely twelve half-ounces of sulphur powder.\"";
    close;

L_sulphur_noash:
    mes "[Rauk the Alchemist]";
    mes "\"You don't seem to have all three piles of volcanic ash.\"";
    close;

L_sulphur_nomauve:
    mes "[Rauk the Alchemist]";
    mes "\"You don't seem to have the three mauve leaves I asked for.\"";
    close;

L_sulphur_nospace:
    mes "[Rauk the Alchemist]";
    mes "\"Oh dear. You don't seem to be able to carry the sulphur powder.\"";
    close;

L_mana_potion:
    mes "[Rauk the Alchemist]";
    mes "\"Humh... I do believe that I have a recipe somewhere. One moment...\"";
    mes "Rauk pulls a small book out of his sleeve and leafs through it.";
    mes "\"Aha, here we are. Hmm, I'm not convinced that this is the best possible recipe...\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"I shall need one pearl, one bottle of water, thirty mauve leaves, twenty gamboge leaves, and five piles of volcanic ash.\"";
    next;
    menu
        "Here you are!", L_get_mana_potion,
        "Never mind.", L_main_menu;
    goto L_main_menu;

L_get_mana_potion:
    if(countitem("MauveHerb") < 30)
        goto L_mana_potion_lacking;
    if(countitem("GambogeHerb") < 20)
        goto L_mana_potion_lacking;
    if(countitem("PileOfAsh") < 5)
        goto L_mana_potion_lacking;
    if(countitem("Pearl") < 1)
        goto L_mana_potion_lacking;
    if(countitem("BottleOfWater") < 1)
        goto L_mana_potion_lacking;
    getinventorylist;
    if ((@inventorylist_count == 100)
        && (countitem("MauveHerb") > 30)
        && (countitem("PileOfAsh") > 5)
        && (countitem("Pearl") > 1)
        && (countitem("BottleOfWater") > 1)
        && (countitem("ManaPotion") < 1))
            goto L_mana_potion_toomuch;
    delitem "MauveHerb", 30;
    delitem "GambogeHerb", 20;
    delitem "PileOfAsh", 5;
    delitem "Pearl", 1;
    delitem "BottleOfWater", 1;
    getitem "ManaPotion", 1;
    mes "[Rauk the Alchemist]";
    mes "Rauk grinds the leaves, then crushes the pearl. Taking out a small charcoal oven, he heats up your water bottle and dissolves first the pearl powder, then the ashes.";
    mes "The brew begins to bubble violently.";
    next;
    mes "[Rauk the Alchemist]";
    mes "Taking the bottle with a pair of tongs, he pours the liquid through a fine sieve, discarding the liquid.";
    mes "He then mixes the residual paste with the leaves, stirs in a little water from the pond and fills the result into a separate bottle.";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Here you are. I hope that this is what you wanted.\"";
    next;
    goto L_main_menu;

L_mana_potion_toomuch:
    mes "[Rauk the Alchemist]";
    mes "\"You look quite burdened already. Why don't you drop off a few things first, and come back later?\"";
    next;
    goto L_main_menu;

L_mana_potion_lacking:
    mes "[Rauk the Alchemist]";
    mes "\"Sorry, but I need one Pearl, one Bottle of Water, 30 Mauve Leaves, 20 Gamboge Leaves, and five Piles of Ash.\"";
    next;
    goto L_main_menu;

L_iron:
    set @COST_PER_IRON_POTION, 2;

    mes "\" To make them, I'm going to need " + @COST_PER_IRON_POTION + " Small Mushrooms per Iron Potion. How many Iron Potions would you like?\"";
    input @count;

    if (@count == 0)
        close;
    set @empty, countitem("SmallMushroom");

    if (@empty < @count * @COST_PER_IRON_POTION)
        goto L_no_iron;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("SmallMushroom") == 0 && @empty > @count)
        goto L_TooMany;

    delitem "SmallMushroom", @COST_PER_IRON_POTION * @count;
    getitem "IronPotion", @count;
    close;

L_concentration:
    set @COST_PER_CONCENTRATION_POTION, 2;

    mes "\" To make them, I'm going to need " + @COST_PER_CONCENTRATION_POTION + " Pink Petals per Concentration Potion. How many Concentration Potions would you like?\"";
    input @count;

    if (@count == 0)
        close;
    set @empty, countitem("PinkPetal");

    if (@empty < @count * @COST_PER_CONCENTRATION_POTION)
        goto L_no_concentration;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("PinkPetal") == 0 && @empty > @count)
        goto L_TooMany;

    delitem "PinkPetal", @COST_PER_CONCENTRATION_POTION * @count;
    getitem "ConcentrationPotion", @count;
    close;

L_mental:
    set @COST_PER_MENTAL_POTION, 2;

    mes "\" To make them, I'm going to need " + @COST_PER_MENTAL_POTION + " Black Scorpion Stingers per Mental Potion. How many Mental Potions would you like?\"";
    input @count;

    if (@count == 0)
        close;
    set @empty, countitem("BlackScorpionStinger");

    if (@empty < @count * @COST_PER_MENTAL_POTION)
        goto L_no_mental;
    getinventorylist;
    if (@inventorylist_count == 100 && countitem("BlackScorpionStinger") == 0 && @empty > @count)
        goto L_TooMany;

    delitem "BlackScorpionStinger", @COST_PER_MENTAL_POTION * @count;
    getitem "MentalPotion", @count;
    close;

L_no_iron:
    mes "\"You have to bring me 2 Small Mushrooms for each Iron Potion.\"";
    close;

L_no_concentration:
    mes "\"You have to bring me 2 Pink Petals for each Concentration Potion.\"";
    close;

L_no_mental:
    mes "\"You have to bring me 2 Black Scorpion Stingers for each Concentration Potion.\"";
    close;

L_dyeing_intro:
    mes "[Rauk the Alchemist]";
    mes "Rauk pauses for a moment.";
    mes "\"Hmm, I'm not very good at that... I can only make simple dyes, the ones that you can use for cotton and wool.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"For the truly powerful ones that you can use to dye a person or an entire lake with, I would need a powerful catalyst, like an Obsidian Spork or a Wumpus Egg...\"";
    mes "Rauk seems to be lost in his thoughts.";
    next;
    menu
        "I only want to dye clothes, though...", -,
        "What's a 'Wumpus egg'?", L_wumpus_egg_intro,
        "What's an 'Obsidian Spork'?", L_obsidian_spork_intro,
        "Er, never mind...", L_abort;
    mes "[Rauk the Alchemist]";
    mes "\"Oh, just for clothes? Well, that is easy. I can make red, yellow, light blue, orange, pink, green, dark blue, black and purple dye, if you can get me the ingredients for it.\"";
    next;
    set QUEST_clothdyer_knowsdye, 2;
    goto L_pick_colour;

L_wumpus_egg_intro:
    mes "[Rauk the Alchemist]";
    mes "Rauk's eyes brighten up.";
    mes "\"Ah, a wumpus egg is one of the most powerful catalysts out there, useful for transmutation and transchromation! Unfortunately the Common Wumpus is almost completely extinct these days, so they are hard to find.";
    mes "Should you find one, please let me know-- I will pay well for one!\"";
    close;

L_obsidian_spork_intro:
    mes "[Rauk the Alchemist]";
    mes "Rauk scratches his head.";
    mes "\"Hm, obsidian is a dark, glass-like material that you can normally find near volcanos. Shaping it isn't too hard, but shaping it without it losing its magical properties is almost impossible.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Obsidian sporks are therefore hard to make, but they are said to be very useful in certain kinds of alchemy.";
    mes "Should you find one, please let me know!\"";
    close;

L_pick_colour:
    menu
        "What are the ingredients you need?", L_description,
        "Red", L_red,
        "Yellow", L_yellow,
        "Light blue", L_light_blue,
        "Green", L_green,
        "Orange", L_orange,
        "Pink", L_pink,
        "Dark blue", L_dark_blue,
        "Black", L_black,
        "Purple", L_purple,
        "Dark Green", L_dark_green,
        "Nothing, really.", L_abort;
    close;

L_description:
    mes "[Rauk the Alchemist]";
    mes "\"The kinds of dyes I know are made from herbs-- alizarin for red, gamboge for yellow, cobalt for blue, and mauve as binding agent for dark colors.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Some of the colors need more ingredients, including some that you can't find here, so I have to charge money for them.";
    mes "Oh, and for a proper dark blue and purple I also need a pearl; without pearl dust they would not shimmer properly.\"";
    next;

L_description_quick:
    menu
        "What do you need for red dye?", L_d_red,
        "What do you need for yellow dye?", L_d_yellow,
        "What do you need for light blue dye?", L_d_light_blue,
        "What do you need for green dye?", L_d_green,
        "What do you need for orange dye?", L_d_orange,
        "What do you need for pink dye?", L_d_pink,
        "What do you need for dark blue dye?", L_d_dark_blue,
        "What do you need for black dye?", L_d_black,
        "What do you need for purple dye?", L_d_purple,
        "What do you need for dark green dye?", L_d_dark_green,
        "Actually...", -;
    menu
        "Can you make some dye for me, please?", L_pick_colour,
        "Where can I get the herbs?", L_d_herbs,
        "Where can I find pink petals?", L_d_pink_petals,
        "Where can I find iron ore?", L_d_ore,
        "Where can I find a pearl?", L_d_pearl,
        "Where can I find maggot slime?", L_d_maggot_slime,
        "I see. Thank you, and a good day to you!", L_abort;
    close;

L_d_herbs:
    mes "[Rauk the Alchemist]";
    mes "\"Alizarin, mauve, cobalt and gamboge bushes grow in this general area. I haven't seen them nearby, but take a look around; I am sure you will find some.\"";
    next;
    goto L_description_quick;

L_d_pink_petals:
    mes "[Rauk the Alchemist]";
    mes "\"Just take some from the pink flowers around here. But be careful, they seem to be a bit fond of them.\"";
    next;
    goto L_description_quick;

L_d_ore:
    mes "[Rauk the Alchemist]";
    mes "\"Iron ore you should be able to find in some mine, I think. That's where people usually get it from, I have been told.\"";
    next;
    goto L_description_quick;

L_d_pearl:
    mes "[Rauk the Alchemist]";
    mes "\"A pearl... hm, that might be tricky. You normally find them in clams, but I haven't seen many of those here in the woodlands.\"";
    next;
    goto L_description_quick;

L_d_maggot_slime:
    mes "[Rauk the Alchemist]";
    mes "\"As the name might have given away already, maggot slime is most easily obtained from maggots. Still, there are some other creatures-- such as bats-- that secrete a similar kind of slime that for alchemistic purposes is equivalent.\"";
    next;
    goto L_description_quick;

L_intermediate:
    menu
        "Can you make some dye for me?", L_pick_colour,
        "Can you describe the ingredients?", L_description_quick,
        "Never mind.", L_abort;
    close;

L_ok:
    mes "[Rauk the Alchemist]";
    mes "\"Here is your dye. Remember to use all of it at once or the color may bleach out.\"";
    next;
    goto L_pick_colour;

L_red:
    if (countitem("AlizarinHerb") < 10)
        goto L_red_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("AlizarinHerb") > 10)
            goto L_TooMany;
    delitem "AlizarinHerb", 10;
    getitem "RedDye", 1;
    goto L_ok;

L_red_fail:
    mes "[Rauk the Alchemist]";
    mes "\"Hmm, sorry, but I do need ten alizarin leaves to make red dye.\"";
    next;
    goto L_intermediate;

L_d_red:
    mes "[Rauk the Alchemist]";
    mes "\"Red dye is fairly simple to make. Bring me ten leaves of alizarin, and I can brew it for you right away.\"";
    next;
    goto L_intermediate;

L_yellow:
    if (countitem("GambogeHerb") < 10)
        goto L_yellow_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("GambogeHerb") > 10)
            goto L_TooMany;
    delitem "GambogeHerb", 10;
    getitem "YellowDye", 1;
    goto L_ok;

L_yellow_fail:
    mes "[Rauk the Alchemist]";
    mes "\"Without enough gamboge leaves-- I would need at least ten--, I can't make yellow dye for you.\"";
    next;
    goto L_intermediate;

L_d_yellow:
    mes "[Rauk the Alchemist]";
    mes "\"Yellow dye is no more than gamboge extract. If you get me ten gamboge leaves, I can make it easily.\"";
    next;
    goto L_intermediate;

L_light_blue:
    if (countitem("CobaltHerb") < 10)
        goto L_light_blue_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("CobaltHerb") > 10)
            goto L_TooMany;
    delitem "CobaltHerb", 10;
    getitem "LightBlueDye", 1;
    goto L_ok;

L_light_blue_fail:
    mes "[Rauk the Alchemist]";
    mes "\"Sorry, but I won't give it to you for less than ten cobalt leaves.\"";
    next;
    goto L_intermediate;

L_d_light_blue:
    mes "[Rauk the Alchemist]";
    mes "\"Light blue dye is what you get if you let cobalt leaves sit in alcohol over night. I have some here and will trade it for ten fresh cobalt leaves.\"";
    next;
    goto L_intermediate;

L_green:
    if (countitem("CobaltHerb") < 20)
        goto L_green_fail;
    if (countitem("GambogeHerb") < 20)
        goto L_green_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("CobaltHerb") > 20
        && countitem("GambogeHerb") > 20)
            goto L_TooMany;
    if (Zeny < 1000)
        goto L_green_fail;
    delitem "CobaltHerb", 20;
    delitem "GambogeHerb", 20;
    set Zeny, Zeny - 1000;
    getitem "GreenDye", 1;
    goto L_ok;

L_green_fail:
    mes "[Rauk the Alchemist]";
    mes "\"No... I need enough gamboge and cobalt to make your dye.\"";
    mes "\"Twenty gamboge leaves, twenty cobalt leaves, and 1000 GP should be sufficient.\"";
    next;
    goto L_intermediate;

L_d_green:
    mes "[Rauk the Alchemist]";
    mes "\"Green dye is a little tricky to make, since you have to boil gamboge leaves at just the right temperature while stirring in a cobalt ester.";
    mes "Making the cobalt ester is not easy, and every time I try I end up melting a crystal flask beyond repair...\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Thus, I will need twenty gamboge leaves, twenty cobalt leaves, and 1000 GP for materials.";
    next;
    goto L_intermediate;

L_d_no_green:
    mes "[Rauk the Alchemist]";
    mes "\"Come back when you are a little more experienced. I might be able to tell you how to make green dye then.\"";
    close;

L_orange:
    if (countitem("AlizarinHerb") < 10)
        goto L_orange_fail;
    if (countitem("GambogeHerb") < 10)
        goto L_orange_fail;
    if (countitem("IronOre") < 2) goto L_orange_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("AlizarinHerb") > 10
        && countitem("GambogeHerb") > 10
        && countitem("IronOre") > 2)
            goto L_TooMany;
    if (Zeny < 1000)
        goto L_orange_fail;
    delitem "AlizarinHerb", 10;
    delitem "GambogeHerb", 10;
    delitem "IronOre", 2;
    set Zeny, Zeny - 1000;
    getitem "OrangeDye", 1;
    goto L_ok;

L_orange_fail:
    mes "[Rauk the Alchemist]";
    mes "\"I'm sorry, but I need 1000 GP, two chunks of iron ore, and ten each of gamboge and alizarin leaves.\"";
    next;
    goto L_intermediate;

L_d_orange:
    mes "[Rauk the Alchemist]";
    mes "\"Orange dye is fun to make, but it requires some burnt iron, and also consummate sulphur powder, which you cannot get here easily.";
    mes "\"Still, for 1000 GP, two pieces of iron ore, ten alizarin leaves and ten gamboge leaves, I can make you a vial of orange dye.\"";
    next;
    goto L_intermediate;

L_pink:
    if (countitem("AlizarinHerb") < 10)
        goto L_pink_fail;
    if (countitem("PinkPetal") < 6)
        goto L_pink_fail;
    if (Zeny < 1000)
        goto L_pink_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("AlizarinHerb") > 10
        && countitem("PinkPetal") > 6)
            goto L_TooMany;
    delitem "AlizarinHerb", 10;
    delitem "PinkPetal", 6;
    set Zeny, Zeny - 1000;
    getitem "PinkDye", 1;
    goto L_ok;

L_pink_fail:
    mes "[Rauk the Alchemist]";
    mes "\"No, you don't have all I need, and that would be ten alizarin leaves, six pink flower petals, and 1000 GP.\"";
    next;
    goto L_intermediate;

L_d_pink:
    mes "[Rauk the Alchemist]";
    mes "\"Pink dye... that's a funny one: you can't get proper pink out of the usual herbs. You do need ten leaves of alizarin, but you also need six pink flower petals.";
    mes "To properly extract the pink from the petals, you have to boil it in concentrated utenum; I will have to charge 1000 GP for that.\"";
    next;
    goto L_intermediate;

L_dark_blue:
    if (countitem("CobaltHerb") < 100)
        goto L_dark_blue_fail;
    if (countitem("MauveHerb") < 50)
        goto L_dark_blue_fail;
    if (countitem("Pearl") < 1)
        goto L_dark_blue_fail;
    if (Zeny < 10000)
        goto L_dark_blue_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("CobaltHerb") > 100
        && countitem("MauveHerb") > 50
        && countitem("Pearl") > 1)
            goto L_TooMany;
    delitem "CobaltHerb", 100;
    delitem "MauveHerb", 50;
    delitem "Pearl", 1;
    set Zeny, Zeny - 10000;
    getitem "DarkBlueDye", 1;
    goto L_ok;

L_dark_blue_fail:
    mes "[Rauk the Alchemist]";
    mes "\"I will need all of the ingredients to make dark blue dye for you.\"";
    mes "\"I need 100 cobalt leaves, 50 mauve leaves, one pearl, and 10,000 GP.\"";
    next;
    goto L_intermediate;

L_d_dark_blue:
    mes "[Rauk the Alchemist]";
    mes "\"Dark blue dye is one of the trickiest ones. You need concentrated extract from 100 leaves of cobalt and 50 mauve leaves for proper binding.";
    mes "For the right shimmer, a pearl is indispensible, and the most expensive part is a rare kind of ayanamian sapphire dust that I have to charge 10,000 GP for.\"";
    next;
    goto L_intermediate;

L_purple:
    if (countitem("CobaltHerb") < 100)
        goto L_purple_fail;
    if (countitem("AlizarinHerb") < 100)
        goto L_purple_fail;
    if (countitem("MauveHerb") < 20)
        goto L_purple_fail;
    if (countitem("Pearl") < 1)
        goto L_purple_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("CobaltHerb") > 100
        && countitem("AlizarinHerb") > 100
        && countitem("MauveHerb") > 20
        && countitem("Pearl") > 1)
            goto L_TooMany;
    if (Zeny < 40000)
        goto L_purple_fail;
    delitem "CobaltHerb", 100;
    delitem "AlizarinHerb", 100;
    delitem "MauveHerb", 20;
    delitem "Pearl", 1;
    set Zeny, Zeny - 40000;
    getitem "PurpleDye", 1;
    goto L_ok;

L_purple_fail:
    mes "[Rauk the Alchemist]";
    mes "\"No... I don't think that you have enough ingredients for this. Let me check my notes.\"";
    mes "\"What I need are 100 cobalt leaves, 100 alizarin leaves, 20 mauve leaves, one pearl, and 40,000 GP.\"";
    next;
    goto L_intermediate;

L_d_purple:
    mes "[Rauk the Alchemist]";
    mes "\"Hm, Purple dye... proper Tritan Purple is hard to make. Fortunately, the correct recipe has survived... but some ingredients are quite costly.";
    mes "I can't even tell you why, unfortunately, since this is a bit of an alchemistic secret, and I really don't want to argue this out with people who can turn my nose into a rhubarb.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Still, I can make it for you, out of 100 cobalt leaves, 100 alizarin leaves, 20 mauve leaves, one pearl, and 40,000 GP. Some other ingredients are covered by the GP.\"";
    next;
    goto L_intermediate;

L_black:
    if (countitem("CobaltHerb") < 40)
        goto L_black_fail;
    if (countitem("AlizarinHerb") < 40)
        goto L_black_fail;
    if (countitem("GambogeHerb") < 40)
        goto L_black_fail;
    if (countitem("MauveHerb") < 40)
        goto L_black_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("CobaltHerb") > 40
        && countitem("AlizarinHerb") > 40
        && countitem("GambogeHerb") > 40
        && countitem("MauveHerb") > 40)
            goto L_TooMany;
    if (Zeny < 20000)
        goto L_black_fail;
    delitem "CobaltHerb", 40;
    delitem "AlizarinHerb", 40;
    delitem "GambogeHerb", 40;
    delitem "MauveHerb", 40;
    set Zeny, Zeny - 20000;
    getitem "BlackDye", 1;
    goto L_ok;

L_black_fail:
    mes "[Rauk the Alchemist]";
    mes "\"I am sorry, but you don't have all the items I need to make black dye. I need fourty leaves of alizarin, cobalt, gamboge and mauve each, and 20,000 GP.\"";
    next;
    goto L_intermediate;

L_d_black:
    mes "[Rauk the Alchemist]";
    mes "\"Black? Ah! such a wonderful choice of color. It's my favorite! Well, if you too want something black, I would be delighted to make you some black dye.";
    mes "Just bring me 40 leaves each of cobalt, alizarin, gamboge and mauve.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Oh, and 20,000 GP for the charcoal and diamond dust mixture you need to keep the mauve smell out.\"";
    next;
    goto L_intermediate;

L_dark_green:
    if (BaseLevel < 30)
        goto L_d_no_green;
    if (QUEST_clothdyer_knowsdye != @QUEST_HAS_SOLVED_DYE_PUZZLE)
        goto L_d_dark_green;
    if (countitem("CobaltHerb") < 10)
        goto L_dark_green_fail;
    if (countitem("GambogeHerb") < 10)
        goto L_dark_green_fail;
    if (countitem("MauveHerb") < 10)
        goto L_dark_green_fail;
    if (countitem("MaggotSlime") < 1)
        goto L_dark_green_fail;
    if (Zeny < 1000)
        goto L_dark_green_fail;
    getinventorylist;
    if (@inventorylist_count == 100
        && countitem("CobaltHerb") > 10
        && countitem("GambogeHerb") > 10
        && countitem("MauveHerb") > 10
        && countitem("MaggotSlime") > 1)
            goto L_TooMany;
    delitem "CobaltHerb", 10;
    delitem "MauveHerb", 10;
    delitem "GambogeHerb", 10;
    delitem "MaggotSlime", 1;
    set Zeny, Zeny - 1000;
    getitem "DarkGreenDye", 1;
    goto L_ok;

L_dark_green_fail:
    mes "[Rauk the Alchemist]";
    mes "Rauk frowns as he examines the items you hand him.";
    mes "\"No, this will not do. I need ten gamboge leaves, ten cobalt leaves, ten mauve leaves, slime from one maggot, and 1000 GP.\"";
    next;
    goto L_intermediate;

L_d_dark_green:
    mes "[Rauk the Alchemist]";
    if (QUEST_clothdyer_knowsdye != @QUEST_HAS_SOLVED_DYE_PUZZLE)
        goto L_d_dark_green_quest;
    mes "\"Since we have figured out how much maggot slime we need for you, all you have to bring me are 1000 GP, one maggot slime, and ten leaves each of mauve, cobalt, and gamboge.\"";
    next;
    goto L_intermediate;

L_d_dark_green_quest:
    mes "\"Ah, dark green... dark green dye is actually simple to make, except for one tiny little problem: dark green clothes fade very quickly when they touch human skin. By far the best way to fixate the color is argentum powder, mixed with dark green dye essence extracted from maggot slime.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"But just how much maggot slime goes into the fixative and how much into the rest of the mixture varies completely for every individual. We will have to figure out just how many thousandth ounces it is for you before I can make dark green dye for you.\"";
    next;
    if (QUEST_clothdyer_knowsdye == @QUEST_CAN_GET_DYE_HERE)
        set QUEST_clothdyer_knowsdye, (rand(1000) + @QUEST_GUESS_BASE);

L_d_dark_green_q_main:
    menu
        "Uh... no thanks.", L_intermediate,
        "So nobody else can wear clothes I dye?", L_dark_green_q_wear,
        "OK, what should I do?", L_dark_green_q_explain,
        "Let's figure it out!", L_dark_green_q_guess_0;
    close;

L_dark_green_q_wear:
    mes "[Rauk the Alchemist]";
    mes "\"The color stabilises after a week or so.";
    mes "Others can wear the clothes you have dyed-- just make sure that you wear those clothes for a week before passing them on.\"";
    next;
    goto L_d_dark_green_q_main;

L_dark_green_q_explain2:
    mes "[Rauk the Alchemist]";
    mes "Rauk blinks.";
    mes "\"Very well. It works like this: you give me a maggot slime and tell me how many thousandth parts go into one part of the dye potion.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Then we try whether that was the right ratio. I will tell you if you guessed right, but if you were wrong, I will tell you whether you guessed too high or too low.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"With enough slimes and enough tries we should be able to figure out just how much you need.\"";
    next;
    menu
        "Er... can you explain that again?", L_dark_green_q_explain2,
        "Let's do it!", L_dark_green_q_guess_0,
        "I don't have time for this.", L_intermediate;
    close;

L_dark_green_q_explain:
    mes "[Rauk the Alchemist]";
    mes "\"We have to measure the balance between your light and your dark bile-- two of your humors-- and use that as the maggot slime concentration.\"";
    mes "\"This will probably take several tries; for each try we need maggot slime from one maggot.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Each time you tell me how many thousandth parts of one ounce of the concentrate you want to use in the fixative. I will stir the mixture appropriately and put the rest of the slime into the base mixture. We then put the two together, and you dip your finger in.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"If the mixture is too dark, then that means that we put too much maggot slime into the fixative. If it discolours, we put in too little. But if it retains its color, we are done.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "Rauk smiles.";
    mes "\"But don't worry, I will happily do all this for free-- I rather enjoy these little games.\"";
    next;
    menu
        "Er... can you explain that again?", L_dark_green_q_explain,
        "Errr... what?", L_dark_green_q_explain2,
        "Let's do it!", -,
        "I don't have time for this.", L_intermediate;

L_dark_green_q_guess_0:
    if (countitem("MaggotSlime") < 1)
        goto L_dark_green_q_noslime;
    delitem "MaggotSlime", 1;

    mes "[Rauk the Alchemist]";
    mes "Rauk fills your maggot slime into a small bottle and picks a glass bottle from within his robe.";
    mes "\"Now we need to figure out just how many thousandths you need. First, tell me how many tenths of an ounce you want to put in.\"";
    next;
    menu
        "none", -,
        "1 tenth", -,
        "2 tenths", -,
        "3 tenths", -,
        "4 tenths", -,
        "5 tenths", -,
        "6 tenths", -,
        "7 tenths", -,
        "8 tenths", -,
        "9 tenths", -;

    set @menu, @menu - 1;
    set @guess_accumulator, @menu * 100;

    mes "[Rauk the Alchemist]";
    if (@menu)
        mes "Rauk pours a good-sized portion of maggot slime from the small bottle into the glass bottle.";
    mes "\"We now have " + @guess_accumulator + " thousandths of an ounce. How many hundredths of an ounce should I add?\"";
    next;
    menu
        "none", -,
        "1 hundredth", -,
        "2 hundredths", -,
        "3 hundredths", -,
        "4 hundredths", -,
        "5 hundredths", -,
        "6 hundredths", -,
        "7 hundredths", -,
        "8 hundredths", -,
        "9 hundredths", -;

    set @menu, @menu - 1;
    set @guess_accumulator, @guess_accumulator + (@menu * 10);

    mes "[Rauk the Alchemist]";
    if (@menu)
      mes "Rauk pours a portion of maggot slime from the small bottle into the glass bottle.";
    mes "\"These are now " + @guess_accumulator + " thousandths of an ounce. How many thousands more?\"";
    next;
    menu
        "none", -,
        "1 thousandth", -,
        "2 thousandths", -,
        "3 thousandths", -,
        "4 thousandths", -,
        "5 thousandths", -,
        "6 thousandths", -,
        "7 thousandths", -,
        "8 thousandths", -,
        "9 thousandths", -;

    set @menu, @menu - 1;
    set @guess_accumulator, @guess_accumulator + @menu;

    mes "[Rauk the Alchemist]";
    if (@menu)
        mes "Rauk pours a tiny amount of maggot slime from the small bottle into the glass bottle.";
    mes "Rauk mixes some more ingredients into the bottles, stirs them, heats one of them and mixes the results together.";
    next;

    mes "[Rauk the Alchemist]";
    mes "\"Please put your finger in.\"";
    mes "Hesitantly. you stick your finger into the resulting brew. The mixture feels warm and smooth to the touch.";
    next;
    mes "[Rauk the Alchemist]";
    mes "You pull your finger out again.";

    if (@guess_accumulator + @QUEST_GUESS_BASE > QUEST_clothdyer_knowsdye)
        goto L_dark_green_q_toomuch;

    if (@guess_accumulator + @QUEST_GUESS_BASE < QUEST_clothdyer_knowsdye)
        goto L_dark_green_q_toolittle;

    // otherwise correct guess

    mes "Nothing seems to be happening with the mixture. Rauk's eyes lighten up.";
    mes "\"This is it! You need precisely " + @guess_accumulator + " thousandts. Let me write this down...\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "Rauk is beaming.";
    mes "\"I can now make dark green dye for you. All I need will be slime from one maggot, ten gamboge leaves, ten cobalt leaves, ten mauve leaves, and 1000 GP for other ingredients.\"";
    mes "[You gain 20,000 experience points]";
    getexp 20000, 0;
    set QUEST_clothdyer_knowsdye, @QUEST_HAS_SOLVED_DYE_PUZZLE;
    next;
    goto L_intermediate;

L_dark_green_q_toomuch:
    mes "After only a second, the mixture begins to blacken. Rauk frowns.";
    mes "\"That was too much... you need fewer than " + @guess_accumulator + " thousandths, I think.";
    goto L_dark_green_q_again;

L_dark_green_q_toolittle:
    mes "Almost instantaneously, the mixture loses its colour and turns transparent. Rauk sighs.";
    mes "\"That was too little. Next time, try more than " + @guess_accumulator + " thousandths.";
    goto L_dark_green_q_again;

L_dark_green_q_again:
    mes "\"Should we try again?\"";
    next;
    menu
        "Yes!", L_dark_green_q_guess_0,
        "No, I've had enough.", -;
    close;

L_dark_green_q_noslime:
    mes "[Rauk the Alchemist]";
    mes "\"Oh, you don't have any maggot slime? That's unfortunate; I am out of it myself. Still it should be easy enough to find, just bring me one and we can continue testing.\"";
    next;
    goto L_intermediate;

L_monster_oil:
    mes "[Rauk the Alchemist]";
    mes "Rauk locks his eyes with you and continues in more serious tone.";
    mes "\"I know how to create it, but you won't get it from me. It's far too dangerous; even the best alchemist may need multiple attempts and will risk blowing up! I can give you a recipe though, if you still are wanton.\"";
    next;
    menu
        "Yes, tell me!", -,
        "No, that sounds too dangerous.", L_abort;
    mes "[Rauk the Alchemist]";
    mes "You will need a pearl, a pair of snake skins, two piles of volcanic ash, three black scorpion stingers-- and a golden scorpion stinger. In addition you must have plenty of herbs to stabilise the concoction; mauve, alizarin, cobalt and gamboge will do just fine.";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Take the pearl, skins, black stingers, ash, and cook briefly in a cauldron. Next add the mauve/alizarin/cobalt/gamboge as needed to stabilise into a black brew. Lastly, add the golden scorpion stinger and let boil briefly. And it's done.\"";
    next;
    mes "[Rauk the Alchemist]";
    mes "\"Good luck not blowing up!\"";
    set @Q_status, @Q_status | @SETZER_KNOWS_STINGER;
    callsub L_Update_Var;
    close;

L_abort:
    close;


L_Update_Var:
    set QUEST_Forestbow_state,
        (QUEST_Forestbow_state & ~(@Q_MASK)
        | (@Q_status << @Q_SHIFT));
    return;

L_TooMany:
    mes "[Rauk the Alchemist]";
    mes "You don't have room for this.";
    close;
}
Phew, this was tough to look through, also I believe from what I saw so far that some of this scripting isn't perfect, but I didn't change the "style" and just added the option for the Mental Potion by copying the one of the Iron Potion and changing it.
I chose 2 Black Scorpion Stingers for now, but I know this isn't perfect, so please tell me something else you have in mind.
I can't think of something...


And now a mob to drop the potion:

Code: Select all

1055, Butterfly, Butterfly, 25, 250, 0, 0, 11, 2, 10, 50, 3, 5, 10, 45, 10, 15, 35, 40, 1, 1, 1, 3, 44, 129, 350, 780, 300, 800, 718, 1000, 892, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 60

#ID, Name, Jname, LV, HP, SP, EXP, JEXP, Range1, ATK1, ATK2, DEF, MDEF, STR, AGI, VIT, INT, DEX, LUK, Range2, Range3, Scale, Race, Element,Mode, Speed, Adelay, Amotion,Dmotion,Drop1id,Drop1per, Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per, Drop8id,Drop8per,Item1, Item2, MEXP, ExpPer, MVP1id, MVP1per,MVP2id, MVP2per,MVP3id, MVP3per,mutationcount,mutationstrength
Nightghost suggested to take the Butterfly as drop source and I really like this idea :D
Drop chance is 5% then, I hope that's fine.
Spiky Mushrooms drop Iron Potions with a chance of 8%, Sea Slimes drop Concentration Potion with a chance of only 1% -> I took something in the middle.

As I said earlier: please check, give me some feedback, tell me what I have forgotten etc. :wink:
Main characters:
Lv.94 - Cassy - speedarcher on dark path, bunny-wannabe, would like to ride on a Mouboo once...
Lv.95 - Biqcassy - mage on light path, addicted to her Fluffy Hat, love-hates Fallens, really misses Confused Tree...
Lv.70 - Simca. - dreams of becoming a speedarcher on light path, still has a lot to learn...

Personal development overview | priorities | wiki to-do | wiki profile incl. other characters

[20:24:59] <Cassy> debug npc in crypts!
[20:25:02] <Cassy> just a joke...
[20:25:08] <wushin> DONT DO THAT
[20:25:10] <o11c> !slap Cassy
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Mental Potion (about the same as the #asorm spell)

Post by o11c »

Cassy wrote:

Code: Select all

892, MentalPotion, Mental Potion, 0, 500, 250, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {what-should-I-add-here?}, {}

#ID, Name, Label, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}

Code: Select all

{sc_start sc_mbarrier, timeout, value;}
sc_mbarrier needs to be defined in db/const.txt as 197 (put it with the other sc_ variables); I have checked that this should be safe, which arbitrary sc_* might not.

The spell #asorm uses a value of up to 50, and a timeout of a lot. You'll probably want to play around with the numbers a bit.

Unfortunately the old version of the server code (which is being run on the test server due to my fight with Frost) is really buggy with the timeouts when called from the script system (but not from the magic system), so you'll only be able to test it on your own machine. Please make sure you report any other bugs you encounter with the code.
Former programmer for the TMWA server.
User avatar
Cassy
TMW Adviser
TMW Adviser
Posts: 791
Joined: 09 Mar 2013, 09:39
Location: ♥ Fluffyland ♥
Contact:

Re: Mental Potion (about the same as the #asorm spell)

Post by Cassy »

So something like this should be fine (needs testing of course):

item_db

Code: Select all

892, MentalPotion, Mental Potion, 0, 500, 250, 10, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, {sc_start sc_mbarrier, 60, 50;}, {}

#ID, Name, Label, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript}
60 seconds, just like Iron & Concentration Potion.
Value 50 needs testing.

db/const.txt

Code: Select all

sc_mbarrier 197
Main characters:
Lv.94 - Cassy - speedarcher on dark path, bunny-wannabe, would like to ride on a Mouboo once...
Lv.95 - Biqcassy - mage on light path, addicted to her Fluffy Hat, love-hates Fallens, really misses Confused Tree...
Lv.70 - Simca. - dreams of becoming a speedarcher on light path, still has a lot to learn...

Personal development overview | priorities | wiki to-do | wiki profile incl. other characters

[20:24:59] <Cassy> debug npc in crypts!
[20:25:02] <Cassy> just a joke...
[20:25:08] <wushin> DONT DO THAT
[20:25:10] <o11c> !slap Cassy
User avatar
veryape
TMW Adviser
TMW Adviser
Posts: 558
Joined: 06 Dec 2012, 12:08
Contact:

Re: Mental Potion (about the same as the #asorm spell)

Post by veryape »

Does the effect of the potion stack with #asorm? If that is the case I think it might just add new pvp balance problems.

The last time I looked into pvp asromed m.eye banshee wielding archers were usually the winners, because they can outrange the magicians. If they could be both asormed and take a potion that stacks with the asorm I fear that they would become nearly impossible to beat for a mage.

If it is not stackable with asorm i think it is a great idea. What is really needed for pvp is some love for the warriors imo, maybe some kind of gear/charm that gives them a greater chance of avoiding crits + m resistance at the cost of some def or something along those lines.
Characters: veryape / Captain Dunce / Elvara / veryapeGM
User avatar
Cassy
TMW Adviser
TMW Adviser
Posts: 791
Joined: 09 Mar 2013, 09:39
Location: ♥ Fluffyland ♥
Contact:

Re: Mental Potion (about the same as the #asorm spell)

Post by Cassy »

veryape wrote:Does the effect of the potion stack with #asorm? If that is the case I think it might just add new pvp balance problems.

The last time I looked into pvp asromed m.eye banshee wielding archers were usually the winners, because they can outrange the magicians. If they could be both asormed and take a potion that stacks with the asorm I fear that they would become nearly impossible to beat for a mage.
The potion itself doesn't stack (e.g. when you use two potions you won't get 50% + 50% m.def. increase) and since it works about the same way as #asorm does it shouldn't stack with the spell.
But I will wait for a confirmation of o11c (busy atm) to get sure.
Thanks for pointing at this :D
Main characters:
Lv.94 - Cassy - speedarcher on dark path, bunny-wannabe, would like to ride on a Mouboo once...
Lv.95 - Biqcassy - mage on light path, addicted to her Fluffy Hat, love-hates Fallens, really misses Confused Tree...
Lv.70 - Simca. - dreams of becoming a speedarcher on light path, still has a lot to learn...

Personal development overview | priorities | wiki to-do | wiki profile incl. other characters

[20:24:59] <Cassy> debug npc in crypts!
[20:25:02] <Cassy> just a joke...
[20:25:08] <wushin> DONT DO THAT
[20:25:10] <o11c> !slap Cassy
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Mental Potion (about the same as the #asorm spell)

Post by o11c »

Cassy wrote:The potion itself doesn't stack (e.g. when you use two potions you won't get 50% + 50% m.def. increase) and since it works about the same way as #asorm does it shouldn't stack with the spell.
But I will wait for a confirmation of o11c (busy atm) to get sure.
Right, the spell and the potion do the exact same thing, just through differetn script interfaces, and a single effect can't stack.
Former programmer for the TMWA server.
User avatar
Cassy
TMW Adviser
TMW Adviser
Posts: 791
Joined: 09 Mar 2013, 09:39
Location: ♥ Fluffyland ♥
Contact:

Re: Mental Potion (about the same as the #asorm spell)

Post by Cassy »

Well I had a lot of brainstorming on this but am running in circles.

Problem:
These potions are supposed to balance pvp for warriors by increasing magic defense and therefore weakening mage's #ingrav.
I stopped working on this (actually everything's already finished) because of the Banshee Bow in pvp problem.
By weakening mages Banshee Bow archers wouldn't have any competition anymore.

So I'm thinking about possibilities to weaken Banshee Bow archers as well.
But this seems like trouble to me because:
  • if the potion increases m.def, but decreases something else like attack speed, walk speed or critical chance then it might be worse for warriors. Also archers might not use it but they should to get their speed or high critical chance reduced
  • the potion should not increase another stat because if increasing e.g. critical defense it will affect pve as well
Please feel free to tell your opinions and ideas from a neutral side (meaning don't speak as an archer, speak as someone who wants to balance pvp :D ).
In the end even the best possible solution will need testing of course.

(Please don't discuss about weakening the Banshee Bow itself here, we have an own thread for this ;) )
Main characters:
Lv.94 - Cassy - speedarcher on dark path, bunny-wannabe, would like to ride on a Mouboo once...
Lv.95 - Biqcassy - mage on light path, addicted to her Fluffy Hat, love-hates Fallens, really misses Confused Tree...
Lv.70 - Simca. - dreams of becoming a speedarcher on light path, still has a lot to learn...

Personal development overview | priorities | wiki to-do | wiki profile incl. other characters

[20:24:59] <Cassy> debug npc in crypts!
[20:25:02] <Cassy> just a joke...
[20:25:08] <wushin> DONT DO THAT
[20:25:10] <o11c> !slap Cassy
User avatar
Kazenawa
Novice
Novice
Posts: 189
Joined: 18 Dec 2011, 09:24

Re: Mental Potion (about the same as the #asorm spell)

Post by Kazenawa »

Cassy wrote:Well I had a lot of brainstorming on this but am running in circles.

Problem:
These potions are supposed to balance pvp for warriors by increasing magic defense and therefore weakening mage's #ingrav.
I stopped working on this (actually everything's already finished) because of the Banshee Bow in pvp problem.
By weakening mages Banshee Bow archers wouldn't have any competition anymore.
[...]
Please feel free to tell your opinions and ideas from a neutral side (meaning don't speak as an archer, speak as someone who wants to balance pvp ).
In the end even the best possible solution will need testing of course.[...]
I'll certainly be offtopic answering the following, feel free to move this answer on another topic if needed.
As evoked here (page 1), monsters apparently have a flag associated with their behavior. It also seems to be possible to adapt the flag to the PvP status.
Reading once more a thought about "How to balance PvP", I've thought to one thing...

Would it be possible to attach a similar flag to players ? I'll explain:
  • If the player is not in a PvP area, the flag is something like "default". This way, the controlled character would behave as usual.
  • However, if the player enters a PvP area, the associated flag changes. This new flag would affect the player's stats.
However, I already see some problems in it, but I can't be sure of them (I don't know how the server works):
  • The server might need "something" to be able to distinguish an archer from a mage or a warrior (maybe another flag based on stats, but it could be weird for "hybrid" player classes).
  • Changing player's abilities might have a bad effect on Terranite Cave (the biggest PvP area), maybe possible changes shouldn't be enabled there (I think on disadvantages about killing Terranites).
  • Is it technically feasible ?
  • It looks like a long and maybe difficult thing to implement (but I don't know how the server works).
  • Even this way, classes seems hard to balance.
  • Anyway, as classes are different, there will always be a difference a one who will potentially win more than the others...
So, considering the small impact of PvP on the game, is it really worth working on it ? Maybe that other things are more important...



Edit: Orthograph...
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Mental Potion (about the same as the #asorm spell)

Post by o11c »

Trying to balance PvP *without* balancing the rest of the game is going to be doomed to failure.

Btw, it's possible to link directly to a post ...
Former programmer for the TMWA server.
User avatar
Kazenawa
Novice
Novice
Posts: 189
Joined: 18 Dec 2011, 09:24

Re: Mental Potion (about the same as the #asorm spell)

Post by Kazenawa »

o11c wrote:Trying to balance PvP *without* balancing the rest of the game is going to be doomed to failure.

Btw, it's possible to link directly to a post ...
Seems difficult yes, balancing everything would be easier an maybe cleaner ?

About linking directly to a post... I don't know how to do it... :S
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Mental Potion (about the same as the #asorm spell)

Post by o11c »

Kazenawa wrote:About linking directly to a post... I don't know how to do it... :S
With the default theme, click the paper icon near the right side, left of "Posted: Fri Sep 20, 2013 4:46 pm". With the prosilver theme, *everything* is easier, the link is in the whole post title.
Former programmer for the TMWA server.
User avatar
Kazenawa
Novice
Novice
Posts: 189
Joined: 18 Dec 2011, 09:24

Re: Mental Potion (about the same as the #asorm spell)

Post by Kazenawa »

o11c wrote:
Kazenawa wrote:About linking directly to a post... I don't know how to do it... :S
With the default theme, click the paper icon near the right side, left of "Posted: Fri Sep 20, 2013 4:46 pm". With the prosilver theme, *everything* is easier, the link is in the whole post title.
Oooh ok, thanks a lot ! :)
[/offtopic]
Post Reply