Page 1 of 1
Working on an AFK dwb script.
Posted: August 1st, 2009, 12:52 pm
by captainamerica
But I'm getting stuck with how to handle the looting. if I have it try to delete by sending 6, 5 and 4, it'll end up keeping liquids, but also augments/enhancers/other crappy loot/crystals etc. I'm not sure if it'd be easier to do a pixel color check for either of the liquid colors or not.
Anyone have experience with a script for this?
Posted: August 2nd, 2009, 2:35 am
by r04r
You could click the item in your inventory, then an unique part of the name in the title bar of your inventory (Make sure there is a backpack behind inventory so it isn't see-trough anymore), then the script will check the item names.
Down side is, you'll need a PLC and a BLC every time you start the script to set it up correctly.
Posted: August 4th, 2009, 7:10 pm
by absolution
r04r wrote:You could click the item in your inventory, then an unique part of the name in the title bar of your inventory (Make sure there is a backpack behind inventory so it isn't see-trough anymore), then the script will check the item names.
Down side is, you'll need a PLC and a BLC every time you start the script to set it up correctly.
This technique works great. I employ it for my lyase program...only keeping the 10's and 11's
Here is a snippet of my code
Code: Register to unlock hidden link
;Click the 10 enzyme to make it active
ToolTip ("Left click on the enzyme with the 10 value to activate it.",50,50,"",0,1)
While 1
Sleep(1*$LagMultiplier)
If _IsPressed ( "01" ) Then
ExitLoop
EndIf
WEnd
ToolTip("")
Sleep(5*$LagMultiplier)
;Initial setup of X & Y for the pixelchecksum for the "10" enzyme
ToolTip ("Left click at the upper left corner of the '10' in the description area of the window.",50,50,"",0,1)
While 1
Sleep(1*$LagMultiplier)
If _IsPressed ( "01" ) Then
$pos = MouseGetPos() ;get X & Y position of the click
ExitLoop
EndIf
WEnd
ToolTip("")
$UprLft10x = $pos[0] ;set X position of the click
$UprLft10y = $pos[1] ;set Y position of the click
Sleep(5*$LagMultiplier)
ToolTip ("Left click at the lower right corner of the '10' in the description area of the window.",50,50,"",0,1)
While 1
Sleep(1*$LagMultiplier)
If _IsPressed ( "01" ) Then
$pos = MouseGetPos() ;get X & Y position of the click
ExitLoop
EndIf
WEnd
ToolTip("")
$LwrRgt10x = $pos[0] ;set X position of the click
$LwrRgt10y = $pos[1] ;set Y position of the click
Sleep(5*$LagMultiplier)
;Take a snapshot of the area enclosed by the upper left and lower right clicks for the 10 enzyme
$Checksum10 = PixelChecksum($UprLft10x, $UprLft10y, $LwrRgt10x, $LwrRgt10y)
Func SaveOrNot ()
MouseClick ("Left",$Itemx,$Itemy,1) ;click at the item spawn location in inventory
Sleep(30*$LagMultiplier)
$ChecksumTemp10 = PixelChecksum($UprLft10x, $UprLft10y, $LwrRgt10x, $LwrRgt10y) ;snapshot of 10 enzyme area again for comparison to the base
$ChecksumTempMap = PixelChecksum($UprLftMapx, $UprLftMapy, $LwrRgtMapx, $LwrRgtMapy) ;snapshot of map area again for comparison to the base
If $ChecksumTemp10 = $Checksum10 Then ;compare the new snapshot of the 10 enzyme area to the base snapshot
MouseClickDrag("Left",$Itemx,$Itemy,$EnzymeBPx,$EnzymeBPy,5) ;if the snapshots are the same, move the enzyme to the enzyme backback
ElseIf $ChecksumTempMap = $ChecksumMap Then ;compare the new snapshot of the map area to the base snapshot
MouseClickDrag("Left",$Itemx,$Itemy,$MapBPx,$MapBPy,5) ;if the snapshots are the same, move the enzyme to the map backback
Else ;the item of intereest is not a 10 or 11 enzyme or a map
MouseClick("Right",$Itemx,$Itemy,1) ;right click at the item spawn location in inventory to bring up the radial menu
Sleep(10*$LagMultiplier)
Send("3") ;choose option 3 on the radial menu, this will delete some items
Sleep(1*$LagMultiplier)
Send("2") ;choose option 2 on the radial menu, this will delete the other items
EndIf
EndFunc