Jump to content

Stolao's Daily Login Reward [v2.0B]


Stolao

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   4
  • Joined:  04/15/16
  • Last Seen:  

I'm trying to put countdown on Number of mins after logging before collecting prize.

How can I do this?

Edited by maxine02
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

I'm trying to put countdown on Number of mins after logging before collecting prize.

How can I do this?

Replace sleep2 with a countdown.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  58
  • Reputation:   4
  • Joined:  04/15/16
  • Last Seen:  

hmm.

 

 

I'm trying to put countdown on Number of mins after logging before collecting prize.
How can I do this?


Replace sleep2 with a countdown.

 

hmmm. I have this currently

message strcharinfo(0),"You need to be online for "+ .Rest +" minutes to get your reward.";

I want  the  .Rest  which is 180minutes becomes 120minutes after 60minutes of login doing @loginreward 

First login it will say You need to be online for 180 minutes to get your reward.
then after 60mins, using @loginreward will say
You need to be online for 120 minutes to get your reward.
Something like that. sorry if my explanation is not that good.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  31
  • Reputation:   0
  • Joined:  05/13/12
  • Last Seen:  

hello, my problem is every 3rd day consecutive I don't receive anything, but the 4th consecutive, I receive it. What seems to be the problem :( 

Note: nevermind the .Minwait because I did that to check.

