Jump to content
  • 0

How to make this daily


Question

Posted (edited)

// NPC Name must have a Number behind it.  ex Name#1 , Name#2,...

zhakastia,106,43,1    script    Chained Quest#1    757,{
function    ChainedQuest;
mes "I am a Chained Quest NPC, you can only redo the previous Quest after you have finished all of my Quests.";
next;

// Quest Setup :
// ChainedQuest( Reward,Amount , Required Zeny, {Item1,Amount1,Item2,Amount2,...} );
switch( getd( "Quest"+strnpcinfo(2) ) ){
   Case 0: ChainedQuest( 7959,5,200000, 7063,300, 7296,15, 7441,10, 722,75, 725,75 );
   Case 1: ChainedQuest( 7959,5,200000, 7166,300, 7117,15, 721,75, 983,5, 7215,75 );
   Case 2: ChainedQuest( 7959,5,200000, 7205,300, 7117,25, 7063,75, 7063,50, 7563,25 );
   Case 3: ChainedQuest( 7959,5,200000, 916,300, 7095,75, 7263,20 ,7440,20, 704,75, 7562,2 );
   Case 4: ChainedQuest( 7959,5,200000, 7205,300, 7063,75, 914,20 ,7447,50, 12020,75, 7139,50 );
   Case 5: ChainedQuest( 7959,5,200000, 7327,300, 693,75, 1971,5, 740,50, 715,50, 981,1);
   Case 6: ChainedQuest( 7959,5,200000, 7446,300, 991,75, 7290,4, 7108,15, 549,75, 1971,5);
default:
   mes "Congratulation ,You have finished all the Quest i gave you, you may Re-Do if you want.";
   set getd( "Quest"+strnpcinfo(2) ),0;
   close;
}

OnPCLoadMapEvent:
   showevent 1,0;
   end;

function    ChainedQuest    {
   for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){
       if( countitem( getarg( .@i ) ) < ( getarg( .@i + 1 )) ){
           mes "[ ^FF0000Part "+( getd( "Quest"+strnpcinfo(2) ) + 1 )+"^000000 ]";
           mes "^00FF00_______________________________^000000";
           mes "^FF0000Reward^000000 : "+getarg(1)+" x ^0000FF"+getitemname( getarg(0) )+"^000000";
           mes "^00FF00_______________________________^000000";
           mes "then bring me those items :";
           mes "^00FF00_______________________________^000000";
           mes ( Zeny < getarg(2) ? "^FF0000":"^0000FF" )+getarg(2)+" Zeny^000000";
           for( set .@a,3; getarg( .@a,0 ) != 0 ; set .@a,.@a + 2 ){
               mes (( countitem(getarg( .@a )) < ( getarg(.@a + 1 )) )? "^FF0000[ "+countitem(getarg(.@a))+" / "+(getarg(.@a+1)):"^0000FF[ "+getd( "Quest"+strnpcinfo(2) ) )+" ] "+getitemname(getarg(.@a))+"^000000 ";
               }
           close;
           }
       }
   if( Zeny < getarg( 2 ) ){
       mes "You required "+getarg( 2 )+" Zeny.";
       close;
       }
   mes "[ ^FF0000Part "+( getd( "Quest"+strnpcinfo(2) ) + 1 )+"^000000 ]";
   mes "Look's like you have collected all";
   mes "^FF0000_______________________________^000000";
   mes ( Zeny < getarg(2) ? "^FF0000":"^0000FF" )+getarg(2)+" Zeny^000000";
   for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){
       mes "^FF0000"+getarg( .@i+1 )+" x ^0000FF "+getitemname( getarg( .@i ) )+"^000000";
       }
   next;
   if( select("^0000FFContinue^000000:Cancel") == 2 ){
       mes "Okay..as you wish ~ come back again when you do continue it.";
       close;
       }
   for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){
       delitem getarg( .@i ),getarg( .@i + 1 );
       }
   set Zeny,Zeny - getarg( 2 );
   set getd( "Quest"+strnpcinfo(2) ),getd( "Quest"+strnpcinfo(2) ) + 1;
   mes "You will be rewarded with ";
   mes "^0000FF_______________________________^000000";
   mes "^FF0000"+getarg(1)+"^000000 x ^0000FF"+getitemname( getarg(0) )+"^000000";
   mes "^0000FF_______________________________^000000";
   getitem getarg(0),getarg(1);
   close;
   }
}

zhakastia    mapflag    loadevent

This NPC will allow you to do Daily Chain Quests. You can do up to 10 quests a day and gain 5 Gold coin for each quest. After 10 quests, you can still do Chain Quests, but you will only gain 10 Silver Coins. possible to do this?

Edited by Mootie

1 answer to this question

Recommended Posts

Posted (edited)

since this is a support section, I just point out the trick though

1. at the start up of the script, use a gettimestr(%Y%m%D) check

if var != today, remove all variables produce in this script

2. after user done all quests for the 1st time, inside default: label

set a new getd("Quest"+ strnpcinfo(2) +"done") and reward gold coin, and reset getd( "Quest"+strnpcinfo(2) ) variable

3. after user done all quest for 2nd time and above, inside default: label

if ( getd("Quest"+ strnpcinfo(2) +"done" ), reward silver coin

EDIT:

btw I think this is emistry script ... his scripting style so resemble it

EDIT2:

yeah lol

http://rathena.org/board/files/file/2495-chain-quest/

Edited by AnnieRuru

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...