ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Tana on April 01, 2016, 11:18:31 PM
-
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
FINDITEM %containerid
if FINDKIND <> -1
{
gosub opencontainer
}
return
-
This should be working
This will open your bag and count
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
-
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
-
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.
-
Look here http://www.scriptuo.com/index.php?topic=7270.0;highlight=bos Crome did the leg work for you.
-
thanks ghost. also the sub you wrote broke my looting script not sure why. lol ill post it here
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
-
yeah i found how to do it i guess i just didn search enough
-
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.
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