Page 15 of 16

Re: Party Bot (questions/answers)

Posted: Mon Jun 30, 2014 7:54 am
by gamerix92
my actual version of MM is 777. party.lua with 18,3 KB

in this file updateLastHitTime is included.

isn't removed.

where to get the "new" party.lua ?

could someone post me his file ^^

Re: Party Bot (questions/answers)

Posted: Mon Jun 30, 2014 8:20 am
by rock5
Just to clarify, 777 is not MM but rombot. They are different. MM version should be something like 1.04. MM is the program that runs the bot.

Maybe my last post was misleading. What I meant was the function updateLastHitTime was removed from player.lua so the call to use it in party.lua errors because the function no longer exists. So party.lua needs to be updated to not use that function. That hasn't been done yet so there is no new party.lua to download. Me or Lisa will do it soon. To tell you the truth, I don't want to do it right now because my main screen is being repaired and my secondary screen is on my left. If I do too much work on it I will get a crick in my neck. But I'll have a quick look at it and see if I fix it quick.

Re: Party Bot (questions/answers)

Posted: Mon Jun 30, 2014 8:39 am
by rock5
Ok. Here is a version of party.lua with some minor changes that should make it work. I didn't test it myself. I'll leave that too you.

Re: Party Bot (questions/answers)

Posted: Mon Jun 30, 2014 8:56 am
by gamerix92
okay thanks for explanations. Sry that i mixed them up. missunderstanding.

ok thanks. I will try it out .

Thanks for helping :D

--------------------------------------------------------------
I had also an idea, but dont know if it would be working.
For the quests in party everything with killing and looting from killed mobs is possible. But when we have to collect items like special flowers or use an item on a killed or not killed mob/ npc.
Is it possible without wp files ?
Search for questitems and collect or use them automaticly with a command like quest"collect" or quest"use" ?
The difficulty will be to search the questlog for quest like them -> find their necessary items -> get them to search by command.

Just a notion :D

Re: Party Bot (questions/answers)

Posted: Mon Jun 30, 2014 10:23 am
by gamerix92
works fine with the party.lua from rock5 xD

Thank you

:D :D

Re: Party Bot (questions/answers)

Posted: Mon Jun 30, 2014 5:47 pm
by lisa
gamerix92 wrote:I had also an idea, but dont know if it would be working. For the quests in party everything with killing and looting from killed mobs is possible. But when we have to collect items like special flowers or use an item on a killed or not killed mob/ npc. Is it possible without wp files ? Search for questitems and collect or use them automaticly with a command like quest"collect" or quest"use" ? The difficulty will be to search the questlog for quest like them -> find their necessary items -> get them to search by command.
You could just do the code as in

Code: Select all

code"player:harvest(ID)"
code"player:target_Object(IDorNAME)"
or
You can create a userfunction to do basically what ever you want and then call that function. Pretty sure I posted some examples on this I used with looting mysterious bags in party.

Code: Select all

function collect(IDorNAME)
player:target_Object( IDorNAME ,900)
end
then type in party chat.

Code: Select all

code"collect('Grass of Loathing')"

Re: Party Bot (questions/answers)

Posted: Thu Sep 18, 2014 7:54 am
by noobbotter
Is it possible to put variables into the party chat? For instance, if my party leader accepts a quest and saves the questgiver ID and quest ID as variables, can he send those in party chat? I'm looking to do something like this:

Code: Select all

function DD_getquest()
		-- figure out who to target
		local target = player:getTarget()
		local questgiver = target.Id
		

		-- then get quest id as I accept quest
		EventMonitorStart("newquestid", "ADDNEW_QUESTBOOK");
		print("event monitor started")
		local time,moretocome,questid = nil;
		print("doing repeat function now")
		repeat
			time, moretocome, questid = EventMonitorCheck("newquestid", "1");
			yrest(500); -- check every half second
		until questid ~= nil
		EventMonitorStop("newquestid");
		
		-- now send the command to party
		local partycommand = 'code"player:target("'..questgiver..'"); yrest(500); AcceptQuestByName("'..newquestid..'");yrest(500)"'
		sendPartyChat(partycommand)
		yrest(500)
		
	end
haven't tried this yet as I am not at a computer i can try it on... just wondering if anyone can tell me if this would work. Thanks.

Re: Party Bot (questions/answers)

Posted: Fri Sep 19, 2014 2:48 am
by lisa
you can but just a little bit different to what you posted.

Code: Select all

local partycommand = 'code"player:target("'..questgiver..'"); yrest(500); AcceptQuestByName("'..newquestid..'");yrest(500)"'

try this instead.

Code: Select all

