31
Gold Farming / Re: crameeps - Tamer/Pet Auto Kill
« on: March 06, 2009, 11:24:43 AM »
I have used it, just not in the last verision posted , i posted it from work ;/
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
sub openBags
set #nextCPosX #cliXRes
set #nextCPosY 0
set #LOBJECTID %searchbagid
event Macro 17 0
wait 20
ignoreItem reset
openloop:
findItem %bagstoopentype C_ , %searchbagid
if #FINDCNT > 0
{
ignoreItem #FINDID
set %bagx #cliXRes - 230
set #nextCPosX %bagx
set #nextCPosY 0
set #LOBJECTID #FINDID
event Macro 17 0
wait 20
gosub moveitems #findid #charid %grabtype 0 ;Put the sub here so you can search each bag individualy as they are being opend, this avoids the problem of searching your pack i believe.
set %i %i + 1
goto openloop:
}
return
set %i %i + 1
display yesno Do you need to sort the bags into the dumpbag?
if #dispRes = yes
gosub sortintoBag
; Setup
set %bagstoopentype ZJF_CKF
set %grabtype KTL ; You need to change this to the item your looking for.
; Do not edit after here unless you know what you do
gosub getBagwithBags
display yesno Do you need to sort the bags into the dumpbag?
if #dispRes = yes
gosub sortintoBag
gosub openBags
if #dispRes = yes
display ok %i Bags sorted and opened
else
display ok %i Bags opened
stop
sub getBagwithBags
event SysMessage Please target the bag to open bags in
set #TARGCURS 1
wait 5
waiting:
if #TARGCURS = 1
goto waiting
findItem #LTARGETID
set %searchbagid #FINDID
set %searchbagx #FINDX + 8
set %searchbagy #FINDY + 8
return
sub sortintoBag
ignoreItem %searchbagid
sortloop:
findItem %bagstoopentype C_ , #BACKPACKID
if #FINDCNT > 0
{
exEvent Drag #FINDID
wait 15
exEvent Dropc %searchbagid
wait 15
goto sortloop
}
return
sub openBags
set #nextCPosX #cliXRes
set #nextCPosY 0
set #LOBJECTID %searchbagid
event Macro 17 0
wait 20
ignoreItem reset
openloop:
findItem %bagstoopentype C_ , %searchbagid
if #FINDCNT > 0
{
ignoreItem #FINDID
set %bagx #cliXRes - 230
set #nextCPosX %bagx
set #nextCPosY 0
set #LOBJECTID #FINDID
event Macro 17 0
wait 20
gosub moveitems #findid #charid %grabtype 0 ;Put the sub here so you can search each bag individualy as they are being opend, this avoids the problem of searching your pack i believe.
set %i %i + 1
goto openloop:
}
return
;Added sub to move stuff
sub moveItems ns
{
namespace push
namespace local moveItems
set !dragTimeout 4 ;1/10 s
set !dragTimer #scnt2
set !items %3
set !stackdrag %4
if %0 < 3
set !items *
set !from %1
set !to %2
finditem !items C_ , !from
for #findindex 1 %grabamount
{
if #findkind = 0
{
set !amt 1
if #findstack > 1
{
if !stackdrag = 0
{
set !amt #findstack
}
else
{
set !amt !stackdrag
}
}
while #scnt2 < !dragTimer
wait 0
exevent drag #findid !amt
exevent dropc !to
set !dragTimer #scnt2 + !dragTimeout
}
}
namespace clear
namespace pop
return
}