Awesome Cleric Macro needs help!!!

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

Awesome Cleric Macro needs help!!!

Post by BadBoy » Sun Sep 29, 2002 5:08 pm

Heres one I think would really fly...
Just fix up the "coding" if you want to call it that.

if F1, F2, F3, F4, F5, & F6 $char(hp,pct) <= 60% then call sub Word of Restoration

if F1 => 40% and <= 60% $char(hp,pct) then call sub Complete Heal1
if F2 => 40% and <= 60% $char(hp,pct) then call sub Complete Heal2
if F3 => 40% and <= 60% $char(hp,pct) then call sub Complete Heal3
if F4 => 40% and <= 60% $char(hp,pct) then call sub Complete Heal4
if F5 => 40% and <= 60% $char(hp,pct) then call sub Complete Heal5
if F6 => 40% and <= 60% $char(hp,pct) then call sub Complete Heal6

if F1 $char(hp,pct) <= 39% then call Quick Heal1
if F2 $char(hp,pct) <= 39% then call Quick Heal2
if F3 $char(hp,pct) <= 39% then call Quick Heal3
if F4 $char(hp,pct) <= 39% then call Quick Heal4
if F5 $char(hp,pct) <= 39% then call Quick Heal5
if F6 $char(hp,pct) <= 39% then call Quick Heal6

if F2 = NULL then goto F3
if F3 = NULL then goto F4
if F4 = NULL then goto F5
if F5 = NULL then goto F6
if F6 = NULL then goto F1

if F1, F2, F3, F4, F5, & F6 $char(hp,pct) => 90% then call sub attack

sub attack
/target npc
/attack on
/if $npc(hp,pct) = 0% then /attack off
(all while constantly scanning players HP if possible)

sub Complete Heal1
/sit off
/press F1
/cast "Complete Healing"
/gsay Casting Complete Healing on (Name)
/delay 11
/sit on

sub Complete Heal2
/sit off
/press F2
/cast "Complete Healing"
if $p2 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Complete Healing on (Name)
/delay 11
/sit on

sub Complete Heal3
/sit off
/press F3
/cast "Complete Healing"
if $p3 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/delay 11
/sit on
/gsay Casting Complete Healing on (Name)

sub Complete Heal4
/sit off
/press F4
/cast "Complete Healing"
if $p4 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Complete Healing on (Name)
/delay 11
/sit on

sub Complete Heal5
/sit off
/press F5
/cast "Complete Healing"
if $p5 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Complete Healing on (Name)
/delay 11
/sit on

sub Complete Heal6
/sit off
/press F6
/cast "Complete Healing"
if $p6 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Complete Healing on (Name)
/delay 11
/sit on

sub Quick Heal1
/sit off
/press F1
/cast "Divine Light"
/gsay Casting Divine Light on (Name)
/delay 11
/sit on

sub Quick Heal2
/sit off
/press F2
/cast "Divine Light"
if $p2 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Divine Light on (Name)
/delay 11
/sit on

sub Quick Heal3
/sit off
/press F3
/cast "Divine Light"
if $p3 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Divine Light on (Name)
/delay 11
/sit on

sub Quick Heal4
/sit off
/press F4
/cast "Divine Light"
if $p4 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Divine Light on (Name)
/delay 11
/sit on

sub Quick Heal5
/sit off
/press F5
/cast "Divine Light"
if $p5 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Divine Light on (Name)
/delay 11
/sit on

sub Quick Heal6
/sit off
/press F6
/cast "Divine Light"
if $p6 $distance = too far away then /gsay (Name), you are too far away for me to heal you! Come closer!
/gsay Casting Divine Light on (Name)
/delay 11
/sit on

sub Word of Restoration
/sit off
/cast "Word of Restoration"
/gsay Casting Word of Restoration, come close!
/delay 6
/sit on

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Sun Sep 29, 2002 5:50 pm

looks good at first glance. Gotta code in F1 - F6 though.. I was gonna put it into code brackets but im not sure where explaination ends and code beings :)

do we have a grouptarget command? target member 1 2 3 etc?

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

Post by BadBoy » Sun Sep 29, 2002 6:15 pm

LoL, not sure, I cant code, what do you think we should do? :)

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Sun Sep 29, 2002 6:19 pm

Delete MQ and this macro from your PC now and leave while you still have an acct left with which to play.


Mag

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

Post by BadBoy » Sun Sep 29, 2002 6:29 pm

Shutup mag you fag

User avatar
Madman
a ghoul
a ghoul
Posts: 144
Joined: Wed Jun 26, 2002 4:16 pm

Post by Madman » Sun Sep 29, 2002 6:30 pm

since the script may get deleted like many tend to do that look nice I wanna throw in my 2cp while i still can the script looks very nice. Looks like you took an inventive and totally new approach to it. Its rare to see new scripts on here that appear from the gound up. there aer a few things that could proborably be done to shrink the size of it. For example would it be possible to implement an incremting loop for the F key so that each line is not having to be repeated. anyways what i just said may not even be possible but still it looks good.

Way to think out of the box.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Sep 29, 2002 6:37 pm

Salutations,
You can target gorup members with tyhe keys f1 through f6.

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Sun Sep 29, 2002 6:47 pm

I'm not gonna shutup. Learn to code or get the hell out of here. You come here, beg, leech, borrow, steal, whatever you want to call it and expect not to get a few flames? LoL

Go back to school kiddie and learn a thing or 2.


Mag

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sun Sep 29, 2002 8:13 pm

Salutations,
if this turns into a flaming thread....

macrotoon
a ghoul
a ghoul
Posts: 106
Joined: Wed Sep 18, 2002 4:38 pm

