|
You last visited: Today at 12:05
Advertisement
Can someone tell me why it wont pick up Plant Fibers?
Discussion on Can someone tell me why it wont pick up Plant Fibers? within the GW Exploits, Hacks, Bots, Tools & Macros forum part of the Guild Wars category.
09/30/2018, 09:09
|
#1
|
elite*gold: 0
Join Date: Feb 2013
Posts: 10
Received Thanks: 4
|
Can someone tell me why it wont pick up Plant Fibers?
heloo!
I have problem can someone plis tell me where is the problem!
It doesnt want to pick up plant fibers but it does pick up abnormal seeds!
Code:
Func PickUpLoot()
Local $lMe
Local $lBlockedTimer
Local $lBlockedCount = 0
Local $lItemExists = True
Local $Distance
For $i = 1 To GetMaxAgents()
$lAgent = GetAgentByID($i)
If Not GetIsMovable($lAgent) Then ContinueLoop
$lDistance = GetDistance($lAgent)
If $lDistance > 2000 Then ContinueLoop
$lItem = GetItemByAgentID($i)
If CanPickup($lItem) Then
Do
If GetDistance($lAgent) > 150 Then Move(DllStructGetData($lAgent, 'X'), DllStructGetData($lAgent, 'Y'), 100)
PickUpItem($lItem)
Sleep(GetPing())
Do
Sleep(100)
$lMe = GetAgentByID(-2)
Until DllStructGetData($lMe, 'MoveX') == 0 And DllStructGetData($lMe, 'MoveY') == 0
$lBlockedTimer = TimerInit()
Do
Sleep(3)
$lItemExists = IsDllStruct(GetAgentByID($i))
Until Not $lItemExists Or TimerDiff($lBlockedTimer) > Random(500, 1000, 1)
If $lItemExists Then $lBlockedCount += 1
Until Not $lItemExists Or $lBlockedCount > 5
EndIf
Next
EndFunc ;=> PickUpLoot
Func CanPickUp($aitem)
$m = DllStructGetData($aitem, 'ModelID')
If $m = 442 Then Return True ;Abnormal Seeds
If $m <> 442 Then Return False
If $m = 934 Then Return True ;Plant Fibers
If $m <> 934 Then Return False
If $m = 2511 Then Return True ;Gold Coins
If $m <> 2511 Then Return False
EndFunc ;=> CanPickUp
|
|
|
09/30/2018, 11:49
|
#2
|
elite*gold: 0
Join Date: May 2014
Posts: 269
Received Thanks: 320
|
Ofc. your Bot does only pickup abnormal seeds ... because your Function is designed to do so
Take a look into other bots CanPickup-Function.
Then you'll see what you did wrong.
|
|
|
09/30/2018, 12:31
|
#3
|
elite*gold: 0
Join Date: May 2011
Posts: 98
Received Thanks: 85
|
Quote:
Originally Posted by DerMoench14
Ofc. your Bot does only pickup abnormal seeds ... because your Function is designed to do so
Take a look into other bots CanPickup-Function.
Then you'll see what you did wrong.
|
Ill be a bit nice today and provide the answer and explanation for you Since I could see this problem being somewhat confusing to someone who doesnt code.
Code:
If $m = 442 Then Return True
This will always return before it checks the other statements because $m is ALWAYS either 442 or it is not 442 and since that is the only statement as the others are separate it will not check them.
You need to structure it like this:
Code:
If $m = 442 Then
Return True ; Abnormal Seeds
ElseIf $m =934 Then
Return True ; Plant Fibres (And bramble bows oddly)
ElseIf $m = 2511 Then
Return True ; Gold Coins (Its better to do this with quantity I think)
Else
Return True
EndIf
However this code is quite large and can get out of control very very quickly. Your better to use a switch function like this:
Code:
Func CanPickUp($aItem)
Local $M = DllStructGetData($aItem, 'ModelID')
Local $Q = DllStructGetData($aItem, 'Quantity')
Switch $M
Case 442, 934
Return True ; Abnormal Seeds & Plant Fibre
EndSwitch
If $Q > 50 Then
Return True
Else
Return False
EndIf
Return False
EndFunc
So eventually you can structure it to contain everything you need with minimal coding since you can add multiple statements to each line like this:
Code:
Func IsPcon($aItem)
Local $ModelID = DllStructGetData($aItem, "ModelID")
Switch $ModelID
Case 910, 2513, 5585, 6049, 6366, 6367, 6375, 15477, 19171, 19172, 19173, 22190, 24593, 28435, 30855, 31145, 31146, 35124, 36682
Return True ; Alcohol
Case 6376, 21809, 21810, 21813, 36683
Return True ; Party
Case 21492, 21812, 22269, 22644, 22752, 28436
Return True ; Sweets
Case 6370, 21488, 21489, 22191, 26784, 28433
Return True ; DP Removal
Case 15837, 21490, 30648, 31020
Return True ; Tonic
EndSwitch
Return False
EndFunc
Hope this helps!
|
|
|
09/30/2018, 13:23
|
#4
|
elite*gold: 0
Join Date: Feb 2013
Posts: 10
Received Thanks: 4
|
Now it works I just look a bit more precisly....
Thx for the advice!!!
Code:
Func PickUpLoot()
If GetMapLoading() == 2 Then Disconnected()
Local $lMe, $lAgent, $lItem
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(3)
$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
Func CanPickUp($lItem)
If GetMapLoading() == 2 Then Disconnected()
Local $Quantity
Local $ModelID = DllStructGetData($lItem, 'ModelID')
Local $ExtraID = DllStructGetData($lItem, 'ExtraID')
Local $lType = DllStructGetData($lItem, 'Type')
Local $lRarity = GetRarity($lItem)
If $ModelID == 146 And ($ExtraID == 10 Or $ExtraID == 12) Then Return True ; Black and White Dye
If $ModelID == 921 Then ; Bones
$Drops += DllStructGetData($lItem, 'Quantity')
GUICtrlSetData($DropsCount,$Drops)
Return True
EndIf
If $ModelID == 929 Then Return True ; 929 = Dust
If $ModelID == 934 Then Return True ; Plant Fibers
If $ModelID == 442 Then Return True ; Abnormal seeds
If $ModelID == 22751 Then Return True ; Lockpick
If $ModelID == 22191 Then Return True ; Clover
If $ModelID == 2511 And GetGoldCharacter() < 99000 Then Return True ;2511 = Gold Coins
;If $lType == 24 Then Return True ;Shields
Return False
EndFunc
|
|
|
|
Similar Threads
|
Can someone tell me why this coder spams trying to use adrenaline skills?
09/22/2018 - GW Exploits, Hacks, Bots, Tools & Macros - 1 Replies
For $i = 0 To 7
$energy = GetEnergy(-2)
$recharge = DllStructGetData(GetSkillBar(), "Recharge" & $i + 1)
$adrenaline = DllStructGetData(GetSkillBar(), "AdrenalineB" & $i + 1)
If $recharge = 0 And $energy >= $intSkillEnergy And $intSkillAdrenaline <= $adrenaline Then
$useSkill = $i + 1
ExitLoop
EndIf
|
[Selling] Feathers, Dusts, Fibers BOT and others bot
07/20/2013 - Guild Wars Trading - 0 Replies
Hi, i sell feathers bot for 8 euros/250 ectos, dust 8 euros/250 ectos, fibers 8 euros/250 ectos
A bot who farm luxon, kurzick, norn, deldrimor, asura and vanguard point.
Sunspears and light farm is include
Price 15euros or 500 ectos
I accepte paypal, ectos, zkeys, arms
|
Can someone tell me why ZanDekaron is already unpacked ?
09/28/2011 - Dekaron Private Server - 3 Replies
Zan sucks.But help me, i wanna skillhack it !:D
|
Someone can tell me the hacker that works tell now without any problems...?
03/06/2011 - Grand Chase Philippines - 8 Replies
.......
|
[B]someone plz tell me a good free bot to run mf and plz tell me the link[/B]
01/04/2010 - Diablo 2 - 2 Replies
Please guys i need help and instruction on how to do it it has to be a bot that runs on a windows xp laptop
thank you all
|
All times are GMT +2. The time now is 12:05.
|
|