party chat monitoring

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

party chat monitoring

#1 Post by lisa » Mon Jan 16, 2012 9:05 pm

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
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
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: party chat monitoring

#2 Post by gloover » Tue Jan 17, 2012 9:43 am

Yea, thats, what I was searching a long time - thank u very much lisa!

Pmaia
Posts: 70
Joined: Wed Jun 22, 2011 8:17 pm

Re: party chat monitoring

#3 Post by Pmaia » Tue Jan 17, 2012 6:37 pm

will testing it at the limits:D
thanks for the post
trying now!!!!

Pmaia
Posts: 70
Joined: Wed Jun 22, 2011 8:17 pm

Re: party chat monitoring

#4 Post by Pmaia » Tue Jan 17, 2012 7:17 pm

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

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

Re: party chat monitoring

#5 Post by lisa » Tue Jan 17, 2012 8:54 pm

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.
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

Xmen
Posts: 45
Joined: Thu Jan 19, 2012 10:18 am

Re: party chat monitoring

#6 Post by Xmen » Sun Jan 22, 2012 9:53 am

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: ?
--[[Hi @ll my english is very bad so I have translated the following text with google]]--

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

Re: party chat monitoring

#7 Post by lisa » Sun Jan 22, 2012 10:45 am

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

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

Xmen
Posts: 45
Joined: Thu Jan 19, 2012 10:18 am

Re: party chat monitoring

#8 Post by Xmen » Sun Jan 22, 2012 6:46 pm

Yes WORKS very nice :D
--[[Hi @ll my english is very bad so I have translated the following text with google]]--

nerdyone255
Posts: 107
Joined: Mon Nov 22, 2010 10:17 am

Re: party chat monitoring

#9 Post by nerdyone255 » Mon Jan 23, 2012 1:05 pm

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.

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: party chat monitoring

#10 Post by Buster99 » Mon Jan 23, 2012 5:11 pm

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>

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

Re: party chat monitoring

#11 Post by lisa » Tue Jan 24, 2012 10:49 pm

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
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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: party chat monitoring

#12 Post by Buster99 » Wed Jan 25, 2012 11:36 am

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

Buster99
Posts: 69
Joined: Fri Nov 25, 2011 9:27 am

Re: party chat monitoring

#13 Post by Buster99 » Sun Jan 29, 2012 7:52 pm

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")

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

Re: party chat monitoring

#14 Post by lisa » Sun Jan 29, 2012 8:07 pm

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?
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

Xmen
Posts: 45
Joined: Thu Jan 19, 2012 10:18 am

Re: party chat monitoring

#15 Post by Xmen » Sun Jan 29, 2012 8:12 pm

I can not find errors
Please send the waypoint section from other party members
--[[Hi @ll my english is very bad so I have translated the following text with google]]--

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

Re: party chat monitoring

#16 Post by lisa » Sun Jan 29, 2012 10:23 pm

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.
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

woah
Posts: 44
Joined: Sat Dec 17, 2011 5:27 pm

Re: party chat monitoring

#17 Post by woah » Sun Feb 19, 2012 7:18 am

Thanks lisa this works great (:

abron1
Posts: 162
Joined: Wed Feb 22, 2012 12:43 am

Re: party chat monitoring

#18 Post by abron1 » Mon May 07, 2012 10:41 am

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...

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

Re: party chat monitoring

#19 Post by lisa » Mon May 07, 2012 6:06 pm

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.
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

miesermetzler
Posts: 46
Joined: Tue Dec 06, 2011 12:17 pm

Re: party chat monitoring

#20 Post by miesermetzler » Wed Oct 03, 2012 3:16 pm

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:

Locked

Who is online

Users browsing this forum: No registered users and 5 guests