Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.80 KB | None | 0 0
  1. |AF_Bst.mac 1
  2.  
  3. #turbo 40
  4. #include wait4rez.inc
  5. #include ninjadvloot.inc
  6. #include General.inc
  7. #include Spell_routines.inc
  8. #event Experience "#*#You have slain#*#"
  9. #event Experience "#*#has been slain by#*#"
  10. #event Experience "#*#You gain party experience#*#"
  11. #event Experience "#*#You gained raid experience#*#"
  12. #event faraway "Your Target is too far away, get closer!"
  13. #event IRC "<#1#> #2#"
  14. #event SetVar "[MQ2] set: #1# #2#"
  15. #event nosee "You cannot see your target."
  16. #event CantHit "You can't hit them from here."
  17. #event Zone "You have entered #1#."
  18. #event Zone "LOADING, PLEASE WAIT..."
  19. #event NotHold "Your spell did not take hold."
  20. #event Help "[MQ2] Help"
  21. #chat tell
  22. #chat chat
  23. Sub main
  24. /declare dummy int local
  25. /call GeneralDeclares
  26. /call GeneralDeclares2
  27. /call event_zone
  28. /squelch /alias /Bsthelp /echo help
  29. /echo Beastlord Script Started 1
  30. :Mainloop
  31. /varset MacroState MainLoop
  32. /delay 1
  33. /doevents
  34. /if ( ${Followflag} || ${Me.Invis} ) /goto :Mainloop
  35. /call DpsMode
  36. /call MedTime
  37. /if (${Me.Dead}) /call wait4rez
  38. /if (${DoLoot} && !${Me.Moving} && !${Me.Invis}) /call LootMobs
  39. /if (!${CheckExpTimer} && ${AutoExpAdjust}) /call AutoAdjustExp
  40. /if (${Me.PctEndurance}<=18 && ${Me.CombatAbilityReady[Respite]} && !${Me.Combat} && !${Me.Invis}) /disc Respite
  41. /call pet
  42. /call buffs
  43. /goto :Mainloop
  44. /return
  45.  
  46. Sub GeneralDeclares
  47. /declare Followflag int outer 0
  48. /declare Y float outer
  49. /declare X float outer
  50. /declare Counter int local
  51. /declare iMobID int outer
  52. /declare iMobCount int outer 0
  53. /declare iMobArray int outer 15
  54. /declare iMobList[16] int outer
  55. /declare iDebuffList[16] int outer
  56. /declare iniName string outer Bst_${Me.Name}.ini
  57. /declare bufftimer timer outer
  58. /declare MainMobID int outer
  59. /declare p int local
  60. /declare TempAggroTimer timer outer
  61. /declare TempIgnoreTimer timer outer
  62. /declare CurrentTarget int outer
  63. /declare following string outer
  64. /declare TempStickSetting int outer
  65. /declare validTarget int outer
  66. /declare irctimer timer outer 0s
  67. /declare WithStandTimer timer outer
  68. /declare CantHit int outer
  69. /declare acquiretimer timer outer 0
  70. /call DeclareIniVar RangeItem string Settings ""
  71. /call DeclareIniVar RangeItemSummon string Settings ""
  72. /call DeclareIniVar MobRadius int SETTINGS 10 /radius
  73. /call DeclareIniVar DpsMode int Settings 1 /dps
  74. /call DeclareIniVar MainAssist string Settings somebody /ma
  75. /call DeclareIniVar SecondAssist string Settings somebody
  76. /call DeclareIniVar TrippleAssist string Settings somebody
  77. /call DeclareIniVar EventsMaster string Settings somebody
  78. /call DeclareIniVar StickSetting string Settings 35 /sticksetting
  79. /call DeclareIniVar AssistDistance int Settings 80 /assistdistance
  80. /call DeclareIniVar AssistAt int Settings 98 /assistat
  81. /call DeclareIniVar DoLoot int Settings 0 /Doloot
  82. /call DeclareIniVar UseDisc int Settings 0 /UseDisc
  83. /Call DeclareIniVar WhenToBurn int Settings 95 /burn
  84. /Call DeclareIniVar Endurance int Settings 5 /Endurance
  85. /Call DeclareIniVar Petbuff1 string pet /petbuff1
  86. /Call DeclareIniVar Petbuff2 string pet /petbuff2
  87. /Call DeclareIniVar Petbuff3 string pet /petbuff3
  88. /Call DeclareIniVar Pethaste string pet /pethaste
  89. /Call DeclareIniVar Petshrink string pet /petshrink
  90. /Call DeclareIniVar Pet string pet /pet
  91. /Call DeclareIniVar BV string Disc NULL /bv
  92. /Call DeclareIniVar Naturesfury string Disc NULL /Naturesfury
  93. /Call DeclareIniVar Growl string pet NULL /Growl
  94. /Call DeclareIniVar SE string Buffs NULL /SE
  95.  
  96. /return
  97.  
  98. Sub Pet
  99. /varset MacroState Pet
  100. /if (${Cast.Ready[${Pet}]} && !${Me.Pet.ID} && ${Me.PctMana}>=20 && !${Me.Combat}) /cast "${Pet}"
  101. /if (${Cast.Ready[${Petbuff1}]} && !${Me.PetBuff[${Petbuff1}]} && ${Spell[${Petbuff1}].Stacks[0]} && ${Me.PctMana}>=20 && ${Me.Pet.ID} && !${Me.Combat}) /cast "${Petbuff1}"
  102. /if (${Cast.Ready[${Petbuff2}]} && !${Me.PetBuff[${Petbuff2}]} && ${Spell[${Petbuff2}].Stacks[0]} && ${Me.Pet.ID} && ${Me.PctMana}>=20 && !${Me.Combat}) /cast "${Petbuff2}"
  103. /if (${Cast.Ready[${Petbuff3}]} && !${Me.PetBuff[${Petbuff3}]} && ${Spell[${Petbuff3}].Stacks[0]} && ${Me.Pet.ID} && ${Me.PctMana}>=20 && !${Me.Combat}) /cast "${Petbuff3}"
  104. /if (${Cast.Ready[${Pethaste}]} && !${Me.PetBuff[${Pethaste}]} && ${Spell[${Pethaste}].Stacks[0]} && ${Me.PctMana}>=20 && ${Me.Pet.ID} && !${Me.Combat}) /cast "${Pethaste}"
  105. /if (${Cast.Ready[${Petshrink}]} && ${Me.Pet.Height}>=1 && !${Me.Combat}) /cast "${Petshrink}"
  106. /return
  107.  
  108. Sub Buffs
  109. /if (${Cast.Ready[${SE}]} && !${Me.Buff[${SE}].ID} && !${Me.Combat} && ${Me.PctMana}>=25) /cast "${SE}"
  110. /return
  111.  
  112. Sub DpsMode
  113. /doevents
  114. /call GetTarget
  115. /if (${validTarget} && ${Target.PctHPs}<=${AssistAt} && ${Target.Type.Equal[NPC]} && ${Target.Distance} < ${AssistDistance} && ${Target.ID}) /goto :KillTarget
  116. /return
  117. :Killtarget
  118. :loop
  119. /doevents
  120. /delay 1
  121. /call Attack
  122. /call CheckHealth
  123. /if (!${validTarget} || ${ExcludeList.Find[${Target.DisplayName}]}) /multiline ; /squelch /target clear; /attack off; /return
  124. /if (${Target.Type.Equal["Corpse"]} || !${Target.ID}) /multiline ; /squelch /target clear; /varset validTarget 0; /attack off; /return
  125. /if (${validTarget}) /goto :loop
  126. :end
  127. /return
  128.  
  129. Sub GetMob
  130. /varset MacroState GetMob
  131. /declare MobID int local
  132. /declare i int local
  133. /declare MobLvl int local 5
  134. /declare MobToKill int local 0
  135. /declare MobDistance int local ${MobRadius}
  136. /declare Mobs int local
  137. /if (${Me.Dead}) /call wait4rez
  138. /delay 3
  139. /if (${Target.ID} && ${Target.Type.Equal[npc]} && !${ExcludeList.Find[${Spawn[ID ${MobID}].CleanName}]}) {
  140. /varset MobToKill ${Target.ID}
  141. /goto :end
  142. }
  143. /if (${SpawnCount[npc los Range 5 110 radius 50 zradius 50 targetable]}) {
  144. /varset Mobs ${SpawnCount[npc los Range 5 110 radius 50 zradius 50 targetable]}
  145. /for i 1 to ${Mobs}
  146. /varset MobID ${NearestSpawn[${i}, npc los Range 5 110 radius 50 zradius 50 targetable].ID}
  147. /if (${Spawn[id ${MobID}].Level}>${MobLvl} && ${Spawn[id ${MobID}].Type.Equal[NPC]} && !${ExcludeList.Find[${Spawn[id ${MobID}].CleanName}]} && ${Spawn[id ${MobID}].CleanName.Length}>1 || ${MezzImmuneList.Find[${Spawn[ID ${MobID}].CleanName}]}) {
  148. /varset MobToKill ${MobID}
  149. /varset MobLvl ${Spawn[id ${MobID}].Level}
  150. /if (${MezzImmuneList.Find[${Spawn[ID ${MobID}].CleanName}]}) {
  151. /echo ${Spawn[ID ${MobID}].CleanName}]} Is Mezzimmune So i'm going after him!
  152. /goto :end
  153. }
  154. /if (${Spawn[id ${MobID}].Named} || ${NameList.Find[${Spawn[ID ${MobID}]}].CleanName}) /goto :end
  155. }
  156. /next i
  157. /goto :end
  158. }
  159. /if (${SpawnCount[npc los Range 5 110 radius ${MobRadius} zradius 50 targetable]}) {
  160. /varset Mobs ${SpawnCount[npc los Range 5 110 radius ${MobRadius} zradius 50 targetable]}
  161. /for i 1 to ${Mobs}
  162. /varset MobID ${NearestSpawn[${i}, npc los Range 5 110 radius ${MobRadius} zradius 50 targetable].ID}
  163. /if (${Spawn[id ${MobID}].Type.Equal[NPC]} && ${Spawn[id ${MobID}].LineOfSight} && !${ExcludeList.Find[${Spawn[id ${MobID}].CleanName}]} && ${Spawn[id ${MobID}].CleanName.Length}>1 && !${TempIgnoreTimer${MobID}}) {
  164. /varset MobToKill ${MobID}
  165. /varset MobLvl ${Spawn[id ${MobID}].Level}
  166. /goto :end
  167. }
  168. /next i
  169. }
  170. :end
  171. /if (${Spawn[${MobToKill}].Type.NotEqual[Aura]}) {
  172. /target id ${MobToKill}
  173. /varset TempAggroTimer 20s
  174. /varset CantHit 0
  175. /varset CurrentTarget ${Target.ID}
  176. /if (${Target.ID}) /squelch /face fast
  177. /if (!${Defined[TempIgnoreTimer${MobToKill}]}) /declare TempIgnoreTimer${MobToKill} timer outer
  178. } else {
  179. /return
  180. }
  181. /delay 1s ${Target.Type.Equal[NPC]}
  182. /return
  183.  
  184. Sub Attack
  185. /varset MacroState Attack
  186. /if (${Me.Sitting}) /squelch /stand
  187. /if (!${Melee.Combat}) /killthis
  188. /if (${Melee.Combat}) /face fast
  189. /if (${Me.CombatAbilityReady[${BV}]} && ${Me.PctEndurance}>=${Endurance} && ${Target.PctHPs}<94 && ${Me.Combat}) /doability "${BV}"
  190. /if (${Me.PctMana}>=20 && ${Me.CombatState.Equal[Combat]}) /call cast "${Growl}"
  191. /if (${UseDisc}) /call UseDisc
  192. /return
  193.  
  194. Sub UseDisc
  195. /varset MacroState UseDisc
  196. /if (${Me.Dead}) /call wait4rez
  197. /return
  198.  
  199. Sub CheckHealth
  200. /varset MacroState CheckHealth
  201. /if (${Me.Dead}) /call wait4rez
  202. /return
  203.  
  204.  
  205. Sub Checkall
  206. /doevents
  207. /varset MacroState checkall
  208. /declare MobID int local
  209. /declare i int local
  210. /declare mobcount int local
  211. /declare Mobs int local
  212. /if (${Me.Dead}) /call wait4rez
  213. /if (${Target.Type.Equal[Corpse]} || ${Target.Type.Equal[PC]}) {
  214. /squelch /target clear
  215. /call interrupt
  216. /return
  217. }
  218. /if (${DpsMode}) /return
  219. /call CheckName
  220. /return
  221.  
  222. Sub GetTarget
  223. /varset MacroState GetTarget
  224. /declare i int local
  225. /declare tempID int local ${Target.ID}
  226. /if (${Me.Moving}) /return
  227. /if (${Spawn[${MainAssist}].ID}) {
  228. /assist ${MainAssist}
  229. } else /if (${Spawn[${SecondAssist}].ID}) {
  230. /assist ${SecondAssist}
  231. } else /if (${Spawn[${TripleAssist}].ID}) {
  232. /assist ${TripleAssist}
  233. }
  234. /delay 2
  235. /if (${ExcludeList.Find[${Target.DisplayName}]}) /goto :notgood
  236. /if ( ( ${Spawn[${tempID}].Type.Equal[npc]} || ( ${Spawn[${tempID}].Type.Equal[pet]} && !${Spawn[${tempID}].Master.Type.Equal[pc]} ) ) && ( ( ${Spawn[pc ${mainTank}].NearestSpawn[radius ${Math.Calc[${AssistDistance}*2]} id ${tempID}].ID} && ${Spawn[pc ${mainTank}].Distance3D}<=${AssistDistance} ) || !${Spawn[pc ${mainTank}].ID} || ${Spawn[pc ${mainTank}].Distance3D}>200 ) && ${tempID}!=${petID} && ( ${aggroAnim.Find[|${Spawn[${tempID}].Animation}|]} || ${Spawn[${tempID}].PctHPs}<${AssistAt} || ${Me.TargetOfTarget.Type.Equal[pc]} || ${Me.TargetOfTarget.Master.Type.Equal[pc]} ) ) {
  237. /varset validTarget 1
  238. /varset CurrentTarget ${Target.ID}
  239. } else {
  240. :notgood
  241. /varset validTarget 0
  242. }
  243. /return
  244.  
  245. Sub DeclareIniVar(string name,string varType,string section,string value,string alias)
  246. /if ( !${Defined[${name}]} ) /declare ${name} ${varType} outer
  247. /varset ${name} ${Ini[${iniName},${section},${name.Left[1].Upper}${name.Right[-1]},"${value}"]}
  248. /ini "${iniName}" "${section}" "${name.Left[1].Upper}${name.Right[-1]}" "${${name}}"
  249. /if ( ${Defined[alias]} ) /squelch /alias ${alias} /echo set: ${name}
  250. /return
  251.  
  252. Sub Irc
  253. /Call DeclareIniVar IRCServer string Settings "localhost 6667"
  254. /Call DeclareIniVar IRCChannel string Settings "Main"
  255. /i quit
  256. /iconnect ${IRCServer} ${IRCCchannel} ${Me}
  257. /timed 30 /i join #${IRCChannel}
  258. /varset irctimer 30s
  259. /return
  260.  
  261.  
  262. Sub Event_nosee
  263. /varset MacroState NOSEE
  264. /if (${Target.Distance} >50 && ${SpawnCount[npc radius 50]} || ${Target.Distance} > ${MobRadius}) /squelch /target clear
  265. /doevents flush nosee
  266. /varset MainMobID 0
  267. /delay 1
  268. /return
  269.  
  270. Sub CheckName
  271. /declare lMobID int local
  272. /declare Counter int local
  273. /declare lMobToKill int local 0
  274. /declare Mobs int local
  275. /if (!${SpawnCount[npc radius 50 zradius 30]}) /return
  276. /varset Mobs ${SpawnCount[npc radius 50 zradius 30 los]}
  277. /for Counter 1 to ${Mobs}
  278. /varset lMobID ${NearestSpawn[${Counter},npc radius 50 zradius 30].ID}
  279. /if (${Spawn[id ${lMobID}].LineOfSight} && !${Spawn[id ${lMobID}].CleanName.Find[s corpse]} && !${ExcludeList.Find[${Spawn[id ${lMobID}].CleanName}]} && (${Spawn[id ${lMobID}].Named} || ${NameList.Find[${Spawn[${lMobID}]}].CleanName} || ${MezzImmuneList.Find[${Spawn[${lMobID}]}].CleanName} ) ) {
  280. /if (${Target.ID}!= ${lMobID} && !${NameList.Find[${Target.ID}].CleanName} && !${MezzImmuneList.Find[${Target.ID}].CleanName} ) /target id ${lMobID}
  281. /delay 1s ${Target.ID}==${lMobID}
  282. /return
  283. }
  284. /next Counter
  285. /return
  286.  
  287. Sub Event_Experience
  288. /varset MacroState Experience
  289. /if (${DpsMode}) /varset validTarget 0
  290. /return
  291.  
  292. Sub checkammo
  293. /if (${FindItemCount[${RangeItemSummon}]} < 30) {
  294. /if (${FindItem[${RangeItem}].ID}) {
  295. /call cast "${RangeItem}" Item 0
  296. /delay 6s ${Cursor.ID}
  297. /timed 5 /autoinventory
  298. /delay 2s !${Cursor.ID}
  299. }
  300. }
  301. /return
  302.  
  303. Sub Event_faraway
  304. /varset MacroState Faraway
  305. /delay 10s !${Me.Moving}
  306. /if (!${Me.Moving}) /multiline ; /squelch /stick; /squelch /killthis
  307. /delay 5
  308. :end
  309. /doevents flush faraway
  310. /return
  311.  
  312. Sub Event_CantHit
  313. /varset CantHit ${Math.Calc[${CantHit}+1]}
  314. /if (${CantHit} > 15) /multiline ; /varset TempIgnoreTimer${Target.ID} 60s;/squelch /target clear
  315. /return
  316.  
  317. Sub Event_NotHold
  318. /if (${Defined[TempIgnoreTimer${Target.ID}]}) /multiline ; /varset TempIgnoreTimer${Target.ID} 60s;/squelch /target clear
  319. /doevents flush NotHold
  320. /delay 3
  321. /return
  322.  
  323. Sub Event_Help
  324. /echo Beastlord Script Help
  325. /echo /Dps On/Off - When turned on the Macro will not cast any aggro spells and will not taunt. It will start assisting someone else and just attack and use dps Type spells.
  326. /echo /MA ToonName - This is to be used with dps mode. This basically sets who you're going to be assisting.
  327. /echo /sticksetting # - This is your stick Range that you want to use. If you set it to high the Macro will try to compensate and Find Max melee. This is only for DPS mode.
  328. /echo /Assistdistance # - This is how close the mob has to be before it will start attacking when it reaches the desired health. This is only for DPS mode.
  329. /echo /Assistat # - This is the health the mob has to be before it decides to even attack If the mob is close enough. This is only for DPS Mode.
  330. /echo /Doloot On/Off - Turns looting On and Off.
  331. /echo /DoAura On/Off - Turns Aura On and Off.
  332. /echo /UseDisc On/Off - Burns Disc's on named On and Off.
  333. /echo /AutoSit On/Off - Turns Auto Sitting on or off. Will try to sit If either Mana or Endurance is under 90%.
  334. /echo /Autoadjustexp On/Off - Turns on whether you want the Macro to auto adjust Whether your Exp goes to Level or AAs.
  335. /echo /Maintexplvl # - This is the minimum amount of Exp you want in the Level you're currently at to have before the AutoAdjuster will make Exp go to AAs.
  336. /echo /MaxLevel # - This is the Level your toon needs to be before it even decides to go to AAs.
  337. /return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement