User:Choonster/Obsolete Macros

These macros are obsolete, but are listed here to preserve them.

Random companion from a specified pool
/run CallCompanion("CRITTER",GetRandomArgument(''' c1,c2,c3,etc. )) Replace  c1,c2,c3,etc. ''' with the indices of your companions.

Random companion with exceptions
/run local r,c,t=random,"CRITTER"t={r( X-1 ),r( X+1 , Y-1 ),r( Y+1 , Z-1 ),r( Z+1 ,GetNumCompanions(c))}CallCompanion(c,t[r(#t)]) Where  X,Y,Z  are indices of companions you don't want the macro to summon. This pattern can be repeated as many times as needed to exlude any number of companions (at a certain point it becomes more efficient to specify which companions you do want to summon rather than which ones you don't).  X,Y,Z  must be in ascending order from left to right. i.e. X < Y < Z

Correct Usage
X=10, Y=20, Z=25

t={r( 9 ),r( 11 , 19 ),r( 21 , 24 ),r( 26 ,GetNumCompanions(c))}

Incorrect Usage
X=20, Y=10, Z=25

t={r( 19 ),r( 21 , 9 ),r( 11 , 24 ),r( 26 ,GetNumCompanions(c))}

Random companion from a specified pool and smart random flyer/ground mount
/run local c,g=CallCompanion,GetRandomArgument c("CRITTER",g(''' c1,c2,c3,etc. ))if not IsMountedand IsOutdoorsthen c("MOUNT",IsFlyableAreaand g( f1,f2,f3,f4,etc. )or g( g1,g2,g3,g4,etc. '''))end Replace ''' c1,c2,c3,etc.  with the indices of your companions,  f1,f2,f3,f4,etc.  with the indices of your flying mounts and  g1,g2,g3,g4,etc. ''' with the indices of your ground mounts.