Jump to content
  • 0
keough

Can someone make this work?

Question

this quest supposed to be daily and you can repeat this after 20 hours

 

//        //=====//     /==/     /==/          /==/      //       //     //     /==/     /==/  /=/     /==/         //      //=====//              /==/  /=/             /==============/     /========/   /==//===/    /==/     /==///     //=//////    /==/      /==//=/       /==/    /==/==/==/==/==/     /     /  /   /==/         /==/     /==///    // ==        /==/      /==//=/       /==/    /==/  /==/  /==/     ======/  /   /==/         /==/     /==///   //   ==      /==/      /==/  /=/     /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/     /==///  //     ==    /==/      /==/   /=/    /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/=====/==/// //       ==  /==/      /==/    /=/   /==/    /==/  /==/  /==/     /========/   /==/         /==///////==/// ================ rAthena Script ==================================================// ============== Information =======================================================// = iRO Daily Quest : Swab the Deck// = Made by :// = Rikimaru//===== Current Version: =============================================== //= 1.4//===== Compatible With: =============================================== //= any rAthena SVN//===== Description: =================================================== //= The iRO Daily Quest : Swab the Deck//= Usefull for having fun in a Server with a Mini Quest//= Has a counter of 20 Hours until the Players can do the Quest agian.//===== Additional Comments: =========================================== //= 1.3 Finished Scripting all NPC's [Rikimaru]//= 1.4 Fixed a saved Variable Typo [Rikimaru]//====================================================================== //============== DO NOT REMOVE MY CREDITS AND CLAIM MY WORK AS YOURS ===alberta,104,60,5	script	[Quest] First Mate	748,{//============================= Settings ==========================set .@npcname$,"[ First Mate ]";set .BeadID,6222;//======================= End =====================================if(countitem(6221) > 0 && gettimetick(2) - exchangedalready > (60 * 60 * 20)) {mes .@npcname$;mes "Hey,how many Mystic Leaf Cat Balls";mes "do you want to exchange to Shiny Beads?";next;mes .@npcname$;mes "Input the Amount of the Mystic Leaf Cat Balls,which you want to exchange.";mes "If you input 0 , you're going to cancel the deal.";next;input @beadamount;if (@beadamount == 0) {close;}mes .@npcname$;mes "Do you really want to exchange";mes ":"+ @beadamount +" Mystic Leaf Cat Balls";mes "for "+ @beadamount +" Shiny Beads?";next;switch(select("Yes!:No!")) {	case 1:	mes .@npcname$;	mes "Okay converting... ... ...";	if(countitem(6221) < @beadamount) goto l_noitem;	delitem 6221,@beadamount;	getitem .BeadID,@beadamount;	set BaseExp,+50000;// CHANGE THE EXP AMOUNT!!	set JobExp,+40000;// CHANGE THE EXP AMOUNT!!	set exchangedalready,gettimetick(2);	next;	mes .@npcname$;	mes "Okay you can exchange the Shiny Beads at the Second Mate.";	close;	case 2:	mes .@npcname$;	mes "Okay goodbye!";	close;	}l_noitem:mes .@npcname$;mes "I'm sorry,but you're missing some items!";close;}mes .@npcname$;mes "Hey , do you want to do the Daily Quest?";next;switch(select("Yes,sure!:No,bye!:Cancel")) {	case 1:	mes .@npcname$;	mes "Okay you have to go to the alberta Ship";	mes "and enter one of the Portals and Catch A Hydra!";	next;	mes .@npcname$;	mes "If you catch it,you'll get a Mystic Hydra Ball,";	mes "if you got it,come back to me,if you failed,";	mes "come back to me and get a new Hydra Ball,to";	mes "catch the rats!";	next;	mes .@npcname$;	mes "So,here take this,";	mes "and come back when you finished.";	getitem 12408,1;	close;	case 2:	mes .@npcname$;	mes "Okay,goodbye!";	close;	case 3:	close;	}}// ============================ End of the First Mate Script ===================================alberta,107,59,5	script	[Quest] Second Mate	100,{set .@npcname$,"^0000FF[ Second Mate ]^000000";set .BeadID,6222;setarray @ItemID[0],5159,5158,2281,2283,2295,5094,14545,12221,12210,11501,11502;setarray @Cost[0],20,10,10,10,30,100,2,1,2,1,1;setarray @itemcount[0],1,1,1,1,1,1,3,5,3,100,100;mes .@npcname$;mes "Hello ["+strcharinfo(0)+"],do";mes "you want to buy some items?";mes "You'll have to give me Shiny";mes "Beads for the Items!";next;	if (select("Yes,sure","No,nevermind!") == 2) 		close;	next;	mes .@npcname$;	mes "Item = Cost";	for( set .@i, 0; .@i < getarraysize(@ItemID); set .@i, .@i + 1 ) {		mes "^0000ff"+@itemcount[.@i]+"x "+getitemname(@ItemID[.@i])+"^000000 = ^00aa00"+@Cost[.@i]+"^000000";		if( .@i < 1 )			set .@menu$, getitemname(@ItemID[.@i]);		else			set .@menu$, .@menu$+":"+getitemname(@ItemID[.@i]);	}	next;	select(.@menu$);	set @choice, @menu - 1;	mes @npcname$;	if(countitem(.BeadID) <@Cost[@choice]) {		mes "You need more Shiny Beads for "+@itemcount[@choice]+"x '"+getitemname(@ItemID[@choice])+"'";		close;	}	mes "Are u realy sure to trade "+@itemcount[@choice]+"x '^ff0000"+getitemname(@ItemID[@choice])+"^000000' for ^00aa00"+@Cost[@choice]+"^000000 Shiny Beads?";	if(select("No! Cancel!:Yes, Trade me!") == 1 ) {		mes "Canceled the Trade";		close;	}	set .@new, .BeadID - @Cost[@choice];	if( .@new < 0 )		set .@new, 0;	delitem .BeadID,@Cost[@choice];	getitem @ItemID[@choice], @itemcount[@choice];	mes "The Trade was succesfull. Have fun with the Item!";	close;}alb_ship,0,0,0,0	monster	Suspicious Hydra	2081,20,300000,150000,1

 

