Jump to content
  • 0

Daily quest every 12 hours not 24 hours help script


Question

Posted

hello everyone i would like to ask for your help.... in regards to this script.. i'm having real troulbe with gettime scripts this is the script

	invek,136,148,5    script    Daily Quest    733,{
mes "[ Daily Quest ]";
mes "Hello ^0000ff"+strcharinfo(0)+"^000000,";
mes "How can i help you?";
        mes "       ";
        mes "^ff0000NOTE^000000 :";
        mes "Daily quest starts every";
        mes "1:00 A.M and 1:00 P.M";
	next;
menu "Do the Daily Quest",doquest,"^ff0000Exit^000000",dontdodaily;
	dontdodaily:
        close;
doquest:
    set .@t,gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 );
    mes "[ Daily Quest ]";
    mes ""+ .week$[.@t] + " Quest Detail :";
    mes "^777777Required Items^000000 :";
    set .@size,getarraysize( getd( ".req_item"+ .@t ) );
    for ( set .@i,1; .@i < .@size; set .@i,.@i+2)
    mes ""+((countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) ? "^ff0000":"^008800")+""+getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".req_item"+ .@t +"["+ .@i +"]" ) )+" ("+countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) )+"/"+getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) +")";
    
    mes "^777777Reward Items^000000 :";
    mes "1x "+getitemname( getd( ".req_item"+ .@t ) );
    mes "1x Refinement Card";
    next;
    if ( select ( "Submit ^0000ffDaily Quest Items", "^ff0000Exit^000000" ) == 2 ) {
        close;
    }
    else if( #the_day_today == gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) ) {
            mes "[ Daily Quest ]";
        mes "I'm sorry, but you have completed";
        mes "the ^ff0000"+( gettime(3) > 12 ? "P.M" : "A.M" )+"^000000 quest for today already.";
        mes "Please comeback later for";
        mes "the ^0000ff"+(gettime(3) > 12 ? "A.M" : "P.M" )+"^000000 quest.";
        close;
    }
    else if ( gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 ) != .@t ) {
        mes "[ Daily Quest ]";
        mes "I'm sorry, but the daily quest has just been updated.";
        mes "I now require a new set of quest items.";
        close;
    }
    mes "[ Daily Quest ]";
    mes "^ff0000*Checking Inventory*^000000";
    mes "Please wait....";
    sleep2 5000;
    mes "             ";
    mes "             ";
    mes "• ^008800Inventory Check Complete^000000";
    next;
    for ( set .@i,1; .@i < .@size; set .@i,.@i+2 ) {
        if ( countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) ) < getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) ) {
            setarray .@not_enough[.@c], getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" ) - countitem( getd( ".req_item"+ .@t +"["+ .@i +"]" ) );
            set .@c,.@c + 2;
        }
    }
    if ( .@c ) {
        mes "[ Daily Quest ]";
        mes "You do not have enough ^ff0000Quest Items^000000.";
        close;
    }
    for ( set .@i,1; .@i < .@size; set .@i,.@i + 2 )
    delitem getd( ".req_item"+ .@t +"["+ .@i +"]" ), getd( ".req_item"+ .@t +"["+( .@i +1 )+"]" );
    getitem getd( ".req_item"+ .@t ), 1;
    set #the_day_today,gettime(4)*2 + ( gettime(3) > 12 ? 1 : 0 );
    mes "[ Daily Quest ]";
    mes "^777777Quest Completed^000000 :";
    mes "^009900"+ .week$[.@t]+" Quest^000000";
    mes "        ";
    mes "^777777Received Items^000000 :";
    mes "• ^0000ff1x "+getitemname( getd( ".req_item"+ .@t ) );
    mes "• ^0000ff1x Refinement  card^000000";
    getitem 21013,1;
    close;
OnInit:
    waitingroom "Daily Quest",0;
    setarray .week$, "Sunday's (A.M)", "Sunday's (P.M)", "Monday's (A.M)", "Monday's (P.M)", "Tuesday's (A.M)", "Tuesday's (P.M)", "Wednesday's (A.M)", "Wednesday's (P.M)", "Thursday's (A.M)", "Thursday's (P.M)", "Friday's (A.M)", "Friday's (P.M)", "Saturday's (A.M)", "Saturday's (P.M)";
    setarray .req_item0, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;// sunday
    setarray .req_item1, 21010, rand( 901,1070 ),rand( 10,20 ), 502,20, 503,30, 504, 40;// sunday PM etc..
    setarray .req_item2, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item3, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item4, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item5, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item6, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item7, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item8, 21010, rand( 901,1070 ),rand( 10,20 ), 502,20, 503,30, 504, 40;
    setarray .req_item9, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item10, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item11, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item12, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    setarray .req_item13, 21010, rand( 901,1070 ),rand( 10,20 ), 502,1;
    end;
}



