Jump to content
  • 0
MikZ

LOGIN REWARD VIA LAST MAC

Question

I already post this request when I found out someone someone already requested with same script.
Wanted to know how to change to last_mac.

prontera,155,180,5	script	Reward NPC	4_F_FAIRYKID4,{
//	$ip_reward_daytime = 0;
	mes "["+ strnpcinfo(NPC_NAME) +"]";
	if ( $ip_reward_daytime != atoi( gettimestr("%Y%m%d", 20 ) ) ) {
		$ip_reward_daytime = atoi( gettimestr("%Y%m%d", 20 ) );
		deletearray $ip_reward$;
	}
	.@size = getarraysize( $ip_reward$ );
	while ( getcharip() != $ip_reward$[.@i] && .@i < .@size ) { ++.@i; }
	if ( .@i < .@size ) {
		mes "You have claimed the reward with this IP address.";
		close;
	}
	if ( @ip_reward && @ip_reward + .countdown <= gettimetick(2) ) {
		mes "Here is the surprise reward";
		getitem Poring_Coin, 1;
		$ip_reward$[ getarraysize( $ip_reward$ ) ] = getcharip();
		close;
	}
	if ( @ip_reward ) {
		mes "Countdown timer...";
		.@timeleft = @ip_reward + .countdown - gettimetick(2);
		mes .@timeleft /3600 +" hour "+ .@timeleft %3600/60 +" min "+ .@timeleft %60 +" sec left";
		close;
	}
	mes "Hello "+ strcharinfo(PC_NAME) +", I am here to give you a daily Surprise Reward. Do you want to have it?";
	next;
	select "Yes, sure !!";
	mes "["+ strnpcinfo(NPC_NAME) +"]";
	mes "You can claim the reward in 5 hours time.";
	close2;
	addtimer .countdown *1000, strnpcinfo(NPC_NAME) +"::OnClaimReward";
	@ip_reward = gettimetick(2);
	end;
OnClaimReward:
	dispbottom "You can claim Daily Login Reward now.";
	end;
OnInit:
	.countdown = 5*60*60; // 5 hours
//	.countdown = 5;
}

 

Edited by MikZ

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0
On 5/24/2018 at 10:55 PM, AnnieRuru said:

@Begin


prontera,155,180,5	script	Reward NPC	4_F_FAIRYKID4,{
//	$ip_reward_daytime = 0;
	mes "["+ strnpcinfo(NPC_NAME) +"]";
	if ( $ip_reward_daytime != atoi( gettimestr("%Y%m%d", 20 ) ) ) {
		$ip_reward_daytime = atoi( gettimestr("%Y%m%d", 20 ) );
		deletearray $ip_reward$;
	}
	.@size = getarraysize( $ip_reward$ );
	while ( getcharip() != $ip_reward$[.@i] && .@i < .@size ) { ++.@i; }
	if ( .@i < .@size ) {
		mes "You have claimed the reward with this IP address.";
		close;
	}
	if ( @ip_reward && @ip_reward + .countdown <= gettimetick(2) ) {
		mes "Here is the surprise reward";
		getitem Poring_Coin, 1;
		$ip_reward$[ getarraysize( $ip_reward$ ) ] = getcharip();
		close;
	}
	if ( @ip_reward ) {
		mes "Countdown timer...";
		.@timeleft = @ip_reward + .countdown - gettimetick(2);
		mes .@timeleft /3600 +" hour "+ .@timeleft %3600/60 +" min "+ .@timeleft %60 +" sec left";
		close;
	}
	mes "Hello "+ strcharinfo(PC_NAME) +", I am here to give you a daily Surprise Reward. Do you want to have it?";
	next;
	select "Yes, sure !!";
	mes "["+ strnpcinfo(NPC_NAME) +"]";
	mes "You can claim the reward in 5 hours time.";
	close2;
	addtimer .countdown *1000, strnpcinfo(NPC_NAME) +"::OnClaimReward";
	@ip_reward = gettimetick(2);
	end;
OnClaimReward:
	dispbottom "You can claim Daily Login Reward now.";
	end;
OnInit:
	.countdown = 5*60*60; // 5 hours
//	.countdown = 5;
}

