Page 1 of 2

party chat monitoring

Posted: Mon Jan 16, 2012 9:05 pm
by lisa
Deleted this post as there are functions that are part of the default bot now, I will explain their usage here though so that people can see it here if they get this as a result of a search.

head to this topic for party bot questions/answer
http://www.solarstrike.net/phpBB3/viewt ... =21&t=4402

Re: party chat monitoring

Posted: Tue Jan 17, 2012 9:43 am
by gloover
Yea, thats, what I was searching a long time - thank u very much lisa!

Re: party chat monitoring

Posted: Tue Jan 17, 2012 6:37 pm
by Pmaia
will testing it at the limits:D
thanks for the post
trying now!!!!

Re: party chat monitoring

Posted: Tue Jan 17, 2012 7:17 pm
by Pmaia
well actualy im not able to make thiss work:\ something im made wrong takea look

Code: Select all

[code]function checkeventparty("Sumis", "start")
repeat
local time, moreToCome, name, msg = EventMonitorCheck(_name, "4,1")
if type(_msg) == "string" then
if msg and name ~= player.Name then
if string.find(string.lower(msg),string.lower(_msg)) then
return true
end
end
elseif type(_msg) == "table" then
for k,v in pairs(_msg) do
if msg and name ~= player.Name then
if string.find(string.lower(msg),string.lower(v)) then
return v
end
end
end
else
print("Incorrect message usage")
end
until msg == nil
end

function eventparty("Sumis", "stop")
if _startstop == "stop" then
print(_name.." Monitor stopped.")
EventMonitorStop(_name)
else
print(_name.." Monitor started.")
EventMonitorStart(_name, "CHAT_MSG_PARTY")
end
end

function sendpartychat("Im Ready")
RoMScript("SendChatMessage('".._msg.."', 'PARTY')")
end[/code]
this is wat i modified for the userfunction need to change all parts to be =?like

Code: Select all

function checkeventparty("Sumis", "start")
EventMonitorCheck("Sumis", "4,1")
its this? couse wen i load the micromacro it stops imediatly

at the waypoint

Code: Select all

<!-- #  3 --><waypoint x="1692" z="-5162" y="759"  tag="go - (1688, 759, -5162)">
	 waitForLoadingScreen(30);
	local id = RoMScript("GetZoneID()");
	if id == 209 then
   	 __WPL:setWaypointIndex(__WPL:findWaypointTag("In - (1670, 760, -5077)"));
	else
	repeat
	yrest(1000)
	until checkeventparty("Sumis", "start")
	end
	</waypoint>
<!-- # 12 --><waypoint x="1696" z="2891" y="445" tag="Goon - (1696, 445, 2891)"> 
  		 waitForLoadingScreen(30);
   		local id = RoMScript("GetZoneID()")
		if id == 128 then
     	 	__WPL:setWaypointIndex(__WPL:findWaypointTag("Out - (1774, 433, 2883)"))
		else
		repeat
		yrest(1000)
		until checkeventparty("Sumis", "start")
		player:update();
      		SlashCommand("ILG destroy");
      		yrest(400)
      		SlashCommand("ILG inv");
      		yrest(400)
      		SlashCommand("ILG inv");
		end
		</waypoint>
wat is wrong? its something at usefunctions isnt it?
thanks for all hard work programing Lisa

Re: party chat monitoring

Posted: Tue Jan 17, 2012 8:54 pm
by lisa
Don't edit the userfunction just save it as is.

in the WP start the event using

Code: Select all

eventparty("Sumis", "start")
and then look for messages as you did.

Code: Select all

  repeat
   yrest(1000)
   until checkeventparty("Sumis", "start")
This will wait for a party member to say
start in party chat.


I might make up some test WP for people to use so they can see it in action.

Re: party chat monitoring

Posted: Sun Jan 22, 2012 9:53 am
by Xmen
Hi lisa

I have a little problem with the script listed here

