Jump to content
  • 0

cash point for new player but only once per acc?


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

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

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

is that not character-based?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

nice i'll try that thanks! :)

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@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;
	...
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

@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

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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

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

×
×
  • Create New...