@AnnieRuru how can i change getcharip() to last_mac or last_unique_id?

Share this post


Link to post
Share on other sites
  • 0

IP addresses and mac addresses do not uniquely identify people. Most home internet users have dynamic IP addresses assigned by their ISP, so it changes over time, and some ISPs even assign a different one every single time the router is rebooted (ie: Orange). Even with a static IP, nothing prevents anyone from using a VPN, tor, or any other anonymity tool. IP addresses may also be shared: some schools, dormitories, and organizations have a single address for every single computer on its network, so you could end up mistaking hundreds of people as the same person. Some computers themselves are also shared (ie: with coworkers, family members, friends, …). As for mac addresses, they can very easily be spoofed, and one could even make a script to change their mac address every minute if they wanted to... so yeah, that's a bad idea too.

If this still does not discourage you from using mac addresses, feel free to add this "feature" to Hercules: https://github.com/HerculesWS/Hercules/issues/1734

 

There's really no silver bullet to really be sure of the identity of someone, but one of the approaches that kinda works is to make abuse costly on abusers, while not imposing a huge burden on non-abusers. What works best is doing a physical verification instead of a digital one when someone creates an account. For example, most social media platforms now ask you to provide and validate a phone number. This means if someone were to bypass this verification they would have to have more than one phone. Some sites, such as Paypal, go even further ask you for your credit card number (or bank account number) and then do a transaction on it (usually $1), to see if the card is valid. This means you would have to have more than one credit card if you want to bypass this verification, which implies physically going to your bank, making an appointment, and opening a new account. Some (such as Google) prefer to snail mail you an envelope containing a code, which you then have to enter on their website. To abuse this you would need more than one street address. Keep in mind that this only makes it harder on would-be abusers and that nothing can 100% fingerprint someone. Even DNA profiling isn't perfect.

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, meko said:

IP addresses and mac addresses do not uniquely identify people. Most home internet users have dynamic IP addresses assigned by their ISP, so it changes over time, and some ISPs even assign a different one every single time the router is rebooted (ie: Orange). Even with a static IP, nothing prevents anyone from using a VPN, tor, or any other anonymity tool. IP addresses may also be shared: some schools, dormitories, and organizations have a single address for every single computer on its network, so you could end up mistaking hundreds of people as the same person. Some computers themselves are also shared (ie: with coworkers, family members, friends, …). As for mac addresses, they can very easily be spoofed, and one could even make a script to change their mac address every minute if they wanted to... so yeah, that's a bad idea too.

If this still does not discourage you from using mac addresses, feel free to add this "feature" to Hercules: https://github.com/HerculesWS/Hercules/issues/1734

 

There's really no silver bullet to really be sure of the identity of someone, but one of the approaches that kinda works is to make abuse costly on abusers, while not imposing a huge burden on non-abusers. What works best is doing a physical verification instead of a digital one when someone creates an account. For example, most social media platforms now ask you to provide and validate a phone number. This means if someone were to bypass this verification they would have to have more than one phone. Some sites, such as Paypal, go even further ask you for your credit card number (or bank account number) and then do a transaction on it (usually $1), to see if the card is valid. This means you would have to have more than one credit card if you want to bypass this verification, which implies physically going to your bank, making an appointment, and opening a new account. Some (such as Google) prefer to snail mail you an envelope containing a code, which you then have to enter on their website. To abuse this you would need more than one street address. Keep in mind that this only makes it harder on would-be abusers and that nothing can 100% fingerprint someone. Even DNA profiling isn't perfect.

Thank you for this @meko. I am planning to buy gepard. How about gepard last_unique_id is it changeable?
May I know how to change the script from last_ip to last_unique_id? thanks!

Share this post


Link to post
Share on other sites
  • 0

