Page 1 of 2

Ranger Auto Pull

Posted: Tue May 04, 2004 6:25 pm
by omper
First Attempt at this.. thanks to all that chipped in..

When you run the macro it will set your current position as anchor.. it will then proceed to find a mob within a range of 150. It can be used for tanks also if you want to modify it.


/macro rangerautopull.mac

Code: Select all

|  Rangerautopull.mac   v 0.1 alpha

| Writen by Omper 

#chat tell 
#include spellcast.inc 
#event GotHIT "Hit You For" 

/declare AnchorX float outer 
/declare AnchorY float outer 
/declare startpoint int outer  

Sub Main 
   	
	/echo Rangerautopull.mac 
	
	/varset AnchorX ${Me.X} 
	/varset AnchorY ${Me.Y} 
        /cleanup 
        /doevents 
        /call MoveToAnchor 
        /pause 10           
	/call Tarnpc
	
/return 


Sub Tarnpc   

   /target npc radius 150 
   /call Cast "ensnare     

/return 



Sub Event_GOTHIT 
    
   /attack on 
   :Loop 
      /if (${Target.Distance}>20) { 
            /keypress forward    
            } 
            /if (${Target.Distance}<10) { 
            /keypress back hold 
            /timed 1 /keypress back 
            } 
            /face nolook fast 
            /delay 0 
         /if (!${Target.ID}) { 
            /goto :End 
            } else { 
         /goto :Loop 
         } 

:End 
          /call MoveToAnchor 
/return 

Sub MoveToAnchor 
    /declare iCount int local 

    /varset fXLoc ${Me.X} 
    /varset fYLoc ${Me.Y} 
    /varset iCount 0 

    /echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}. 

:AnchorMoveLoop  
    /delay 1 
    /doevents 
    /face nolook loc ${AnchorY},${AnchorX} 
    
    /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) { 
       /keypress forward hold 
   } else { 
       /keypress forward 
        /return 
    } 

    /if (${iCount}>2) { 
        /call Detectobst 
        /face nolook loc ${AnchorY},${AnchorX} 
        /varset iCount 0 
    } 
    
    /varcalc iCount ${iCount}+1 
    /goto :AnchorMoveLoop 
/return 

Sub Detectobst 
    /delay 2 
    /if (${fXLoc}==${Me.X}) /if (${fYLoc}==${Me.Y}) /call Hitobst 
    /varset fXLoc ${Me.X} 
    /varset fYLoc ${Me.Y} 
/return 

Sub Hitobst 
    /keypress forward 
    /keypress back hold 
    
    /if (${Math.Rand[2]}) {    
        /delay 2s    
        /keypress back 
        /keypress right hold 
        /delay 8 
        /keypress right 
        
        /delay 2s 
        /keypress back 
        /keypress left hold 
        /delay 8 
        /keypress left 
    } 
    /delay 10 
    /keypress forward hold 
/return

Posted: Wed May 05, 2004 3:23 pm
by Zelker
Looks like a nice and useful macro. I haven't tried it out yet but here are a few things I noticed.

Code: Select all

  /call Cast "ensnare
missing an endquote after ensnare

Code: Select all

#chat tell 
Is this need for something?

One other thing you might add, is a check to see if what you are pulling is too close to another mob. In which case you would have a multiple pull on your hands.

-Z

okies.. More help.. Odd behavior

Posted: Wed Aug 04, 2004 7:58 am
by nbjeter3
Ok, I made the slight code correction in the missing quotes posted above and got the macro to run. Herein lies the problem. Start macro Ranger runs out and KEEP running out. It has been Jokingly renamed the ranger auto suicide macro due to this odd behavior. Now the error I get is

/varset Variable fXLoc not found.
/varset Variable fYLoc not found.

I'm figgering this HAS to be the cause of the suicidal behavior of the poor ranger, Either that or he just gets so depressed about bein replaced by a bot that he kills himself... I dunno you tell me.. lol I can see two places in the code where the /varset fyLoc is called as well as an fxloc But cannot figger out for the life of me what they are supposed to do or represent. Can someone help please?

oh yeah

Posted: Wed Aug 04, 2004 8:02 am
by nbjeter3
And before its asked.. Yes, I've converted the > and <'s to < and > just before its asked.