But i dont see the message for 20 hours.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

try change 20 to 24 on this part

if(countitem(6221) > 0 && gettimetick(2) - exchangedalready > (60 * 60 * 20)) {

Share this post


Link to post
Share on other sites
  • 0

i mean, when i finish the quest, i am able to do it again instantly with no time limit. maybe there's an error with the script or there is not time for the script.

Share this post


Link to post
Share on other sites
  • 0

The Quest you mean is in the First Mate npc isn't it??, if so here i move exchanger to be part of npc main menu and remove time setting

 

//        //=====//     /==/     /==/          /==/      //       //     //     /==/     /==/  /=/     /==/         //      //=====//              /==/  /=/             /==============/     /========/   /==//===/    /==/     /==///     //=//////    /==/      /==//=/       /==/    /==/==/==/==/==/     /     /  /   /==/         /==/     /==///    // ==        /==/      /==//=/       /==/    /==/  /==/  /==/     ======/  /   /==/         /==/     /==///   //   ==      /==/      /==/  /=/     /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/     /==///  //     ==    /==/      /==/   /=/    /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/=====/==/// //       ==  /==/      /==/    /=/   /==/    /==/  /==/  /==/     /========/   /==/         /==///////==/// ================ rAthena Script ==================================================// ============== Information =======================================================// = iRO Daily Quest : Swab the Deck// = Made by :// = Rikimaru//===== Current Version: =============================================== //= 1.4//===== Compatible With: =============================================== //= any rAthena SVN//===== Description: =================================================== //= The iRO Daily Quest : Swab the Deck//= Usefull for having fun in a Server with a Mini Quest//= Has a counter of 20 Hours until the Players can do the Quest agian.//===== Additional Comments: =========================================== //= 1.3 Finished Scripting all NPC's [Rikimaru]//= 1.4 Fixed a saved Variable Typo [Rikimaru]//====================================================================== //============== DO NOT REMOVE MY CREDITS AND CLAIM MY WORK AS YOURS ===alberta,104,60,5	script	[Quest] First Mate	748,{	set .@npcname$,"[ First Mate ]";	set .@BeadID,6222;	mes .@npcname$;	mes "Hey , do you want to do the Daily Quest?";	next;	switch(select("Yes,sure!:No,bye!:Exchange Shiny Beads:Cancel")) {	case 1:		mes .@npcname$;		mes "Okay you have to go to the alberta Ship";		mes "and enter one of the Portals and Catch A Hydra!";		next;		mes .@npcname$;		mes "If you catch it,you'll get a Mystic Hydra Ball,";		mes "if you got it,come back to me,if you failed,";		mes "come back to me and get a new Hydra Ball,to";		mes "catch the rats!";		next;		mes .@npcname$;		mes "So,here take this,";		mes "and come back when you finished.";		getitem 12408,1;		close;	case 2:		mes .@npcname$;		mes "Okay,goodbye!";		close;	case 3:		mes .@npcname$;		mes "Hey,how many Mystic Leaf Cat Balls";		mes "do you want to exchange to Shiny Beads?";		next;		mes .@npcname$;		mes "Input the Amount of the Mystic Leaf Cat Balls,which you want to exchange.";		mes "If you input 0 , you're going to cancel the deal.";		next;		if (input(.@beadamount,1,30000) || countitem(6221) < .@beadamount) {			mes .@npcname$;			mes "I'm sorry,but you're missing some items!";			close;		}		mes .@npcname$;		mes "Do you really want to exchange";		mes ":"+ .@beadamount +" Mystic Leaf Cat Balls";		mes "for "+ .@beadamount +" Shiny Beads?";		next;		switch(select("Yes!:No!")) {		case 1:			mes .@npcname$;			mes "Okay converting... ... ...";			delitem 6221, .@beadamount;			getitem .@BeadID, .@beadamount;			set BaseExp,+50000;// CHANGE THE EXP AMOUNT!!			set JobExp,+40000;// CHANGE THE EXP AMOUNT!!			next;			mes .@npcname$;			mes "Okay you can exchange the Shiny Beads at the Second Mate.";			close;		case 2:			mes .@npcname$;			mes "Okay goodbye!";			close;		}	case 4:		close;	}}// ============================ End of the First Mate Script ===================================alberta,107,59,5	script	[Quest] Second Mate	100,{set .@npcname$,"^0000FF[ Second Mate ]^000000";set .BeadID,6222;setarray @ItemID[0],5159,5158,2281,2283,2295,5094,14545,12221,12210,11501,11502;setarray @Cost[0],20,10,10,10,30,100,2,1,2,1,1;setarray @itemcount[0],1,1,1,1,1,1,3,5,3,100,100;mes .@npcname$;mes "Hello ["+strcharinfo(0)+"],do";mes "you want to buy some items?";mes "You'll have to give me Shiny";mes "Beads for the Items!";next;	if (select("Yes,sure","No,nevermind!") == 2) 		close;	next;	mes .@npcname$;	mes "Item = Cost";	for( set .@i, 0; .@i < getarraysize(@ItemID); set .@i, .@i + 1 ) {		mes "^0000ff"+@itemcount[.@i]+"x "+getitemname(@ItemID[.@i])+"^000000 = ^00aa00"+@Cost[.@i]+"^000000";		if( .@i < 1 )			set .@menu$, getitemname(@ItemID[.@i]);		else			set .@menu$, .@menu$+":"+getitemname(@ItemID[.@i]);	}	next;	select(.@menu$);	set @choice, @menu - 1;	mes @npcname$;	if(countitem(.BeadID) <@Cost[@choice]) {		mes "You need more Shiny Beads for "+@itemcount[@choice]+"x '"+getitemname(@ItemID[@choice])+"'";		close;	}	mes "Are u realy sure to trade "+@itemcount[@choice]+"x '^ff0000"+getitemname(@ItemID[@choice])+"^000000' for ^00aa00"+@Cost[@choice]+"^000000 Shiny Beads?";	if(select("No! Cancel!:Yes, Trade me!") == 1 ) {		mes "Canceled the Trade";		close;	}	set .@new, .BeadID - @Cost[@choice];	if( .@new < 0 )		set .@new, 0;	delitem .BeadID,@Cost[@choice];	getitem @ItemID[@choice], @itemcount[@choice];	mes "The Trade was succesfull. Have fun with the Item!";	close;}alb_ship,0,0,0,0	monster	Suspicious Hydra	2081,20,300000,150000,1

Share this post


Link to post
Share on other sites
  • 0

 

The Quest you mean is in the First Mate npc isn't it??, if so here i move exchanger to be part of npc main menu and remove time setting

 

//        //=====//     /==/     /==/          /==/      //       //     //     /==/     /==/  /=/     /==/         //      //=====//              /==/  /=/             /==============/     /========/   /==//===/    /==/     /==///     //=//////    /==/      /==//=/       /==/    /==/==/==/==/==/     /     /  /   /==/         /==/     /==///    // ==        /==/      /==//=/       /==/    /==/  /==/  /==/     ======/  /   /==/         /==/     /==///   //   ==      /==/      /==/  /=/     /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/     /==///  //     ==    /==/      /==/   /=/    /==/    /==/  /==/  /==/     / /===/  /   /==/         /==/=====/==/// //       ==  /==/      /==/    /=/   /==/    /==/  /==/  /==/     /========/   /==/         /==///////==/// ================ rAthena Script ==================================================// ============== Information =======================================================// = iRO Daily Quest : Swab the Deck// = Made by :// = Rikimaru//===== Current Version: =============================================== //= 1.4//===== Compatible With: =============================================== //= any rAthena SVN//===== Description: =================================================== //= The iRO Daily Quest : Swab the Deck//= Usefull for having fun in a Server with a Mini Quest//= Has a counter of 20 Hours until the Players can do the Quest agian.//===== Additional Comments: =========================================== //= 1.3 Finished Scripting all NPC's [Rikimaru]//= 1.4 Fixed a saved Variable Typo [Rikimaru]//====================================================================== //============== DO NOT REMOVE MY CREDITS AND CLAIM MY WORK AS YOURS ===alberta,104,60,5	script	[Quest] First Mate	748,{	set .@npcname$,"[ First Mate ]";	set .@BeadID,6222;	mes .@npcname$;	mes "Hey , do you want to do the Daily Quest?";	next;	switch(select("Yes,sure!:No,bye!:Exchange Shiny Beads:Cancel")) {	case 1:		mes .@npcname$;		mes "Okay you have to go to the alberta Ship";		mes "and enter one of the Portals and Catch A Hydra!";		next;		mes .@npcname$;		mes "If you catch it,you'll get a Mystic Hydra Ball,";		mes "if you got it,come back to me,if you failed,";		mes "come back to me and get a new Hydra Ball,to";		mes "catch the rats!";		next;		mes .@npcname$;		mes "So,here take this,";		mes "and come back when you finished.";		getitem 12408,1;		close;	case 2:		mes .@npcname$;		mes "Okay,goodbye!";		close;	case 3:		mes .@npcname$;		mes "Hey,how many Mystic Leaf Cat Balls";		mes "do you want to exchange to Shiny Beads?";		next;		mes .@npcname$;		mes "Input the Amount of the Mystic Leaf Cat Balls,which you want to exchange.";		mes "If you input 0 , you're going to cancel the deal.";		next;		if (input(.@beadamount,1,30000) || countitem(6221) < .@beadamount) {			mes .@npcname$;			mes "I'm sorry,but you're missing some items!";			close;		}		mes .@npcname$;		mes "Do you really want to exchange";		mes ":"+ .@beadamount +" Mystic Leaf Cat Balls";		mes "for "+ .@beadamount +" Shiny Beads?";		next;		switch(select("Yes!:No!")) {		case 1:			mes .@npcname$;			mes "Okay converting... ... ...";			delitem 6221, .@beadamount;			getitem .@BeadID, .@beadamount;			set BaseExp,+50000;// CHANGE THE EXP AMOUNT!!			set JobExp,+40000;// CHANGE THE EXP AMOUNT!!			next;			mes .@npcname$;			mes "Okay you can exchange the Shiny Beads at the Second Mate.";			close;		case 2:			mes .@npcname$;			mes "Okay goodbye!";			close;		}	case 4:		close;	}}// ============================ End of the First Mate Script ===================================alberta,107,59,5	script	[Quest] Second Mate	100,{set .@npcname$,"^0000FF[ Second Mate ]^000000";set .BeadID,6222;setarray @ItemID[0],5159,5158,2281,2283,2295,5094,14545,12221,12210,11501,11502;setarray @Cost[0],20,10,10,10,30,100,2,1,2,1,1;setarray @itemcount[0],1,1,1,1,1,1,3,5,3,100,100;mes .@npcname$;mes "Hello ["+strcharinfo(0)+"],do";mes "you want to buy some items?";mes "You'll have to give me Shiny";mes "Beads for the Items!";next;	if (select("Yes,sure","No,nevermind!") == 2) 		close;	next;	mes .@npcname$;	mes "Item = Cost";	for( set .@i, 0; .@i < getarraysize(@ItemID); set .@i, .@i + 1 ) {		mes "^0000ff"+@itemcount[.@i]+"x "+getitemname(@ItemID[.@i])+"^000000 = ^00aa00"+@Cost[.@i]+"^000000";		if( .@i < 1 )			set .@menu$, getitemname(@ItemID[.@i]);		else			set .@menu$, .@menu$+":"+getitemname(@ItemID[.@i]);	}	next;	select(.@menu$);	set @choice, @menu - 1;	mes @npcname$;	if(countitem(.BeadID) <@Cost[@choice]) {		mes "You need more Shiny Beads for "+@itemcount[@choice]+"x '"+getitemname(@ItemID[@choice])+"'";		close;	}	mes "Are u realy sure to trade "+@itemcount[@choice]+"x '^ff0000"+getitemname(@ItemID[@choice])+"^000000' for ^00aa00"+@Cost[@choice]+"^000000 Shiny Beads?";	if(select("No! Cancel!:Yes, Trade me!") == 1 ) {		mes "Canceled the Trade";		close;	}	set .@new, .BeadID - @Cost[@choice];	if( .@new < 0 )		set .@new, 0;	delitem .BeadID,@Cost[@choice];	getitem @ItemID[@choice], @itemcount[@choice];	mes "The Trade was succesfull. Have fun with the Item!";	close;}alb_ship,0,0,0,0	monster	Suspicious Hydra	2081,20,300000,150000,1

 

The First Mate should give you another Hydra Ball for the next 20 hours only, not everytime. but while waiting for 20 hours, still you can exchange for beads if you have mystic hydra ball.

Share this post


Link to post
Share on other sites
  • 0

ahhh i see, try change code in this part

if(countitem(6221) > 0 && gettimetick(2) - exchangedalready > (60 * 60 * 20)) {

to

if(countitem(6221) > 0) {

it will make while waiting for 20 hours, still you can exchange for beads if you have mystic hydra ball.

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.