this is a a script made by CAPUCHE from the scripting request way back in 2013 or 2014 if i'm correct....... i can submit the daily quest if its morning however when it becomes 1 pm and above it's telling me directly that i completed the quest already. thank you so much

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

its am and pm based script

try this one if u want to make it once a day 

prontera,146,143,6	script	Hunting Quests	997,{
	if(extime+86399 > gettimetick(2))
{
mes "Please wait 24 hours.";
close;
}
	if (getgmlevel() >= 80) goto GM_Menu;
	L_START:
	if (getgmlevel() >= 80) next;
	mes "[Daily  Quest]";
	mes "Hello "+strcharinfo(0)+"!";
	mes "Do you want to start today's Quest?";
	mes " ";
	mes "Total Daily Quests Finished: ^008800"+$DailyQuestTotal+"^000000.";
	mes "Today Daily Quests Finished: ^0000FF"+$DailyQuestToday+"^000000.";
	menu "Yes!",-,"Nahh",L_Close;
	next;
	mes "[Daily Quest]";
	mes "You'll need these item for Today's Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	mes "In exchange you will get ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"";
	next;
	mes "[Daily Quest]";
	mes "Do you have the items?";
	menu "Yes! I do.",-,"Gimme some time.",L_Close;
	if(countitem($QuestItem1) >= $QuestItem1HM) && (countitem($QuestItem2) >= $QuestItem2HM) && (countitem($QuestItem3) >= $QuestItem3HM) goto FinishQuest;
	next;
	mes "[Daily Quest]";
	mes "You only have "+countitem($QuestItem1HM)+" of ^FF0000"+getitemname($QuestItem1)+"^000000, "+countitem($QuestItem2HM)+" of ^FF0000"+getitemname($QuestItem2)+"^000000, "+countitem($QuestItem3HM)+" of ^FF0000"+getitemname($QuestItem3)+"^000000.";
	mes "Come back when you have it! Better get the items quickly. It's gonna change in a Day!";
	close;
	end;

	L_Close:
	next;
	mes "[Daily Quest]";
	mes "Come back again! Get the Items!";
	mes "Goodbye!";
	close;
	end;

	GM_Menu:
	mes "[Daily Quest]";
	mes "Hello GM "+strcharinfo(0)+"!";
	mes "What can I do for you today?";
	menu "Player Menu",L_START,"Change Today's Quest/Prize",L_ChangeQuest,"Close",L_Close;
	end;

	L_ChangeQuest:
	next;
	mes "[Daily Quest]";
	mes "What will you like to change?";
	next;
	menu "Go back.",GM_Menu,"Prize [^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"]",L_ChangePrize,"Change Quest Randomly",L_ChangeQuestRandom,"Change Quest by Myself",L_ChangeQuestMyself;
	end;

	L_ChangeQuestMyself:
	next;
	mes "[Daily Quest]";
	mes "Which item would you like to change first?";
	menu "Go Back.",L_ChangeQuest,"Item 1 [^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"]",L_ChangeItem1,"Item 2 [^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"]",L_ChangeItem2,"Item 3 [^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"]",L_ChangeItem3;
//
	L_ChangeItem1:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem1;
	next;
	L_ChangeItem12:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem1)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 200^000000.";
	next;
	input $QuestItem1HM;
	next;
	if ($QuestItem1HM > 200) goto L_HMItem1Denied;
	mes "[Daily Quest]";
	mes "Item 1 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+".";
	next;
	goto L_ChangeQuest;
	end;

	L_HMItem1Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem1)+"^000000) must be in a range of ^0088001 ~ 200^000000.";
	next;
	goto L_ChangeItem12;
	end;	
//
	L_ChangeItem2:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem2;
	next;
	L_ChangeItem22:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem2)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 150^000000.";
	next;
	input $QuestItem2HM;
	next;
	if ($QuestItem2HM > 150) goto L_HMItem2Denied;
	mes "[Daily Quest]";
	mes "Item 2 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+".";
	next;
	goto L_ChangeQuest;
	end;

	L_HMItem2Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem2)+"^000000) must be in a range of ^0088001 ~ 150^000000.";
	next;
	goto L_ChangeItem22;
	end;
//
	L_ChangeItem3:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem3;
	next;
	L_ChangeItem32:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem3)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 50^000000.";
	next;
	input $QuestItem3HM;
	next;
	if ($QuestItem3HM > 50) goto L_HMItem3Denied;
	mes "[Daily Quest]";
	mes "Item 3 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+".";
	next;
	goto L_ChangeQuest;
	end;

	L_HMItem3Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem3)+"^000000) must be in a range of ^0088001 ~ 50^000000.";
	next;
	goto L_ChangeItem32;
	end;
