I am trying to run several alt characters in an instance. I am having an issue with inviting party members. First, the InviteByName function gives me an error of
[string "..."]:27 attempt to call global 'InviteByName' (a nil value)
I have tried putting the argument of InviteByName into another variable and even directly putting the characters name in quotes, and I cannot get it to work anymore. I say anymore, since I thought there was a time I could directly use InviteByName("toon1") and it would work.
Also, I actually want the invite to be an honor party invite. How do I do an honor party invite?
******************************************
valid_characters = {
'toon1', 'toon2', 'toon3', 'toon4',
};
repeat
local obj = nil;
local objectList = CObjectList();
objectList:update();
character_detected = false;
for i = 0,objectList:size() do
obj = objectList:getObject(i);
if( obj.Type == PT_PLAYER ) then
local pawn = CPawn(obj.Address);
if( table.contains(valid_characters, pawn.Name) ) then
character_detected = true;
printf("character detected! Name: %s\n", tostring(pawn.Name));
InviteByName(pawn.Name);
end
end
end
yrest(1000)
until character_detected == true;
yrest(1000)
keyboardHold( settings.hotkeys.MOVE_FORWARD.key )
yrest(1000)
keyboardRelease( settings.hotkeys.MOVE_FORWARD.key )
waitForLoadingScreen()
Inviting Party Members
Re: Inviting Party Members
--=== Moved ===--
This sub forum is not for;
1. Making suggestions for userfunctions, waypoint files, scripts etc.
2. Talking about files that have there own threads elsewhere.
3. Starting a project that never gets finished.
This thread is for;
1. Sharing a userfunction, waypoint file, script etc. for others to share. Basically, if you don't have a file to attach then don't start a thread here.
If you are just starting a project and are still in the discussion phase but have nothing to post yet then you should start in the main "Runes of Magic" forum.
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: Inviting Party Members
If you are trying to use the in game function then you need to use RoMScript
Code: Select all
RoMScript("InviteByName("..pawn.Name..");")
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: Inviting Party Members
Except you forget the quotes around the string.
Code: Select all
RoMScript("InviteByName(\""..pawn.Name.."\");")- 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 12 guests