Siege buff bot
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Siege buff bot
oh cool, didn't even think you could use table. commands with ingame macro's. Also if you have the addon ExtendedMacroIcon's the macro limit is increased to 767, meaning you can have a hell of a lot more per macro.
Im having an issue with detecting players in party after they are moved. using target.InParty keeps returning false, even when both target and player are in party. I tried player:update() and target:update() before and after moving them and it simply won't return true, meaning that when I run player:checkSkills(true, target) it just returns false due to it not finding them in party.
This is happening in siege, but it even did it outside siege, when move players joined party, it would only return true for those that were already in it.
Im having an issue with detecting players in party after they are moved. using target.InParty keeps returning false, even when both target and player are in party. I tried player:update() and target:update() before and after moving them and it simply won't return true, meaning that when I run player:checkSkills(true, target) it just returns false due to it not finding them in party.
This is happening in siege, but it even did it outside siege, when move players joined party, it would only return true for those that were already in it.
Re: Siege buff bot
It was known that the memory area for the macros is actually larger that 255 characters but the bot doesn't take advantage of this. It limits the command length to 255. So it wouldn't matter if you had that addon installed.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Siege buff bot
I can't fault the InParty flag at all, tried zoning in and out, reloging, logging in while out of memory range and walking into range. Every single time it was how it should be.ZZZZZ wrote:Im having an issue with detecting players in party after they are moved. using target.InParty keeps returning false, even when both target and player are in party. I tried player:update() and target:update() before and after moving them and it simply won't return true, meaning that when I run player:checkSkills(true, target) it just returns false due to it not finding them in party.
What code are you using?
Are you making sure to create a pawn of the objects?
My testing was like this.
Code: Select all
Command> local target = CPawn(player:findNearestNameOrId("Star").Address) print(target.InParty)
true
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Siege buff bot
This is the code I was getting the issues with:lisa wrote: What code are you using?
Code: Select all
if buffThem then
player:target(obj)
player:update();
if (player:haveTarget() ~= nil) then
player:update();
local target = player:getTarget()
target:update()
target:updateBuffs()
local doParty = false
if RoMCode('inraid = UnitInRaid("player"); canmove = UnitIsRaidLeader("player") or UnitIsRaidAssistant("player"); if inraid and canmove then a=canmove end') and table.contains(ZZraidTable, target.Name) then
for i,v in pairs(settings.profile.skills) do
if ZZuseSkill(target, v) then
doParty = true
break
end
end
end
if doParty then
for i, v in pairs(ZZraidTable) do
if target.Name == v then
oldPos = i
for j = 31,36 do
if ZZraidTable[j] == "" then
newPos = j
break
end
end
RoMScript("MoveRaidMember("..oldPos..","..newPos..")")
repeat
yrest(50);
until GetPartyMemberName(newPos) == target.Name
break
end
end
end
player:checkSkills(true, target)
yrest(50);
player:checkSkills(true, target)
player:checkPotions()
table.insert(buffedTable, obj.Name)
if doParty then
RoMScript("MoveRaidMember("..newPos..","..oldPos..")")
repeat
yrest(50);
until GetPartyMemberName(oldPos) == target.Name
end
end
end
Re: Siege buff bot
You are assuming it is an issue with InParty then, you need to add prints, I could be wrong but single target buffs have range of 200 and party ones have 100, so if the characters were 101-200 distance it would do the other skills and not party ones.
Just saying that without prints you can't say for sure it is an issue with InParty.
Just saying that without prints you can't say for sure it is an issue with InParty.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Siege buff bot
Had already put prints all through my function to try and figure out errors and I finally got everything to work correctly...except for that issue.
What I did to make the issue appear was while the character was in a different zone (in my case character i was inviting was in Heffner, player in reifort), invited them to party. Once they had joined party I recalled it to reifort at which point (with all invited chars within 50 range of the player) i ran my function to buff all raid slots.
Out of all 7 characters I had spread throughout the raid, the only 1 it didn't buff was the 1 that was invited before entering the zone. (it did use Savage Blessing on it, just didn't use the party buffs).
What I did to make the issue appear was while the character was in a different zone (in my case character i was inviting was in Heffner, player in reifort), invited them to party. Once they had joined party I recalled it to reifort at which point (with all invited chars within 50 range of the player) i ran my function to buff all raid slots.
Out of all 7 characters I had spread throughout the raid, the only 1 it didn't buff was the 1 that was invited before entering the zone. (it did use Savage Blessing on it, just didn't use the party buffs).
Re: Siege buff bot
I'll check it out when I get a chance, this laptop can barely handle 2 chars I need to use my main PC for this.
A little trick I picked up along the way is to do this.
I have this as a userfunction.
and I put my "prints" in code I am testing like this.
lisa_debug("lol %s","yuppers")
so arg one is the format and arg 2+ is any values/variables
examples.
So I use commandline to test any functions and if it didn't work as I expected I change _mydebug to true and run it again.
I don't always want my debug messages printed, sometimes I just want the normal bot prints and the debug messages sometimes get in the way. So using it like this I can turn on and off my debug messages
A little trick I picked up along the way is to do this.
I have this as a userfunction.
Code: Select all
function lisa_debug(fmt,...)
if not _mydebug then return end
if type(fmt) == "userdata" then
fmt = tostring(fmt)
elseif type(fmt) == "table" then
for k,v in pairs(fmt) do
printf("%s = %s\n", k,v)
end
return
end
printf(fmt.."\n", ...)
end
lisa_debug("lol %s","yuppers")
so arg one is the format and arg 2+ is any values/variables
examples.
Code: Select all
Command> _mydebug = true
Command> lisa_debug("lol %s","yuppers")
lol yuppers
Command> _mydebug = false
Command> lisa_debug("lol %s","yuppers")
Command> lisa_debug("lol %s: %d ","yuppers",55)
Command> _mydebug = true
Command> lisa_debug("lol %s: %d ","yuppers",55)
lol yuppers: 55
I don't always want my debug messages printed, sometimes I just want the normal bot prints and the debug messages sometimes get in the way. So using it like this I can turn on and off my debug messages

Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Siege buff bot
Don't worry, I test it by changing the check in the checkBuffs() function.
With InParty it just doesn't buff the party skills. But with it changed to it works.
So there is definitely something wrong with InParty and updating some address. I don't know anything about addresses so I can't test it :S
With InParty it just doesn't buff the party skills.
Code: Select all
if target and target.InParty == true then
Code: Select all
if target and RoMScript('UnitInParty("target")') == true then
So there is definitely something wrong with InParty and updating some address. I don't know anything about addresses so I can't test it :S
Re: Siege buff bot
I had a chance to test it and yeah I could replicate it aswell, seems to be only with raids and when the character is out of memory range when it is converted to a raid. For now I think the in game macro is the way to go but it shouldn't be a permenant solution.
I think the InParty flag should just remain for actual parties and not raids. I wonder if there is a raid flag in memory, not sure when I would have time to check that though.
I think the InParty flag should just remain for actual parties and not raids. I wonder if there is a raid flag in memory, not sure when I would have time to check that though.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Siege buff bot
ok, as a temp fix i'll just leave it at this:
Code: Select all
if target and target.InParty == true or RoMScript('UnitInParty("target")') == true then
Re: Siege buff bot
Related to tables... is it better to use pairs or table.contains to confirm a value is in the table?
~~ edit: Figured out the issue. Still wondering if there is any difference or preference for contains or pairs though.
~~ edit2: Also wondering if there is a call for rebuffcut? Like there is the .Target == STARGET_PARTY etc, is there a check like .Rebuffcut? When checking other players to see if they have the players buff(s) already, and if they should be moved into party or not, it only takes into account if they have the buff or not, I can check remain time with .TimeLeft but im not sure how to compare that against the rebuffcut value.
Sorry for all the questions btw, and thanks again
~~ edit: Figured out the issue. Still wondering if there is any difference or preference for contains or pairs though.
~~ edit2: Also wondering if there is a call for rebuffcut? Like there is the .Target == STARGET_PARTY etc, is there a check like .Rebuffcut? When checking other players to see if they have the players buff(s) already, and if they should be moved into party or not, it only takes into account if they have the buff or not, I can check remain time with .TimeLeft but im not sure how to compare that against the rebuffcut value.
Sorry for all the questions btw, and thanks again