//
	L_ChangeQuestRandom:
	set $QuestItem1, rand(701,1065);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(701,1065);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(701,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	mes "[Daily Quest]";
	mes "This is the Daily Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	next;
	goto GM_Menu;
	end;

	L_ChangePrize:
	next;
	mes "[Daily Quest]";
	mes "Input the Prize";
	next;
	input $DailyQuestPrize;
	next;
	mes "[Daily Quest]";
	mes "The Prize: "+getitemname($DailyQuestPrize)+" x How many?";
	next;
	input $DailyQuestPrizeHM;
	next;
	mes "[Daily Quest]";
	mes "This is what you like?";
	mes "^0000ff"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	menu "Yup, Thanks.",GM_Menu,"Noo! I made a mistake!",L_ChangePrize;
	end;

	FinishQuest:
	next;
	mes "[Daily Quest]";
	mes "You got ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	delitem $QuestItem1,$QuestItem1HM;
	delitem $QuestItem2,$QuestItem2HM;
	delitem $QuestItem3,$QuestItem3HM;
	getitem $DailyQuestPrize,$DailyQuestPrizeHM;
	set $DailyQuestTotal,$DailyQuestTotal +1;
	set $DailyQuestToday,$DailyQuestToday +1;
	set extime,gettimetick(2);
	close;
	end;
	
}

-	script	DailyQuestItemChanger	-1,{
	OnInit:
	Start:
	set $QuestItem1, rand(936,980);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(981,1025);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(1025,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	OnHour24:
	set $QuestItem1, rand(936,980);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(981,1025);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(1025,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	goto Start;
	end;

}

 

Edited by Cyro
  • Upvote 1
  • 0
Posted
57 minutes ago, Cyro said:

its am and pm based script

try this one if u want to make it once a day 


prontera,146,143,6	script	Hunting Quests	997,{
	if(extime+86399 > gettimetick(2))
{
mes "Please wait 24 hours.";
close;
}
	if (getgmlevel() >= 80) goto GM_Menu;
	L_START:
	if (getgmlevel() >= 80) next;
	mes "[Daily  Quest]";
	mes "Hello "+strcharinfo(0)+"!";
	mes "Do you want to start today's Quest?";
	mes " ";
	mes "Total Daily Quests Finished: ^008800"+$DailyQuestTotal+"^000000.";
	mes "Today Daily Quests Finished: ^0000FF"+$DailyQuestToday+"^000000.";
	menu "Yes!",-,"Nahh",L_Close;
	next;
	mes "[Daily Quest]";
	mes "You'll need these item for Today's Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	mes "In exchange you will get ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"";
	next;
	mes "[Daily Quest]";
	mes "Do you have the items?";
	menu "Yes! I do.",-,"Gimme some time.",L_Close;
	if(countitem($QuestItem1) >= $QuestItem1HM) && (countitem($QuestItem2) >= $QuestItem2HM) && (countitem($QuestItem3) >= $QuestItem3HM) goto FinishQuest;
	next;
	mes "[Daily Quest]";
	mes "You only have "+countitem($QuestItem1HM)+" of ^FF0000"+getitemname($QuestItem1)+"^000000, "+countitem($QuestItem2HM)+" of ^FF0000"+getitemname($QuestItem2)+"^000000, "+countitem($QuestItem3HM)+" of ^FF0000"+getitemname($QuestItem3)+"^000000.";
	mes "Come back when you have it! Better get the items quickly. It's gonna change in a Day!";
	close;
	end;

	L_Close:
	next;
	mes "[Daily Quest]";
	mes "Come back again! Get the Items!";
	mes "Goodbye!";
	close;
	end;

	GM_Menu:
	mes "[Daily Quest]";
	mes "Hello GM "+strcharinfo(0)+"!";
	mes "What can I do for you today?";
	menu "Player Menu",L_START,"Change Today's Quest/Prize",L_ChangeQuest,"Close",L_Close;
	end;

	L_ChangeQuest:
	next;
	mes "[Daily Quest]";
	mes "What will you like to change?";
	next;
	menu "Go back.",GM_Menu,"Prize [^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+"]",L_ChangePrize,"Change Quest Randomly",L_ChangeQuestRandom,"Change Quest by Myself",L_ChangeQuestMyself;
	end;

	L_ChangeQuestMyself:
	next;
	mes "[Daily Quest]";
	mes "Which item would you like to change first?";
	menu "Go Back.",L_ChangeQuest,"Item 1 [^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"]",L_ChangeItem1,"Item 2 [^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"]",L_ChangeItem2,"Item 3 [^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"]",L_ChangeItem3;
//
	L_ChangeItem1:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem1;
	next;
	L_ChangeItem12:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem1)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 200^000000.";
	next;
	input $QuestItem1HM;
	next;
	if ($QuestItem1HM > 200) goto L_HMItem1Denied;
	mes "[Daily Quest]";
	mes "Item 1 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+".";
	next;
	goto L_ChangeQuest;
	end;

	L_HMItem1Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem1)+"^000000) must be in a range of ^0088001 ~ 200^000000.";
	next;
	goto L_ChangeItem12;
	end;	
