Jump to content
  • 0

cash point for new player but only once per acc?


Question

Posted

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

Posted

Here's my method :P

-    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;
}
Posted

@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;
	...
Posted

@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

Posted

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

Posted

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

  • Upvote 1
Posted

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

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