need some help

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

KaKaMoNsTeR

need some help

Post by KaKaMoNsTeR » Sun Nov 02, 2003 10:37 pm

the evade function dosent work and i dont know how to fix it, and i whould like it to use backstab all the time even in front. whould be greatfull for any assistance i can get. thanks

Code: Select all

| Auto Rogue Script 
| Program by Jay 
| Updated by AP50 
| 
| Version 1.06   11/NOV/2003 
| 
| Usage: /macro autorogue <Tank Name> 
| 
| Changes for 1.02 
|   - Added Sneakhide option 
|   - Added BehindTarget check during enrage 
|   - Added enrage var 
|   - Added documentation 
|   - Changed, You will not evade when mob is below 20% 
| Changes for 1.03 
|   - Added target engage delay 
|   - Added target range check before engage 
|   - Checks to make sure target is not a pet first 
|   - Added an assist in the attack loop 
| Changes for 1.04 
|   - Added death check 
| Changes for 1.05 
|   - Updated for use with new variable system 
| Changes for 1.06 
|   - Just fixing the nopredict change 

#Event Enraged "has become ENRAGED" 
#Event Offrage "is no longer enraged" 
#Event Slainby "You have been slain by" 

#include routines.mac 
#turbo @turboamount 

Sub main 

| ----- Trigger Declares --------------------- 
/Declare assisthealth global 
/Declare evaderefresh global 
/Declare turboamount global 
/Declare sneakhide global 
/Declare engagedistance global 

| ----- Trigger Values ----------------------- 

/Varset assisthealth   96   | Wait until mob is below this health trigger. 
/Varset evaderefresh   105   | How long it takes till evade refreshes. 
/Varset turboamount   380   | Turbo Amount, Change at your own risk. 
/Varset sneakhide   1   | Sneak Hide between kills; 1 = Yes, 0 = No 
/Varset engagedistance   150   | How close mob must be to engage 

| ----- Variables ---------------------------- 
/Declare evadetimer   timer 
/Declare checktimer   timer 
/declare targetname   global 
/Declare targetid   global 
/Declare tankname   global 
/Declare attacktarget   global 
/Declare tempvar   global | Simple tempvar 
/Declare behindtarget   global | 1 = True, 0 = False 
/Declare targetenrage   global | 1 = True, 0 = False 
/Declare prekillxp   global | Exp prior to kill 
/Declare postkillxp   global | Exp after kill 
/Declare xpdiff      global | Difference in Exp pre/post kill 
/Declare xptillding   global | Exp till next level 
/Declare prekillaaxp   global | AA Exp prior to kill 
/Declare postkillaaxp   global | AA Exp after kill 
/Declare aaxpdiff   global | Difference in AA Exp pre/post kill 
/Declare mobstillding   global | Approx number of kills of this mob type till next level 
/Declare mobtypekilled   global | Number of this mob type killed 
/Declare mobdetail   array2 | Mob details array 


   /echo "Auto Rogue Version 1.05 Starting" 
   /varset tankname @Param0 
   /echo "@tankname is assist tank." 
   /varset tempvar 0 
   /if n @sneakhide==1 { 
      /doability "Sneak" 
      /doability "Hide" 
   } 
   /goto :Wait 
   /goto :Attack 
/return 

:Wait 
   /assist @tankname 
   /delay 5 
   /if "$target()"=="FALSE" { 
      /target @tankname 
      /face fast
      /goto :Wait 
   } 
   /if "$target(type)"!="NPC" { 
      /face fast
      /goto :Wait 
   } 
   /if n @tempvar!="$target(hp,pct)" /echo $target(name,clean) targeted at $target(hp,pct)% at distance $target(distance). 
   /varset tempvar "$target(hp,pct)" 
   /face fast

   /if n "$target(hp,pct)"<=@assisthealth /if n "$target(distance,noprodict)<@engagedistance" /if n "$target(pet)==0" /goto :DoubleCheck 
   /Attack off 
   /DoEvents 
/goto :Wait 

:DoubleCheck 
   /delay 10 
   /if n "$target(hp,pct)"<=@assisthealth /if n "$target(distance)<@engagedistance" /if n "$target(pet)==0" /goto :Attack 
/goto :Wait 