//
	L_ChangeItem2:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem2;
	next;
	L_ChangeItem22:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem2)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 150^000000.";
	next;
	input $QuestItem2HM;
	next;
	if ($QuestItem2HM > 150) goto L_HMItem2Denied;
	mes "[Daily Quest]";
	mes "Item 2 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+".";
	next;
	goto L_ChangeQuest;
	end;

	L_HMItem2Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem2)+"^000000) must be in a range of ^0088001 ~ 150^000000.";
	next;
	goto L_ChangeItem22;
	end;
//
	L_ChangeItem3:
	next;
	mes "[Daily Quest]";
	mes "Alright. What will be the item?";
	next;
	input $QuestItem3;
	next;
	L_ChangeItem32:
	mes "[Daily Quest]";
	mes "How much of ^ff0000"+getitemname($QuestItem3)+"^000000 do you want?";
	mes "It must be in the range of ^0088001 ~ 50^000000.";
	next;
	input $QuestItem3HM;
	next;
	if ($QuestItem3HM > 50) goto L_HMItem3Denied;
	mes "[Daily Quest]";
	mes "Item 3 Set.";
	set $DailyQuestToday,0;
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+".";
	next;
	goto L_ChangeQuest;
	end;

	L_HMItem3Denied:
	mes "[Daily Quest]";
	mes "This item (^ff0000"+getitemname($QuestItem3)+"^000000) must be in a range of ^0088001 ~ 50^000000.";
	next;
	goto L_ChangeItem32;
	end;
//
	L_ChangeQuestRandom:
	set $QuestItem1, rand(701,1065);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(701,1065);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(701,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	mes "[Daily Quest]";
	mes "This is the Daily Quest:";
	mes "^FF0000"+getitemname($QuestItem1)+"^000000 x "+$QuestItem1HM+"";
	mes "^FF0000"+getitemname($QuestItem2)+"^000000 x "+$QuestItem2HM+"";
	mes "^FF0000"+getitemname($QuestItem3)+"^000000 x "+$QuestItem3HM+"";
	next;
	goto GM_Menu;
	end;

	L_ChangePrize:
	next;
	mes "[Daily Quest]";
	mes "Input the Prize";
	next;
	input $DailyQuestPrize;
	next;
	mes "[Daily Quest]";
	mes "The Prize: "+getitemname($DailyQuestPrize)+" x How many?";
	next;
	input $DailyQuestPrizeHM;
	next;
	mes "[Daily Quest]";
	mes "This is what you like?";
	mes "^0000ff"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	menu "Yup, Thanks.",GM_Menu,"Noo! I made a mistake!",L_ChangePrize;
	end;

	FinishQuest:
	next;
	mes "[Daily Quest]";
	mes "You got ^0000FF"+getitemname($DailyQuestPrize)+"^000000 x "+$DailyQuestPrizeHM+".";
	delitem $QuestItem1,$QuestItem1HM;
	delitem $QuestItem2,$QuestItem2HM;
	delitem $QuestItem3,$QuestItem3HM;
	getitem $DailyQuestPrize,$DailyQuestPrizeHM;
	set $DailyQuestTotal,$DailyQuestTotal +1;
	set $DailyQuestToday,$DailyQuestToday +1;
	set extime,gettimetick(2);
	close;
	end;
	
}

-	script	DailyQuestItemChanger	-1,{
	OnInit:
	Start:
	set $QuestItem1, rand(936,980);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(981,1025);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(1025,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	OnHour24:
	set $QuestItem1, rand(936,980);
	set $QuestItem1HM, rand(1,200);
	set $QuestItem2, rand(981,1025);
	set $QuestItem2HM, rand(1,150);
	set $QuestItem3, rand(1025,1065);
	set $QuestItem3HM, rand(1,50);
	set $DailyQuestToday,0;
	goto Start;
	end;

}

Great script sir, how to make that every 8 hours? i can do that 3 times in a 24 hours cycle?

 

  • 0
Posted

Change 

if(extime+86399 > gettimetick(2))
{
mes "Please wait 24 hours.";
close;
}

To

 

if(extime+28800 > gettimetick(2))
{
mes "Please wait 8 hours.";
close;
}
  • 0
Posted
2 hours ago, Cyro said:

Change 


if(extime+86399 > gettimetick(2))
{
mes "Please wait 24 hours.";
close;
}

To

 


if(extime+28800 > gettimetick(2))
{
mes "Please wait 8 hours.";
close;
}

Thank you sir..

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