I am having a problem, but not in the way you imply JAF. Thanks for stepping in to try to pull my head out of the sand though! Might need more than three it seems at this rate.
Since this is a combat situation, removing items from PD is dangerous (you only need to recharge gorgon lens because you are currently fighting medusa). I need another way around that, as I cant see myself releasing a script that could get you killed. I currently use 3-4 charges per medusa, and suspect that others do as well. This and a companion script will greatly reduce the danger of statues.
As to handling containers, I think I finally got a decent handle on that:
find and set %stuff in pack
find and set %boxonground G_ ,
findcnt || findkind to verify in G_ radius.
If true,
then drag %stuff
dropc %stuff in pack to %boxonground.
Since the items I want to charge are in a container, and I get that, the only way to directly target something in it SHOULD be target last (like when we used to steal from paperdolls), or a click with target cursor = 1 at contposX Y or finditem X Y. Thats where I am having issues.
@Twinkle McNugget. Thanks for the reminder. I guess I should be using the target command then? default is 2 seconds, unless an argument (is that the right term?) is added (3-5 being the most common)? target 5s (5s is argument, correct?)
There's also event macro 25 0, wait for target, that could be used as well. Not sure if you would have to use event macro 28 0 (wait) in conjunction though. I never coud get that to work right in the client.
Hmm, not quite... read my post above, then take a look at this code from a pot chugger script I wrote.
sub disarm
{
finditem %lhandtypes C_ , #charid
if #findkind <> -1
{
set %lhanded #findid
set #lHandID %lhanded
wait 2
event macro 24 1
}
finditem %rhandtypes C_ , #charid
if #findkind <> -1
{
set %rhanded #findid
set #rHandID %rhanded
event macro 24 2
}
wait 20
}
return
display ok disarm exited without return
This code finds the items I defined earlier in the script called %lhandtypes. It finds them in the C_ (container) , #charid (paperdoll)
it sets a %lhanded to the #findid
then it sets the #lhandid to the %lhanded (which is the #findid)
it waits 2
then it uses the event macro for disarm.
goes to the next line and searches for %rhandtypes ....... etc etc etc.
also, a tip I learned a long time ago, is when trying to debug your code to see if your subs are exiting correctly with the return, put in the display line after the return. If for some reason the script jumps over the return line, you get a display popup telling you that your sub (helpful to define what sub) exited without a return
Hope this is starting to make more sense...
Listen closely to Cerv and his hints... he is more often correct than mistaken

JaF