Need a Ranger Script

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

Blackstarr
decaying skeleton
decaying skeleton
Posts: 9
Joined: Mon Feb 09, 2004 3:00 am

Need a Ranger Script

Post by Blackstarr » Tue Feb 10, 2004 6:45 am

I had a grest mac. But when mq2 came out it no longer works and Im very slow learner on makeing scripts But Im looking for a Ranger script that will Auto shoot arrows or attack on command and snare on command and even buff on command. It also did auto follow on command. It was made only for a ranger. I know this is a lot to ask for.

Im still trying to lean how to script and there lots of good info on form.

Here is my old script its not the best one of its time but with Am3 and EQ it did me great

#chat tell
#define Master v0
#define ranger_toggle v1
#define ranger_button v2
#define ranger_ammo_cur v3
#define attack_off v4
#define ranger_target_cur v5
#define RNGPOS v7
#define MELPOS v8
#define FOLPOS v9
#define ranger_home_x v10
#define ranger_home_y v11
#define ranger_target_distance v12
#define ranger_target_distance_cur v13
#define char_x_cur v14
#define char_y_cur v15

Sub Main
/varset ranger_toggle 1
/varset ranger_button 3
/if "$p0"==" " {
/echo You must specify char name to assist ( ie. /macro ranged Jim )
} else {
/varset Master $p0
/tell $Master Ready to go. Commands are: Range, Melee, Taunt, Follow, Stop, Snare, Sow, Ass, Sit, Stand
}
:Loop
/doevents
/if n $attack_off=="0" /call Melee_off
/if n $RNGPOS=="1" /call Range_Assist
/if n $MELPOS=="1" /call Melee_Assist
/if n $FOLPOS=="1" /call Follow_Master
/goto :Loop
/return

Sub Melee_off
/if $combat=="TRUE" /attack off
/return

Sub Range_Assist
/if $combat=="TRUE" /attack off
/assist $Master
/delay 1
/if $target()=="FALSE" /return
/varset ranger_target_cur $target(id)
/tell $Master Assisting you in killing %T with ranged weapon.
:Range_Assist_Loop
/if n $RNGPOS=="0" /return
/face fast nopredict
/if n $target(distance)>30 {
/press $ranger_button
}
/doevents
/if $target(type)!~"corpse" /if $target(id)==$ranger_target_cur /goto :Range_Assist_Loop
/sendkey up down
/sendkey up up
/return

Sub Melee_Assist
/assist $Master
/delay 1
/if $target()=="FALSE" /return
/varset ranger_target_cur $target(id)
/tell $Master Assisting you in killing %T with melee weapon.
/attack on
:Melee_Assist_Loop
/if n $MELPOS=="0" /return
/face fast nopredict
/if n $target(distance)>16 /sendkey down up
/if n $target(distance)<10 /sendkey up up
/if n $char(ability,"Kick")!=-2 /doability "Kick"
/doevents
/if $target(type)!~"corpse" /if $target(id)==$ranger_target_cur /goto :Melee_Assist_Loop
/sendkey up down
/sendkey up up
/return

Sub Follow_Master
/target $Master
/if $char(STATE)=="SIT" /stand
/tell $Master I am on auto-follow mode, do not get too far from me, and make sure I don't get stuck. Send "stop" when you want me to stop following.
:Follow_Loop
/face fast nopredict
/if n $target(distance)>18 /sendkey down up
/if n $target(distance)<12 /sendkey up up
/doevents
/if n $FOLPOS!="0" /goto :Follow_Loop
/sendkey up up
/tell $Master Stopping here.
/return


|||||||||||||||||||||||||||||||| EVENTS ||||||||||||||||||||||||||||||||

Sub Event_Chat
/if "$p1"~~"$Master" {
/if "$p2"=="range" {
/varset RNGPOS 1
/varset MELPOS 0
/varset FOLPOS 0
}
/if "$p2"=="melee" {
/varset RNGPOS 0
/varset MELPOS 1
/varset FOLPOS 0
}
/if "$p2"=="follow" {
/varset RNGPOS 0
/varset MELPOS 0
/varset FOLPOS 1
}
/if "$p2"=="stop" {
/varset RNGPOS 0
/varset MELPOS 0
/varset attack_off 0
/varset FOLPOS 0
}
/if "$p2"=="sit" /if $char(STATE)=="STAND" /sit
/if "$p2"=="stand" /if $char(STATE)=="SIT" /stand
/if "$p2"=="Snare" /cast 8
/if "$p2"=="Sow" /cast 1
/if "$p2"=="Taunt" /doability 5
/if "$p2"=="Ass" /ass
} else {
/tell $Master $p0 from $p1: $p2
}
/return
Whats up Doc?

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Tue Feb 10, 2004 4:26 pm

[NOTE]: I dedicate this post to Rainmaker.


Code: Select all

 is your friend.
[CODE] is our friend, too.
[CODE] makes reading scripts pretty and saves our eyes.

:: Search :: is your friend.
:: Search :: is our friend, too.
:: Search :: makes reading the same questions over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over and over a thing of the past.

[quote="Blackstarr"]I know this is a lot to ask for.[/quote]
Umm...yeah...what he said.  But I'm not asking, I'm suggesting.



Yup....I'm back....and finally caught up on the posts.  :D
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

Blackstarr
decaying skeleton
decaying skeleton
Posts: 9
Joined: Mon Feb 09, 2004 3:00 am

Post by Blackstarr » Fri Mar 12, 2004 4:04 pm

All ya ask for is a liitle help and u get a smart ass! I have seen may post and I have read this site over and over I have yet to fine any one that want to give a helping and out! WTF U all so stuck up? I have seen a few Ranger scripts! So some of us are not good in Scripting But all the Scipts I have found dont work or so dame buggie there not worth a shit! Y in the hell ya got a requests Macro When you get plp that post shit like this!
Whats up Doc?

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Fri Mar 12, 2004 8:49 pm

Some scripts require thought, my sad, little friend.

Bugs are inherent if you're not writing it yourself, and can correct each one as it crops up on your specific setup.

"This macro does this, and this, I need one that will NOT do this, but does this instead. Can anyone help me? I've muddled through the code and can't quite figure it out. Here it is.. (code bracket) code code code (ending code bracket) ..."

Take note that it DOES have code brackets in the example. Some folks don't like straining their eyes to help someone out who can't help themselves.


Ass.

:twisted:
-Elric

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Fri Mar 12, 2004 8:58 pm

A ranger macro:

sub main
/ooc looking for a rez! please help!
/return

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Fri Mar 12, 2004 9:04 pm

Ahem. As was said in the IRC channel.



HAHAHAHAHAHAHAHAHHA!
-Elric