Moderator: MacroQuest Developers
Code: Select all
/if (${Me.PctMana}<95 && ${Me.PctHPs}>=${CanniLimit} && ${CannTimer}<=0 && !${CastQueue.Length}) {
/call ExecCommand ${CanniSpell}
/varset CannTimer 1
}
Code: Select all
/if (${Me.PctMana}<95 && ${Me.PctHPs}>=${CanniLimit} && ${CannTimer}<=0 && !${CastQueue.Length}) {
/call AddCast "${CanniSpell}" ${Me.Name} buff
/varset CannTimer 1
}
If you are ungrouped you have to issue the watchtarget command.Fippy wrote:Started to play with this today. I am botting a high level shammy and using it to PL a lowbie toon. Right now I dont seem to be able to get autoheal to work I have to ask for a heal when required. Also the buff timers are a little off, I assume this is do to items effecting the buff time and genbot is not getting the correct value.
Ill have a closer look tomorrow and see if i can find out whats going on.
Pathing around areas I put in my hunter.mac scripts about 2 years ago (prolly still in the old macros section of the forum). It was a real simple array defining a set locs with a radius to avoid them by. It worked ok until you got to 10 or more locs to avoid then it started to lag bigtime. I think it might be a better solution to create a mesh of valid locs for each zone and then use an implementation of the A* algorithm to find a path for you. A better solution would be if somebody could find the function eq uses for collision detection and hook into that so you could do some premptive checking around the front of your character. I did get this working ok using the LineOfSight function but that only works in some zones (old zones have a lot of see through terrain) unfortunatley I lost the code in a reformat and since it didnt do what I wanted so I never bothered to re-code it.Vexix wrote:
I've been playing with some hunter macs lately, and I have some ideas to solve the granddaddy issue of pulling in open spaces -- how to path around the aggro mobs you don't want to pull and pull the mob you do want.
Once I finish that, the next step will be to teach genbot to remember everywhere it hits an fixed obstacle, and route around them in the future. For instance, everytime it hit a tree, it would log the loc of the tree, and avoid it every times it comes near in the future.
From there we create genbot-maps, that represent all of the walls as immovable objects, and then genbot figures out how to find it's way through mazes without any master guidance or pre-recorded pathing.
Ok. That may be a loooooong ways off.
--Vexix
Code: Select all
Failed to parse /if condition '()', non-numeric encountered
botcore.inc@135 (CoreMain):/if (${Macro.Return}) {
botmain.inc@70 (Main): /call CoreMainTo:Sub CheckNeverKill(int CheckID)
/declare GenFor int local
/if (!${Defined[CheckID]}) /declare CheckID int local ${CombatTargetID}
/if (${NeverKill.Equal[${NeverKill-DefaultValue}]}) /return
/for GenFor 1 to ${Math.Calc[${NeverKill.Count[|]}+1]}
/if (${Spawn[${CheckID}].CleanName.Find[${NeverKill.Arg[${GenFor},|]}]}) {
/if (${CombatTargetID}==${CheckID}) /varset CombatTargetID 0
/return 0
}
/next GenFor
/return 1
Sub CheckNeverKill(int CheckID)
/declare GenFor int local
/if (!${Defined[CheckID]}) /declare CheckID int local ${CombatTargetID}
/if (${NeverKill.Equal[${NeverKill-DefaultValue}]}) /return 1
/for GenFor 1 to ${Math.Calc[${NeverKill.Count[|]}+1]}
/if (${Spawn[${CheckID}].CleanName.Find[${NeverKill.Arg[${GenFor},|]}]}) {
/if (${CombatTargetID}==${CheckID}) /varset CombatTargetID 0
/return 0
}
/next GenFor
/return 1