Did not find any crashed game clients.
3:46pm - scripts\rom/bot.lua:786: Failed to compile and run Lua code for waypoin
t #2


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>

my waypoint file

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 -->
				<waypoint x="3" z="123" y="0">
					eventparty("test", "start")
					local readycheck = {"lol","haha","see"}
					repeat
					yrest(1000)
					local message = checkeventparty("test",readycheck)
					if message and message == readycheck[1] then char1 == true end
					if message and message == readycheck[2] then char2 == true end
					if message and message == readycheck[3] then char3 == true end
					until char1 and char2 and char3
				</waypoint>
	<!-- #  2 -->
				<waypoint x="4" z="55" y="0"> 
					eventparty("test", "stop")
				</waypoint>
</waypoints>
//EDIT

for 2 Players it's ok

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 -->
				<waypoint x="3" z="123" y="0">
					eventparty("test", "start")
					repeat
					yrest(1000)
					until checkeventparty("goober", "ready") 
				</waypoint>
	<!-- #  2 -->
				<waypoint x="4" z="55" y="0"> 
					eventparty("test", "stop")
				</waypoint>
</waypoints>
[/color]

where is the error :roll: ?

Re: party chat monitoring

Posted: Sun Jan 22, 2012 10:45 am
by lisa
I might just be a little tired at the moment but I can't see anything wrong with first code.

Second code the names don't match though so it will never leave that loop.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
   <!-- #  1 -->
            <waypoint x="3" z="123" y="0">
               eventparty("goober", "start")
               repeat
               yrest(1000)
               until checkeventparty("goober", "ready") 
            </waypoint>
   <!-- #  2 -->
            <waypoint x="4" z="55" y="0"> 
               eventparty("goober", "stop")
            </waypoint>
</waypoints>

Should work.


--=== edit ===--

Yeah Iwas just sleepy, had == instead of =
fixed code on first post too.

Code: Select all

               if message and message == readycheck[1] then char1 = true end
               if message and message == readycheck[2] then char2 = true end
               if message and message == readycheck[3] then char3 = true end


Re: party chat monitoring

Posted: Sun Jan 22, 2012 6:46 pm
by Xmen
Yes WORKS very nice :D

Re: party chat monitoring

Posted: Mon Jan 23, 2012 1:05 pm
by nerdyone255
this is friggin uber!! awesome lisa!

dont forget to sanitize your names and share your scripts everyone!
keep the community alive.

ill have a few farms to share soon.

Re: party chat monitoring

Posted: Mon Jan 23, 2012 5:11 pm
by Buster99
I cannot get this to work. I have your userfunction and have copy and pasted exactly your example. The script stays in endless loop with message in bot window, "goober Monitor started". I am typing "ready" over and over in party chat with another character but it doesn't complete loop and move on to next WP. Any ideas?

Using your example:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="5" z="25" y="0">
               eventparty("goober", "start")
               repeat
               yrest(1000)
               until checkeventparty("goober", "ready") 
	</waypoint>
	<!-- #  2 --><waypoint x="-50" z="34" y="0">
               eventparty("goober", "stop")
	</waypoint>
</waypoints>

Re: party chat monitoring

Posted: Tue Jan 24, 2012 10:49 pm
by lisa
I posted some info/code for testing if event monitoring is working in this topic, test it to make sure you have event monitoring working.

http://www.solarstrike.net/phpBB3/viewt ... =27&t=2516

Re: party chat monitoring

Posted: Wed Jan 25, 2012 11:36 am
by Buster99
Thanks Lisa, I got it to work after reading your other posts. I had failed to download:

http://rom.curse.com/downloads/rom-addo ... 03fix.aspx

Re: party chat monitoring

Posted: Sun Jan 29, 2012 7:52 pm
by Buster99
I am having another problem with the multi-character option. It works fine ONLY on the first time through. Script ran great with 2 characters but trying to add a 3rd it isn't working. I am still starting and stopping the eventparty. I can't figure out why it only works the FIRST time through the script.

Code: Select all

