SphereCommunity
IF ON bag ON pack question - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: IF ON bag ON pack question (/Thread-IF-ON-bag-ON-pack-question)

Pages: 1 2


RE: IF ON bag ON pack question - Skul - 12-10-2012 10:29 PM

easier to use findid
Code:
if (<findlayer.21.findid.i_defname>) //is within layer 21
if you want to see if it only within a container within your pack and no further you will have to do more code:
Code:
[function isinpack]
forcont <uid> 1 //1 container within layer 21
  if (<baseid>==<args>)
    local.isinpack=1
  endif
endfor
return <dlocal.isinpack>

if (<findlayer.21.isinpack i_defname>)
  //code
endif