Invite guild member to party

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Invite guild member to party

#1 Post by botje »

seeying all my alts are in my guild, a botguild xd, would i be able to see which one is online and invite it to party automaticly?

that way i dont have to have a whole list of invite to party lines with all my alt names, but just invite the one online in my guild.
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Invite guild member to party

#2 Post by lisa »

http://www.theromwiki.com/API:GetGuildRosterInfo

This bit is what you want to know
IsOnLine

Code: Select all

local name, rank, class, level, subClass, subLevel, isHeader, isCollapsed, dbid, guildTitle, IsOnLine, LogOutTime, Zone, Note = GetGuildRosterInfo(i);
I am sure you can work out how to use it ;)
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
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Invite guild member to party

#3 Post by botje »

what about this?

Code: Select all

function JoinParty(YourName)
	local name, rank, class, level, subClass, subLevel, isHeader, isCollapsed, dbid, guildTitle, IsOnLine, LogOutTime, Zone, Note = RoMScript("GetGuildRosterInfo(1)");
	local count = 1
	 
	while IsOnLine == false and rank == 10 do
		IsOnLine = RoMScript("GetGuildRosterInfo(count)");
		
		count = count + 1
	end
	
	printf("Debug:  "..name.." \n");
	printf("Debug:  "..IsOnLine.." \n");
	printf("Debug:  "..rank.." \n");
	
	sendMacro('InviteByName('..name..')');
end
this is as far as i get, but now it tries to invite myself xd
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Invite guild member to party

#4 Post by rock5 »

Code: Select all

IsOnLine = RoMScript("GetGuildRosterInfo(count)");
What this does is only take the first returned value, which happens to be 'name', and put it into the variable 'IsOnLine'. If you want IsOnLine you are going to have to take at least the first 11 returned values.

Code: Select all

name, rank, class, level, subClass, subLevel, isHeader, isCollapsed, dbid, guildTitle, IsOnLine= RoMScript("GetGuildRosterInfo(1)");
It also lets you get the rank which you want to use.
  • 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
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Invite guild member to party

#5 Post by botje »

oh, so the 1 in that example stands for first value? i thought it was the index from the list.

or i need to make that whole line with it?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Invite guild member to party

#6 Post by rock5 »

Sorry, should be

Code: Select all

name, rank, class, level, subClass, subLevel, isHeader, isCollapsed, dbid, guildTitle, IsOnLine= RoMScript("GetGuildRosterInfo("..count..")");
And yes, 'count' is the index in the list of guildies.
  • 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
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Invite guild member to party

#7 Post by botje »

k cool, ill try again then ^^
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: Invite guild member to party

#8 Post by botje »

got it ^^

Code: Select all

function JoinParty()
	local name, rank, class, level, subClass, subLevel, isHeader, isCollapsed, dbid, guildTitle, IsOnLine, LogOutTime, Zone, Note = RoMScript("GetGuildRosterInfo(1)");
	local count = 1
	 
	while IsOnLine == false or rank == 10 do
		name, rank, class, level, subClass, subLevel, isHeader, isCollapsed, dbid, guildTitle, IsOnLine= RoMScript("GetGuildRosterInfo("..count..")");
		count = count + 1
	end
	
	--printf("Debug:  "..count.." \n");
	--printf("Debug:  "..name.." \n");
	--printf("Debug:  "..rank.." \n");
	
	sendMacro('InviteByName("'..name..'")');
end
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Invite guild member to party

#9 Post by rock5 »

It will work but the 'count' will be off by one for all except the first member. Instead of getting the info first then doing a 'while' loop you could have just used a 'repeat' loop.

Code: Select all

count = 0
repeat
    count = count + 1
    name, rank, class, level, subClass, subLevel, isHeader, isCollapsed, dbid, guildTitle, IsOnLine= RoMScript("GetGuildRosterInfo("..count..")");
until IsOnLine == true and rank ~= 10
  • 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
Post Reply