the script you posted made by me ...
sorry as I don't own Gepard, I don't know how it works so I couldn't make this system for you

and what meko said was spot on,
just reminded the IP address detection method on this script can just bypass by restarting the modem

the mac address system though ...
sry maybe I was out from RO scene too long ?
2 years ago I heard that mac address is something that is only possible by adding a 3rd party program running in the background ...

and this makes me assume that Gepard is also something 3rd party program ... stuffs

Share this post


Link to post
Share on other sites
  • 2
21 hours ago, AnnieRuru said:

the script you posted made by me ...
sorry as I don't own Gepard, I don't know how it works so I couldn't make this system for you

and what meko said was spot on,
just reminded the IP address detection method on this script can just bypass by restarting the modem

the mac address system though ...
sry maybe I was out from RO scene too long ?
2 years ago I heard that mac address is something that is only possible by adding a 3rd party program running in the background ...

and this makes me assume that Gepard is also something 3rd party program ... stuffs

@AnnieRuru its okay. 

I somehow just edit it with the common query command and change the ip to unique_id. Somehow it worked fine for daily login.
Wonder if you have any suggestion or tips to improve this. I don't kinda understand the script cuz im noob. but that this mean every 00:00 server time you will be able to get coin or 24hr from last talked to the npc?

prontera,164,173,5	script	Daily Login	4_F_FAIRYKID4,{
//	$ip_reward_daytime = 0;
	query_sql("SELECT `last_unique_id` from `login` WHERE `account_id` = "+getcharid(3),@lui$);

	mes "["+ strnpcinfo(NPC_NAME) +"]";
	if ( $ip_reward_daytime != atoi( gettimestr("%Y%m%d", 20 ) ) ) {
		$ip_reward_daytime = atoi( gettimestr("%Y%m%d", 20 ) );
		deletearray $ip_reward$;
	}
	.@size = getarraysize( $ip_reward$ );
	while ( @lui$ != $ip_reward$[.@i] && .@i < .@size ) { ++.@i; }
	if ( .@i < .@size ) {
		mes "You have claimed the reward.";
		close;
	}
	if ( @ip_reward && @ip_reward + .countdown <= gettimetick(2) ) {
		mes "Here is the surprise reward";
		getitem 25045, 1;
		$ip_reward$[ getarraysize( $ip_reward$ ) ] = @lui$;
		close;
	}
	if ( @ip_reward ) {
		mes "Countdown timer...";
		.@timeleft = @ip_reward + .countdown - gettimetick(2);
		mes .@timeleft /3600 +" hour "+ .@timeleft %3600/60 +" min "+ .@timeleft %60 +" sec left";
		close;
	}
	mes "Hello "+ strcharinfo(PC_NAME) +", I am here to give you a daily Surprise Reward. Do you want to have it?";
	next;
	select "Yes, sure !!";
	mes "["+ strnpcinfo(NPC_NAME) +"]";
	mes "You can claim the reward after an hour.";
	close2;
	addtimer .countdown *1000, strnpcinfo(NPC_NAME) +"::OnClaimReward";
	@ip_reward = gettimetick(2);
	end;
OnClaimReward:
	dispbottom "You can claim Daily Login Reward now.";
	end;
OnInit:
	.countdown = 1*60*60; // 5 hours
//	.countdown = 5;
}

 

Share this post


Link to post
Share on other sites
  • 0

yup you did correct

Spoiler

