How to get this macro to nuke ONCE?

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Trixz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Apr 21, 2003 8:18 am

How to get this macro to nuke ONCE?

Post by Trixz » Thu Aug 21, 2003 7:41 pm

Been working on this forever and I can't get to nuke only once... it nukes over and over again and won't stop til mob is dead. Anyone have any suggestions?

Code: Select all

#include spellcast.mac
#define RetryBuff t39
#define TheAssistee v40
#define Skipbuff v41
#Event Burnout "Your pet's Burnout"
#Event Shielding "Your shielding fades"
#Event SlowDown "Your feet slow down"
#Event NotTakeHold "Your spell did not take hold"

Sub Main
   /if $p0=="" { 
      /echo Useage: /macro fight <assistname> 
      /end 
   } 
   /varset TheAssistee $p0 
   /varset RetryBuff 25m
   :start
   /if n $char(mana,pct)<25 /call Med
   /call Fight
   /if n $RetryBuff<=0 /call BuffAgain
   /doevents
   /goto :start
/return

Sub Fight
   :tryagain
   /assist $TheAssistee
   /delay 2
   /if $target(type)!=NPC /goto :tryagain
   /if n $target(distance)>85 /call WaitForMob 
   /pet attack

   :loop
   /if n $target(hp,cur)<=50 {
      /stand
      /delay 1
      /call cast "$char(gem,4)"
      /sit
      /return
   }
   /goto :loop
/return

Sub Med
   /assist $TheAssistee
   /if $target(type)=NPC /pet attack
   :checkmana
   /if n $char(mana,pct)>=50 /return
   /goto :checkmana
/return

Sub WaitForMob
   :waiting
   /if n $target(distance)<=85 /return
   /goto :waiting
/return

Sub BuffAgain
   /varset Skipbuff 0
   /doevent Shielding
   /varset RetryBuff 25m
/return

Sub Event_Burnout
   /if n $char(mana,pct)>=15 /call cast "Burnout II"
   /delay 2
/return

Sub Event_Shielding
   /if n $Skipbuff!=0 /return
   /if n $char(mana,pct)>=15 /call cast "Greater Shielding"
   /delay 2
/return

Sub Event_SlowDown
   /stand
   /press 0
   /sit
/return

Sub Event_NotTakeHold
   /varset Skipbuff 1
/return
Last edited by Trixz on Thu Aug 21, 2003 7:57 pm, edited 1 time in total.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Thu Aug 21, 2003 7:55 pm

Try this, altered code in red.

Code: Select all

Sub Fight
	:tryagain
	/assist $TheAssistee
	/delay 2
	/if $target()!=TRUE /goto :tryagain
	/if n $target(distance)>85 /call WaitForMob
	/pet attack

	:loop
	/if n $target(hp,cur)<=50 [color=red]/if n $l0!=1[/color] {
		/stand
		/delay 1
		/call cast "$char(gem,4)"
		[color=red]/varset l0 1[/color]
		/sit
		/return
	}
	/goto :loop
/return

Trixz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Apr 21, 2003 8:18 am

Post by Trixz » Thu Aug 21, 2003 8:07 pm

I should've tested it more... that does what I originally thought it would do... after the first mob it won't cast anymore... what I want is for it to cast one spell on every mob... any ideas on how to fix this?... got the part fixed where it confuses pet for a mob after casting burnout, now how many times it casts a nuke is the only problem with it.

Trixz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Apr 21, 2003 8:18 am

Post by Trixz » Thu Aug 21, 2003 10:05 pm

Ok I finnaly got this to work the way I want it... now the only thing I need to make it do is back away if it gets agro hehe but anyway in case any of you can use it heres the working macro.

Code: Select all

#include spellcast.mac 
#define TheAssistee v40 
#define Skipbuff v41
#Event Burnout "Your pet's Burnout" 
#Event Shielding "Your shielding fades" 
#Event SlowDown "Your feet slow down" 
#Event NotTakeHold "Your spell did not take hold" 

Sub Main 
   /if $p0=="" { 
      /echo Useage: /macro fight <assistname> 
      /end 
   } 
   /varset TheAssistee $p0 
   :start 
   /if n $char(mana,pct)<25 /call Med 
   /call Fight 
   /doevents 
   /goto :start 
