Jump to content
  • 0

Daily Reward with IP checker


McNeri

Question


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   2
  • Joined:  01/24/12
  • Last Seen:  

I used this but no IP checker, help me guys:(

//====================== rAthena Script ===============================================================
//=== Made by Rikimaru
//=== Topic Link : http://rathena.org/board/topic/58004-request-daily-reward-npc-script/
//==================== Information ====================================================================
//==== Daily Reward Script
//================= Version : =========================================================================
//=== V 1.1   Fixed a typo in the Script [ Rikimaru ]
//=== V 1.0   Finished Scripting the Daily Reward Script [ Rikimaru ]
//============== Credits : ============================================================================
//=== Credits to Rikimaru for the Daily Reward Script
//=== rAthena Profile Link : http://rathena.org/board/user/434-rikimaru/
//=====================================================================================================
//*************************************************************************
prontera,146,158,5 script Daily Reward 911,{
//=========================== Settings ================================================================
set .@rewname$,"[ Daily Reward ]";
set .rewardid,607;
set @rewardamount,10;
//======================= Settings End ================================================================
//*****************************************************************************************************
if(gettimetick(2) - lastTimeTalked > (60 * 60 * 24)) {
mes .@rewname$;
mes "Hello "+strcharinfo(0)+",I";
mes "am here to give you a daily";
mes "Reward. Do you want to have it?";
next;
switch(select("-Yes,sure!:-No,bye!:-Cancel")) {
case 1:
mes .@rewname$;
mes "Okay going to give you the item!";
next;
mes .@rewname$;
getitem .rewardid,@rewardamount;
mes "Okay have fun with it!";
set lastTimeTalked,gettimetick(2);
close;
case 2:
mes .@rewname$;
mes "Okay goodbye!";
close;
case 3:
close;
}
}
mes .@rewname$;
mes "Sorry you can get the";
mes "Reward again after ";
mes "24 Hours are over!";
close;
}

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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

try this

prontera,146,158,5 script Daily Reward 911,{
//=========================== Settings ================================================================
set .@rewname$,"[ Daily Reward ]";
set .rewardid,607;
set @rewardamount,10;
//======================= Settings End ================================================================
//*****************************************************************************************************
query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", @LastIp$);
if( (gettimetick(2) - lastTimeTalked > 86400)&&(gettimetick(2) - getd(@LastIp$) > 86400)) {
mes .@rewname$;
mes "Hello "+strcharinfo(0)+",I";
mes "am here to give you a daily";
mes "Reward. Do you want to have it?";
next;
switch(select("-Yes,sure!:-No,bye!:-Cancel")) {
case 1:
mes .@rewname$;
mes "Okay going to give you the item!";
next;
mes .@rewname$;
getitem .rewardid,@rewardamount;
mes "Okay have fun with it!";
set lastTimeTalked,gettimetick(2);
setd(@LastIp$,gettimetick(2));
close;
case 2:
mes .@rewname$;
mes "Okay goodbye!";
close;
case 3:
close;
}
}
mes .@rewname$;
mes "Sorry you can get the";
mes "Reward again after ";
mes "24 Hours are over!";
close;
}

Edited by QQfoolsorellina
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   2
  • Joined:  01/24/12
  • Last Seen:  

thanks sir

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

@LastIp$

are you sure with this variable ?

a variable with "@" as prefix will be removed upon relog / logout ...

i think a proper way should be look like this..

create a new SQL table , update the IP Address into the table..

and NPC will refer to this table before giving away the items..

or ..

just make the item untradeable + permanent account variable...

just to inform you that players are able to change the IP at anytime they want if they know how....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  90
  • Reputation:   5
  • Joined:  06/17/12
  • Last Seen:  

How about Account Bound only? To avoid creating new chars with the same account?

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