Jump to content
×
×
  • Create New...
  • 0

[Q]Autopickup filter


devilake

Question

20 answers to this question

Recommended Posts

  • 0
13 minutes ago, charparodar said:

I use this pick up on my client: https://uploads.habira-gamers.org/index.php/s/boeQ4U5nNGj6LLo

It's a python script, it appears under the minimap when imported...

This only picks up itens with the owner's name or without any name, I don't know if is this exactly what you're looking for...

it isn't but i think i can edit it to be what i want, thank you alot for help. What i wanted is a pickupbot that will pick a type of items. For example it will pick only Moonlight chests

Link to comment
  • 0
36 minutes ago, charparodar said:

I use this pick up on my client: https://uploads.habira-gamers.org/index.php/s/boeQ4U5nNGj6LLo

It's a python script, it appears under the minimap when imported...

This only picks up itens with the owner's name or without any name, I don't know if is this exactly what you're looking for...

player.PickCloseItem()

doesn't this function try to pick the closest item regardless of its owner? IIRC it doesn't try to pick the items with your name only.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0
  • Web Developer
Just now, NabbHackeR said:

player.PickCloseItem()

doesn't this function try to pick the closest item regardless of its owner? IIRC it's not picking the items with your name only.

At least on my server it only picks the itens with the owner's name or without anyone's name..., Yang is included...

QJ0orbR.png

Metin2 Icon Database

Link to comment
  • 0
3 minutes ago, charparodar said:

At least on my server it only picks the itens with the owner's name or without anyone's name..., Yang is included...

I understand what u're telling me.

But look, for example, there are two items dropped : Sword+2 and Skill Book. I want this autopickup to pick only the book. And i want to tell it what to pick up in the .py script, not ingame.

Link to comment
  • 0

def PickUpItem(self): player.PickCloseItem()

1230 game.py

def PickUpStart(self): player.PickCloseItem()

119 pickup.py

 

I remembered correctly, it will not only try to pickup the items with your name, but the others too, so say goodbye to ur chat if u step on an item you're not the owner of XD

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0
  • Web Developer
Just now, devilake said:

I understand what u're telling me.

But look, for example, there are two items dropped : Sword+2 and Skill Book. I want this autopickup to pick only the book. And i want to tell it what to pick up from the .py script, not ingame.

I'm sorry, but I don't know almost anything about python, that script wasn't made by me...

QJ0orbR.png

Metin2 Icon Database

Link to comment
  • 0
1 minute ago, charparodar said:

I'm sorry, but I don't know almost anything about python, that script wasn't made by me...

It's okay man, don't worry!

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0
2 minutes ago, NabbHackeR said:

def PickUpItem(self): player.PickCloseItem()

1230 game.py

def PickUpStart(self): player.PickCloseItem()

119 pickup.py

 

I remembered correctly, it will not only try to pickup the items with your name, but the others too, so say goodbye to ur chat if u step on an item you're not the owner of XD

Got it, but i don't need this, i already have this, check my response to charparodar

Link to comment
  • 0
Just now, devilake said:

Got it, but i don't need this, i already have this, check my response to charparodar

You misunderstood, i just said it does the same as the Z button, but automatically.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0
1 minute ago, NabbHackeR said:

You misunderstood, i just said it does the same as the Z button, but automatically.

No, you misunderstood. I know what it does, i have an autopickup script, i don't need that. I need a script that picks up only books, not every garbage from the ground.

Link to comment
  • 0
42 minutes ago, devilake said:

No, you misunderstood. I know what it does, i have an autopickup script, i don't need that. I need a script that picks up only books, not every garbage from the ground.

oh.

add an itemVnum arg to the function and make an array of items you want to pickup, then check it and if it matches one of them, proceed to pick it.

Or just use a value() or socket() change.

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0
1 minute ago, NabbHackeR said:

oh.

add an itemVnum arg to the function and make an array of items you want to pickup, then check it and if it matches one of them, proceed to pick it.

Or just change use a value() or socket() change.

May you, please, help me with that? I'm not familiar with Metin's libs.

Link to comment
  • 0
1 hour ago, charparodar said:

This only picks up itens with the owner's name or without any name.

Haha bro, that is nice xD *this script and all script for pickup, called a simple function player.PickCloseItem() with delay automatically.

He want to make a special functions to send to binary to check vnum xD.

That means you need to make a new functions in binary.

Ahh here is a point how to make, i made this long time ago.

if app.ENABLE_SPECIAL_AUTOPICKUP_BY_VNUM
	def BINARY_AutoPickUp_Append(self, reason):
		import player as ch
		import chat as msg
			
		if reason == "open":
			global bCheckActive
			if bCheckActive == 0:
				bCheckActive = 1
				
				ch.PickItemByVnum() # New Function need to create on binary
				msg.AppendChat(msg.CHAT_TYPE_INFO, "Enabled BINARY_AutoPickUp_Append")
			else:
				msg.AppendChat(msg.CHAT_TYPE_INFO, "Disabled BINARY_AutoPickUp_Append")
				bCheckActive = 0

 