//===== EinherjarRO Scripts ================================== 
//= Daily Prize, OnPCLoginEvent
//===== By: ================================================== 
//= Stolao
//===== Current Version: ===================================== 
//= 1.63
//===== Compatible With: ===================================== 
//= rAthena SVN
//===== Description: ========================================= 
//= A reward system for players who play more frequently
//===== Comments: ============================================
//= Maybe Make .MinWait an array mins,days,weeks,months,years;
//===== Additional Comments: =================================
//= For Older See Old Versions
//= 1.51 Changed set .@g formula and move lower into script
//= 1.52 Replace all disbottom -> message
//= 1.53 Changed Format to Include minuets instead of just hours
//= 1.54 Made Time till next rewards display dynamic
//= 1.55 Changed a forgotten  .PointType$ -> getd(.@TT[1])
//= 1.56 changed .@XT -> .@XT$
//= 1.57 Added Atoi where nessisary
//= 1.58 Fixed a swapped .@x and .@x+1
//= 1.59 Serveral Edit Undocumented to fix
//= 1.5A Fixed a logic bug, day 1 skipped
//= 1.5B Fixed a [-1] bug
//= 1.5C Actualy Fixed a logic bug, day 1 skipped
//= 1.5D Added A .Rest Notification
//= 1.5E Moved Sleep2 after the day check
//= 1.5F Added additive logging so a dc wont reset the .Rest Delay
//= 1.60 Added timer break into @at and @afk
//= 1.61 Added '[Daily Rewards]:' to all messages
//= 1.62 Fixed missing "
//= 1.63 Fixed missing )
//===== Contact Info: ========================================
//= [Stolao] 
//= Email: [email protected]
//============================================================
-	script	LOGIN	-1,{
OnWhisperGlobal:
OnLoginCmnd:
OnPCLoginEvent:
	if(.Rest){
		set @login, (gettime(7) * 365 * 24 * 60) + (gettime(8) * 24 * 60) + (gettime(3) * 60) + gettime(2);
		if(@login > #LastDailyReward + .MaxWait ){
			set #logintimer, 0;
			set @login, 0;
		}
		set .@rest, (gettime(7) * 365 * 24 * 60) + (gettime(8) * 24 * 60) + (gettime(3) * 60) + .Rest;
		message strcharinfo(0),"[Daily Rewards]: to collec reward you must remain logged in for "+ ( @login - .@rest ) +" Minuets";
	}
	set .@i, (gettime(7) * 365 * 24 * 60) + (gettime(8) * 24 * 60) + (gettime(3) * 60) + gettime(2);
	if(.@i - .Rest >= (#LastDailyReward + .MinWait)){
		sleep2 100 + ( .Rest * 60000 ) - ( .@i - #logintimer );
		if(.@i < #LastDailyReward + .MaxWait){	set #DRewardCon, #DRewardCon + 1;
		} else {	set #DRewardCon, 0;	}
		set .@g, (#DRewardCon > getarraysize(.Rewards$)) ? (getarraysize(.Rewards$)-1) : #DRewardCon;
		explode(.@XT$,.Rewards$[.@g],"|");
		for(set .@x,0; .@x < getarraysize(.@XT$); set .@x,.@x + 1){
			set .@TT[.@x], atoi(.@XT$[.@x]);
		}
		if(.Mode & 1 && .@TT[4]){	//[Note]: I need to figure out a checkweight for all items tired atm lol, for now ill leave it missing
			for(set .@x,4; .@x < getarraysize(.@TT); set .@x,.@x + 2){	getitembound  .@TT[.@x], .@TT[.@x+1], Bound_Account;	message strcharinfo(0),"[Daily Rewards]: Received "+  .@TT[.@x+1] +" "+ getitemname(.@TT[.@x]);	}
		}
		if(.Mode & 2){
			if(.@TT[0]){	set zeny,zeny + .@TT[0];	message strcharinfo(0),"[Daily Rewards]: Received "+ .@TT[0] +"z";	}
			if(.@TT[1]){	setd getd(.Points$[0]),getd(.Points$[0]) + .@TT[1];	message strcharinfo(0),"[Daily Rewards]: Received "+ .@TT[1] +" "+.Points$[1];	}
		}
		if(.Mode & 4 && (.@TT[3] || .@TT[4])) getexp .@TT[3], .@TT[4];
		if(.Mode & 8){
			for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x + 4){
				if(#DRewardCon % .BuffInfo[.@x + 1] == 0)
					sc_start .BuffInfo[.@x], .BuffInfo[.@x + 2] * 60000, .BuffInfo[.@x + 3];
			}
		}
		message strcharinfo(0),"[Daily Rewards]: You have collected your daily reward, for "+#DRewardCon+" day"+((#DRewardCon > 1)?"s":"")+" in a row.";
		cutin .Pic$[.@g],4;
		set #LastDailyReward, .@i;
		set #logintimer, 0;
		set @login, 0;
	} else {
		set .@days,(#LastDailyReward + .MinWait - .@i)/60/24;
		set .@hours,((#LastDailyReward + .MinWait - .@i)/60)%24;
		set .@mins,(#LastDailyReward + .MinWait - .@i)%60;
		message strcharinfo(0),"[Daily Rewards]: You have "+ ((.@days) ? .@days +":Days " : "") +""+ ((.@hours) ? .@hours +":Hours " : "") +""+ ((.@mins) ? .@mins +":Minute(s) " : "") +"till your next reward";
	}
end;
OnPCLogoutEvent:
	if(@login){
		set .@i, (gettime(7) * 365 * 24 * 60) + (gettime(8) * 24 * 60) + (gettime(3) * 60) + gettime(2);
		set #logintimer, .@i - @login + #logintimer;
		set @login, 0;
	}
return;
end;
OnInit:
	//Basic Settings
	//   1: Item | 2: Points | 4: Exp  
	//   8: Gain Buffs Every X Consecutive Days logged in
	//     (a bit value, e.g. 3 = Items & Points from Multi)
	set .Mode,9;

	//To Enable @ Command '@loginreward' unslash next lines
	// * Needs extra commands for typos
	bindatcmd("dailyrewards"	,"LOGIN::OnLoginCmnd",0,99);

	//Enable Delay if @afk or @autotrade are available to players
	//  remove // to enable certain command checks
	//bindatcmd("at"	,"LOGIN::OnPCLogoutEvent",0,99);
	//bindatcmd("autotrade"	,"LOGIN::OnPCLogoutEvent",0,99);
	//bindatcmd("AT"	,"LOGIN::OnPCLogoutEvent",0,99);
	//bindatcmd("Autotrade"	,"LOGIN::OnPCLogoutEvent",0,99);
	//bindatcmd("afk"	,"LOGIN::OnPCLogoutEvent",0,99);
	//bindatcmd("AFK"	,"LOGIN::OnPCLogoutEvent",0,99);
	

	//Minimum Minuets Between Collecting Daily Reward
	//   Day: 22*60 - 24*60
	//   Week: 10080
	set .MinWait,0;

	//Minuets Before Lose Consecutive Daily Reward
	//   Day: 48*60 - 50*60
	//   Week: 20160
	set .MaxWait,1;

	//Number of mins after logging before collecting prize
	set .Rest,0;

	//Point Type
	//   [0] Points earned
	//   [1] Point name in mes
	setarray .Points$,"#KAFRAPOINTS","K-Points";

	// Consecutive Days Buff
	// Each buff contains 4 variables (32 Total Max)
	// <Type>,<Days>,<Duration>,<Rate>, // Buff 1
	// <Type>,<Days>,<Duration>,<Rate>, // Buff 2
	//   ...;
	//
	//  Example: 188,7,45,3
	//    -Every 7th consecutive day logged in Player gains +3 Str for 45 mins
	//
	//  Type is 188, which references which SC_ to use, SC_INCSTR in this example
	//     -For a full list of SC_ visit the db/const.txt
	//  Days is days buff is applied, in this example 7, so every 7th day, 14,21,28....
	//  Duration is buff duration is Minuits, in this example 45 mins
	//  Rate is buff strength, in this example player gains 3 Str
	setarray .BuffInfo	,260,2,120,1;	// Life Insurance for 60 Mins Every 2nd Day

	// Daily Prize items (max 128 days):
	//   "<Zeny>|<Points>|<BaseExp>|<JobExp>|<itemID-1>|<amount-1>|<itemID-2>|<amount-2>...etc", // Day 1
	//   "<Zeny>|<Points>|<BaseExp>|<JobExp>|<itemID-1>|<amount-1>|<itemID-2>|<amount-2>...etc"  // Day 2
	//   ...;
	// Total length of any days string must be 255 or shorter
	// * If players login longer than the last set
	//   day, they will keep getting the last prize.
	setarray .Rewards$,
		"0|0|0|0|501|1",
		"0|0|0|0|502|1",					
		"0|0|0|0|503|3";			// Day 30: BB

		
	setarray .Pic$,
	"tutorial01", //pic with day1 highlighted
	"tutorial02", //pic with day2 highlighted
	"tutorial03"; //pic with day3 highlighted




end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   9
  • Joined:  06/25/12
  • Last Seen:  

How to exempt players on @autotrade / @afk?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

How to exempt players on @autotrade / @afk?

if(checkidle() > time || checkvending()&2)
Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  108
  • Reputation:   1
  • Joined:  02/10/12
  • Last Seen:  

how can I add reset rewards if it reaches the last day?

-    script    LOGIN    -1,{
OnWhisperGlobal:
OnLoginCmnd:
OnPCLoginEvent:
    sleep2 1000 + .Rest * 60000;
    set .@i, (gettime(7) * 365 * 24 * 60) + (gettime(8) * 24 * 60) + (gettime(3) * 60) +gettime(2);
    if(.@i >= (#LastDailyReward + .MinWait)){
        if(.@i < #LastDailyReward + .MaxWait){    set #DRewardCon, #DRewardCon + 1;
        } else {    set #DRewardCon, 1;    }
        set .@g, (#DRewardCon > getarraysize(.Rewards$)) ? (getarraysize(.Rewards$)-1) : #DRewardCon;
        explode(.@XT$,.Rewards$[.@g],"|");
        for(set .@x,0; .@x < getarraysize(.@XT$); set .@x,.@x + 1){
            set .@TT[.@x], atoi(.@XT$[.@x]);
        }
        if(.Mode & 1 && .@TT[4]){    //[Note]: I need to figure out a checkweight for all items tired atm lol, for now ill leave it missing
            for(set .@x,4; .@x < getarraysize(.@TT); set .@x,.@x + 2){    getitem  .@TT[.@x], .@TT[.@x+1];    message strcharinfo(0),"Received "+  .@TT[.@x+1] +" "+ getitemname(.@TT[.@x]);    }
        }
        if(.Mode & 2){
            if(.@TT[0]){    set zeny,zeny + .@TT[0];    message strcharinfo(0),"Received "+ .@TT[0] +"z";    }
            if(.@TT[1]){    setd getd(.Points$[0]),getd(.Points$[0]) + .@TT[1];    message strcharinfo(0),"Received "+ .@TT[1] +" "+.Points$[1];    }
        }
        if(.Mode & 4 && (.@TT[3] || .@TT[4])) getexp .@TT[3], .@TT[4];
        if(.Mode & 8){
            for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x + 4){
                if(#DRewardCon % .BuffInfo[.@x + 1] == 0)
                    sc_start .BuffInfo[.@x], .BuffInfo[.@x + 2] * 60000, .BuffInfo[.@x + 3];
            }
        }
        dispbottom "You have collected your daily reward, for "+#DRewardCon+" day"+((#DRewardCon > 1)?"s":"")+" in a row.";
        //===============Display of pic's with day highlighted.=======================
        cutin .Pic$[.@g],4;
        //============================================================================
        set #LastDailyReward, .@i;
        
    } else {
        set .@days,(#LastDailyReward + .MinWait - .@i)/60/24;
        set .@hours,((#LastDailyReward + .MinWait - .@i)/60)%24;
        set .@mins,(#LastDailyReward + .MinWait - .@i)%60;
        dispbottom "You have "+ ((.@days) ? .@days +": Days " : "") +""+ ((.@hours) ? .@hours +": Hours " : "") +""+ ((.@mins) ? .@mins +": Minutes " : "") +"till your next reward.";
    }
end;
OnInit:
    //Basic Settings
    //   1: Item | 2: Points | 4: Exp  
    //   8: Gain Buffs Every X Consecutive Days logged in
    // (a bit value, e.g. 3 = Items & Points from Multi)
    set .Mode,1 + 2 + 4;

    //To Enable @ Command '@loginreward' unslash next lines
    // * Needs extra commands for typos
    bindatcmd("relog"    ,"LOGIN::OnLoginCmnd",0,99);

    //Minimum Minutes Between Collecting Daily Reward
    //   Day: 22*60 - 24*60
    //   Week: 10080
    set .MinWait,1440;

    //Minutes Before Lose Consecutive Daily Reward
    //   Day: 48*60 - 50*60
    //   Week: 20160
    set .MaxWait,3000;

    //Number of mins after logging before collecting prize
    set .Rest,0;

    //Point Type
    //   [0] Points earned
    //   [1] Point name in mes
    setarray .Points$,"#KAFRAPOINTS","K-Points";

    // Consecutive Days Buff
    // Each buff contains 4 variables (32 Total Max)
    // <Type>,<Days>,<Duration>,<Rate>, // Buff 1
    // <Type>,<Days>,<Duration>,<Rate>, // Buff 2
    //   ...;
    //
    //  Example: 188,7,45,3
    //    -Every 7th consecutive day logged in Player gains +3 Str for 45 mins
    //
    //  Type is 188, which references which SC_ to use, SC_INCSTR in this example
    //     -For a full list of SC_ visit the db/const.txt
    //  Days is days buff is applied, in this example 7, so every 7th day, 14,21,28....
    //  Duration is buff duration is Minuits, in this example 45 mins
    //  Rate is buff strength, in this example player gains 3 Str
    setarray .BuffInfo    ,260,2,360,1    // Life Insurance for 360 Mins Every 2nd Day
                ,198,3,120,10    // +10% Hp for 120 Mins Every 3th Day
                ,196,5,120,25    // +25 Flee for 120 Mins Every 5th Day
                ,257,7,240,50;    // +50% Exp for 240 Mins Every 7th Day

    // Daily Prize items (max 128 days):
    //   "<Zeny>|<Points>|<BaseExp>|<JobExp>|<itemID-1>|<amount-1>|<itemID-2>|<amount-2>...etc", // Day 1
    //   "<Zeny>|<Points>|<BaseExp>|<JobExp>|<itemID-1>|<amount-1>|<itemID-2>|<amount-2>...etc"  // Day 2
    //   ...;
    // Total length of any days string must be 255 or shorter
    // * If players login longer than the last set
    //   day, they will keep getting the last prize.
    setarray .Rewards$,
        "100",                    // Day 0: 100 Zeny
        "100000|0|0|0",           // Day 1: 100000 Zeny
        "0|0|0|0|12210|2",        // Day 2: 2 Bubble Gum
        "0|0|0|0|14003|2",        // Day 3: 2 Elite Siege Supply Box
        "0|0|0|0|0|0",            // Day 4: 5 Event Ticket
        "0|0|0|0|0|0",            // Day 5:  
        "0|0|0|0|0|0",            // Day 6:
        "0|0|0|0|0|0",            // Day 7:
        "0|0|0|0|0|0",            // Day 8:
        "0|0|0|0|0|0",            // Day 9:
        "0|0|0|0|0|0",            // Day 10:
        "0|0|0|0|0|0",            // Day 11:
        "0|0|0|0|0|0",            // Day 12:
        "0|0|0|0|0|0",            // Day 13:
        "0|0|0|0|0|0",            // Day 14:
        "0|0|0|0|0|0",            // Day 15:
        "0|0|0|0|0|0",            // Day 16:
        "0|0|0|0|0|0",            // Day 17:
        "0|0|0|0|0|0",            // Day 18:
        "0|0|0|0|0|0",            // Day 19:
        "0|0|0|0|0|0",            // Day 20:
        "0|0|0|0|0|0",            // Day 21:
        "0|0|0|0|0|0",            // Day 22:
        "0|0|0|0|0|0",            // Day 23:
        "0|0|0|0|0|0",            // Day 24:
        "0|0|0|0|0|0",            // Day 25:
        "0|0|0|0|0|0",            // Day 26:
        "0|0|0|0|0|0",            // Day 27:
        "0|0|0|0|0|0",            // Day 28:
        "0|0|0|0|0|0",            // Day 29:
        "0|0|0|0|0|0";            // Day 30:    
        
    setarray .Pic$,
    "day00", //pic with day0 highlighted
    "day01", //pic with day1 highlighted
    "day02", //pic with day2 highlighted
    "day03",
    "day04",
    "day05",
    "day06",
    "day07",
    "day08",
    "day09",
    "day10",
    "day11",
    "day12",
    "day13",
    "day14",
    "day15",
    "day16",
    "day17",
    "day18",
    "day19",
    "day20",
    "day21",
    "day22",
    "day23",
    "day24",
    "day25",
    "day26",
    "day27",
    "day28",
    "day29",
    "day30";
end;
}
Edited by blakbord
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

 

how can I add reset rewards if it reaches the last day?

-    script    LOGIN    -1,{
OnWhisperGlobal:
OnLoginCmnd:
OnPCLoginEvent:
    sleep2 1000 + .Rest * 60000;
    set .@i, (gettime(7) * 365 * 24 * 60) + (gettime(8) * 24 * 60) + (gettime(3) * 60) +gettime(2);
    if(.@i >= (#LastDailyReward + .MinWait)){
        if(.@i < #LastDailyReward + .MaxWait){    set #DRewardCon, #DRewardCon + 1;
        } else {    set #DRewardCon, 1;    }
        set .@g, (#DRewardCon > getarraysize(.Rewards$)) ? (getarraysize(.Rewards$)-1) : #DRewardCon;
        explode(.@XT$,.Rewards$[.@g],"|");
        for(set .@x,0; .@x < getarraysize(.@XT$); set .@x,.@x + 1){
            set .@TT[.@x], atoi(.@XT$[.@x]);
        }
        if(.Mode & 1 && .@TT[4]){    //[Note]: I need to figure out a checkweight for all items tired atm lol, for now ill leave it missing
            for(set .@x,4; .@x < getarraysize(.@TT); set .@x,.@x + 2){    getitem  .@TT[.@x], .@TT[.@x+1];    message strcharinfo(0),"Received "+  .@TT[.@x+1] +" "+ getitemname(.@TT[.@x]);    }
        }
        if(.Mode & 2){
            if(.@TT[0]){    set zeny,zeny + .@TT[0];    message strcharinfo(0),"Received "+ .@TT[0] +"z";    }
            if(.@TT[1]){    setd getd(.Points$[0]),getd(.Points$[0]) + .@TT[1];    message strcharinfo(0),"Received "+ .@TT[1] +" "+.Points$[1];    }
        }
        if(.Mode & 4 && (.@TT[3] || .@TT[4])) getexp .@TT[3], .@TT[4];
        if(.Mode & 8){
            for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x + 4){
                if(#DRewardCon % .BuffInfo[.@x + 1] == 0)
                    sc_start .BuffInfo[.@x], .BuffInfo[.@x + 2] * 60000, .BuffInfo[.@x + 3];
            }
        }
        dispbottom "You have collected your daily reward, for "+#DRewardCon+" day"+((#DRewardCon > 1)?"s":"")+" in a row.";
        //===============Display of pic's with day highlighted.=======================
        cutin .Pic$[.@g],4;
        //============================================================================
        set #LastDailyReward, .@i;
        
    } else {
        set .@days,(#LastDailyReward + .MinWait - .@i)/60/24;
        set .@hours,((#LastDailyReward + .MinWait - .@i)/60)%24;
        set .@mins,(#LastDailyReward + .MinWait - .@i)%60;
        dispbottom "You have "+ ((.@days) ? .@days +": Days " : "") +""+ ((.@hours) ? .@hours +": Hours " : "") +""+ ((.@mins) ? .@mins +": Minutes " : "") +"till your next reward.";
    }
end;
OnInit:
    //Basic Settings
    //   1: Item | 2: Points | 4: Exp  
    //   8: Gain Buffs Every X Consecutive Days logged in
    // (a bit value, e.g. 3 = Items & Points from Multi)
    set .Mode,1 + 2 + 4;

    //To Enable @ Command '@loginreward' unslash next lines
    // * Needs extra commands for typos
    bindatcmd("relog"    ,"LOGIN::OnLoginCmnd",0,99);

    //Minimum Minutes Between Collecting Daily Reward
    //   Day: 22*60 - 24*60
    //   Week: 10080
    set .MinWait,1440;

    //Minutes Before Lose Consecutive Daily Reward
    //   Day: 48*60 - 50*60
    //   Week: 20160
    set .MaxWait,3000;

    //Number of mins after logging before collecting prize
    set .Rest,0;

    //Point Type
    //   [0] Points earned
    //   [1] Point name in mes
    setarray .Points$,"#KAFRAPOINTS","K-Points";

    // Consecutive Days Buff
    // Each buff contains 4 variables (32 Total Max)
    // <Type>,<Days>,<Duration>,<Rate>, // Buff 1
    // <Type>,<Days>,<Duration>,<Rate>, // Buff 2
    //   ...;
    //
    //  Example: 188,7,45,3
    //    -Every 7th consecutive day logged in Player gains +3 Str for 45 mins
    //
    //  Type is 188, which references which SC_ to use, SC_INCSTR in this example
    //     -For a full list of SC_ visit the db/const.txt
    //  Days is days buff is applied, in this example 7, so every 7th day, 14,21,28....
    //  Duration is buff duration is Minuits, in this example 45 mins
    //  Rate is buff strength, in this example player gains 3 Str
    setarray .BuffInfo    ,260,2,360,1    // Life Insurance for 360 Mins Every 2nd Day
                ,198,3,120,10    // +10% Hp for 120 Mins Every 3th Day
                ,196,5,120,25    // +25 Flee for 120 Mins Every 5th Day
                ,257,7,240,50;    // +50% Exp for 240 Mins Every 7th Day

    // Daily Prize items (max 128 days):
    //   "<Zeny>|<Points>|<BaseExp>|<JobExp>|<itemID-1>|<amount-1>|<itemID-2>|<amount-2>...etc", // Day 1
    //   "<Zeny>|<Points>|<BaseExp>|<JobExp>|<itemID-1>|<amount-1>|<itemID-2>|<amount-2>...etc"  // Day 2
    //   ...;
    // Total length of any days string must be 255 or shorter
    // * If players login longer than the last set
    //   day, they will keep getting the last prize.
    setarray .Rewards$,
        "100",                    // Day 0: 100 Zeny
        "100000|0|0|0",           // Day 1: 100000 Zeny
        "0|0|0|0|12210|2",        // Day 2: 2 Bubble Gum
        "0|0|0|0|14003|2",        // Day 3: 2 Elite Siege Supply Box
        "0|0|0|0|0|0",            // Day 4: 5 Event Ticket
        "0|0|0|0|0|0",            // Day 5:  
        "0|0|0|0|0|0",            // Day 6:
        "0|0|0|0|0|0",            // Day 7:
        "0|0|0|0|0|0",            // Day 8:
        "0|0|0|0|0|0",            // Day 9:
        "0|0|0|0|0|0",            // Day 10:
        "0|0|0|0|0|0",            // Day 11:
        "0|0|0|0|0|0",            // Day 12:
        "0|0|0|0|0|0",            // Day 13:
        "0|0|0|0|0|0",            // Day 14:
        "0|0|0|0|0|0",            // Day 15:
        "0|0|0|0|0|0",            // Day 16:
        "0|0|0|0|0|0",            // Day 17:
        "0|0|0|0|0|0",            // Day 18:
        "0|0|0|0|0|0",            // Day 19:
        "0|0|0|0|0|0",            // Day 20:
        "0|0|0|0|0|0",            // Day 21:
        "0|0|0|0|0|0",            // Day 22:
        "0|0|0|0|0|0",            // Day 23:
        "0|0|0|0|0|0",            // Day 24:
        "0|0|0|0|0|0",            // Day 25:
        "0|0|0|0|0|0",            // Day 26:
        "0|0|0|0|0|0",            // Day 27:
        "0|0|0|0|0|0",            // Day 28:
        "0|0|0|0|0|0",            // Day 29:
        "0|0|0|0|0|0";            // Day 30:    
        
    setarray .Pic$,
    "day00", //pic with day0 highlighted
    "day01", //pic with day1 highlighted
    "day02", //pic with day2 highlighted
    "day03",
    "day04",
    "day05",
    "day06",
    "day07",
    "day08",
    "day09",
    "day10",
    "day11",
    "day12",
    "day13",
    "day14",
    "day15",
    "day16",
    "day17",
    "day18",
    "day19",
    "day20",
    "day21",
    "day22",
    "day23",
    "day24",
    "day25",
    "day26",
    "day27",
    "day28",
    "day29",
    "day30";
end;
}

try using latest, https://github.com/Stolao/Npc_Release/blob/master/Daily_Reward/DailyReward.txt

 

and

	// Reset
	//   [0] Repeat last day
	//   [1] reset when reach end of days
	.Reset = 1;
Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  115
  • Reputation:   4
  • Joined:  08/14/16
  • Last Seen:  

@stolao I am using your latest release but it seems there is still the problem of skipping day 1 to day 2. Any pointers on how can I fix the issue? Or you will release an updated one? Please help! Thank you

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

@stolao I am using your latest release but it seems there is still the problem of skipping day 1 to day 2. Any pointers on how can I fix the issue? Or you will release an updated one? Please help! Thank you

it was a visual bug in the display message and the cutin, items were correct, fixed in 1.77 and 1.78 respectively 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.02
  • Content Count:  173
  • Reputation:   3
  • Joined:  09/04/16
  • Last Seen:  

Yey! It was awesome! Great work! Thanks for the script! :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   1
  • Joined:  09/10/16
  • Last Seen:  

Sir, may I ask a few things? 

	// To disable the command '@loginreward' comment the next lines
	// * Needs extra commands for typos
	bindatcmd("relog"	,"LOGIN::OnLoginCmnd",0,99);

^ How do I add this command?

 

And how do I set it to instant get login rewards once logged in? But ofc after claiming the rewards, players still need to wait another 24hours to get the next rewards.

Edited by lionellex
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

request: master stolao, can you please add a feature when using @relog command the cutin will appear and also, for those players using @at command they will not receive rewards. thanks in advance!

Edited by NANORAY
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Sir, may I ask a few things? 

	// To disable the command '@loginreward' comment the next lines
	// * Needs extra commands for typos
	bindatcmd("relog"	,"LOGIN::OnLoginCmnd",0,99);

^ How do I add this command?

 

And how do I set it to instant get login rewards once logged in? But ofc after claiming the rewards, players still need to wait another 24hours to get the next rewards.

 

Its enabled by default

 

and assuming you don't increase the 

	// Number of mins after logging before collecting prize
	.Rest = 0;

it will be instant

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   1
  • Joined:  09/10/16
  • Last Seen:  

 

Sir, may I ask a few things? 

	// To disable the command '@loginreward' comment the next lines
	// * Needs extra commands for typos
	bindatcmd("relog"	,"LOGIN::OnLoginCmnd",0,99);

^ How do I add this command?

 

And how do I set it to instant get login rewards once logged in? But ofc after claiming the rewards, players still need to wait another 24hours to get the next rewards.

 

Its enabled by default

 

and assuming you don't increase the 

	// Number of mins after logging before collecting prize
	.Rest = 0;

it will be instant

 

 

Hi sir, 2 more questions. Let's say I want to let the players get their rewards during 10am - 12pm and loosing them after 24h - 30h.

	// Minimum minutes between collecting daily reward
	//   Day: 10*60 - 12*60
	//   Week: 10080
	.MinWait = 1320;

	// Minutes before losing the consecutive reward
	//   Day: 24*60 - 30*60
	//   Week: 20160
	.MaxWait = 3000; 

Did I set them right?

Edited by lionellex
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

request: master stolao, can you please add a feature when using @relog command the cutin will appear and also, for those players using @at command they will not receive rewards. thanks in advance!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

request: master stolao, can you please add a feature when using @relog command the cutin will appear and also, for those players using @at command they will not receive rewards. thanks in advance!

Cutins do appear when using @relog, and I sobt understand what you mean about auto trade, can you reword?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

 

request: master stolao, can you please add a feature when using @relog command the cutin will appear and also, for those players using @at command they will not receive rewards. thanks in advance!

Cutins do appear when using @relog, and I sobt understand what you mean about auto trade, can you reword?

 

im using latest rev but when i use @relog cutins don't appear. im using rest = 60 and show cutin. about the @at, for those using @at (auto trade) i dont want them to get the rewards.

auto trade: those merchant continue vending.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

just tested and @relog shows cutins when rewards are available,

 

as for autotrade

after
 

		sleep2 1000 + .Rest * 60000;

add
 

		if(checkvending()&2){
			message strcharinfo(0),"[Daily Rewards]: Venders cannot recive rewards.";
			end;
		}

 

 

request: master stolao, can you please add a feature when using @relog command the cutin will appear and also, for those players using @at command they will not receive rewards. thanks in advance!


Cutins do appear when using @relog, and I sobt understand what you mean about auto trade, can you reword?

 

im using latest rev but when i use @relog cutins don't appear. im using rest = 60 and show cutin. about the @at, for those using @at (auto trade) i dont want them to get the rewards.


auto trade: those merchant continue vending.

 

 

actually did an update to my git adding this option

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   1
  • Joined:  09/10/16
  • Last Seen:  

@stolao sir, I'm having this error.

 

2955kxs.png

 

How do I fix this?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

@stolao sir, I'm having this error.

 

2955kxs.png

 

How do I fix this?

show me whole conf, but guessing you have a missing ; after buffinfo

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  60
  • Reputation:   1
  • Joined:  09/10/16
  • Last Seen:  

@stolao, yup i forgot to ; on buffinfo..its okay now thanks for replying.

Edited by lionellex
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Updated Post

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  192
  • Reputation:   9
  • Joined:  05/08/13
  • Last Seen:  

Thanks

 

Edited by Isaiah
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Updated Post

Is it possible to create an npc instead or a command to claim the reward, instead of automatically receiving it? Thus to prevent players from just leaving their client on with no activity?

Yes it would be quite easy to do, give it a try :)
Link to comment
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
Reply to this topic...

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

×
×
  • Create New...