Author Topic: check to see if container is open if not go to open it  (Read 3371 times)

0 Members and 2 Guests are viewing this topic.

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
check to see if container is open if not go to open it
« on: April 01, 2016, 11:18:31 PM »
0
im trying to figure out how to make sure a bag gump is open. the way im checking for weight is item count in a bad and it only works if the bag is open so i want it to check to amke sure the bad is open every time
id imagine id look a little something like this


Code: [Select]
FINDITEM %containerid
 if FINDKIND <> -1
{
gosub opencontainer
}

return
 

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: check to see if container is open if not go to open it
« Reply #1 on: April 02, 2016, 05:21:04 AM »
0
This should be working

This will open your bag and count
Code: [Select]
sub openlootbag
finditem %lootbag in C_ , #BackpackID
set #LOBJECTID #FINDID
wait 10
event Macro 17 0
finditem %Map in C_ , %lootbag
wait 1s
if #findCnt < 100
{
return
}
else
{
  gosub home
}
return

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: check to see if container is open if not go to open it
« Reply #2 on: April 03, 2016, 11:45:38 AM »
0
hey ghost since youve been so helpful i have another question.. how do you make sure a BOS has charges? i know it has something to do with #property but you know im a noob and cant figure *bleep* out lol

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: check to see if container is open if not go to open it
« Reply #3 on: April 03, 2016, 12:09:26 PM »
0
top on head not sure,   look around using the search button and you might find a looting script with BOS option.    I  only scan for bag itself, not the charge.

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: check to see if container is open if not go to open it
« Reply #4 on: April 03, 2016, 12:15:00 PM »
0
Look here http://www.scriptuo.com/index.php?topic=7270.0;highlight=bos   Crome did the leg work for you.

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: check to see if container is open if not go to open it
« Reply #5 on: April 03, 2016, 12:29:58 PM »
0
thanks ghost. also the sub you wrote broke my looting script not sure why. lol ill post it here

Code: [Select]
sub loot
FINDITEM %CORPSE G_3
if ( #FINDKIND > -1 ) && ( %attacking = #false ) && ( %looting = #false )
   {
   set %noloot #false
   goto lootloop
   }
if #findkind = -1
   {
   set %noloot #true
   }

lootloop:
set %newcorpse #findID
set #LOBJECTID %newcorpse
if #CONTTYPE = %CORPSE
{
  set %opencorpse #CONTID
}
nextCPos 25 450
wait 20
EVENT MACRO 17
wait 20
FINDITEM %loot C_ , %opencorpse
if #findcnt > 0
 {
  set %looting #true
   exevent drag #findID
   wait 10
   EXEVENT DROPC %mapbag
   wait 10
 }
if #findcnt < 1
 {
 set %looting #false
 }
;FINDITEM POF C_ , %opencorpse
;if ( #findcnt > 0 ) && ( %USEBOS = #true )
; {
;   exevent drag #findID #findstack
;   wait 10
;   EXEVENT DROPC #BACKPACKID
;   wait 10
; }
ignoreitem %newcorpse 1
return

Offline TanaTopic starter

  • Jr. Member
  • **
  • Posts: 67
  • Activity:
    0%
  • Reputation Power: 1
  • Tana has no influence.
  • Respect: +6
  • Referrals: 1
    • View Profile
Re: check to see if container is open if not go to open it
« Reply #6 on: April 03, 2016, 12:36:46 PM »
0
yeah i found how to do it i guess i just didn search enough

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: check to see if container is open if not go to open it
« Reply #7 on: April 03, 2016, 05:25:28 PM »
0
Trying to follow to logic, but not sure I'm on the same road as you :)   This is the logic I have in mind.  Hope that work.

Code: [Select]
sub loot
FINDITEM %CORPSE G_2   ;  Should be 2 title
if ( #FINDKIND = 1 ) && ( %attacking = #false ) && ( %looting = #false )   
   set %noloot #true   <  not sure
else
 return

set #lobjectid #findid
event macro 17 0
ignoreitem #findid
nextCPos 25 450
wait 20
if #CONTTYPE = YFM
    set %corpse #contid
FINDITEM %loot C_ , %corpse
If #findkind = -1
 {
 set %looting #false
  return
}
if #findcnt > 0
 {
  set %looting #true
   exevent drag #findid #findstack
   exevent dropc %mapbag
   wait 20
 }
return

Tags: