HristDead Posted August 20, 2013 Posted August 20, 2013 Hi rAthena, I tried searching for a script like this but couldnt find. What im requesting is when a new player signs in he gets 2 cash point., but only one time per account... to avoid they making 10 characters to get cash points. does someone have a script like that? thanks. Quote
whitesn Posted August 20, 2013 Posted August 20, 2013 http://pastebin.com/0mj475ws Haven't tested it yet Quote
QQfoolsorellina Posted August 20, 2013 Posted August 20, 2013 Here's my method - script abcde -1,{ OnPCLoginEvent: if( BaseExp>0 || BaseLevel>1) end; if(!query_sql("SELECT account_id FROM `global_reg_value` WHERE str='#CASHPOINTS' AND account_id = "+getcharid(3),.@aid)) set #CASHPOINTS,#CASHPOINTS+2; set BaseExp,BaseExp+1; end; } Quote
Capuche Posted August 20, 2013 Posted August 20, 2013 @QQfoolsorellina if the player spends all his cashpoint then log out and make a new character, he still get the cashpoints. Maybe with logincount.. - script swdghfgj -1,{ OnPCLoginEvent: if( BaseExp>0 || BaseLevel>1) end; query_sql "SELECT `logincount` FROM `login` WHERE `account_id` = '"+ getcharid(3) +"'", .@logincount; if( .@logincount > 1 ) end; ... Quote
QQfoolsorellina Posted August 20, 2013 Posted August 20, 2013 @QQfoolsorellina if the player spends all his cashpoint then log out and make a new character, he still get the cashpoints. Maybe with logincount.. - script swdghfgj -1,{ OnPCLoginEvent: if( BaseExp>0 || BaseLevel>1) end; query_sql "SELECT `logincount` FROM `login` WHERE `account_id` = '"+ getcharid(3) +"'", .@logincount; if( .@logincount > 1 ) end; ... nope, my sql query is to check #CASHPOINTS data exist or not , it's not to check the value of #CASHPOINTS Quote
Capuche Posted August 20, 2013 Posted August 20, 2013 Yes but the lines with empty or 0 values in `value` are deleted from global_reg_value if the player spends all his cashpoint then log out then the data is deleted Quote
QQfoolsorellina Posted August 20, 2013 Posted August 20, 2013 Yes but the lines with empty or 0 values in `value` are deleted from global_reg_value if the player spends all his cashpoint then log out then the data is deleted It's not true ,Emulator never delete account var records Even though empty value and logout 1 Quote
Capuche Posted August 22, 2013 Posted August 22, 2013 From my test: I set a new integer variable and log out A new line appear in global_reg_value I set this variable to 0 and log out I can't find the line in global_reg_value anymore don't know if it's related to the emu... maybe it's my phpmyadmin..? Quote
Question
HristDead
Hi rAthena,
I tried searching for a script like this but couldnt find.
What im requesting is when a new player signs in he gets 2 cash point., but only one time per account... to avoid they making 10 characters to get cash points.
does someone have a script like that? thanks.
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.