<!-- # 1 --><waypoint x="1661" z="-4914" y="752">
		eventparty("goober", "start")
		repeat
			yrest(1000)
			local message = checkeventparty("goober",{"outside2","outside3"})
			if message and message == "outside2" then char1 = true end
			if message and message == "outside3" then char2 = true end
		until char1 and char2
		sendpartychat("comeon")
		yrest(500)
			keyboardPress( key.VK_NUMPAD7 ); --ILG Destroy 
			yrest(500)
			keyboardPress( key.VK_NUMPAD6 ); --ILG Invite
	</waypoint>
<!-- # 2 --><waypoint x="1668" z="-5014" y="761">
               eventparty("goober", "stop")

Re: party chat monitoring

Posted: Sun Jan 29, 2012 8:07 pm
by lisa
you can use code to do ILG invite and destroy.

Code: Select all

SlashCommand("ILG inv")

SlashCommand("ILG destroy")
As to the question at hand though.

When you say it doesn't work, exactly how doesn't it work?
Does it just sit there waiting for ever and not recognizing the other characters talking in party chat?
Do the other characters talk in party chat BEFORE the event monitoring is started?
Does it error out some how?

Does blue cheese really taste mouldy?

Re: party chat monitoring

Posted: Sun Jan 29, 2012 8:12 pm
by Xmen
I can not find errors
Please send the waypoint section from other party members

Re: party chat monitoring

Posted: Sun Jan 29, 2012 10:23 pm
by lisa
My guess is you haven't started monitoring yet and the other chars have said what they want to say.

So you can either make then repeat their message a few times or start the monitoring before that waypoint.


As to what you are trying to use it for, there is an easier solution.

You are using it to check when all party members have successfully left the instance right? then you destroy group and reinvite.

Just use

Code: Select all

<!-- # 1 --><waypoint x="1661" z="-4914" y="752">
repeat
yrest(500)
until checkparty() == true
yrest(1000)
SlashCommand("ILG destroy")
yrest(1000)
SlashCommand("ILG inv")
</waypoint>
checkparty will only return true if the rest of the party members are within 200 of the character, 200 is default, you can set the distance to what you want.

Code: Select all

checkparty(50)
This will check every party member, so if you have other characters not doing the instance while in party then don't use it as it will always return false.

Re: party chat monitoring

Posted: Sun Feb 19, 2012 7:18 am
by woah
Thanks lisa this works great (:

Re: party chat monitoring

Posted: Mon May 07, 2012 10:41 am
by abron1
hey lisa your monitor works perfect but when my characters zone out sometimes they can't see each other to trigger the events.. i tried to put the jump in there but somes times it don't work i was wondering if there is another way for them dectect each other? because it gets them out of sync when that happens and one is inside the instance and the other is outside waiting for there events to start...

Re: party chat monitoring

Posted: Mon May 07, 2012 6:06 pm
by lisa
do a forum search for "checkparty" I added a function to the bot a while back to check if party members are within a specified range. There should be a write up somewhere for it.

Re: party chat monitoring

Posted: Wed Oct 03, 2012 3:16 pm
by miesermetzler
You said you posted an easy checkparty userfunction. Thats true you made that for me ;) , because we found no other way to syncronize a party. It was very easy and functional. I have only to set checkparty in the waypoints where the chars have to syncronize. After a few rom-updates the checkparty userfunction wont work. And i´ve seen you have deleted your upload. And i decided to look for an another easy functional userfunction. And i´ve found the party check monitoring. But this is a bit complicated. Many commands and codes may include many mistakes or bad commands. And in this case I or we all have ask once again lisa or rock5 and spam the topics. To avoid this i prefer easy and functional codes/ addons. As i seen in the topic here it wont work or you´ll have to write endless variables. And to avoid mistakes and/ or missmatches in my WP i would like to ask for the old checkparty. userfunction. Can you upload it again? Because this was an easy and functional userfunction. pls give it back :cry: :cry: :cry: