The Miner at the mines north of 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.

cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

The Miner at the mines north of Hurnscald

Post by cinderweb »

Code: Select all

set   @QUEST_EXP, 5000
set   @QUEST_REW, 5000
set   @TREASUREKEY_AMOUNT, 5

    mes"[Miner]";
    mes"\"Be careful in there.\"";
    mes"\"Could you help an old miner out while you are in there?""\;
    menu
           "Sure I'll help.", L_Help
           "No thanks.", L_Close

L_Help:
    mes"[Miner]";
    mes"\"You see when the spiders came I hurried up and ran, dropping my keychain in the process.\""
    mes"\"The keychain broke, but that's not what i'm worried about, I'm worried about the keys the spiders gobbled up.\""
    mes"\"There were only 5 keys so if you can get them back for me I'd be really grateful.\""
    menu
           "I''ll be right back with them." L_Close
           "I have them right here."  L_Thanks
           "I've changed my mind. L_Close

L_Thanks:
    if  (countitem("treasurekey")< @TREASUREKEY_AMOUNT)
         goto L_Not_enough;
    delitem "treasurekey", @TREASUREKEY_AMOUNT;
    set zeny, zeny + @QUEST_REW
    get exp @QUEST_EXP
    mes "[Miner]";
    mes "\"Thanks for your help. Take this 5000 gold for your trouble\""

L_Not_enough:
    mes"[Miner]",
    mes"\"No I need 5 keys. Please come back when you have enough.\"";
    goto L_Close
This quest is setup to be about level 40-45. I need some help though closing it out so that it doesn't repeat. How do I do that?
Last edited by cinderweb on 06 Aug 2013, 00:15, edited 1 time in total.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: The Miner at the mines north of Hurnscald

Post by o11c »

jayd6974 wrote:This quest is setup to be about level 40-45. I need some help though closing it out so that it doesn't repeat. How do I do that?
You set a bit in some persistent variable (we can't afford to waste a whole variable, we're fairly close to the limit as it is).
Former programmer for the TMWA server.
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: The Miner at the mines north of Hurnscald

Post by cinderweb »

What's a persistent variable? any examples I could look at?
User avatar
veryape
TMW Adviser
TMW Adviser
Posts: 558
Joined: 06 Dec 2012, 12:08
Contact:

Re: The Miner at the mines north of Hurnscald

Post by veryape »

Something like this might work I think, what do you think o11c?

Code: Select all

018-1.gat,80,61,0|script|Miner|109,
{
set   @QUEST_EXP, 5000
set   @QUEST_REW, 5000
set   @TREASUREKEY_AMOUNT, 5

if (@Miner == 0 && BaseLevel >= 45) goto L_Miner_Start;
if (@Miner == 1) goto L_MinerDone

    mes"[Miner]";
    mes"\"Be careful in there.\"";
    close;
 
L_Miner_Start:
    mes"[Miner]";
    mes"\"Hi, you look fairly experienced, could you help an old miner out while you are in there?""\;
    menu
           "Sure I'll help.", L_Help
           "No thanks.", L_Close

L_Help:
    mes"[Miner]";
    mes"\"You see when the spiders came I hurried up and ran, dropping my keychain in the process.\""
    mes"\"The keychain broke, but that's not what i'm worried about, I'm worried about the keys the spiders gobbled up.\""
    mes"\"There were only 5 keys so if you can get them back for me I'd be really grateful.\""
    menu
           "I''ll be right back with them." L_Close
           "I have them right here."  L_Thanks
           "I've changed my mind." L_Close

L_Thanks:
    if  (countitem("treasurekey")< @TREASUREKEY_AMOUNT)
         goto L_Not_enough;
    delitem "treasurekey", @TREASUREKEY_AMOUNT;
    set zeny, zeny + @QUEST_REW
    get exp @QUEST_EXP
    mes "[Miner]";
    mes "\"Thanks for your help. Take this 5000 gold for your trouble\""
    set @Miner, 1;

L_Not_enough:
    mes"[Miner]",
    mes"\"No I need 5 keys. Please come back when you have enough.\"";
    goto L_Close

L_MinerDone:
   mes"[Miner]",
   mes"\"Thanks again for your help!\"";
   goto L_Close

L_Close:
    set @Miner, 0;
    close;
}
Last edited by veryape on 06 Aug 2013, 00:25, edited 2 times in total.
Characters: veryape / Captain Dunce / Elvara / veryapeGM
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: The Miner at the mines north of Hurnscald

Post by cinderweb »

Thanks Veryape that looks simple enough now I know how to do it for the next one. Thank you.

Skragar
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: The Miner at the mines north of Hurnscald

Post by Jaxad0127 »

Image
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: The Miner at the mines north of Hurnscald

Post by cinderweb »

