Page 1 of 2

The Miner at the mines north of Hurnscald

Posted: 04 Aug 2013, 23:45
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?

Re: The Miner at the mines north of Hurnscald

Posted: 05 Aug 2013, 02:22
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).

Re: The Miner at the mines north of Hurnscald

Posted: 05 Aug 2013, 23:29
by cinderweb
What's a persistent variable? any examples I could look at?

Re: The Miner at the mines north of Hurnscald

Posted: 06 Aug 2013, 00:09
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;
}

Re: The Miner at the mines north of Hurnscald

Posted: 06 Aug 2013, 00:17
by cinderweb
Thanks Veryape that looks simple enough now I know how to do it for the next one. Thank you.

Skragar

Re: The Miner at the mines north of Hurnscald

Posted: 06 Aug 2013, 04:50
by Jaxad0127

Re: The Miner at the mines north of Hurnscald

Posted: 06 Aug 2013, 18:41
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.

Re: The Miner at the mines north of Hurnscald

Posted: 07 Aug 2013, 00:22
by Wombat
For this style of fetch quest, making it a daily quest might be a better option.

Re: The Miner at the mines north of Hurnscald

Posted: 07 Aug 2013, 20:20
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?

Re: The Miner at the mines north of Hurnscald

Posted: 17 Aug 2013, 23:19
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?

Re: The Miner at the mines north of Hurnscald

Posted: 18 Aug 2013, 09:10
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.

Re: The Miner at the mines north of Hurnscald

Posted: 18 Aug 2013, 14:09
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.

Re: The Miner at the mines north of Hurnscald

Posted: 28 Aug 2013, 01:11
by cinderweb
http://pastebin.com/EmUENu7r

there it is in downloadable form so you guys can get it up on test

Re: The Miner at the mines north of Hurnscald

Posted: 28 Aug 2013, 06:45
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/

Re: The Miner at the mines north of Hurnscald

Posted: 28 Aug 2013, 22:52
by straelyn