Jump to content
  • 0

Item Limit By MAC (last_unique_id)


Question

Posted

Hi,

I tried to give my player compensation for my broken Daily Rewards.. But to avoid abuse, I want to make it Mac Adresss Restriction.. And I googling around all post said I need harmony but I already using gepard.. Then, I take a look at Stalao's script and I use his script as my reference.. But.. My problem is I do limit the mac.. But.. its not actually a mac.. Just some 1 number in mapreg.. So.. How to make this work? I spend about 3 hours to figure it out.. But still failed..

-	script	Special Gift#login	-1,{
	
	OnPCLoginEvent:
	
	set LasUniqueID,query_sql("SELECT last_unique_id FROM `login` WHERE account_id = "+getcharid(3)+"", .@last_unique_id$);
	set AccountId2,query_sql("SELECT account_id FROM `login` WHERE last_unique_id = '"+.@last_unique_id$+"'", .@AccountId2);

	}

prontera,156,111,11	script	Special Gift	465,{
	
	if (($UserMac) == ((.@AccountId2) + 1) ){
	mes "[Sarah]";
	mes "You already claimed by this Computer!!";
	close;
	}
		
if (#GIFT == 1) {
	mes "[Sarah]";
	mes "You already claimed!!";
	close;
	}

if ((#LastDailyReward > 0) && (#GIFT == 0)) {

	mes "[Sarah]";
	mes " I can give you ^ff0000GIFT^000000.";
	next;
	mes "[Sarah]";
	mes "Do you want it now?";
	switch(select("Nevermind:Sure!!")){
	case 1: 
	close;
	break;
	
	case 2:
	next;
	mes "[Sarah]";
	mes "Have a nice day~";
	set #GIFT,1;
	set $UserMac,(.@AccountId2)+1;
	close2;
	getitem 501,1;
	break;
		}
	}
}


Thank you in advance..

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...