Help

JS-CHAR-SWARM

The Char swarm() method is used to swarm mobiles after the character. The syntax is:

<victim>.swarm( [ 'zone', ] <power levels>, <percent>, <vnum1>, ..., <vnumN> );

Where victim is who should be swarmed, power levels is the number of power levels of mobiles to swarm after the victim, and percent is the percentage chance between 1 and 100 that any individually mobile will be sent swarming. If you specify the 'zone' option, only mobiles in the same zone as the victim will be swarmed after them. The list of vnums is the vnums for the mobiles which should be sent after the victim.

For example, the following will send up to 50 power levels of mobiles #23123 and #23124 who are in the same zone as the actor after the actor. By "50 power levels" this means that up to 1 50th level mobile will be sent, or 2 level 25 mobiles, or 4 level 12 mobiles, and so on. There will be a 80% chance that a particular mobile will be sent swarming per invocation of this method.

actor.swarm( 'zone', 50, 80, 23123, 23124 );

If you want to swarm all mobiles after the victim, specify a high power level number as in the following example:

actor.swarm( 10000, 23221, 23231, 12323 );