Re: Party Bot (questions/answers)
Posted: Wed Feb 20, 2013 12:09 am
Wasn't there some similar issue that had something to do with the MM version? What version of MM are you using?
MicroMacro home
https://www.solarstrike.net/phpBB3/
pretty sure we are upto 1.02 beta 6 for MM versionWonderBoB wrote:I am using the MM version 1.02 Rom bot version 750
Code: Select all
player:updateBattling()
if player.Battling then
if player:target(player:findEnemy(true, nil, evalTargetDefault)) then
if heal then
healfight()
else
player:fight()
end
end
end
Code: Select all
if (not player.Battling) then
if settings.profile.options.LOOT == true and
settings.profile.options.LOOT_ALL == true then
local Lootable = player:findEnemy(nil, nil, evalTargetLootable)
if not Lootable then
getNameFollow() --includes mount/dismount code
else
player:target(Lootable)
if player.TargetPtr ~= 0 then
player:lootAll()
end
-- Fix for out of Combat checking while in pure Heal mode, edited by WonderBoB
if( type(settings.profile.events.onLeaveCombat) == "function" ) then
local status,err = pcall(settings.profile.events.onLeaveCombat);
if( status == false ) then
local msg = sprintf(language[85], err);
error(msg);
end
-- End of fix
end
end
else
getNameFollow()
end
end
Code: Select all
print("I am HEAL_FIGHT and leaving combat")
Code: Select all
Engaging enemy [Guardian Punisher] in combat.
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (58006/202193)
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (0/202193)
I am HEAL_FIGHT and leaving combat
Clearing target.
Engaging enemy [Guardian Punisher] in combat.
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (20947/202193)
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (0/202193)
I am HEAL_FIGHT and leaving combat
Party member 1 has the name of DPS
Engaging enemy [Guardian Punisher] in combat.
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (64013/207285)
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (0/207285)
I am HEAL_FIGHT and leaving combat
We didn't move to the loot!? Root buff? Missing 'click to move' option
Clearing target.
Engaging enemy [Guardian Punisher] in combat.
Moving in | Suggested range: 180 | Distance: 195
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (123132/207285)
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (99576/207285)
Use MACRO: PRIEST_URGENT_HEAL => DPS (45416/54038)
Use MACRO: PRIEST_ICE_BLADE => * Failed to cast *
I am HEAL_FIGHT and leaving combat
Engaging enemy [Guardian Punisher] in combat.
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (64716/202193)
Use MACRO: PRIEST_ICE_BLADE => Guardian Punisher (0/202193)
I am HEAL_FIGHT and leaving combat
Clearing target.
Picking up sigil "Talent Sigil"
Code: Select all
<!-- Party Bot options -->
<option name="PARTY" value="true" />
<option name="PARTY_ICONS" value="false" />
<option name="PARTY_INSTANCE" value="true" />
<option name="PARTY_FOLLOW_NAME" value="DPS" />
<option name="ICON_FIGHT" value="false" />
<!-- Healing options -->
<option name="HEAL_FIGHT" value="true" />
Code: Select all
<onLeaveCombat>
print(" I just left combat")
if player:findNearestNameOrId("107217") then
player:target_Object("107217")
yrest(500) -- If not enough time to pick up bag, increase it.
end
</onLeaveCombat>
Code: Select all
if (not player.Battling) then
if settings.profile.options.LOOT == true and
settings.profile.options.LOOT_ALL == true then
local Lootable = player:findEnemy(nil, nil, evalTargetLootable)
if not Lootable then
getNameFollow() --includes mount/dismount code
else
player:target(Lootable)
if player.TargetPtr ~= 0 then
player:lootAll()
end
-- Fix for out of Combat checking while in pure Heal mode, edited by WonderBoB
if( type(settings.profile.events.onLeaveCombat) == "function" ) then
local status,err = pcall(settings.profile.events.onLeaveCombat);
if( status == false ) then
local msg = sprintf(language[85], err);
error(msg);
end
-- End of fix
end
end
else
getNameFollow()
end
end
What you have done is added the onleavecombat to anytime a party member is not in combat and there is something to loot, so it is more of a "onloot" event.There is no usage for onleavecombat for a dedicated healer at this stage because it is something that is handled after you kill a mob, as in you target something and then it dies = "leaving combat" and since a dedicated healer would never target a mob then it would never do the onleavecombat code.
Code: Select all
if not Lootable then
getNameFollow() --includes mount/dismount code
else
player:target(Lootable)
if player.TargetPtr ~= 0 then
player:lootAll()
end
if onLoot then onLoot() end
end
Code: Select all
function onLoot()
if player:findNearestNameOrId("107217") then
player:target_Object("107217")
yrest(500) -- If not enough time to pick up bag, increase it.
end
end
Code: Select all
-- warden pet healing
if havewarden then
for k,v in pairs(petmemberpawn) do
v:updateHP()
-- no repeat loop so just 1 heal and will heal again next time round, keeps players as priority.
if v.HP/v.MaxHP*100 > 10 and 70 > v.HP/v.MaxHP*100 then -- Alive and under 80% hp
player:target(v)
if player.Class1 == CLASS_PRIEST then
if 180 > distance(v.X,v.Z,player.X,player.Z) then
--player:cast("PRIEST_URGENT_HEAL")
SlashCommand("/script CastSpellByName(\""..GetIdName(491147).."\");");
cprintf(cli.yellow, "Heal Pet Skill: %s\t %s\n",GetIdName(491147),v.Name);
yrest(1000)
end
elseif player.Class1 == CLASS_DRUID then
if 230 > distance(v.X,v.Z,player.X,player.Z) then
--player:cast("DRUID_RECOVER")
SlashCommand("/script CastSpellByName(\""..GetIdName(493528).."\");");
cprintf(cli.yellow, "Heal Pet Skill: %s\t %s\n",GetIdName(493528),v.Name);
yrest(1000)
end
end
end
end
end
end
Code: Select all
if player.Class1 == CLASS_PRIEST then
Code: Select all
Party member 1 has the name of My Warden
Use MACRO: PRIEST_HEALING_SALVE=> My Healer (61859/61859)
Use MACRO: PRIEST_HEALING_SALVE=> My Warden (118625/118625)
Clearing target.
Clearing target.
Party member 1 has the name of My Warden
Use MACRO: PRIEST_HEALING_SALVE=> My Healer (61859/61859)
Not in game. Waiting till you reenter game... Continuing.
Player address changed: 0x8D14600
Ranged skill found: MAGE_LIGHTNING
Maximum range of range attack skills is less than COMBAT_DISTANCE 235. Reducing
COMBAT_DISTANCE setting to 225.
Use MACRO: PRIEST_HEALING_SALVE=> My Warden (118625/118625)
Id 1107296256 not found
Id 1107296256 not found
Id 1097284046 not found
Id 1056423407 not found
Id 1 not found
Id 1106771968 not found
Id 1134297088 not found
Id 1143209984 not found
Id 49278976 not found
Id 1107296256 not found
Id 1107296256 not found
Id 1097284046 not found
Id 1056423407 not found
Id 1 not found
Id 1106771968 not found
Id 1134297088 not found
Id 1143209984 not found
Id 49278976 not found
Id 1107296256 not found
Id 1107296256 not found
Id 1097284046 not found
Id 1056423407 not found
Id 1 not found
Id 1106771968 not found
Id 1134297088 not found
Id 1143209984 not found
Id 49278976 not found
Use MACRO: PRIEST_WAVE_ARMOR => My Warden (118625/118625)
Clearing target.
Id 99 not found
Id 99 not found
Id 99 not found
Party member 1 has the name of My Warden
Use MACRO: PRIEST_HEALING_SALVE=> My Healer (61859/61859)
Use MACRO: PRIEST_WAVE_ARMOR => My Healer (61859/61859)
Clearing target.
Use MACRO: PRIEST_HEALING_SALVE=> My Warden (115815/118625)
Use MACRO: PRIEST_WAVE_ARMOR => My Warden (115816/118625)
Engaging enemy [Sugon Armored Beast] in combat.
Use MACRO: MAGE_FIREBALL => Sugon Armored Beast (202275/202275)
Use MACRO: PRIEST_BONE_CHILL => Sugon Armored Beast (177102/202275)
Use MACRO: PRIEST_ICEWIND_BLADE=> Sugon Armored Beast (142090/202275)
Use MACRO: PRIEST_FROST_SCARS => Sugon Armored Beast (142090/202275)
Taking too long to damage target, breaking sequence...
Clearing target.
Use MACRO: PRIEST_REGENERATE => Sugon Armored Beast (0/202275)
Engaging enemy [Sugon Armored Beast] in combat.
Moving in | Suggested range: 225 | Distance: 225
Use MACRO: MAGE_FIREBALL => Sugon Armored Beast (202275/202275)
Use MACRO: PRIEST_FROST_SCARS => Sugon Armored Beast (178829/202275)
Use MACRO: PRIEST_WAVE_ARMOR => My Healer (61859/61859)
Clearing target.
Party member 1 has the name of My Warden
Use MACRO: PRIEST_HEALING_SALVE=> My Healer (61859/61859)
Engaging enemy [Sugon Armored Beast] in combat.
Use MACRO: MAGE_FIREBALL => Sugon Armored Beast (202275/202275)
Use MACRO: PRIEST_FROST_SCARS => Sugon Armored Beast (112418/202275)
Use MACRO: MAGE_LIGHTNING => Sugon Armored Beast (103032/202275)
Use MACRO: PRIEST_BONE_CHILL => Sugon Armored Beast (103032/202275)
Heal Pet Skill: Urgent Heal Chiron the Centaur
Use MACRO: MAGE_FIREBALL => Sugon Armored Beast (18848/202275)
Heal Pet Skill: Urgent Heal Chiron the Centaur
Engaging enemy [Sugon Armored Beast] in combat.
Use MACRO: MAGE_FIREBALL => Sugon Armored Beast (108402/202275)
Use MACRO: MAGE_LIGHTNING => Sugon Armored Beast (50716/202275)
Use MACRO: PRIEST_BONE_CHILL => * Failed to cast *
Use MACRO: PRIEST_HEALING_SALVE=> My Warden (118625/118625)
Party member 1 has the name of My Warden
12:56am - ...rs/User/Desktop/micromacro/scripts/rom/functions.lua:321: bad argum
ent #1 to 'memoryWriteBytePtr' ((null))
Code: Select all
Engaging enemy [Sugon Armored Beast] in combat.
Use MACRO: MAGE_FIREBALL => Sugon Armored Beast (202275/202275)
Use MACRO: PRIEST_BONE_CHILL => Sugon Armored Beast (177102/202275)
Use MACRO: PRIEST_ICEWIND_BLADE=> Sugon Armored Beast (142090/202275)
Use MACRO: PRIEST_FROST_SCARS => Sugon Armored Beast (142090/202275)
Taking too long to damage target, breaking sequence...
Clearing target.
Code: Select all
<option name="MAX_FIGHT_TIME" value="30" />
Code: Select all
GetIdName(1107296256)
GetIdName(1107296256)
GetIdName(1097284046)
GetIdName(1056423407)
GetIdName(1)
......
Made me LOLrock5 wrote:I swear Lisa, sometimes I think you don't think things through. Why limit onLoot to only with party use? You don't think that it would be useful to others as well? Just saying.
True.lisa wrote:There is no reason it still can't be done, true?
But what if a user want to do something after every combat but don't want it to loot.lisa wrote:The little function usage I added for party bot is because partyhealer never targets anything so it never actually triggers the onleavecombat event.
no because it would be called after the mob was killed and then again for where onLoot is. No point calling the same event twice for every time you kill a mob. It is only the partyhealer that never does onleavecombat, anything that attacks a mob still does it as usual.rock5 wrote:You know you could have just used the onLeaveCombat event. Although maybe the onLoot gives some extra needed versatility. By 'use' I mean call the onLeaveCombat event instead of onLoot.
Code: Select all
Clearing target.
Party member 1 has the name of My Warden
Use MACRO: PRIEST_HEALING_SALVE=> My Priest (61859/61859)
Use MACRO: PRIEST_HEALING_SALVE=> My Warden (97020/97020)
Use MACRO: PRIEST_GROUP_HEAL => My Warden (97020/97020)
Party member 1 has the name of My Warden
Use MACRO: PRIEST_HEALING_SALVE=> My Priest (61859/61859)
Use MACRO: PRIEST_HEALING_SALVE=> My Warden (97020/97020)
Use MACRO: PRIEST_WAVE_ARMOR => My Priest (61859/61859)
Use MACRO: PRIEST_SOUL_BOND => My Priest (61859/61859)
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Party member 1 has the name of My Warden
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Use MACRO: PRIEST_AMPLIFIED_ATT=> My Warden (89905/89905)
Use MACRO: PRIEST_GRACE_OF_LIFE=> My Warden (89905/89905)
Use MACRO: PRIEST_AMPLIFIED_ATT11:14pm - ...rs/User/Desktop/micromacro/s
om/functions.lua:321: bad argument #1 to 'memoryWriteBytePtr' ((null))