Page 28 of 30 FirstFirst ... 182627282930 LastLast
Results 271 to 280 of 295

Thread: OK to ASK FOR HELP HERE!

  1. #271
    Senior Member Underavelvetmoon's Avatar
    Join Date
    Jun 2011
    Location
    UK
    Posts
    181
    Quote Originally Posted by Ringo1823 View Post
    Hey guys, i'm a total newbe in codeing and got a question, regarding a chest bot.


    I have absoulutly now clue how i'm going to fix this... I already updated the gwa˛ & try various code.
    If someone could help me get this going i would be really pleased.

    Thanks in advance

    Attachment 4412
    Attachment 4410
    Attachment 4411
    Ive never seen MoveTo use more than the Coords. Maybe its supposed to have a modified GWA2?

    Number one game forever....

  2. #272
    Junior Member
    Join Date
    Jun 2017
    Posts
    4
    When i used the GWA2, which was included it didnt work/ start at all
    I actually replaced it with a newer one, this was the original:GWA˛.au3

  3. #273
    Junior Member
    Join Date
    Jun 2017
    Posts
    4
    Strange, followed your suggestion just ctrldel everything beyond 2 commands.

    Somehow seams fine now, i'll test it now

  4. #274
    Junior Member
    Join Date
    Jun 2017
    Posts
    4
    It Works fine so far... But the tickbox : Collect Items doesn't work..

    I want the bot just open chests so no pick up / sales etc...

    Any idea
    looking forward to hear from you, thanks for your first idea

  5. #275
    hi guys what func i can use to How to know the number of objects (and example skalefin) I am farming and make it appear inside the display every run
    ty all

  6. #276
    Junior Member mhaendler's Avatar
    Join Date
    Jun 2016
    Posts
    14
    PHP Code:
    Globa Const $ItemCount Your item counter
    GUICtrlCreateLabel
    ('Skalefin'8357017, Default, $GUI_WS_EX_PARENTDRAG) ; Your Label in Gui
    Global Const $ItemLabel GUICtrlCreateLabel($ItemCount80355017, Default, $GUI_WS_EX_PARENTDRAG) ; Your Count in Gui 
    In your PickupLoot Function:

    PHP Code:
    If DllStructGetData($lItem"ModelID") == $ITEM_ID_SKALEFIN Then ; If the ModelId of the Item matches the item id of skalefin (for example)
        
    $ItemCount += increment item counter by one
        GUICtrlSetData
    ($ItemLabel$ItemCount) ; pass it to the gui
    EndIf 

  7. #277
    Quote Originally Posted by mhaendler View Post
    PHP Code:
    Globa Const $ItemCount Your item counter
    GUICtrlCreateLabel
    ('Skalefin'8357017, Default, $GUI_WS_EX_PARENTDRAG) ; Your Label in Gui
    Global Const $ItemLabel GUICtrlCreateLabel($ItemCount80355017, Default, $GUI_WS_EX_PARENTDRAG) ; Your Count in Gui 
    In your PickupLoot Function:

    PHP Code:
    If DllStructGetData($lItem"ModelID") == $ITEM_ID_SKALEFIN Then ; If the ModelId of the Item matches the item id of skalefin (for example)
        
    $ItemCount += increment item counter by one
        GUICtrlSetData
    ($ItemLabel$ItemCount) ; pass it to the gui
    EndIf 
    ty alot for the help!

  8. #278
    yo guys im doing a salvage bot but cant find a nice salvage func anyone can help me?

  9. #279
    Senior Member Underavelvetmoon's Avatar
    Join Date
    Jun 2011
    Location
    UK
    Posts
    181
    Quote Originally Posted by koala95 View Post
    yo guys im doing a salvage bot but cant find a nice salvage func anyone can help me?
    I literally just took the normal Sell Functions and changed them to salvage. Not 100% sure it will work since I dont use salvage in my scripts, but it should.

    Code:
     Func Salvage($bagIndex)
    	$bag = GetBag($bagIndex)
    	$numOfSlots = DllStructGetData($bag, "slots")
    	For $i = 1 To $numOfSlots
    		; Out("Selling item: " & $bagIndex & ", " & $i)
    		$aItem = GetItemBySlot($bagIndex, $i)
    		If DllStructGetData($aItem, "ID") = 0 Then ContinueLoop
    		If CanSalvage($aItem) Then
    			StartSalvage($aItem)
    			Sleep(500)
    			SalvageMaterials()
    		EndIf
    		RndSleep(250)
    	Next
     EndFunc
    Code:
     Func CanSalvage($aItem)
    	Local $M = DllStructGetData($aItem, "ModelID")
    
    	Switch $M
    	Case ;Items to salvage
    	   Return True
    	EndSwitch
    	Return False
     EndFunc

    Number one game forever....

  10. #280
    Senior Member Maverick's Avatar
    Join Date
    Dec 2009
    Posts
    474
    Ok I want to add this to my CanPickup(), if an item drops and it's far from other enemies (i.e. picking it up does not cause aggro) pick it up. I tried this but doesn't work:

    Code:
    	Local $ItemX = DllStructGetData($aItem, 'X')
    	Local $ItemY = DllStructGetData($aItem, 'Y')
            Local $NearestEnemy = GetNearestEnemyToCoords($ItemX, $ItemY)
            Local $EnemyDistance = ComputeDistance($ItemX, $ItemY, DllStructGetData($NearestEnemy, 'X'), DllStructGetData($NearestEnemy, 'Y'))
            If $EnemyDistance > 1400 Then Return True
    I now wrote this but not sure if this would help either:

    Code:
    Func GetNumberOfEnemiesInRangeOfItem($aItem, $aRange = 1400)
    	Local $lDistance
    	Local $nOfEnemies = 0
    	Local $lAgentArray = GetAgentArray(0xDB)
    	For $i = 1 To $lAgentArray[0]
    		If DllStructGetData($lAgentArray[$i], 'Allegiance') <> 3 Then ContinueLoop
    		If DllStructGetData($lAgentArray[$i], 'HP') <= 0 Then ContinueLoop
    		If BitAND(DllStructGetData($lAgentArray[$i], 'Effects'), 0x0010) > 0 Then ContinueLoop
    		$lDistance = (DllStructGetData($aItem, 'X') - DllStructGetData($lAgentArray[$i], 'X')) ^ 2 + (DllStructGetData($aItem, 'Y') - DllStructGetData($lAgentArray[$i], 'Y')) ^ 2
    		If $lDistance < $aRange Then
    			$nOfEnemies += 1
    		EndIf
    	Next
    	Return $nOfEnemies
    EndFunc   ;==>GetNumberOfEnemiesInRangeOfItem
    (╯°□°)╯︵ ┻━┻

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •