Jump to content

Question

Posted

Hello MaxCheaters!

 

I have lameguard and need to add restriction in olympiad, register only 1pj per Pc(hwid).

 

Can any help whit this please

 

 

Thanks! :)

4 answers to this question

Recommended Posts

  • 0
Posted

Hello MaxCheaters!

 

I have lameguard and need to add restriction in olympiad, register only 1pj per Pc(hwid).

 

Can any help whit this please

 

 

Thanks! :)

Lameguard have nothing to do with it

just check your olympiad config files

  • 0
Posted

Lameguard send me this, can any help me to adapt on last acis rev, i need make register only 1pj per PC 1xHWID

 

Thanks a lot guys! 

 

I can pay whit paypal if you want.

Heya.

I will give you code to get hwid in gameserver, and you can use it as you wish.

Add in L2GameClient:
implements com.lameguard.session.LameClientV195


private String _hwid;
private int instances;
private int patch;
private boolean isProtected;

@Override
public String getHWID() {
return _hwid;
}

@Override
public int getInstanceCount() {
return instances;
}

@Override
public int getPatchVersion() {
return patch;
}

@Override
public boolean isProtected() {
return isProtected;
}

@Override
public void setHWID(String hwid) {
this._hwid = hwid;
}

@Override
public void setInstanceCount(int instances) {
this.instances = instances;
}

@Override
public void setPatchVersion(int patch) {
this.patch = patch;
}

@Override
public void setProtected(boolean isProtected) {
this.isProtected = isProtected;
}


Then you can get hwid with getClient().getHWID()
HWID structure:
/**
* The Hardware ID has the following format:
*
* aaaabbbbbbbbccccccccddddddddeeee
*
* Where:
*
* aaaa = CPU ID
* bbbbbbbb = BIOS ID
* cccccccc = HDD ID
* dddddddd = MAC ID
* eeee = internal value
*/

So you shouldn't use it in full. By default it's only first 20 symbols
of hwid compared.

And you can use methods of LG to compare:
com.lameguard.HWID.equals(String hwid1, String hwid2, int mask)
Mask:
public static int HWID_CPU = 8;
public static int HWID_BIOS = 4;
public static int HWID_HDD = 2;
public static int HWID_MAC = 1;

Lameguard support.

  • 0
Posted

All you have to do is:

1. add "implements LameClientV195" to L2GameClient

2. add somewhere at the end of the L2GameClient:

private String _hwid;
private int instances;
private int patch;
private boolean isProtected;

@Override
public String getHWID() {
return _hwid;
}

@Override
public int getInstanceCount() {
return instances;
}

@Override
public int getPatchVersion() {
return patch;
}

@Override
public boolean isProtected() {
return isProtected;
}

@Override
public void setHWID(String hwid) {
this._hwid = hwid;
}

@Override
public void setInstanceCount(int instances) {
this.instances = instances;
}

@Override
public void setPatchVersion(int patch) {
this.patch = patch;
}

@Override
public void setProtected(boolean isProtected) {
this.isProtected = isProtected;
}

Then each L2GameClient will have its own HWID(set during passage from Selecting Server > Character Selection Screen).

 

If you want to make some HWID restriction later, you do something like that:

public static boolean containsSameHWID(Collection<L2PcInstance> groupOfPlayers, L2PcInstance newPlayer)
{
	String newPlayerHWID = newPlayer.getGameClient().getHWID();//I am pretty sure getGameClient() will be wrong in your Pack, you should find what method returns L2GameClient)
	for(L2PcInstance playerInGroup : groupOfPlayers)
	{
		if(playerInGroup.getGameClient().getHWID().equals(newPlayerHWID))
		{
			return true;
		}
	}
	return false;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock