Jump to content

Daily Points/Token with IP checker


Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   3
  • Joined:  07/12/12
  • Last Seen:  

Here is my Daily Points/Event Token with my own twist to it.

1. There is an IP Checker, It can be redeemed once per IP every 24 hours upon login.

if((getd("$G_LIP_"+@lastIP$)+(60*60*24)) <= @now) {

Change 60*60*24 to the time you want. It is set for 24 hours right now.

2. You can either set it to give an item or points

//getitem 7227,1;
  //set(#pvppoints,#pvppoints+10);

You can change the ID of the item and the amount.

You can also use points if you want, just change the variable and the amount to your liking.

daily.txt

Edited by PokemonRO
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  399
  • Reputation:   198
  • Joined:  11/09/11
  • Last Seen:  

I'm confused:

query_sql("SELECT REPLACE(`last_ip`,'.','_') FROM `login` WHERE `account_id` = "+getcharid(3),@lastIP$);

Wouldn't just

query_sql("SELECT `last_ip` from `login` WHERE `account_id` = "+getcharid(3),@lastIP$);

Be feasible? o.o What's the REPLACE for? o.o I'm not that SQL-savvy, so I'm asking you to educate me! :o)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  63
  • Reputation:   3
  • Joined:  07/12/12
  • Last Seen:  

Oh, yep! your method works too. I just copied and pasted the sql line from another script and did a quick test to see if it worked, never actually looked to see that the replace was there.

Both methods work fine, they will both record in your global reg values and tick properly for that IP.

Edited by PokemonRO
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...