local partycommand = 'code"player:target('..questgiver..'); yrest(500); AcceptQuestByName('..newquestid..');yrest(500)"'

hmmm actually you want to have more " in there for the functions.

Code: Select all

local partycommand = 'code"player:target(\"'..questgiver..'\"); yrest(500); AcceptQuestByName(\"'..newquestid..'\");yrest(500)"'
try that 1.

Re: Party Bot (questions/answers)

Posted: Fri Sep 19, 2014 1:14 pm
by noobbotter
I realized what I was doing wrong with the quotes so I tried it like this:

Code: Select all

'code"player:target('..questgiver..'); yrest(500); AcceptQuestByName('..questid..');yrest(500)"'
I think I would only need the \" in there if I am using NPC or quest Names, versus ID. Correct?

I also found that i used newquestid instead of questid so I fixed that.
Well, I am seeing 2 problems at this point:

1: The quest ID it is returning is "6" instead of a 6 digit questID. I'm not sure why. Here's my code updated and fixed as much as possible:

Code: Select all

		-- figure out who to target
		local target = player:getTarget()
		local questgiver = target.Id
		

		-- then get quest id as I accept quest
		EventMonitorStart("newquestid", "ADDNEW_QUESTBOOK");
		print("event monitor started")
		local time,moretocome,questid = nil;
		print("doing repeat function now")
		repeat
			time, moretocome, questid = EventMonitorCheck("newquestid", "1");
			yrest(500); -- check every half second
		until questid ~= nil
		EventMonitorStop("newquestid");
		
		-- now send the command to party
		local partycommand = 'code"player:target('..questgiver..'); yrest(500); AcceptQuestByName('..questid..');yrest(500)"'
		sendPartyChat(partycommand)
If I do a printf("quest id is: %s",questid) it will return 6 instead of the actual ID of the quest. Is there a better way for me to automatically grab the quest ID of the most recent quest I just accepted?

Problem 2: If the quest is from a bulletin board, it doesn't see the target as the bulletin board because I can't "target" it. Is there a better way to retrieve the quest giver of the most recently accepted quest? Also, I tried to target another player and run this and the targetid that it returned was "1001" which didn't seem quite right anyway, as I would think the ID would be 6 digits?

In case you hadn't figured it out, I'm putting all this in a script where I would press number 1 then accept a quest and the script would then send all the relevant information to my party and have them accept the same quest. Then I will do the same thing with turning in the quest (and clicking an object if needed). I've got it all working if I manually enter the questID and target IDs. That works fine for repeating the same daily quest over and over again, but wouldn't work well for doing regular quests.

Re: Party Bot (questions/answers)

Posted: Fri Sep 19, 2014 6:12 pm
by lisa
well now I know what you are actually trying to do.


get your main to target the quest NPC and while still targeting them

Code: Select all

npc"accept"
npc"complete"
that will accept all quests and hand in all completed quest with that NPC.

As for targeting objects you just need to tell it to target the ID/name, now if you are manually playing the main it means you need to get the ID, using rock5's getID addon is probably easiest way to do that.
Then just do

Code: Select all

code"player:target_Object(ID)"
If you are doing a waypoint then you should already know the ID or name.

Re: Party Bot (questions/answers)

Posted: Fri Sep 19, 2014 10:49 pm
by noobbotter
well, the

Code: Select all

npc"accept"
npc"complete"
will work good when dealing with an NPC, but I need a way to automatically grab the ID of something else (like a quest board) on the fly because I am manually controlling the party lead. Right now, I am trying to use NUMPAD_1 to accept a quest, and when i press the NUMPAD_1, my character will get the quest and then tell the followers to accept the quest as well. Then NUMPAD_3 will do the same but for completing quest. If I have to use a different button to use for non-NPC quests, I can do that, I jsut need to know how I would get that oblectID. Maybe I could somehow grab questgiver from the last accepted quest? Is there a command to get the ID of the questgiver for a given quest?

Re: Party Bot (questions/answers)

Posted: Fri Sep 19, 2014 11:43 pm
by lisa

Re: Party Bot (questions/answers)

Posted: Sat Sep 20, 2014 12:24 am
by rock5
If I understand correctly your problem is you want to be able to go up to a new npc, target it and tell your party members to target the same and you need to do that with boards that you can't target. Maybe you could get the name of the board using "mouseover"

Code: Select all

boardname = UnitName("mouseover")
and tell the other members to target it by name.

Re: Party Bot (questions/answers)

Posted: Fri Oct 23, 2015 5:45 pm
by beanybabe
Thanks looks like it will do the trick the function to add party as friend.

