Checkmate Posted September 20, 2013 Share Posted September 20, 2013 Hi.. rAthena Community...Is there anyone here or someone can create for me some script or mybe sql... that can detect player birthday or the time of registration date.. TO give them some present of thier birthday?..? Btw... Is there have any coincidence?..?Thanks All ^ ^ Quote Link to comment Share on other sites More sharing options...
Sanasol Posted September 20, 2013 Share Posted September 20, 2013 - script birthday -1,{ OnPCLoginEvent: if(#last_bdyear != gettime(7)) { set @nb, query_sql("select birthdate from `login` where `account_id`='"+getcharid(3)+"'", @bdate$); explode([email protected]$, @bdate$, "-"); set [email protected]$, gettimestr("%m%d",21); if([email protected]$ == ([email protected]$[1]+""[email protected]$[2])) { getitem 7227,1; set #last_bdyear,gettimestr("%Y",21); set @byear, [email protected]$[0]; set [email protected]$, (sex) ? "his":"her"; announce "Hey everyone, "+strcharinfo(0)+" celebrates "[email protected]$+" "+(#[email protected])+" birthday!",bc_blue|bc_all; } } end; } 2 Quote Link to comment Share on other sites More sharing options...
Patskie Posted September 20, 2013 Share Posted September 20, 2013 Didn't try so test this : - script Sample -1,{ OnPCLoginEvent: query_sql "SELECT `DATE_FORMAT(birthdate, '%m')`, `DATE_FORMAT(birthdate, '%d')` FROM `login` WHERE `account_id` = '" +getcharid(3)+ "'", [email protected], [email protected]; if ( ( gettime(6) == [email protected] ) && ( gettime(5) == [email protected] ) ) getitem 502, 10; dispbottom "Happy Birthday " +strcharinfo(0)+ "!"; end; } 1 Quote Link to comment Share on other sites More sharing options...
chowking Posted September 20, 2013 Share Posted September 20, 2013 getitem 7227,1; suggest to use account bound items to prevent new account birthday exploit Quote Link to comment Share on other sites More sharing options...
Sanasol Posted September 20, 2013 Share Posted September 20, 2013 getitem 7227,1; suggest to use account bound items to prevent new account birthday exploit ofc Need check for IP(or something else) or account bound Quote Link to comment Share on other sites More sharing options...
chowking Posted September 20, 2013 Share Posted September 20, 2013 anyway great script thanks Quote Link to comment Share on other sites More sharing options...
Hi.. rAthena Community...
Is there anyone here or someone can create for me some script or mybe sql... that can detect player birthday or the time of registration date.. TO give them some present of thier birthday?..?
Btw... Is there have any coincidence?..?
Thanks All ^ ^
Link to comment
Share on other sites