|
You last visited: Today at 22:41
Advertisement
How to edit pickup items on a bot?
Discussion on How to edit pickup items on a bot? within the GW Bots forum part of the Guild Wars category.
05/12/2024, 16:17
|
#1
|
elite*gold: 0
Join Date: May 2024
Posts: 7
Received Thanks: 0
|
How to edit pickup items on a bot?
Hey all,
I have never done any coding so this is a new ball game. As the title suggests I'm interested in figuring out how to edit the items a bot picks up. There are a handful of excellent bots already established on here I just want to "tweak" the pickups to my tastes (unidentifying an inventory bag full of shields for starters).
An example of my attempt to have the featherbot pickup shields:
;If GetChecked ($CBX_Shields) and $ModelID = 778 Then ;778 = Bladed Shields,
;Return True
;EndIf
If GuiCtrlRead($CBX_Shields) = $GUI_CHECKED And $rarity = 2624 and $ModelID = 778 Then ;778 = Shields
Out("Picking up Gold Shield")
$Goldz += DllStructGetData($lItem, 'Quantity')
GUICtrlSetData($GoldsCount,$Goldz)
Return True
EndIf
I was able to get a checkbox for shields but the bot doesn't pickup the corresponding item.
Thanks,
|
|
|
05/13/2024, 11:20
|
#2
|
elite*gold: 0
Join Date: Jul 2023
Posts: 147
Received Thanks: 147
|
You did remove the semicolumn at the start of the lines of this script I hope? Else it will not do anything with those lines.
;If GetChecked ($CBX_Shields) and $ModelID = 778 Then ;778 = Bladed Shields,
;Return True
;EndIf
|
|
|
05/13/2024, 19:25
|
#3
|
elite*gold: 0
Join Date: May 2024
Posts: 7
Received Thanks: 0
|
Quote:
Originally Posted by t7tcrusher
You did remove the semicolumn at the start of the lines of this script I hope? Else it will not do anything with those lines.
;If GetChecked ($CBX_Shields) and $ModelID = 778 Then ;778 = Bladed Shields,
;Return True
;EndIf
|
Thank you! Yes I had the semi-colon in place. I am now picking up bladed shields of any rarity. The way the code reads I would assume it should filter out and non-golds? At least based on what I see within the script itself for the other items, ie Kamas.
If GuiCtrlRead($CBX_Shields) = $GUI_CHECKED And $RARITY = 2624 and $ModelID = 778 Then ;778 = Bladed Shield
Out("Picking up Gold Shields")
$Goldz += DllStructGetData($lItem, 'Quantity')
GUICtrlSetData($GoldsCount,$Goldz)
Return True
EndIf
|
|
|
05/13/2024, 19:36
|
#4
|
elite*gold: 0
Join Date: Jul 2023
Posts: 147
Received Thanks: 147
|
If you post the func canpickup() i can check whats happening since theres an amount of different featherbots
|
|
|
05/13/2024, 20:08
|
#5
|
elite*gold: 0
Join Date: May 2024
Posts: 7
Received Thanks: 0
|
For reference:
Located in GWA2
CS
Func PickUpLoot()
If GetMapLoading() == 2 Then Disconnected()
Local $lMe
Local $lBlockedTimer
Local $lBlockedCount = 0
Local $lItemExists = True
For $i = 1 To GetMaxAgents()
If GetMapLoading() == 2 Then Disconnected()
$lMe = GetAgentByID(-2)
If DllStructGetData($lMe, 'HP') <= 0.0 Then Return
$lAgent = GetAgentByID($i)
If Not GetIsMovable($lAgent) Then ContinueLoop
If Not GetCanPickUp($lAgent) Then ContinueLoop
$lItem = GetItemByAgentID($i)
If CanPickUp($lItem) Then
Do
If GetMapLoading() == 2 Then Disconnected()
If $lBlockedCount > 2 Then UseSkillEx(6,-2)
PickUpItem($lItem)
Sleep(GetPing())
Do
Sleep(100)
$lMe = GetAgentByID(-2)
Until DllStructGetData($lMe, 'MoveX') == 0 And DllStructGetData($lMe, 'MoveY') == 0
$lBlockedTimer = TimerInit()
Do
Sleep(250)
$lItemExists = IsDllStruct(GetAgentByID($i))
Until Not $lItemExists Or TimerDiff($lBlockedTimer) > Random(5000, 7500, 1)
If $lItemExists Then $lBlockedCount += 1
Until Not $lItemExists Or $lBlockedCount > 5
EndIf
Next
EndFunc
#CE
Func CanPickUp($lItem)
If GetMapLoading() == 2 Then Disconnected()
Local $RARITY = GetRarity($lItem)
Local $Quantity
Local $ModelID = DllStructGetData($lItem, 'ModelID')
Local $ExtraID = DllStructGetData($lItem, 'ExtraID')
If $ModelID = 146 And ($ExtraID = 10 Or $ExtraID = 12) Then Return True
;If $ModelID = 931 Or $ModelID = 932 Then ;931=Monstrous Eye ;932=Monstrous Fang
;Return True
;EndIf
;If $ModelID = 923 Then ;931=Monstrous Claw
;Return True
;EndIf
|
|
|
05/14/2024, 17:43
|
#6
|
elite*gold: 0
Join Date: Jul 2023
Posts: 147
Received Thanks: 147
|
Quote:
Originally Posted by greychachki
For reference:
Located in GWA2
CS
Func PickUpLoot()
If GetMapLoading() == 2 Then Disconnected()
Local $lMe
Local $lBlockedTimer
Local $lBlockedCount = 0
Local $lItemExists = True
For $i = 1 To GetMaxAgents()
If GetMapLoading() == 2 Then Disconnected()
$lMe = GetAgentByID(-2)
If DllStructGetData($lMe, 'HP') <= 0.0 Then Return
$lAgent = GetAgentByID($i)
If Not GetIsMovable($lAgent) Then ContinueLoop
If Not GetCanPickUp($lAgent) Then ContinueLoop
$lItem = GetItemByAgentID($i)
If CanPickUp($lItem) Then
Do
If GetMapLoading() == 2 Then Disconnected()
If $lBlockedCount > 2 Then UseSkillEx(6,-2)
PickUpItem($lItem)
Sleep(GetPing())
Do
Sleep(100)
$lMe = GetAgentByID(-2)
Until DllStructGetData($lMe, 'MoveX') == 0 And DllStructGetData($lMe, 'MoveY') == 0
$lBlockedTimer = TimerInit()
Do
Sleep(250)
$lItemExists = IsDllStruct(GetAgentByID($i))
Until Not $lItemExists Or TimerDiff($lBlockedTimer) > Random(5000, 7500, 1)
If $lItemExists Then $lBlockedCount += 1
Until Not $lItemExists Or $lBlockedCount > 5
EndIf
Next
EndFunc
#CE
Func CanPickUp($lItem)
If GetMapLoading() == 2 Then Disconnected()
Local $RARITY = GetRarity($lItem)
Local $Quantity
Local $ModelID = DllStructGetData($lItem, 'ModelID')
Local $ExtraID = DllStructGetData($lItem, 'ExtraID')
If $ModelID = 146 And ($ExtraID = 10 Or $ExtraID = 12) Then Return True
;If $ModelID = 931 Or $ModelID = 932 Then ;931=Monstrous Eye ;932=Monstrous Fang
;Return True
;EndIf
;If $ModelID = 923 Then ;931=Monstrous Claw
;Return True
;EndIf
|
You either forgot to paste a bit at the end of the canpickup function or it's incomplete.
Have to complete it a bit by guessing, but Next should work:
Code:
Func CanPickUp($lItem)
If GetMapLoading() == 2 Then Disconnected()
Local $RARITY = GetRarity($lItem)
Local $Quantity
Local $ModelID = DllStructGetData($lItem, 'ModelID')
Local $ExtraID = DllStructGetData($lItem, 'ExtraID')
If $ModelID = 146 And ($ExtraID = 10 Or $ExtraID = 12) Then Return True
ElseIf GuiCtrlRead($CBX_Shields) = $GUI_CHECKED And $RARITY = 2624 and $ModelID = 778 Then ;778 = Bladed Shield
Out("Picking up Gold Shields")
$Goldz += DllStructGetData($lItem, 'Quantity')
GUICtrlSetData($GoldsCount,$Goldz)
Return True
Else
Return False
EndIf
EndFunc
|
|
|
 |
Similar Threads
|
[GF][eXLib] - OpenBot | Level/Teleport/Pickup/Pickup
09/28/2025 - Metin2 Hacks, Bots, Cheats, Exploits & Macros - 513 Replies
Hi everyone, I present you the OpenBot.
This is a project that i have been working on for the past year in my free time alongside the eXLib Module.
Was made using my eXLib Module and is completely made in Python and open source.
It was also created from m2kmod, you can see some similarity in the UI, but the core features were completely rebuild.
Features:
PathFinding (Even across maps)
WaitDmg (Including bow)
|
Pickup bot mit großem pickup-Umkreis
11/17/2009 - Metin2 - 1 Replies
Ich habe im Metin2 forum gelesen, dass es einen neuen "Pickup_Bot" gibt.
Mithilfe diesem Hack kannst du Items, die nicht in deiner Reichweite sind, aufheben. Giebt es sowas wirklich, oder haben die metin2 GMs sich das nur ausgedacht?
(es gibt ja den Trick, um etwas mit Speedhack aufzuheben, obwohl es aussieht als wärest du noch ausser Reichweite...)
Meinen die damit den Speedhack Trick? Oder gibt es wirklich so einen wunderbaren Hack?
|
All times are GMT +1. The time now is 22:45.
|
|