How to steal regs without snooping?

Kalanmyr

New Member
I'm reviving this thread, apologies in advance. I'm working on a snooping macro. The purpose of the macro is to search all containers in a target's backpack. Currently the script goes 2 layers deep. It works, but it only works with large pauses (see script below) at 2000 ms.

Code:
clearlist 'containers'
if not listexists 'containers'
  @createlist 'containers'
endif
if list 'containers' == 0
  @pushlist 'containers' 0xe76
  @pushlist 'containers' 0xe75
  @pushlist 'containers' 0xe74
  @pushlist 'containers' 0xe78
  @pushlist 'containers' 0xe7d
  @pushlist 'containers' 0xe77
endif
if not listexists 'bags'
  @createlist 'bags'
endif
clearlist 'bags'
//Find Enemy Pack to Snoop
promptalias 'target'
if @inrange 'target' 1 and @findlayer 'target' 21
  @setalias 'Enemypack' 'found'
  @pushlist 'bags' 'Enemypack'
else
  @unsetalias 'Enemypack'
endif
if @findalias 'Enemypack'
  //Snoop Found Pack
  useobject! 'Enemypack'
  for 0 to 'containers'
    //Snoop All Bags inside Pack
    while @findtype containers[] 'any' 'Enemypack'
      pause 2000
      @pushlist 'bags' 'found'
      setalias 'inside' 'found'
      useobject! 'inside'
      pause 200
      //Snoop 2nd Level of Bags
      while @findtype containers[] 'any' 'inside'
        pause 2000
        @pushlist 'bags' 'found'
        useobject! 'found'
        pause 200
        ignoreobject 'found'
      endwhile
      ignoreobject 'inside'
    endwhile
  endfor
  @clearignorelist
endif

My question is: Why does the pause have to be 2000 (I'm talking about the pause after setting the alias and before using the object)??? I mean, I can double click the things and have them open in 200 ms time, why won't steam execute this command?

Is there a more efficient way of snooping these packs? I'm trying to understand what is causing this bottleneck and how to work around it.

Another related question is I'm not sure how to search multiple packs of the same type within the same layer. If there are 5 pouches in the main pack, I beleive the loop will only catch the first pouch, but won't touch the other 4. Any ideas how to ensure that all 4 pouches are snooped?

Thank you!
 
Top