prontera,164,173,5	script	Daily Login	4_F_FAIRYKID4,{
//	$uid_reward_daytime = 0;
	query_sql "SELECT `last_unique_id` FROM `login` WHERE `account_id` = "+getcharid(3), .@lui$;
	mes "["+ strnpcinfo(NPC_NAME) +"]";
	if ( $uid_reward_daytime != atoi( gettimestr("%Y%m%d", 20 ) ) ) {
		$uid_reward_daytime = atoi( gettimestr("%Y%m%d", 20 ) );
		deletearray $uid_reward$;
	}
	.@size = getarraysize( $uid_reward$ );
	while ( .@lui$ != $uid_reward$[.@i] && .@i < .@size ) { ++.@i; }
	if ( .@i < .@size ) {
		mes "You have claimed the reward.";
		close;
	}
	if ( @uid_reward_time && @uid_reward_time + .countdown <= gettimetick(2) ) {
		mes "Here is the surprise reward";
		getitem 25045, 1;
		$uid_reward$[ getarraysize( $uid_reward$ ) ] = .@lui$;
		close;
	}
	if ( @uid_reward_time ) {
		mes "Countdown timer...";
		.@timeleft = @uid_reward_time + .countdown - gettimetick(2);
		mes .@timeleft /3600 +" hour "+ .@timeleft %3600/60 +" min "+ .@timeleft %60 +" sec left";
		close;
	}
	mes "Hello "+ strcharinfo(PC_NAME) +", I am here to give you a daily Surprise Reward. Do you want to have it?";
	next;
	select "Yes, sure !!";
	mes "["+ strnpcinfo(NPC_NAME) +"]";
	mes "You can claim the reward after an hour.";
	close2;
	addtimer .countdown *1000, strnpcinfo(NPC_NAME) +"::OnClaimReward";
	@uid_reward_time = gettimetick(2);
	end;
OnClaimReward:
	dispbottom "You can claim Daily Login Reward now.";
	end;
OnInit:
	.countdown = 1*60*60; // 1 hour
}

just rename the variable, its important to use the correct variable name to make the script easier to read
but otherwise your script will also works

33 minutes ago, MikZ said:

that this mean every 00:00 server time you will be able to get coin or 24hr from last talked to the npc?

every 00:00 server time

and if let's say you start at 11:59pm Wednesday, and claim the reward on the Thursday at 1am, then you can't claim reward anymore on Thursday

I actually had experienced this system in some chinese mobile games app ...
so I made this script according to the chinese mobile game app I've played

Share this post


Link to post
Share on other sites
  • 0
On 5/26/2018 at 9:36 AM, meko said:

There's really no silver bullet to really be sure of the identity of someone, but one of the approaches that kinda works is

Oh yes, there is one way of doing it.

doing it the Habilis way. True, it's a bit painful and awkward way,(couldn't be different with Habilis) but this is better than trying to figure out MACs (My MAC changes at every system startup) and IPs.

On 8/6/2017 at 1:00 PM, Habilis said:

Also this is a ppreview how I want to prevent creation of 500 characters and farm of daily rewards

event versions of items will be given...(they have same properties and a list of limitations)

eg1mwLJ.jpg

 

 
Edited by Habilis

Share this post


Link to post
Share on other sites
  • 0

@Habilis
ahem ... getitembound should do most of the trick

Quote

*getitembound(<item id>, <amount>, <bound type>{, <account ID>})
*getitembound("<item name>", <amount>, <bound type>{, <account ID>})

This command behaves identically to getitem(), but the items created will be
bound to the target character as specified by the bound type. All items created
in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in
some cases cannot be traded or stored.

Valid bound types are:
 1 - Account Bound
 2 - Guild Bound
 3 - Party Bound
 4 - Character Bound

although like what you did with Trade permission is ... yeah more painful

Spoiler

hercule/db/re/item_db.conf


	Trade: {                      (defaults to no restrictions)
		override: GroupID             (int, defaults to 100)
		nodrop: true/false            (boolean, defaults to false)
		notrade: true/false           (boolean, defaults to false)
		nostorage: true/false         (boolean, defaults to false)
		nocart: true/false            (boolean, defaults to false)
		noselltonpc: true/false       (boolean, defaults to false)
		nomail: true/false            (boolean, defaults to false)
		noauction: true/false         (boolean, defaults to false)
		nogstorage: true/false        (boolean, defaults to false)
		partneroverride: true/false   (boolean, defaults to false)
	}

 

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.