jack the lumberjack in Hurnscald

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
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

jack the lumberjack in Hurnscald

Post by cinderweb »

I was thinking That we could add a quest to Jack maybe a weekly or daily where he has fallen behind on his orders with the ship running to Nivalis.
He could ask a player to gather logs for him say 40 logs for 4000 gp and 4000exp as a way too make money at that level. Anyway just a thought.

Skragar

script could go

Code: Select all

L_got shield
   mes"[Jack Lumber]"
   mes"\I hope that my shield will serve you well!";
   mes"But it has put me behind on all these new Nivalis orders now that the ship is running there.";
   mes"Care to help out? I'll pay you for your time\"
   menu
          "Sure I'll help", L_help
          "No  thanks.", L_no  

L_help
   mes"[Jack Lumber]" 
   mes"\Okay i'll need about 40 logs and I'll pay 100gp a log. sound fair?\"
   menu
           "Sounds good be right back will be right back with them",L_closewindow
           "I have them right here",L_thanks
           "I've changed my mind.",L_no

L_no
    mes"[Jack Lumber]"
    mes"\okay good luck to you then"\L_closewindow

L_thanks
    mes"[Jack Lumber]"
    mes"Thank you for your help. Here's your 4000 gold as promised"
    mes"Check back with me next week to see if I need any help with that shipment."L_closewindow
reward 4000gp
reward 4000exp
Last edited by cinderweb on 03 Aug 2013, 13:10, edited 4 times in total.
User avatar
Wombat
TMW Adviser
TMW Adviser
Posts: 1532
Joined: 08 Aug 2008, 16:31

Re: jack the lumberjack in Hurnscald

Post by Wombat »

Not a bad idea to give Jack a repeatable quest with the logs. So after you get the shield, it unlocks a repeatable quest?
Current character is "Abolish".
Frost
TMW Adviser
TMW Adviser
Posts: 851
Joined: 09 Sep 2010, 06:20
Location: California, USA

Re: jack the lumberjack in Hurnscald

Post by Frost »

jayd6974 wrote:I was thinking That we could add a quest to Jack maybe a weekly or daily where he has fallen behind on his orders with the ship running to Nivalis.
He could ask a player to gather logs for him say 40 logs for 400 gp as a way too make money at that level.
I agree, this could help level 30-ish characters. The storyline is nice. :)

I made a few formatting changes (added semicolons) and added code to remove logs and give rewards. I don't know if I did this correctly.

Code: Select all

L_got shield;
   mes"[Jack Lumber]";
   mes"\I hope that my shield will serve you well!";
   mes"But it has put me behind on all these new Nivalis orders now that the ship is running there.";
   mes"Care to help out? I'll pay you for your time.\";
   menu
          "Sure I'll help", L_help
          "No  thanks.", L_no;

L_help;
   mes"[Jack Lumber]" ;
   mes"\Okay i'll need about 40 logs and I'll pay 100gp a log. sound fair?\";
   menu
           "Sounds good be right back will be right back with them",L_closewindow
           "I have them right here",L_thanks
           "I've changed my mind.",L_no;

L_no;
    mes"[Jack Lumber]";
    mes"\okay good luck to you then"\L_closewindow;

L_thanks;
    if (countitem ("RawLog") < 40)
        goto L_Not_Enough_Ship;
    delitem "RawLog", 10;
    @getzeny 4000;
    @getexp 4000;
    mes"[Jack Lumber]";
    mes"Thank you for your help. Here's your 4000 gold as promised.";
    mes"Check back with me next week to see if I need any help with that shipment."L_closewindow;

L_Not_Enough_Ship;
    mes"[Jack Lumber]";
    mes"\"No, I need 40 logs for my next shipment. Please return when you have all 40."\";
   @goto L_Close;
You earn respect by how you live, not by what you demand.
-unknown
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: jack the lumberjack in Hurnscald

Post by o11c »

Frost wrote:I made a few formatting changes (added semicolons)
Formatting changes is "put a space between 'mes' and the string" and "each level of indentation is 4 spaces", not "you're missing a comma between after the labels of the menus", "label targets use ':', not ';'", "there are some strange backslashes in some of those strings, you probably wanted a few more quotes", "ytf is there an '@' before some of the commands", and "getzeny is not a command, just set Zeny, Zeny + 4000;".
Former programmer for the TMWA server.
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: jack the lumberjack in Hurnscald

