Jump to content
  • 0

How to properly Limit Mac Address with Gepard scripts?


rakuzas

Question


  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.04
  • Content Count:  459
  • Reputation:   6
  • Joined:  06/29/12
  • Last Seen:  

Hello,

Below is my scripts but not sure if it broken or not.. Last time, It does not lock player mac address (unique_ID).. So player can keep spamming claim the reward..

I tested it working for my PC and It does block mine.. But other players can spam it without any limitations at all.. Please help me recheck this script.. And please tell me which part I messed up..

Thank in Advance..

 

prontera,187,149,5	script	New Year Giveaway	965,{
	// MAC Address
	query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = "+getcharid(3)+" ",.macID$);
	
	// IP Address 
	query_sql("SELECT `last_ip` FROM `login` WHERE `account_id` = "+getcharid(3)+" ",.IP$);
	
	//if (.IP$ == $Mac_Claimed_WBR$){
	//mes "[Sarah]";
	//mes "You already claimed!!";
	//close;
	//}
	
	if (.macID$ == $Mac_Claimed$){
		mes "[ King William ]";
		mes "You already claimed!";
		close;
	}
	
	mes "[ King William ]";
	mes "Happy New Year 2018!!";
	query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = "+getcharid(3)+" ",$Mac_Claimed$);
	close2;
	getitem 12326,50; // Large Firecracker
	getitem 41290,5; // Mysterious Fragment
	set #DPOINTS,#DPOINTS +10; dispbottom "Congratulations! You've earned 10 Donation Points!";
	}

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

this is easy way

prontera,187,149,5	script	New Year Giveaway	965,{
	query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = "+getcharid(3)+" ",.macID$);
	for(.@i=0;.@i<getarraysize($Mac_Claimed$);.@i++){
		if (.macID$ == $Mac_Claimed$[.@i]){
			mes "[ King William ]";
			mes "You already claimed!";
			close;
		}
	}
	mes "[ King William ]";
	mes "Happy New Year 2018!!";
	getitem 12326,50; // Large Firecracker
	getitem 41290,5; // Mysterious Fragment
	set #DPOINTS,#DPOINTS +10; dispbottom "Congratulations! You've earned 10 Donation Points!";
	$Mac_Claimed$[getarraysize($Mac_Claimed$)] = .macID$;
	close;
}

not tested if there is error in this code just post it here and i will fix it for you

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  152
  • Topics Per Day:  0.04
  • Content Count:  459
  • Reputation:   6
  • Joined:  06/29/12
  • Last Seen:  

I will test it tomorrow night as my tester only available at night.. I will update again tomorrow..

And.. Where can I learn this array script? I not very use to this method and not understand much.. 

And again, Thanks..  I will update tomorrow night.. /no1 

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