Buff Checking Group help

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Buff Checking Group help

Post by blakbelt » Fri Sep 05, 2003 9:56 am

I am currently attempting to have a cleric and ench script (separate) that checks my main characte's buffs, it makes a list of the buffs at start and then rechecks the buffs continually until one needs recast. The problem i am having if you can help, is when using $char (i assume) you can only do self buffs and $target doesnt have a buff paramater. Is there anyway of doing this or am i stuck with an event driven base???

Thanks in Advance, any pointers would be gratefully received...
Blakbelt

Trixz
a lesser mummy
a lesser mummy
Posts: 35
Joined: Mon Apr 21, 2003 8:18 am

Post by Trixz » Fri Sep 05, 2003 1:43 pm

I'm pretty sure the only way this can be done is through events... I seem to recall an event based macro that did just this posted awhile back... use search it may give you someplace to start instead of writing it all from scratch.

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Fri Sep 05, 2003 1:57 pm

I have used search and can only find event based ones...
Blakbelt

boredom
a lesser mummy
a lesser mummy
Posts: 49
Joined: Thu Jun 19, 2003 3:45 pm

Post by boredom » Fri Sep 05, 2003 4:36 pm

As far as I know, there is no way to check someone else's buffs ( I think that's what you're asking) best you can do is have your main toon ask for buffs to the botted toon when they need or have the botted toon time any buffs it gives out and recast when timers expire.

/Bored

User avatar
Curious
a ghoul
a ghoul
Posts: 88
Joined: Wed Aug 27, 2003 5:19 am

Post by Curious » Fri Sep 05, 2003 6:54 pm

It would be possible to set up an auto-cast script using $spell("spell name",duration) to set a timer for re-casting. Not sure if it will do the trick for you, but would get you away from an event-driven script.

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Sat Sep 06, 2003 2:56 am

Thats what i feared, thanks for all the advice
Blakbelt

Shin Noir
a ghoul
a ghoul
Posts: 90
Joined: Tue Aug 05, 2003 8:18 pm

Post by Shin Noir » Sat Sep 06, 2003 4:49 am

Could do something like... (ok this code is ghetto, partially bored yet half asleep, haha)

Code: Select all

|Macro starts on cleric, and nothing wrong is going on:
/tell BuffCustomer status on Virtue?

|BuffCustomer picks up tell and checks:
/if n $char(buff,"Virtue")<1 /tell cleric "Need Virtue"

|cleric event triggered by the response tell
/if $lcase("$p0")=="need virtue" /call Cast Virtue

|partial virtue casting code (1200 = example duration of virtue)
/cast virtue
/varset t0 1200
|BuffCheck just a boolean for seeing if you asked him for buff checks
/varset BuffCheck 1

|sub event_timer when t0 gets to 0 activates, and full mana
/if "$p0"==0 /if n $char(mana,pct)==100 {
/tell BuffCustomer status on Virtue?
/varset BuffCheck 0
}
and then it basically loops. If the guy already has virtue, he won't reply to the cleric when he asks, and you could just make a loop on the BuffCustomer bot to tell the cleric when virtue fades, therefore timing it semi-nicely with a partial double check. <shrugs>

edit: Valerian likes code brackets.

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Sat Sep 06, 2003 11:20 am

Its a thought.... Better than simple event driven script. Although i may set up a series of timers to time when i cast buffs and how long they have until recast needed...
Blakbelt

greggor
orc pawn
orc pawn
Posts: 28
Joined: Tue Jun 17, 2003 2:30 pm

Post by greggor » Sun Sep 07, 2003 12:59 pm

I used this in my Warrior macro, it basically uses group/tell commands to attack targets, and self buff with click armor and loot... Anyway at the end of any text command (ie at the end of my sub event_chat section) it will run the following

/if n $char(buff,$char(buff,"virtue"),duration)<50 {
/g need virtue
}


Pretty simple and it gives you an early warning (virtue has 5 min or less left)... That way virtue won't let out during a fight, which in some cases can be disaterous :)

of course you could change the /g to a /tell to the buffbot to request virtue and all kinds of fun other stuff.


Gregg

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Tue Sep 09, 2003 5:14 am

Thanks that looks exactly like the code i had in mind, will post my results when i have finished...
Blakbelt