Last edited by ZZZZZ on Thu May 08, 2014 10:26 pm, edited 1 time in total.
Re: Siege buff bot
table.contains is just an easy way to search a table. It has limitations of course. It can only search 1 level of the table. It can only search for exact matches. It only returns the first match. So if that's what you need then use it as it will simplify your code, otherwise you'll have to use your own for loop.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Siege buff bot
I found your adjustments to coi, where you added the 4 buttons, Save - Invite - Move - Kick. Did you happen to add macro commands to those functions? Only way I can automate breaking party before siege and then re-inviting after is to use Invite last group. The issue with that is it does not have a function to save it on demand, requires 1-3 mins for it to save.lisa wrote:I did some work on an autoinvite addon a long time which you could save the positions of where people are in raid. So before SW you would invite everyone and move them to where you wanted and then once it's set you disband raid. Then once in SW you click a button and it invites everyone and then automatically moves them to their saved position. It had a few issues but they were issues from the game itself.
Could probably just make a function that uses a table to invite all...think I might do that. Figured out the macro to kick everyone from party so I can just go from there I guess.
Re: Siege buff bot
You could just manually execute the commands it does after that 1m wait.ZZZZZ wrote:The issue with that is it does not have a function to save it on demand, requires 1-3 mins for it to save.
I think the part that waits is this
Code: Select all
if (elapsed - ILG.lastTime > ILG.cfg.saveTime and ILG.lastTime ~= 0 or (numParty == 0 and numRaid == 0 and ILG.partyReal.n == 0)) then
-- cant copy the whole array o_O
ILG.partyReal.n = ILG.party.n;
ILG.partyReal.member = ILG.party.member;
ILG.partyReal.InstanceLevel = ILG.party.InstanceLevel;
end
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Siege buff bot
Oh awesome, I didn't even know you could do that :S
I was trying to do break and invites with my own function but im not sure how to incorperate MM table values into ingame functions
error
Code: Select all
function saveILG()
RoMCode('ILG.partyReal.n = ILG.party.n;')
RoMCode('ILG.partyReal.member = ILG.party.member;')
RoMCode('ILG.partyReal.InstanceLevel = ILG.party.InstanceLevel;')
end
Code: Select all
Command> ZZinviteRaidTable = {}; inviteRaid(true); inviteRaid()
Code: Select all
function inviteRaid(_break)
if _break == true then
ZZinviteRaidTable = {}
for i = 1, 36 do
_name = GetPartyMemberName(i)
if _name == nil then
_name = ""
end
table.insert(ZZinviteRaidTable, _name)
end
RoMCode('charName = UnitName("player"); for i=1,36 do if GetRaidMember(i) ~= charName then UninviteFromParty("raid"..i.."") end end; UninviteFromParty("player")')
for j = 1, 36 do
print(ZZinviteRaidTable[j])
end
else
RoMCode('inviteTable = '..ZZinviteRaidTable..'; for i=1,36 do InviteByName(""..inviteTable[i].."") end')
yrest(10000);
RoMCode('for i=1,36 do SwithRaidAssistant(i, "on") end')
end
end
Code: Select all
onLoad error: ...ro/scripts/rom/userfunctions/userfunction_SiegeBuffs.lua:431: a
ttempt to concatenate global 'ZZinviteRaidTable' (a table value)
Re: Siege buff bot
I couldn't find the addon I changed but from memory (which is pretty bad)
A button saved the names to a table, another button invited all the saved names and I think 1 more button did the moving.
Every button just calls a function, find the names of those functions and you can use the bot to call the functions just like any other in game function.
A button saved the names to a table, another button invited all the saved names and I think 1 more button did the moving.
Every button just calls a function, find the names of those functions and you can use the bot to call the functions just like any other in game function.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Siege buff bot
Your adjustment - http://rom.curseforge.com/addons/comeonin/?comment=3lisa wrote:I couldn't find the addon I changed but from memory (which is pretty bad)
A button saved the names to a table, another button invited all the saved names and I think 1 more button did the moving.
Every button just calls a function, find the names of those functions and you can use the bot to call the functions just like any other in game function.
Im just going to use this to save and invite raid groups.
Code: Select all
function ZZsaveAndBreakRaidCOI()
RoMCode('ComeOnIn_SaveRaid()')
RoMCode('ComeOnIn_UnInvite()')
ZZCOIRaidSaved = true
end
function ZZinviteSavedRaidCOI()
if ZZCOIRaidSaved then
RoMCode('ComeOnIn_InviteRaid()')
ZZCOIRaidSaved = false
end
end
Re: Siege buff bot
wow I don't even remember posting it on curse, looks like they did update it with my changes though so that is good I guess. 2.5 years ago no wonder I can't remember lol
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Siege buff bot
I spent a good hour or 2 just looking through coi's lua file trying to find how it defines what group is currently active and I simply can't find it. Im just looking for something to set coi group by name, like group("Siege") or such. I think it only changes groups via clicking a value in the drop down list but I don't know how to go from there. I figured I could just use the index of the drop down list but I can't get that to work with any of the functions - ComeOnIn_GetGroupName(index) etc
I should really start learning how to make addons :S
I should really start learning how to make addons :S
Re: Siege buff bot
To tie up a loose end, I updated my skills list so here are the skills that have the party flag at 0xA4.
- ALL_FIRE_TRAINING
ALL_SOLDIERS_ATTACK
ALL_SOLDIERS_CHARGE
CHAMPION_LIGHT_PULSE
CHAMPION_RIGHTEOUS_EXPLOSION
CHAMPION_SALVATION_ENGRAVING
CHAMPION_SMOKE_DIFFUSION
CHAMPION_SUICIDE_ADVANCE
DRUID_AWAKENING_OF_THE_WILD
DRUID_CONCENTRATION_PRAYER
DRUID_GIFT_PULSE
DRUID_HEALING_WIND
DRUID_MYSTERIOUS_GRACE
DRUID_SPEED_CATALYSIS
DRUID_SPRING_OF_BLESSINGS
KNIGHT_HOLY_SHIELD
MAGE_FIRE_WARD
PRIEST_ANGELS_BLESSING
PRIEST_BLESSED_SPRING_WATER
PRIEST_EMBRACE_OF_THE_WATER_SPIRIT
PRIEST_GROUP_HEAL
PRIEST_MAGIC_BARRIER
PRIEST_SHADOW_FURY
PRIEST_SOUL_SOURCE
PRIEST_TOUCH_OF_REVIVAL
ROGUE_COURAGEOUS_GUARD
ROGUE_INFORMER
ROGUE_QUICKNESS_AURA
ROGUE_SLAUGHTER_BLESSING
SCOUT_MANA_ARROWS
SCOUT_SPIRITUAL_LEADER
WARDEN_MORALE_BOOST
WARLOCK_CALM_PARADOX
WARLOCK_OTHERWORLDLY_WHISPER
WARLOCK_SUBLIMATION_WEAVE_CURSE
WARLOCK_SURGE_OF_AWARENESS
WARRIOR_DEFENDERS_ROAR
WARRIOR_DEFENSIVE_FORMATION
WARRIOR_GUARDIANS_PLEDGE
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Who is online
Users browsing this forum: No registered users and 8 guests