Party Bot (questions/answers)

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
ichmagbotsyay
Posts: 70
Joined: Tue Aug 09, 2011 7:43 am

Re: Party Bot (questions/answers)

#301 Post by ichmagbotsyay » Tue Jan 05, 2016 4:24 pm

Hi,

how do I leave the Party() loop?
The onLoad section of my waypoint looks kind of like this:

Code: Select all

followMe = true;
while followMe do
	Party();
end;
error("Done",0);
My other char is running some waypoints inside an instance and in the last waypoint I have this command:

Code: Select all

sendPartyChat('code"followMe=false;print(followMe);"');
The first bot receives the command, sets the variable followMe to false and prints 'false' to the MM window.... BUT, the bot keeps following my other char, attacking what he attacks, mounts when he mounts and so on... The script is never ended -.-
I suspect another loop within the Party() function, but I can't find it anywhere. In which file is this function located? Or how do I leave the loop? I know I could use something like sendPartyChat('code"error()"'); to force the bot to crash, but that's not really what I want, it was just to simplify the problem. I actually want the bot to stop following my other char and load another waypoint and so on... But its just completely stuck in some loop somewhere that I cannot exit :(

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party Bot (questions/answers)

#302 Post by lisa » Tue Jan 05, 2016 11:00 pm

because partybot uses in game commands and such just changing the value won't make it stop following, there is already a no follow command though that does everything for you.

Code: Select all

com"nofollow"
com"follow"
As for stopping party bot itself, hmmm it would need some tweaking as the function called is a never ending loop, you only need to call the function once, not in a loop like you did. If you look at the waypoints provided for using party it purely calls it once.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>

	PartyHeals()

	</onLoad>
</waypoints>

So if you want to edit so you can leave the loop you will need to edit rom/classes/party.lua, the function is function Party(heal) and just need to create a way to exit the while loop in that.

You need to keep in mind though if you leave that function that bot will stop listening to your commands.
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

ichmagbotsyay
Posts: 70
Joined: Tue Aug 09, 2011 7:43 am

Re: Party Bot (questions/answers)

#303 Post by ichmagbotsyay » Wed Jan 06, 2016 3:29 am

lisa wrote:because partybot uses in game commands and such just changing the value won't make it stop following, there is already a no follow command though that does everything for you.

Code: Select all

com"nofollow"
com"follow"
I know about those commands, but even if I tell the bot to stop following, the party routine is still constantly called and I can't get it to run another waypoint, or anything else for that matter.
lisa wrote:As for stopping party bot itself, hmmm it would need some tweaking as the function called is a never ending loop, you only need to call the function once, not in a loop like you did. If you look at the waypoints provided for using party it purely calls it once.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>

	PartyHeals()

	</onLoad>
</waypoints>
But if I don't start it in a loop, it just targets my main char and starts following him and then ends the script. The internal loop is not entered immediately, for some reason...
lisa wrote:So if you want to edit so you can leave the loop you will need to edit rom/classes/party.lua, the function is function Party(heal) and just need to create a way to exit the while loop in that.

You need to keep in mind though if you leave that function that bot will stop listening to your commands.
Ah, I was just looking for the function 'Party()' without any arguments, no wonder I couldn't find it :P
Thanks for your help!

-----
edit: I have another question :P

In my main char, I have the profile options set to this:

Code: Select all

<option name="PARTY"		value="true" />
<option name="PARTY_ICONS"		value="true" />
<option name="PARTY_INSTANCE"	value="true" />
<option name="ICON_FIGHT"		value="true" />
<option name="PARTY_FOLLOW_NAME"	value="" />
<option name="HEAL_FIGHT"		value="false" />
<option name="PARTYLEADER_WAIT"	value="true" />
<option name="MONITOR_WHISPERS"	value="false" />
The bot acts accordingly, always waiting on the other bot if it falls behind. But when I use changeProfileOption("PARTYLEADER_WAIT","false"); the MM window correctly prints that the value was changed from 'true' to 'false', but the main char still waits for the second bot. Even if I switch all party options to false, it still waits on the other one. Am I missing something obvious? :D

-----
edit2: Nevermind, just wrote my own party functions that are a lot simpler but do everything I want them too! :D

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Party Bot (questions/answers)

#304 Post by beanybabe » Tue Mar 15, 2016 1:44 pm

lisa I add friends to many waypoints to keep from attacking certain trash mobs. If I use I think it would keep clearing the friend list. I need find way to keep the names added from waypoints.

changeOptionFriendMob("friend", "Rabbit", "Add");
changeOptionFriendMob("friend", "Hare", "Add");
changeOptionFriendMob("friend", "Scarlet Wing", "Add");
changeOptionFriendMob("friend", "Cavy", "Add");
changeOptionFriendMob("friend", "Snake", "Add");
changeOptionFriendMob("friend", "Ferdhoof Rat", "Add");
changeOptionFriendMob("friend", "Cockroach", "Add");
changeOptionFriendMob("friend", "Beetle", "Add");

  • <onLeaveCombat><![CDATA[
    settings.profile.friends = {}
    for i=1, 5 do
    local partyName = GetPartyMemberName(i)
    if partyName then
    changeOptionFriendMob("friend", ""..partyName.."", "Add");
    end
    end
[/list]

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party Bot (questions/answers)

#305 Post by lisa » Tue Mar 15, 2016 9:41 pm

That userfunction is designed to add or remove names as needed, it works exactly as it should.

In your code you do however clear the friends list yourself with this line you have.

Code: Select all

settings.profile.friends = {}
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
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Party Bot (questions/answers)

#306 Post by beanybabe » Thu Mar 17, 2016 7:28 am

I will try it without the clear list. I rarely have characters join or leave party. I do not know why I removed this from the profile after you suggested it month ago there must have been some problem. I did not record the problem anywhere.
Thanks again.

noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

Re: Party Bot (questions/answers)

#307 Post by noobbotter » Thu Mar 17, 2016 3:01 pm

Looks like you were trying to clear and then rebuild the friends list each time you leave combat, maybe so as different people join party it will autoupdate the friends?

User avatar
beanybabe
Posts: 647
Joined: Wed Mar 06, 2013 1:27 am

Re: Party Bot (questions/answers)

#308 Post by beanybabe » Sat Mar 19, 2016 5:51 pm

I got some time to try some things and got this to work when it was put the code in the onload part of a waypoint. If I put it in profile it did not seem to update the profile.

Thanks for helping on this i only need it on a few waypoints it will come in handy.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests