Rogue.mac - updated Jay script

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

OnyxSkyDV
a lesser mummy
a lesser mummy
Posts: 46
Joined: Wed Sep 18, 2002 1:02 pm

Thanks!

Post by OnyxSkyDV » Mon Mar 08, 2004 10:53 pm

Ok, cool. I thought it was supposed to, so I assumed I was doing something wrong. I'll see what I can tack on.

Thanks for the killer code!

OnyxSkyDV

Ahroun
orc pawn
orc pawn
Posts: 10
Joined: Wed Feb 18, 2004 10:56 pm

Evade not working

Post by Ahroun » Fri Mar 12, 2004 4:28 am

Well after much trying i still am not getting the evade part of the macro to work. not sure what im doing wrong, i am using the exact code posted. any ideas?

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   94   | 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 
      /goto :Wait 
   } 
   /if "$target(type)"!="NPC" { 
      /face 
      /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 

   /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 
   /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)>15 /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 
   /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 
   /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

wizar
orc pawn
orc pawn
Posts: 15
Joined: Tue Jan 20, 2004 10:25 am

Evade

Post by wizar » Fri Mar 12, 2004 9:34 am

Might be you just have to have the Sneak and Hide buttons set in your abilities window. I have found that if your ability has not been set in the abilities/combat window you cannot use that ability in a macro. Hope it helps ya.

Ahroun
orc pawn
orc pawn
Posts: 10
Joined: Wed Feb 18, 2004 10:56 pm

Post by Ahroun » Fri Mar 12, 2004 3:05 pm

No good idea tho i have also seen that. but they are set, still cant resolve this *Grrr*

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Fri Mar 12, 2004 6:46 pm

Are you getting the "you must not be moving to hide" or something like that?

Ahroun
orc pawn
orc pawn
Posts: 10
Joined: Wed Feb 18, 2004 10:56 pm

Post by Ahroun » Sat Mar 13, 2004 6:06 am

nope no error at all, its like its not trigering.

dam1337
orc pawn
orc pawn
Posts: 12
Joined: Sat Mar 13, 2004 6:06 pm

no auto position or evades

Post by dam1337 » Sat Mar 13, 2004 6:08 pm

copied the 1.7 rogue script exactly and the toon is not auto positioning to be behind the mob nor is he evading.. any tips?

Ahroun
orc pawn
orc pawn
Posts: 10
Joined: Wed Feb 18, 2004 10:56 pm

Post by Ahroun » Sat Mar 13, 2004 7:38 pm

Same problem.