Advpath

andrewi

New member
Joined
Jan 2, 2009
Messages
49
Reaction score
0
Points
0
Trying to play with this for the first time and making a right mess of things.

Has anyone got some code / ini they'd be happy to share with a simple example of it in use. All I want to do is walk from A to B with stops to take out the mobs along the way - then return and rinse / repeat.

Had a quick search but couldn't see anything already posted - apologies if I've missed something!

Thanks,

A/
 
You want to have your path just go from A to B.

But while you are pathing you want it to check for mobs.

Something like this, I use a path sub while running the path I run another sub called CheckPath, this loops until the path is finished or one of the subs inside that fires off. It then either goes to next path or targets a mob that triggers the pull function. After that it returns to start point.

Code:
Sub DW_1
/if (${ReportSub}) /echo DW_1
/play DW_1 smart
/call CheckPath
/play DW_1 reverse smart
/call Checkpath
/return


Sub CheckPath
/if (${ReportSub}) /echo CheckPath
:path
/if (${AdvPath.State}==2  && !${Target.ID}) {
  /if (${SpawnCount[NPC alert 1 noalert 5 los radius 200]}) {
    /if (${Report}) /echo Mobs Found
    /play off
    /call AquireTarget
    /call PullTarget
  }
}  
/if (${AdvPath.State}==2) /goto :path
/return


Sub AquireTarget
/if (${ReportSub}) /echo AquireTarget
/if (${SpawnCount[NPC alert 1 noalert 5 los radius 200]} ) {
  /target npc targetable alert 1 noalert 5 los radius 200
  /delay 4s ${Target.Type.Equal[NPC]}
  } 
/if (${Me.TargetOfTarget.Name.NotEqual[${puller}]}) {
  /squelch /target clear
  /echo Has someone else on Target already
  }
/return  

Sub PullTarget
/if (${ReportSub}) /echo PullTarget
:recast
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<210 && ${Me.SpellReady[${hateSpell}]}) {
  /face nolook
  /call cast "${hateSpell}" gem2 10s
  /if (${ReportBuff}) /echo Casting ${hateSpell}
  /varset hateTimer 15s
  }
/if (!${Me.TargetOfTarget.ID} && ${Target.LineOfSight} && ${Target.Distance}<210) /goto :recast
/if (!${Me.TargetOfTarget.ID}) /squelch /target clear
/return