#ifdef ENABLE_SPECIAL_AUTOPICKUP_BY_VNUM
void CPythonPlayer::PickItemByVnum(DWORD dwItem)
{
/*********
* author:       VegaS
* description:  Function called from python for autopickup with check to pick item only if exist in dwTableAcces
* date:         Feb. 27 2016, 01:36 am
*/
	CInstanceBase * ch = NEW_GetMainActorPtr();
	if (!ch)
		return;
	
	TPixelPosition chPos;
	ch->NEW_GetPixelPosition(&chPos);

	DWORD dwTableAcces[] = {
		50011, 53001, 53002, 53003, 53004, 53005, 53006, 53007, 53008, 53009, 53010, 53011, 53012, 53013, 53014, 53015, 53016, 53017, 53018, 53019, 53020, 53021, 53022, 53023, 53024, 53025
	};
	
	for (DWORD idxVnum = 0; idxVnum < _countof(dwTableAcces); idxVnum++)
	{
		if (dwItem == dwTableAcces[idxVnum]) 
		{
			TraceError("CPythonPlayer::PickItemByVnum:: Vid = [%d] Name = [%s] Vnum = (%d)", ch->GetVirtualID(), ch->GetNameString(), dwItem);
			SendClickItemPacket(dwItem);
		}
		else
			TraceError("CPythonPlayer::PickItemByVnum:: Vnum %d is not in table for can pickup him.", dwItem);
	}
}
#endif

 

If u use small part of brain you can do this fucking easy ^^.

  • Love 3
Link to comment
  • 0
13 minutes ago, VegaS said:

Haha bro, that is nice xD *this script and all script for pickup, called a simple function player.PickCloseItem() with delay automatically.

He want to make a special functions to send to binary to check vnum xD.

That means you need to make a new functions in binary.

Ahh here is a point how to make, i made this long time ago.

 

If u use small part of brain you can do this fucking easy ^^.

Thank you, buy i have no access to binary, i need to do it with pure python.

Link to comment
  • 0
45 minutes ago, devilake said:

May you, please, help me with that? I'm not familiar with Metin's libs.

I told you how to do it with pure python, he did the same thing, he just did it in C++.

 

👑 Premium International Lua Developer 👑

 My service topic: https://bit.ly/2UPly54

 

Ignorant people have the obligation to compensate their ignorance by paying whoever helps them.

Syreldar

Link to comment
  • 0
15 hours ago, NabbHackeR said:

I told you how to do it with pure python, he did the same thing, he just did it in C++.

 

I have a script that is taken from a multihack, i can show it to you, when i try to implement it to my client, it crashes, maybe because of the client antihack protection wich i don't know how to bypass

Link to comment
  • 0
  • Web Developer
On 17/10/2016 at 9:59 PM, VegaS said:

Haha bro, that is nice xD *this script and all script for pickup, called a simple function player.PickCloseItem() with delay automatically.

He want to make a special functions to send to binary to check vnum xD.

That means you need to make a new functions in binary.

Ahh here is a point how to make, i made this long time ago.

if app.ENABLE_SPECIAL_AUTOPICKUP_BY_VNUM
	def BINARY_AutoPickUp_Append(self, reason):
		import player as ch
		import chat as msg
			
		if reason == "open":
			global bCheckActive
			if bCheckActive == 0:
				bCheckActive = 1
				
				ch.PickItemByVnum() # New Function need to create on binary
				msg.AppendChat(msg.CHAT_TYPE_INFO, "Enabled BINARY_AutoPickUp_Append")
			else:
				msg.AppendChat(msg.CHAT_TYPE_INFO, "Disabled BINARY_AutoPickUp_Append")
				bCheckActive = 0

 

#ifdef ENABLE_SPECIAL_AUTOPICKUP_BY_VNUM
void CPythonPlayer::PickItemByVnum(DWORD dwItem)
{
/*********
* author:       VegaS
* description:  Function called from python for autopickup with check to pick item only if exist in dwTableAcces
* date:         Feb. 27 2016, 01:36 am
*/
	CInstanceBase * ch = NEW_GetMainActorPtr();
	if (!ch)
		return;
	
	TPixelPosition chPos;
	ch->NEW_GetPixelPosition(&chPos);

	DWORD dwTableAcces[] = {
		50011, 53001, 53002, 53003, 53004, 53005, 53006, 53007, 53008, 53009, 53010, 53011, 53012, 53013, 53014, 53015, 53016, 53017, 53018, 53019, 53020, 53021, 53022, 53023, 53024, 53025
	};
	
	for (DWORD idxVnum = 0; idxVnum < _countof(dwTableAcces); idxVnum++)
	{
		if (dwItem == dwTableAcces[idxVnum]) 
		{
			TraceError("CPythonPlayer::PickItemByVnum:: Vid = [%d] Name = [%s] Vnum = (%d)", ch->GetVirtualID(), ch->GetNameString(), dwItem);
			SendClickItemPacket(dwItem);
		}
		else
			TraceError("CPythonPlayer::PickItemByVnum:: Vnum %d is not in table for can pickup him.", dwItem);
	}
}
#endif

 

If u use small part of brain you can do this fucking easy ^^.

Hi VegaS

How can I edit that code to add yang? Since sometimes is to much yang and the floor is all shining, and the premium bonus doesn't catch all the money...

Thanks

QJ0orbR.png

Metin2 Icon Database

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.