I use some function to check if others are near but need have every one in party as a friend so they do not be detected as strangers.
Some day I would like to have it move to some alternate way-point, house or vendor, if another enters the area.

Re: Party Bot (questions/answers)

Posted: Sat Oct 31, 2015 10:26 am
by ichmagbotsyay
i tried searching this thread, but couldnt find an answer to my question:

how do i make the following bot stop moving when a fight starts?

here is the situation: i have a group leader (warrior) running at enemies and marking them with an icon and then attacking them. another bot (scout) is following and properly looting and fighting all marked enemies. the problem is, that when an enemy is attacked, the scout keeps following the warrior into melee range, attacking while moving, but thus canceling casts like comboshot... how do i force the following bot to stop following and just attack when an enemy is marked and then start following again when its dead?

Re: Party Bot (questions/answers)

Posted: Sat Oct 31, 2015 6:25 pm
by lisa
ichmagbotsyay wrote:i tried searching this thread, but couldnt find an answer to my question:

how do i make the following bot stop moving when a fight starts?

here is the situation: i have a group leader (warrior) running at enemies and marking them with an icon and then attacking them. another bot (scout) is following and properly looting and fighting all marked enemies. the problem is, that when an enemy is attacked, the scout keeps following the warrior into melee range, attacking while moving, but thus canceling casts like comboshot... how do i force the following bot to stop following and just attack when an enemy is marked and then start following again when its dead?
have the party leader type in party chat

Code: Select all

com"nofollow"
and then after the boss type

Code: Select all

com"follow"

Re: Party Bot (questions/answers)

Posted: Tue Nov 03, 2015 6:24 am
by ichmagbotsyay
lisa wrote:
ichmagbotsyay wrote:i tried searching this thread, but couldnt find an answer to my question:

how do i make the following bot stop moving when a fight starts?

here is the situation: i have a group leader (warrior) running at enemies and marking them with an icon and then attacking them. another bot (scout) is following and properly looting and fighting all marked enemies. the problem is, that when an enemy is attacked, the scout keeps following the warrior into melee range, attacking while moving, but thus canceling casts like comboshot... how do i force the following bot to stop following and just attack when an enemy is marked and then start following again when its dead?
have the party leader type in party chat

Code: Select all

com"nofollow"
and then after the boss type

Code: Select all

com"follow"
thank you^^

Re: Party Bot (questions/answers)

Posted: Thu Nov 05, 2015 12:48 pm
by beanybabe
Here is how I used the add players to friend list code you shared. I was wondering if there is there a way to remove non-active players that leave party. Or will they just drop on adding another, I have not added enough to find this out yet. I put this in on-leave combat. Then it updates players list after every kill, I did this as friends can join and leave in combat.

Code: Select all

	<onLeaveCombat><![CDATA[
	-- Additional Lua code to execute after killing an enemy
	-- ADD PARTY AS FRIEND
	for i=1, 5 do
      local partyName = GetPartyMemberName(i)
      if partyName then
         changeOptionFriendMob("friend", ""..partyName.."", "Add");
      end
	end
	--look for players.
	while ((CountPlayers()) and (CountPlayers(nil,true, true) > 0)) do
		if (player.Class1 or player.Class2 == CLASS_DRUID) and (not player:hasBuff("Corrosion")) then	
			player:cast("DRUID_ANTIDOTE")
		end
		if (player.Class1 == CLASS_ROGUE) and (not player:hasBuff("500675")) and shouldhide == "true" then
			player:cast("ROGUE_HIDE");
		end  
		playalarm()
		print("1 or more players found. Don't bot. Wait")
		rest(10000);
	end;		
	]]></onLeaveCombat>

Re: Party Bot (questions/answers)

Posted: Thu Nov 05, 2015 8:43 pm
by lisa
that function will only add the name to the list if it isn't already in the list, so you won't get multiple of the same name, if you want to make sure that only the current party members are in the friend list then just reset the list at the start of onleavecombat

Code: Select all

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

Re: Party Bot (questions/answers)

Posted: Fri Nov 06, 2015 9:03 pm
by beanybabe
Thanks, I had thought about it some after posting that and had another idea for a function.

If someone is good at coding a useful bit of code that you can put a list of every char you have. Then it can be called in on leave combat. if a player is detected in the area it checks against the list. You could also include friends you know on the list. Then only have it sound when a stranger is in area. Another feature might be a list of names if you see to signal your char to run back to town or to log out. This should work in party or not.

I was looking at party bot and wondered if it could be useful to add speed up and slow down. if you have several following in a maze like area so they don't get stuck on walls. if the lead char is going to make a turn have it wait and get others next to it then make the turn. just an idea.