Page 1 of 1

Checking other toon buffs?

Posted: Thu Jul 16, 2015 7:07 pm
by Puffda
Is there are way to make my cleric detect if another of my toons has a certain buff/defuff?

I am wanting to set up my cleric so that if one of my guys gets cursed, he will cast RGC on them.

Re: Checking other toon buffs?

Posted: Fri Jul 17, 2015 1:45 am
by Alulien
Yes. I made a post here that should provide you what you're looking for.

Little edit: I would recommend using different checks for same zone/dead as the ones I posted there didn't seem to work reliably.

Re: Checking other toon buffs?

Posted: Fri Jul 17, 2015 2:25 am
by Dreos
Something like this should work:

Code: Select all

   /declare i int local
   /declare n int local
   /declare myBuff[3] int local
   /varset myBuff[1] 5381
   /varset myBuff[2] 5388
   /varset myBuff[3] 5393
   
   |- Checking for buffs and buffing if missing. Change the declare myBuff[x] line to add more buffs, and varset the individual buffs
   
   /for i 1 to ${NetBots.Counts}
      /for n 1 to 3
         /if (!${NetBots[${NetBots.Client.Token[${i}, ]}].Buff.Find[${myBuff[${n}]}]} && ${Group.Member[${i}].Type.Equal[PC]}) {
            /casting ${myBuff[${n}]} -targetid|${Spawn[${NetBots.Client.Token[${i}, ]}].ID}
            /delay ${Cast.Ready[${myBuff[${n}]}]}
         }
      /next n
   /next i


This would go through all your chars on your eqbc server and check for a buff or debuff. I haven't tested it in awhile but I believe checking for Target.Type.Equal[PC] should prevent it from casting on corpses. You might want to check if the char's in zone with something like ${Spawn[pc ${NetBots.Client.Token[${i}, ]}]} - that should return true if it finds that pc in the zone, I think.

Edit: Just noticed the ${Group.Member[${i}]} - I think the group member array starts at 0 while the NetBots array starts at 1, so this might cause some problems. I'll try to test it out tomorrow.