:Attack 
   /doability "Sneak" 
   /echo Fighting $target(name,clean). It is a level $target(level) $target(race). 
   /varset prekillxp $char(exp) 
   /varset prekillaaxp $char(aa,exp) 
   /varset mobdetail(8,0) "$target(name,clean)" 
   /varset mobdetail(1,1) $target(level) 
   /varset mobdetail(1,2) $target(name) 
   /varset mobdetail(1,3) $target(id) 
   /varset targetname $target(name) 
   /varset targetid $target(id) 
   /varset evadetimer @evaderefresh 
   /varset attacktarget 1 
   /varset behindtarget 0 
   /varset targetenrage 0 
   /face fast
   /sendkey down up 
   /if n @attacktarget==1 /attack on 
:AttackLoop 
   /assist @tankname 

   /if "$target()"=="FALSE" /goto :AttackEnd 
   /if "$target(id)"!="@targetid" /goto :AttackEnd 

   /if n @targetenrage==1 /varset attacktarget @behindtarget 
   /if n @attacktarget==1 /if n $target(distance)<18 /doability backstab 
   /if n @attacktarget==1 /Attack on 
   /if n @attacktarget==0 /Attack off 

   /face fast 
   /if n $target(distance)>18 /sendkey down up      |If target is farther then 18 move forward 
   /if n $target(distance)<8 /sendkey down down     |If target is closer then 8 move back 
   /if n $target(distance)<13 /sendkey up up        |If target is closer then 10 stop moving forward 
   /if n $target(distance)>10 /sendkey up down      |If target is farther then 9 stop moving back 

   /face fast 
   /doevents 
   /if n $target(distance)<18 /if n $target(distance)>8  /goto :rotate 
/goto :AttackLoop 

:rotate 
  | ----- Clockwise Rotate Check ----- 
   /if n $target(heading)>=180 /if n $calc($target(heading)-180)<=$char(heading) /if n $char(heading)<$calc($target(heading)-22.5) /goto :bsclock 
   /if n $target(heading)>=180 /if n $char(heading)<=180 /if n $calc($char(heading)-22.5)>$calc($target(heading)-360) /goto :bscounter 
   /if n $target(heading)<=180 /if n $char(heading)<$calc($target(heading)-22.5) /goto :bsclock 
  | ----- Counter Clockwise Rotate Check ----- 
   /if n $char(heading)>=180 /if n $calc($char(heading)-180)<=$target(heading) /if $char(heading)>$calc($target(heading)+22.5) /goto :bscounter 
   /if n $char(heading)>=180 /if n $target(heading)<=180 /if n $calc($char(heading)-157.5)<$calc($target(heading)+180) /goto :bsclock 
   /if n $char(heading)<=180 /if n $target(heading)<=180 /if n $char(heading)>$calc($target(heading)+25) /goto :bscounter 
   /varset behindtarget 1 
/goto :AttackLoop 

:AttackEnd 
   /echo "@targetname has died" 
   /call event_exp 
   /sendkey up up 
   /sendkey up down 
   /sendkey up ctrl 
   /varset attacktarget 0 
   /varset tempvar 0 
   /varset evadetimer 0 
   /attack off 
   /echo "Waiting for @tankname to select a new target..." 
   /delay 10 
   /if n @sneakhide==1 { 
      /doability "Sneak" 
      /doability "Hide" 
   } 
/goto :Wait 

:bsclock 
   /sendkey down ctrl 
   /sendkey down right 
   /sendkey down up 
   /sendkey up up 
   /sendkey down down 
   /sendkey up down 
   /sendkey up right 
   /sendkey up ctrl 
   /press down 
   /press ctrl 
   /face fast
   /varset behindtarget 0 
/goto :AttackLoop 

:bscounter 
   /sendkey down ctrl 
   /sendkey down left 
   /sendkey down up 
   /sendkey up up 
   /sendkey down down 
   /sendkey up down 
   /sendkey up left 
   /sendkey up ctrl 
   /press down 
   /press ctrl 
   /face fast
   /varset behindtarget 0 
/goto :AttackLoop 

| ----- Events called by /DoEvents ----- 

Sub Event_Enraged 
   /if n @behindtarget==0 /varset attacktarget 0 
   /varset targetenrage 1 
   /attack off 