Post by macrotoon » Sun Sep 29, 2002 10:07 pm

BadBoy.
Ive only been using MQ for a week or so. Already I have altered and made a couple scripts myselft. Asking a question about how a particular command works is cool, but just asking someone make a script for you is lame.

My suggestion to you. RTFM. I dont usually throw that term around because i think its rude and insensitive, but in this occurance it is warranted.

The great programmers that have worked on this project have made the coding very easy to learn. My background of programming has been a basic language programming class in the 7th grade on OLD APPLE computers. We made funny animations and junk....point is, if i can do it after 17 years of not touching programming. Anyone can do this.

Great script idea you have there. If I were you. I would start with smaller parts of the script. Dont attempt to write the entire script and start debugging. Its a pain in the ass. and remember. KISS....Keep It Simple Stupid.....this isnt calling you stupid. its just a saying :)

GL on your project.

Genoius
a lesser mummy
a lesser mummy
Posts: 49
Joined: Sat Jul 13, 2002 8:20 am

Post by Genoius » Mon Sep 30, 2002 4:28 am

*agrees*

Get it working for group member 2, and youve got it started for the others. I havent scripted much in a while, but I may touch this one to see if I can make it look and work really well. One thing I think I would add is setting up the group. A starter SUB could read what class each person in your group is, and use the appopriate spell(you dont need, nor WANT to CH you chanter, cuz s/he would be dead before it was done), and the sub re-runs and resets variables if the group changes at all(someone leaves, someone joins, etc...). It would set a variable to either 0 or 1 mayhap; 0 meaning they GET CH; 1 meaning they NEVER get CH(remedy, divine light, or even superior healing works well at the lower 50s levels for a cleric in a group with casters). Casters need SPEED heals, not HUGE heals, or they are dead if they maintain aggro too long.

Anywho, just my 2cp, and you may see my script up if I decide to touch on this one sometime soon.

---Genoius---

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

First draft

Post by BadBoy » Mon Sep 30, 2002 8:27 am

This is only a start, ill be editing it a lot during classes :)

[[ CODE BRACKETS - L124RD ]]

Code: Select all

Sub Main
:loopstart
/press F1
/varset $v1 $target(hp,pct)
/press F2
/varset $v2 $target(hp,pct)
/press F3
/varset $v3 $target(hp,pct)
/press F4
/varset $v4 $target(hp,pct)
/press F5
/varset $v5 $target(hp,pct)
/press F6
/varset $v6 $target(hp,pct)


/If n $v1=>40 And <=80 And /If n $v2=>40 And <=80 And /If n $v3=>40 And <=80 And /If n $v4=>40 And <=80 And /If n $v5=>40 And <=80 And /If n $v6=>40 And <=80 {
		/press F1
		Call WordofRestoration
		}

Else
		/If n $v1=>0 And /If $v1<= 39 {
		/press F1
		Call DivineLight
		}
		/If n $v2=>0 And /If $v2<= 39 {
		/press F2
		Call DivineLight
		}
		/If n $v3=>0 And /If $v3<= 39 {
		/press F3
		Call DivineLight
		}
		/If n $v4=>0 And /If $v4<= 39 {
		/press F4
		Call DivineLight
		}
		/If n $v5=>0 And /If $v5<= 39 {
		/press F5
		Call DivineLight
		}
		/If n $v6=>0 And /If $v6<= 39 {
		/press F6
		Call DivineLight
		}

		/If n $v1=>40 And /If $v1<= 70 {
		/press F1
		Call CompleteHeal
		}
		/If n $v2=>40 And /If $v2<= 70 {
		/press F2
		Call CompleteHeal
		}
		/If n $v3=>40 And /If $v3<= 70 {
		/press F3
		Call CompleteHeal
		}
		/If n $v4=>40 And /If $v4<= 70 {
		/press F4
		Call CompleteHeal
		}
		/If n $v5=>40 And /If $v5<= 70 {
		/press F5
		Call CompleteHeal
		}
		/If n $v6=>40 And /If $v6<= 70 {
		/press F6
		Call CompleteHeal
		}
End Sub

Private Sub CompleteHeal
		/sit off
		/cast "Complete Healing"
		/gsay Complete Healing On (Name)
		/delay 11
		/sit On
		/GoTo :loopstart
		/return
End Sub

Private Sub DivineLight
		/sit off
		/cast "Divine Light"
		/gsay Divine Light On (Name)
		/delay 5
		/sit On
		/GoTo :loopstart
		/return
End Sub

Private Sub WordofRestoration
		/press ESC
		/sit off
		/cast "Word of Restoration"
		/gsay Group Heal Incoming
		/delay 6
		/sit On
		/GoTo :loopstart
		/return
End Sub

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Sep 30, 2002 9:55 am

Salutations,
Notes regarding yer macro:
1) there is no 'private sub ____' just use 'sub ____'
2) You do _not_ need ( in fact you can't use ) a 'end sub' just leave it with '/return'
3)

Code: Select all

/if x==y And /if z==x {
should be
/if x==y /if z==x {
but that will only work if you have IRC-20020928+, if you are using MQ-20020905 then you need to use:
/if x==y {
  /if z==x {
     | some cody thingies...
  }
}
4) (name): you where close, its $target(name)

Just my two pennies... i like pennies...
[[edit: added 4]]

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

I think there will be a lot more editing :)

Post by BadBoy » Mon Sep 30, 2002 10:36 am

Teacher isnt going to like it, but im working on my macro for the next 2 hours :)

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Mon Sep 30, 2002 11:43 am

IRC release in the IRC chatroom has $group features... allows you to target em easily

might be helpful