Posted: Wed Aug 04, 2004 9:35 am
by wrangler
nice, thanks
been trying to alter the ranger hunter macro to do something like this

will try it out when i get home

anyone?

Posted: Thu Aug 05, 2004 5:02 am
by nbjeter3
Was just curious if anyone has had a chance to take a look at the code and see if they can find a solution to my problem.. No hurry, just I'm Confuzzled...

Thanks

Annoying

Posted: Sat Apr 02, 2005 2:45 am
by BigSol
People like this drive me insane...

TEST YOUR MACROS before you post them here. This one is bugged and cannot set variables. What, did you just write it in notepad and upload it without even testing it?!

Re: Annoying

Posted: Sat Apr 02, 2005 3:55 am
by JimJohnson
BigSol wrote:People like this drive me insane...

TEST YOUR MACROS before you post them here. This one is bugged and cannot set variables. What, did you just write it in notepad and upload it without even testing it?!
Free loafing fags like you who register just to bitch drive me crazy.

Posted: Sat Apr 02, 2005 4:54 pm
by magictiger
fucktards that post broken macros drive me crazy.

Posted: Sun Apr 03, 2005 3:36 am
by wizzyman

Code: Select all

/varset fXLoc ${Me.X} 
/varset fYLoc ${Me.Y} 
need to declare those like this

Code: Select all

/declare AnchorX float outer 
/declare AnchorY float outer 
/declare startpoint int outer  
/declare fXLoc float outer
/declare fYLoc float outer  
but it s only a "check if am stuck" value so it wont solve the autosuicide rng from runnig i guess :twisted:

also

Code: Select all

#event GotHIT "Hit You For"
events have to be spelled prefectly with caps and stuff and if it s not the full sentence of the event you ll write it in "#*# bla bla bla #*#"

Code: Select all

#event GotHIT "#*#hits YOU for#*#"
now that work only for simple hit they can be kick bash slash crush gore claw etc etc

so

Code: Select all

#event GotHIT "#*#hits YOU for#*#" 
#event GotHIT "#*#slashes YOU for#*#" 
#event GotHIT "#*#crushes YOU for#*#" 
#event GotHIT "#*#bashes YOU for#*#" 
#event GotHIT "#*#kicks YOU for#*#" 
#event GotHIT "#*#smashes YOU for#*#" 
#event GotHIT "#*#mauls YOU for#*#" 
#event GotHIT "#*#gores YOU for#*#"
#event GotHIT "#*#pierces YOU for#*#"
#event GotHIT "#*#kicks YOU for#*#"
#event GotHIT "#*#bashes YOU for#*#"
and the sub of the event have to be same as event too

Code: Select all

Sub Event_GotHIT
and finaly the anchor (home) have to be declared once only and so add a loop to not return to sub main

Code: Select all

Sub Main

/declare AnchorX float outer 
/declare AnchorY float outer 
/declare startpoint int outer
/declare fXLoc float outer 0.0
/declare fYLoc float outer 0.0 

/varset AnchorX ${Me.X} 
/varset AnchorY ${Me.Y}

/echo Rangerautopull.mac 
:start  
   /cleanup 
   /doevents 
   /call MoveToAnchor 
   /delay 10            
   /call Tarnpc 
/goto  :start  
/return

Posted: Sun Apr 03, 2005 5:24 am
by wizzyman
well i was bored and decided to make it to work since it s just too far from fonctionnal.

Code: Select all

|  Rangerautopull.mac   v 0.1 alpha 

| Writen by Omper 

#include spellcast.inc 
#event GotHIT "#*#hits YOU for#*#" 
#event GotHIT "#*#slashes YOU for#*#" 
#event GotHIT "#*#crushes YOU for#*#" 
#event GotHIT "#*#bashes YOU for#*#" 
#event GotHIT "#*#kicks YOU for#*#" 
#event GotHIT "#*#smashes YOU for#*#" 
#event GotHIT "#*#mauls YOU for#*#" 
#event GotHIT "#*#gores YOU for#*#" 
#event GotHIT "#*#pierces YOU for#*#" 
#event GotHIT "#*#kicks YOU for#*#" 
#event GotHIT "#*#bashes YOU for#*#"  

Sub Main