/return 

Sub Fight 
   :tryagain 
   /assist $TheAssistee 
   /delay 10
   /if $target(type)!=NPC /goto :tryagain 
   /if n $target(distance)>95 /call WaitForMob 
   /pet attack 
  
   :loop 
   /if n $target(hp,cur)<=50 { 
      /stand 
      /delay 1 
      /call cast "$char(gem,4)" 
      /sit
      /if $target()!=FALSE /call WaitTilDead 
      /return 
   } 
   /goto :loop 
/return 

Sub Med 
   /assist $TheAssistee 
   /if $target(type)=NPC /pet attack 
   :checkmana 
   /if n $char(mana,pct)>=50 /return 
   /goto :checkmana 
/return 

Sub WaitForMob 
   :waiting 
   /if n $target(distance)<=95 /return 
   /goto :waiting 
/return 

Sub WaitTilDead
    :notdead
    /if $target()==FALSE /return
    /goto :notdead

Sub Event_Burnout 
   /if n $char(mana,pct)>=15 /call cast "Burnout II" 
   /delay 2
   /sit 
   /target $TheAssistee
/return 

Sub Event_Shielding 
   /if n $Skipbuff!=0 /return 
   /if n $char(mana,pct)>=15 /call cast "Greater Shielding" 
   /delay 2 
/return 

Sub Event_SlowDown 
   /stand 
   /press 0 
   /sit 
/return 

Sub Event_NotTakeHold 
   /varset Skipbuff 1 
/return

DrMadd
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Jun 03, 2003 1:03 pm

Post by DrMadd » Tue Sep 02, 2003 4:24 pm

Modified your script a little...

Code: Select all


#define TheAssistee v40 
#define Skipbuff v41 
#Event Burnout "Your pet's Burnout" 
#Event Shielding "Your shielding fades" 
#Event SlowDown "Your feet slow down" 
#Event NotTakeHold "Your spell did not take hold" 

Sub Main 
   /if $p0=="" { 
      /echo Useage: /macro fight <assistname> 
      /end 
   } 
   /varset TheAssistee $p0 
   :start 
   /if n $char(mana,pct)<25 /call Med 
   /call Fight 
   /doevents 
   /goto :start 
/return 

Sub Fight 
   :tryagain 
   /assist $TheAssistee 
   /delay 1s 
   /if $target(type)!=NPC /goto :tryagain 
   /if n $target(distance)>95 /call WaitForMob 
   /pet attack 
  
   :loop 
   /if n $target(hp,cur)<=50 { 
      /stand 
      /delay 1 
      /call cast "$char(gem,4)" 
      /sit 
      /if $target()!=FALSE /call WaitTilDead 
      /return 
   } 
   /goto :loop 
/return 

Sub Med 
   /sit
   :checkmana 
   /assist $TheAssistee 
   /if $target(type)=NPC {
   /if n $target(distance)>95 /call WaitForMob 
   /pet attack  
   }
   /if n $char(mana,pct)>=75 /return 
   /goto :checkmana 
/return 

Sub WaitForMob 
   :waiting 
   /assist $TheAssistee 
   /if n $target(distance)<=95 /return 
   /delay 1
   /goto :waiting 
/return 

Sub WaitTilDead 
    :notdead 
    /if $target()==FALSE /return 
    /goto :notdead 

Sub Event_Burnout 
   /if n $char(mana,pct)>=15 /call cast "Burnout IV" 
   /delay 2 
   /sit 
   /target $TheAssistee 
/return 

Sub Event_Shielding 
   /if n $Skipbuff!=0 /return 
   /if n $char(mana,pct)>=15 /call cast "Greater Shielding" 
   /delay 2 
/return 

Sub Event_SlowDown 
   /stand 
   /press 0 
   /sit 
/return 

Sub Event_NotTakeHold 
   /varset Skipbuff 1 
/return  
Basically, If you are medding, no reason your pet can't still assist and attack..... Also changed it so that if the Main Assist targeted a mob way far away, you didnt sit and wait for that mob to come in while the main assist targeted something closer.... and pulled it...

Will test soon....

MaDd