Page 1 of 1

Invite by Name function?

Posted: Sat Jul 14, 2012 7:38 pm
by Tamyra
Is there a function that will allow the bot to invite it's party members by name? Example being:

Account one is repeating an instance over and over again for the character's in account 2.
Account 2 is doing the "login next character true" function after one run is complete, just as a tag-along to the first account.

I want the first account to be able to invite the players in the second account in sequence, or as they log on, and only enter the instance after there is a verified party. They will be running 2 different versions of the same instance with a different set of instructions for each of the 2 waypoints. Is there anything like this built, or a function I can play/test with? Maybe only inviting members of a pre-determined "friend list" from the onload and checking the list one at a time to see if any of those players are online and then inviting only the one that is?

Re: Invite by Name function?

Posted: Sat Jul 14, 2012 7:44 pm
by CNKTHoward
This will invite your character:

Code: Select all

RoMScript("InviteByName('charactername');");
I use the addon Auto Accept Invitations for the char to accept the party.

This gets the number of partymembers:

Code: Select all

RoMScript("GetNumPartyMembers()")
If you know how many members you'll have, f.e. you are going to have a 4 man party, you can check if the group is complete with:

Code: Select all

local groupnumber = RoMScript("GetNumPartyMembers()")
if groupnumber == 4 then
   return true
else
You can create a table with all the names, create a for loop and invite all the players in the table.

Re: Invite by Name function?

Posted: Sat Jul 14, 2012 8:02 pm
by Tamyra
Hmmm, my auto accept does not always turn itself on when I load a new character....maybe if I have the tag-along do the inviting so that I can keep auto accept running. That way I do not have to make a table, only invite the one that's repeating the run. Thanks for the info!!

Re: Invite by Name function?

Posted: Sat Jul 14, 2012 8:56 pm
by lisa
I like the invite last group addon, So I never have to specify any names in code.

I just make the party manually and then start up the bot, in the WP code I use the ILG commands to disband party and reinvite party.

Re: Invite by Name function?

Posted: Sat Jul 14, 2012 9:55 pm
by Tamyra
Yeah that would work if I was using the last group for this, but only one member will be the same, others will be different each run.

Re: Invite by Name function?

Posted: Sat Jul 14, 2012 10:32 pm
by lisa
Tamyra wrote:others will be different each run.
Then yeah a table is probably easiest way to go.

Unless you use your friend list for it and only have chars you want to use with the WP in the friends list.

Code: Select all

local count = RoMScript('GetFriendCount("Friend")')
yrest(500)
for i = 1,count do
local name, groupID, online  = RoMScript('GetFriendInfo("Friend", '..i..')')
yrest(500)
if online == true then
RoMScript('InviteByName("'..name..'")');
yrest(500)
end
end
Untested, might work lol