/declare AnchorX float outer 
/declare AnchorY float outer 
/declare fXLoc float outer 0.0
/declare fYLoc float outer 0.0
/declare Agro outer FALSE 

/varset AnchorX ${Me.X} 
/varset AnchorY ${Me.Y}

/echo Rangerautopull.mac 
:start
   /doevents
   /delay 1s
   /if (${Agro}) /call combat  
   /if (!${Agro}) /cleanup
   /call MoveToAnchor 
   /doevents 
   /delay 10            
   /if (!${Agro}) /call Tarnpc 
/goto  :start  
/return 

Sub Tarnpc    

   /target npc radius 150 
   /delay 1s
   /doevents
   /if (${Target.ID}) /call Cast "snare"      

/return

Sub combat 
   /attack on 
   :Loop
      /doevents 
      /if (${Target.Distance}>17) { 
            /keypress forward    
            } 
            /if (${Target.Distance}<10) { 
            /keypress back hold 
            /timed 1 /keypress back 
            } 
            /face nolook fast 
            /delay 0 
            /if (!${Target.ID}) { 
            /varset Agro FALSE
            /goto :End 
            } else { 
         /goto :Loop 
         } 

:End 
/return

Sub Event_GotHIT 
/varset Agro TRUE    
   
/return 

Sub MoveToAnchor
    /if (${Math.Distance[${AnchorY},${AnchorX}]}<=12) /return 
    /declare iCount int local 

    /varset fXLoc ${Me.X} 
    /varset fYLoc ${Me.Y} 
    /varset iCount 0 

    /echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}. 

:AnchorMoveLoop  
    /delay 1 
    /doevents 
    /face nolook loc ${AnchorY},${AnchorX} 
    
    /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) { 
       /keypress forward hold 
   } else { 
       /keypress forward 
       /return 
    } 

    /if (${iCount}>2) { 
        /call Detectobst 
        /face nolook loc ${AnchorY},${AnchorX} 
        /varset iCount 0 
    } 
    
    /varcalc iCount ${iCount}+1 
    /goto :AnchorMoveLoop 
/return 

Sub Detectobst 
    /delay 2 
    /if (${fXLoc}==${Me.X}) /if (${fYLoc}==${Me.Y}) /call Hitobst 
    /varset fXLoc ${Me.X} 
    /varset fYLoc ${Me.Y} 
/return 

Sub Hitobst 
    /keypress forward 
    /keypress back hold 
    
    /if (${Math.Rand[2]}) {    
        /delay 2s    
        /keypress back 
        /keypress right hold 
        /delay 8 
        /keypress right 
        
        /delay 2s 
        /keypress back 
        /keypress left hold 
        /delay 8 
        /keypress left 
    } 
    /delay 10 
    /keypress forward hold 
/return 
it does what it s supposed to and is imo simple enough to be a good start to learn macro language.

Posted: Mon Oct 10, 2005 9:08 pm
by Glacier
magictiger wrote:fucktards that post broken macros drive me crazy.
write your own, ya fuck. way to encourage sharing of macs, numb nuts.

Posted: Tue Oct 11, 2005 7:09 am
by magictiger
Glacier wrote:
magictiger wrote:fucktards that post broken macros drive me crazy.
write your own, ya fuck. way to encourage sharing of macs, numb nuts.
I *DO* write my own. They work. This one did not.
and WTF is with bringing up a post that's been dead for 6 months just to bitch at me about it?

Posted: Wed Oct 12, 2005 3:19 pm
by Glacier
magictiger wrote:
Glacier wrote:
magictiger wrote:fucktards that post broken macros drive me crazy.
write your own, ya fuck. way to encourage sharing of macs, numb nuts.
I *DO* write my own. They work. This one did not.
and WTF is with bringing up a post that's been dead for 6 months just to bitch at me about it?
well, if you do write your own, why complain about someone wanting to share a mac?

doesn't seem all that productive nor does it encourage the dude who is at least TRYING to share. Your post just seemed amazingly toolish.

Re: Annoying

Posted: Wed Oct 12, 2005 3:54 pm
by Slippery
BigSol wrote:People like this drive me insane...

TEST YOUR MACROS before you post them here. This one is bugged and cannot set variables. What, did you just write it in notepad and upload it without even testing it?!

:EDIT:
lol who bumped this thread?