bearkillerPT / metinCV

This was a Summer project! A capable Metin2 bot without code injection/mem fuzzing!
1 stars 1 forks source link

Clear inventory #1

Open kacperino55 opened 11 months ago

kacperino55 commented 11 months ago

Can you explain this function? Is there a feature in any Metin server to destroy item instead of dropping?

https://github.com/bearkillerPT/metinCV/blob/872a4d3793ff1d2b5d58c0bc3dd011216f751f49/SimpleBot.py#L249

bearkillerPT commented 11 months ago

As to my knowledge it is the only way to "destroy" the item. The auto-pickup is only used after a metin is destroyed, I think. This summer I only used the simpleBot. Some servers allow you to, first drop the item and then press a destroy button. That's specific to which private server you choose.

bearkillerPT commented 11 months ago

BTW look at the HSV masks and the tool that I modified for screenshoting instead of using a camera

kacperino55 commented 11 months ago

Actually I was looking for somekind of autopicker however my server doesn't have destroy option so I tried to somehow filter out items to pick up but just based on screenshoting I think its very hard

bearkillerPT commented 11 months ago

Autopicker? Unless it's a very special server it should have the item pickup binded with 'z'... Check the keybindings / shortcuts πŸ˜„

kacperino55 commented 11 months ago

Yes I know 'z' works, but a lot of crap is dropping and I want to pickup specific items only πŸ˜„

bearkillerPT commented 11 months ago

My bad! πŸ˜† Well the easiest way would be to use the clearInventory with the images of the items to drop them whenever it's full and away from the farming spot. Checking if it's full shouldn't be too hard though you must also check every page. I think that doing text recognition / image recognition isn't too bad of an idea actually. Try, using the HSV mask creator, to create a mask that only contains the names of items and then using the pyautogui.locateOnScreen on the mask. The simples solution would be to estimate the amount of time it takes to fill the inventory and then teleport to a random place to drop the trash and go back to farming!

kacperino55 commented 11 months ago

I'll try try, but I'm not sure if it be worth the effort Eq might be full in few minutes with trash items and getting rid of it will take a lot of time

bearkillerPT commented 11 months ago

Eq means inventory? From my experience it took 2/3 hours but my char takes about 10 seconds per metin. The cleaning process, which I haven't used since last year, was pretty quick. I used to only clean the first page and then manually change to the second and so on but it would be somewhat easy to make it auto and from what I recall it was really fast! The idea to teleport isn't too hard either since it's just using the ring and then finding the right options. I see your account is new. Do you know how to use git? If so you could just create a fork and then start working on that and eventually create a Pull Request. I can try to help you!

bearkillerPT commented 11 months ago

If you want me to try to automate the clean inventory I can do it xD

kacperino55 commented 11 months ago

Eq means inventory? Yes I'm playing on global server with no TP ring and wanted to automate farming Dragon Stone Shard with autohunting. So all I need is to pickup Dragon Stone Shard and skip other items. I know some basics of git and python, I will try to write some code

bearkillerPT commented 11 months ago

Please paste a screenshot that includes the dropped items and the most of the background you can get on it! I'll check if it's feasable

kacperino55 commented 11 months ago

For now I think i won't do it I think automating fishing would be more beneficial Are you aware of fishing system on global servers?

bearkillerPT commented 11 months ago

What are the global servers? The official ones or is there a global server? The only one I found is orginins2

kacperino55 commented 11 months ago

Yes official ones from GameForge

bearkillerPT commented 11 months ago

Well I don't think I want to do that with my life xD but I can create the fishing farmbot in a private server and it should be similar. Right now I'm on rodnia. I'll tell you when I'm done

kacperino55 commented 11 months ago

Is this fishing system on Rodnia or there is different one? image

bearkillerPT commented 11 months ago

Well it's gonna take me a while. In the rodnia metin you need to pay 250 ancient coins for each 25 worms which is kind of a lot. Bought 2k coins for 435kk. I'll give it a try! I'll record the screen for now! And yes it is the same system!

bearkillerPT commented 11 months ago

Here's my attempt! Works most of the time xD I added the code and did some refactoring. This script is in a folder inside the RodniaMT2. Hope you find it helpful and can maybe finetune it a bit! https://github.com/bearkillerPT/metinCV/assets/59414986/f84f8fe2-3a91-4e23-b356-4e0809f47563

kacperino55 commented 11 months ago

Okay let me now I will try work on it as well :)

Edit: Didnt see your newest comment, good job! I will look at it now

kacperino55 commented 11 months ago

Can you tell me what part of screen are you taking here? https://github.com/bearkillerPT/metinCV/blob/d6584e67f1a315d15b2a3a29a6ba6a30c716de42/RodniaMT2/fishingBot/fishing.py#L23 I tried to run bot but no fish is detected and this line genreates me image like this: Figure_1 I assume its not the expected result :D I think it depends on resolution you are using, because here I have some numbers that I don't understand https://github.com/bearkillerPT/metinCV/blob/d6584e67f1a315d15b2a3a29a6ba6a30c716de42/RodniaMT2/fishingBot/fishing.py#L15

bearkillerPT commented 11 months ago

Yes you’re right. Those values are resolution dependent. Eventually I’ll create the code to deal with any resolution for all bots but for now those values are for 1366x768 at 150% windows scale. If you comment the line that clicks you can see that windows that spawns and shows the entire logic xD This is how mine looks: image

kacperino55 commented 11 months ago

Okay, I have adjusted fishing window to my resolution and bot is definitely clicking but I feel like fish on my server is faster than yours πŸ˜„ Clicks are on older position of fish so most of the time it is a miss. Do you have any idea what can I adjust to fix that?

https://github.com/bearkillerPT/metinCV/assets/142456525/ebf6d594-84f6-4681-ba58-1f0482862b83