Post by cinderweb »

Code: Select all

	

    set @QUEST_WEEKLY_EXP, 4000;
    set @QUEST_WEEKLY_REW, 4000;
 
    L_Got_Shield:
        mes "[Jack Lumber]";
        mes "\"I hope that my shield will serve you well!\"";
        mes "\"But it has put me behind on all these new Nivalis orders now that the ship is running there.\"";
            next;
        mes "\"Care to help out? I'll pay you for your time.\"";
        menu
            "Sure I'll help.", L_Help,
            "No, thanks.", L_No;
                   
    L_Help:
        mes "[Jack Lumber]";
        mes "\"Okay I'll need " + @RAWLOGS_AMOUNT + " logs and I'll pay 100gp a log. sound fair?\"";
        menu
            "Sounds good I will be right back with them", L_Close,
            "I have them right here", L_Thanks,
            "I've changed my mind.", L_No;
                   
    L_No:
        mes"[Jack Lumber]";
        mes"\"Okay. Good luck to you, then\"", L_Close;
           
    L_Thanks:
        if (countitem("RawLog") < @RAWLOGS_AMOUNT)
            goto L_Not_Enough_Ship;
        delitem "RawLog", @RAWLOGS_AMOUNT;
        set Zeny, Zeny + @QUEST_WEEKLY_REW;
        getexp @QUEST_WEEKLY_EXP, 0;
        mes "[Jack Lumber]";
        mes "\"Thank you for your help. Here's your " + @QUEST_WEEKLY_REW + " gold as promised.\"";
        mes "\"Check back with me next week to see if I need any help with that shipment.\"", L_Close;
     
    L_Not_Enough_Ship:
        mes "[Jack Lumber]";
        mes "\"No, I need " + @RAWLOGS_AMOUNT + " logs for my next shipment. Please return when you have enough.\"";
        goto L_Close;

Thanks to Melkior for help with the code this time. Does anyone have an idea of how to put in a timer for one week? Or is one week bad and it needs to be a daily
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: jack the lumberjack in Hurnscald

Post by o11c »

jayd6974 wrote:Does anyone have an idea of how to put in a timer for one week? Or is one week bad and it needs to be a daily
It would be better to just make it another daily quest using the same framework as Arkim, Mike, etc (grep for DailyQuest under world/map/npc/). Note that the framework is affected by player level.

Note that the daily quest typically involves a small quantity repeated several times per day ... it's somewhat problematic to do big chunks, unless you make sure the chunk is "significantly" smaller than the minimum level.
Make sure you do math so that the exp and gp follow the same pattern.
Former programmer for the TMWA server.
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: jack the lumberjack in Hurnscald

Post by cinderweb »

Code: Select all

	

    set @QUEST_DAILY_EXP, 4000;
    set @QUEST_DAILY_REW, 4000;
    set @dq_level, 30;
    set @dq_cost, 25;

    L_Got_Shield:
        mes "[Jack Lumber]";
        mes "\"I hope that my shield will serve you well!\"";
        mes "\"But it has put me behind on all these new Nivalis orders now that the ship is running there.\"";
            next;
        mes "\"Care to help out? I'll pay you for your time.\"";
        menu
            "Sure I'll help.", L_Help,
            "No, thanks.", L_No;
                   
    L_Help:
        mes "[Jack Lumber]";
        mes "\"Okay I'll need " + @RAWLOGS_AMOUNT + " logs and I'll pay 100gp a log. sound fair?\"";
        menu
            "Sounds good be right back will be right back with them", L_Close,
            "I have them right here", L_Thanks,
            "I've changed my mind.", L_No;
                   
    L_No:
        mes"[Jack Lumber]";
        mes"\"Okay. Good luck to you, then\"", L_Close;
           
    L_Thanks:
        if (countitem("RawLog") < @RAWLOGS_AMOUNT)
            goto L_Not_Enough_Ship;
        delitem "RawLog", @RAWLOGS_AMOUNT;
        set Zeny, Zeny + @QUEST_DAILY_REW;
        getexp @QUEST_DAILY_EXP, 0;
        callfunc "DailyQuest";   
        mes "[Jack Lumber]";
        mes "\"Thank you for your help. Here's your " + @QUEST_DAILY_REW + " gold as promised.\"";
        mes "\"Check back with me tomorrow to see if I need any help with that shipment.\"", L_Close;
     
    L_Not_Enough_Ship:
        mes "[Jack Lumber]";
        mes "\"No, I need " + @RAWLOGS_AMOUNT + " logs for my next shipment. Please return when you have enough.\"";
        goto L_Close;

There does that fix the daily quest amount and level right?
melkior
Warrior
Warrior
Posts: 320
Joined: 28 Dec 2008, 15:57

Re: jack the lumberjack in Hurnscald

Post by melkior »

When dealing with a daily quest, you set up things a bit differently. You call the DailyQuest function which does the dialogue. You just set the variables.

So, remove the variables on the top of the script.

You don't need the L_Not_Enough_Ship label and everything under it, as the DailyQuest function deals with that. Same goes for L_Help and L_No.

"Sure I'll help" should lead the player to L_Thanks and "No, thanks." should lead to L_Close.

And L_Thanks should look like this:

Code: Select all

L_Thanks:
    set @dq_level, 30;
    set @dq_cost, 25;
    set @dq_count, 30;
    set @dq_name$, "RawLog";
    set @dq_friendly_name$, "raw logs";
    set @dq_money, 4000;
    set @dq_exp, 4000;

    callfunc "DailyQuest";

    next;

    mes "[Jack Lumber]";
        mes "\"Check back with me tomorrow to see if I need any help with that shipment.\"", 

    close;
First you set the quest level, then how many daily points it costs, then how many items, the item names, friendly name that's used in the dialogue, GP reward, and finally XP reward.

After that, you call the function which does the next part of the dialogue, including getting the items from the player, checking if he has enough of them etc, and then you give him the final message.
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: jack the lumberjack in Hurnscald

Post by cinderweb »

Code: Select all

 
L_Got_Shield:
    mes "[Jack Lumber]";
    mes "\"I hope that my shield will serve you well!\"";
    mes "\"But it has put me behind on all these new Nivalis orders now that the ship is running there.\"";
    next;
    mes "\"Care to help out?  I'll pay you for your time.\"";
    menu
       "Sure I'll help.", L_Thanks,
       "No, thanks.", L_Close;
      
L_Thanks;                 
    set @dq_level, 30;
    set @dq_cost, 25;
    set @dq_count, 30;
    set @dq_name$, "RawLog";
    set @dq_friendly_name$, "raw logs";
    set @dq_money, 4000;
    set @dq_exp, 4000;
            
    callfunc "DailyQuest";

    next;

    mes "[Jack Lumber]";
    mes "\"Check back with me tomorrow to see if I need any help with that shipment.\"",

    close;
There is that all it is then?
Last edited by cinderweb on 07 Aug 2013, 10:10, edited 2 times in total.
melkior
Warrior
Warrior
Posts: 320
Joined: 28 Dec 2008, 15:57

Re: jack the lumberjack in Hurnscald

Post by melkior »

I have incorporated this quest into the NPC's script and tested it. If everyone is okay with including this in the game, I can open a pull request.
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Re: jack the lumberjack in Hurnscald

Post by wushin »

You should include what you are going to take for the dailys.
The secret to getting all the important stuff done is doing nothing.
melkior
Warrior
Warrior
Posts: 320
Joined: 28 Dec 2008, 15:57

Re: jack the lumberjack in Hurnscald

Post by melkior »

Min level 30 quest, takes 25 daily points and 30 logs, gives 4000 gp and 4000 xp. I think o11c confirmed on #themanaworld-dev that the math works out for such a reward.
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Re: jack the lumberjack in Hurnscald

Post by wushin »

I meant in the script you should tell the player how many logs you are taking.
The secret to getting all the important stuff done is doing nothing.
melkior
Warrior
Warrior
Posts: 320
Joined: 28 Dec 2008, 15:57

Re: jack the lumberjack in Hurnscald

Post by melkior »

The DailyQuest function does that. Besides, I adjusted the script a little bit, so it can work with the rest of Jack's dialogue.
Post Reply