

/ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private./target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs./lua run
/target somespawnid
/delay 5 ${Target.ID}
/if (${Target.PctHPs}<100) {
/if (${Me.TargetOfTarget.ID}) {
/continue
}
}
/declare MyTargetID
/varset MyTargetID ${NearestSpawn[2,npc].ID}
/if (${Spawn[pc loc ${MyTargetID.X}${MyTargetID.Y} ${MyTargetID.z }radius 75 zradius 15].ID}) /echo player near mob lets pull another.
/declare j int local
/declare k int local
/declare MyTargetID int local
/varset k ${NearestSpawn[npc a_rat radius 75].ID}
/for j = 1 to ${k}
/varset MyTargetID ${NearestSpawn[${j},npc a_rat radius 75].ID}
/if (${Spawn[pc loc ${MyTargetID.X}${MyTargetID.Y} ${MyTargetID.z }radius 75 zradius 15].ID}) /echo player near mob lets pull another.
/next j
/declare j int local
/declare k int local
/declare MyTargetID1 int local
/declare MyTargetID2 int local
/varset k ${NearestSpawn[npc a_rat radius 75].ID}
/for j = 1 to ${k}
/varset MyTargetID1 ${NearestSpawn[${j},npc a_rat radius 75].ID}
/if (${Spawn[pc loc ${Spawn[${MyTargetID1}].X} ${Spawn[${MyTargetID1}].Y} ${Spawn[${MyTargetID1.Z}]} radius 75 zradius 15].ID}) {
/varset MyTargetID2 ${NearestSpawn[1,npc loc ${Spawn[${MyTargetID1}].X} ${Spawn[${MyTargetID1}].Y} radius 25].ID}
}
/next j
| Generate our pull list
/for a 1 to ${MaxPullCount}
| | If we have a target start pull from that point. Otherwise pull from where I'm standing.
/if (${Target.ID}) {
/varset TargetID ${Spawn[id ${Target.ID}].NearestSpawn[${a},npc radius ${PullRadius} zradius ${PullZRadius} noalert 10 ${MobsToPull}].ID}
} else {
/varset TargetID ${NearestSpawn[${a},npc radius ${PullRadius} zradius ${PullZRadius} noalert 10 ${MobsToPull}].ID}
}
/delay 1s ${TargetID}
/if (!${TargetID}) /goto :StartPull
/varset TotalMobs ${a}
/varset MobArray[${a}] ${TargetID}
/echo MobID ${a} is ${Spawn[${MobArray[${a}]}].CleanName}(${Spawn[${MobArray[${a}]}].ID})
/next a