Okay so that's not right either. I just wonder why it has to have a variable or something in it. That looked like a pretty bit of script. Thanks Jaxad0127 for the bit of reading but i guess i just don't understand itunless I see it. I'll just stick to reading then instead of trying things out and cluttering up the board with my nonsense.
Note: this forum user was previously known as as jayd6974.
User avatar
Wombat
TMW Adviser
TMW Adviser
Posts: 1532
Joined: 08 Aug 2008, 16:31

Re: The Miner at the mines north of Hurnscald

Post by Wombat »

For this style of fetch quest, making it a daily quest might be a better option.
Current character is "Abolish".
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: The Miner at the mines north of Hurnscald

Post by cinderweb »

Code: Select all

018-1.gat,80,61,0|script|Miner|109,

{
    mes"[Miner]";
    mes"\"Be careful in there.\"";
    close;

L_Miner_Start:
    mes"[Miner]";
    mes"\"Hi, you look fairly experienced, could you help an old miner out while you are in there?\"";
    menu
           "Sure I'll help.", L_Help
           "No thanks.", L_Close

L_Help:
    mes"[Miner]";
    mes"\"You see when the spiders came I hurried up and ran, dropping my keychain in the process.\""
    mes"\"The keychain broke, but that's not what i'm worried about, I'm worried about the keys the spiders gobbled up.\""
    mes"\"There were alot of keys so if you can get them back for me I'd be really grateful.\""
    menu
           "I''ll be right back with them." L_Close
           "I have them right here."  L_Thanks
           "I've changed my mind." L_Close

L_Thanks:
    set @dq_level, 40;
    set @dq_cost, 30;
    set @dq_count, 5;
    set @dq_name$, "Treasure Key";
    set @dq_friendly_name$, "treasure key";
    set @dq_money, 5000;
    set @dq_exp, 5000;
 

    callfunc "DailyQuest";

    next;

    mes "[Miner]";
    mes "/"Check back with me tomorrow to see if I've found all my keys yet.\""
    
    L_Close
Like that Wombat?
Note: this forum user was previously known as as jayd6974.
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: The Miner at the mines north of Hurnscald

Post by cinderweb »

Code: Select all

//
018-1.gat,80,61,0|script|Miner|109,
{
    mes "[Miner]";
    mes "\"Be careful in there.\"";
    next;
    mes "\"Actually maybe you can help an old miner out.\"";
    next;
L_Keys:
    mes "[Miner]";
    set @dq_level, 40;
    set @dq_cost, 35;
    set @dq_count, 10;
    set @dq_name$, "TreasureKey";
    set @dq_friendly_name$, "Treasure Key";
    set @dq_money, 3000;
    set @dq_exp, 300;

    callfunc "DailyQuest";
    goto L_Close;

L_Close:
    set @money, 0;
    set @state, 0;
    set @dq_level, 0;
    set @dq_cost, 0;
    set @dq_count, 0;
    set @dq_name$, "";
    set @dq_friendly_name$, "";
    set @dq_money, 0;
    set @dq_exp, 0;
    set @dq_return, 0;
    close;

}
there that should work for the miner quest can someone with push pull access get it on there for me?
Last edited by cinderweb on 18 Aug 2013, 14:29, edited 2 times in total.
Note: this forum user was previously known as as jayd6974.
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: The Miner at the mines north of Hurnscald

Post by tux9th »

the xp / d.p. ratio is way off.
5 keys are easy to get 35 points are not much and therefore it's way too much xp and gp.

http://wiki.themanaworld.org/index.php/Daily_Quests

look at this table and make it fit the rest.
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: The Miner at the mines north of Hurnscald

Post by cinderweb »

there ya go balanced it out a little bit. and besides at level 40 in those mines 5 keys from spiders is downright dangerous to get.
Note: this forum user was previously known as as jayd6974.
cinderweb
Peon
Peon
Posts: 46
Joined: 30 Apr 2013, 13:59

Re: The Miner at the mines north of Hurnscald

Post by cinderweb »

http://pastebin.com/EmUENu7r

there it is in downloadable form so you guys can get it up on test
Attachments
miners.txt
(690 Bytes) Downloaded 82 times
Note: this forum user was previously known as as jayd6974.
User avatar
tux9th
TMW Adviser
TMW Adviser
Posts: 428
Joined: 09 Mar 2012, 20:21
Location: -67.067433,54.433587

Re: The Miner at the mines north of Hurnscald

Post by tux9th »

please format a patch out of that. I want to get this up into a repo.

https://www.kernel.org/pub/software/scm ... patch.html

you might want to read this as well
http://gitref.org/basic/
User avatar
straelyn
Novice
Novice
Posts: 117
Joined: 04 Jan 2013, 20:56

Re: The Miner at the mines north of Hurnscald

Post by straelyn »

end of line.
Post Reply