Page 1 of 1
Giving away raidlead
Posted: Fri Aug 02, 2013 8:02 am
by amalia
Hey
If you´re botting in public raids such as butterflyraid, you could accidently get raid lead if the former raid lead leaves group wothout setting a new one.
In this case people ask you lot more to invite this or do that or kick offline chars, as if you would not be raid lead. And of course I do not answer them.
Can I check my status of raidlead and randomly pass the raid lead away from me?
This prevents me from beeing detected and does not annoy normal players. Beeing not in public raid makes you also suspect or at least they offend you to participate the raid. Of course this can cause trouble if you´re in a bot-only-group and nobody wants to have lead - but anyway. Somebody an idea?
Re: Giving away raidlead
Posted: Fri Aug 02, 2013 6:36 pm
by lisa
Re: Giving away raidlead
Posted: Sun Aug 04, 2013 8:54 am
by amalia
Hmm
I have right now following code in the onloadsection.
Code: Select all
if RoMScript('UnitIsRaidLeader("player")') == true then
RoMScript('PromoteToPartyLeader("raid1")');
end;
This is giving away party and raidlead, but stops the script immediately.
Errormessage: ../waypntlist.lua:203 attempt to compare string with number
I just took the code from searching for your hinted API-functions.
I have no idea why to use RoMScript.
Of course it should be part of a function but first I should get rid od breaking the script.
Another hint lisa?
Re: Giving away raidlead
Posted: Sun Aug 04, 2013 9:20 am
by rock5
Line 203 of waypointlist.lua has to do with WAYPOINT_DEVIATION. You didn't, by any chance, set it to a string value?
Re: Giving away raidlead
Posted: Sun Aug 04, 2013 6:33 pm
by lisa
just keep in mind there may not be a raid1 when you get leader as there are gaps when people leave raids, so maybe do a check for if there is someone in that spot first, also you could actually be in that first spot.
Now you have the RoMScript's working, the bot's party functions also work for raids
You can just check the names of party members direct from memory with
Number is obviously the position they are in the raid/party, so 1 for first spot, it will return either nil if nothing in the spot or the character's name.
there is also a function for getting party/raid leaders name in the bot direct from memory.
It just returns the name of the leader.
So there you go, some more hints

Re: Giving away raidlead
Posted: Mon Aug 05, 2013 8:14 am
by amalia
@Rock You´re the man. I messed with the test-chars profile. Blame on me.
Lisa I tried to avoid the gaps in the raid, but I cannot figure out how to deal with the rom API on the one hand and a bot function on the other.
Of course the RoMScript('PromoteToPartyLeader("raid"..counter.."")') below doesn´t work but I canot figure out how to do it right.
Code: Select all
function PassLead()
if RoMScript('UnitIsRaidLeader("player")') == true then
local counter = 1
while GetPartyMember(counter) == nil do --count till there is somebody except yourself
counter = counter +1
if counter == 37 then break end; --just to stop if you´re the only one
return
RoMScript('PromoteToPartyLeader("raid"..counter.."")')
end;
end;
And if we´re talking on avoiding gaps, an offline char is also a "gap" but GetPartyMember(number) will not give a nil
Re: Giving away raidlead
Posted: Mon Aug 05, 2013 1:24 pm
by NoKangaroo
@amalia:
Code: Select all
function PassLead()
if RoMScript('UnitIsRaidLeader("player")') == true then
local counter = 1
while GetPartyMember(counter) == nil do --count till there is somebody except yourself
counter = counter +1
if counter == 37 then break end; --just to stop if you´re the only one
return
RoMScript('PromoteToPartyLeader("raid"..counter.."")')
end;
end;
I think "return" should be replaced with "end":
Code: Select all
function PassLead()
if RoMScript('UnitIsRaidLeader("player")') == true then
local counter = 1
while GetPartyMember(counter) == nil do --count till there is somebody except yourself
counter = counter +1
if counter == 37 then break end --just to stop if you´re the only one
end
RoMScript('PromoteToPartyLeader("raid"..counter.."")')
end
end
Re: Giving away raidlead
Posted: Mon Aug 05, 2013 1:59 pm
by rock5
Also it should be
Code: Select all
RoMScript('PromoteToPartyLeader("raid'..counter..'")')
Re: Giving away raidlead
Posted: Mon Aug 05, 2013 5:43 pm
by lisa
I would probably just do something like this, untested.
Code: Select all
function PassLead()
if getPartyLeaderName() == player.Name then
for i = 1,37 do
local currname = GetPartyMemberName(i)
if currname ~= nil and currname ~= player.Name then
RoMScript('PromoteToPartyLeader("raid'..i..'")')
yrest(1000)
if getPartyLeaderName() ~= player.Name then
return
end
end
end
if getPartyLeaderName() == player.Name then
--it's just you in raid, what do you want to do?
end
end
end
checks if your party leader, if you are then it looks for spots with character names and tries to make them lead, as soon as it succeeds in passing lead it stops.
Re: Giving away raidlead
Posted: Tue Aug 06, 2013 2:32 pm
by amalia
Yeah this works perfectly. And there is so much for me to learn...^^
thx