/return 

Sub Event_Offrage 
   /varset targetenrage 0 
   /varset attacktarget 1 
   /attack on 
/return 

Sub Event_Slainby 
   /endmacro 
/return 

Sub Event_Timer 
   /if n @Param0==1 /goto :timerEvade 
/return 

| *** Event Subs *** 

:timerEvade 
   /if n "$target(hp,pct)">=30 { 
      /sendkey up up 
      /sendkey up down 
      /attack off 
      /delay 3 
      /doability Hide 
      /if n @attacktarget==1 /attack on 
   } 
   /varset evadetimer evaderefresh 
/return 

|#Exp Comparison Event 
sub event_exp 
/delay 1s 

/varset postkillxp $char(exp) 
/varset postkillaaxp $char(aa,exp) 
/varcalc xpdiff @postkillxp-@prekillxp 
/varcalc aaxpdiff @postkillaaxp-@prekillaaxp 
/varcalc xptillding 100-$char(exp) 
/varcalc mobstillding @xptillding/@xpdiff 
  /if n @xpdiff>0 { 
  /echo and you've gained @xpdiff% exp and @aaxpdiff% AA exp, bringing your total exp to $char(exp)% and your AA exp to $char(aa,exp)%!! 
   |#Read npc.ini for any entries of last target. (comment from here to next !! area to stop INI saving) 
   /if n $ini(npc.ini,"$zone","@mobdetail(8,0)")=="notfound" { 
    /varset mobtypekilled 0 
   } else { 
    /varset mobtypekilled $ini(npc.ini,"$zone","@mobdetail(8,0)") 
   } 
   /varcalc mobtypekilled @mobtypekilled+1 
   |#Save the data in npc.ini 
   /ini npc.ini "$zone" "@mobdetail(8,0)" @mobtypekilled 
   |!! 
   /echo Don't forget, @xptillding% left till level, with only @mobstillding of these mobs to kill. 
    |#display npc.ini data. (comment from here to next !! area to stop INI saving) 
    /if n @mobtypekilled==1.00 { 
     /echo This is your first kill of @mobdetail(8,0) in $zone. 
    } else { 
     /echo You've have killed @mobdetail(8,0) a total of $int(@mobtypekilled) times in $zone. 
    } 
    |!! 
   /varset mobtypekilled 0 
  } else { 
|# Below handles when you don't get exp or just dinged 
  /echo Exp remains at $char(exp)% and AA exp remains at $char(aa,exp)% after kill. 
  } 
/return

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sun Nov 02, 2003 10:48 pm

What's with all the guests lately.

People afraid to register?

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Mon Nov 03, 2003 9:19 am

Nah, it's F-H. Everyone wants to know how to protect offsets, and F-H is telling them to use MQ to do it.

But, F-H won't tell them how, or what the various "level 2 and higher" offsets are. So they are all coming here to try to get us to give them the info, not understanding that you won't find it here.

KaKaMoNsTeR: You won't find information here on how to backstab from in front. That's a blatant hack, and MQ isn't about hacking EQ. It's about automating annoying, repetative tasks. Yes, we walk a fine line between simple automation and modifying game play (such as the mapfilter features), but you won't find us modifying the game the way they do at forever-hacking.net.

If you need to backstab, take a look at the various rogue scripts, which attempt to always keep you behind the mob.
MQ2: Think of it as Evolution in action.

Guest

Post by Guest » Mon Nov 03, 2003 11:58 am

you guys missunderstod me i whant it to use backstab in front for the extra attack not actully "backstab" in frot

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Mon Nov 03, 2003 7:22 pm

you cannt normally back stab from the front even for an extra attack. well dont think you can atleast dont remeber being able to. so its still asking to do te same thing

Epsilon
a lesser mummy
a lesser mummy
Posts: 61
Joined: Wed Apr 30, 2003 5:46 pm

Post by Epsilon » Mon Nov 03, 2003 7:54 pm

its true what he says, you can BS mobs from front also for an extra attack (even better if you have chaotic backstab AA skill)

KaKaMoNsTeR

Post by KaKaMoNsTeR » Tue Nov 04, 2003 12:42 am

So can i get some pointers on how to do this?