GM detection and banning chance reduction

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.
Locked
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: GM detection and banning chance reduction

#281 Post by lisa » Wed Jun 27, 2012 4:33 am

romaniac wrote:You're right, I read back but missed V5 among the other posts. It's working.
Cool I'll add it to first post =)
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: GM detection and banning chance reduction

#282 Post by lisa » Mon Jul 02, 2012 9:20 pm

Ok so I was eventually convinced to add in player tracking into the GM detect userfunction....

Top of the userfunction has this
--=== New feature ===--
-- this is for monitoring players who may be following you.
ignoreplayertime = 30
-- time in seconds when alarm will be sounded for a player "following" you

clearplayertime = 60
-- time in seconds for players to be removed from table

-- when the ignoreplayertime time is reached it will play the alarm sound
-- if you want your own code performed then create a function named beingfollowed() and that code will be done instead.
Basically the ignoreplayertime is how long in seconds you ignore people that may be following you, after that time it then sounds the alarm, pretty sure I made it to sound 3 times maximum. Checks code every 5 seconds as always.

So after 30 seconds you get an alarm, if they are still around at 35, you get another alarm, if still around at 40 you get another alarm.

You can however use your own code at the first alarm by making a function called beingfollowed()

ie. if you want to log out at the first alarm.

Code: Select all

function beingfollowed()
RoMScript("Logout();");
error("we were followed by someone")
end
I haven't fully tested it but it should be fine, so if you can give it a test run that would be great.

In order to initialize the code there is a profile option.
Existing options are

Code: Select all

			<!-- GM detection options -->
		<option name="GMDETECT"			value="true" /> -- enables the GM detection userfunction
		<option name="GMnearbylogout"	value="true" /> -- If a GM is close to the character it will log out.
		<option name="PAUSEONGM"		value="" />  -- Pauses when GM whispers for value in seconds. ie 300 = 5 minutes
		<option name="RECALL"			value="true" /> -- if in combat while pausing it will use recall and whisper/logout

Add in 1 more for player detection.

Code: Select all

		<option name="playerDETECT"		value="true" /> -- enables the player detection userfunction
So yeah test it out and post comments and any feedback. thanks
userfunction_gmmonitor.lua
V 6.3
The function beingfollowed() now has an argument passed to it of the pawn table.
ie. obj.Name is character name
(9.56 KiB) Downloaded 174 times
With V 6.3 you now have the following characters pawn info passed as first argument.
Wrote this in a hurry but yeah this is the type of thing that would work.

Code: Select all

function beingfollowed(pawn)
	-- ie pawn.Name would be the players name.
	if pname == nil then 
		pname = pawn.Name 
	elseif pname == pawn.Name then 
		-- same as previous "follower"
		_samechar = true
	end

	if _times == nil then 
		_times = 1 
	elseif _samechar == true then
			_times = _times + 1
	else 
			_times = 1
	end
		
	if _times == 1 then
		playalarm()
	end
	if _times == 2 then
		playalarm() playalarm()
	end
	if _times == 3 then
		RoMScript("Logout();");
		error("We were followed by "..pawn.Name.." and logged out")	
	end
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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: GM detection and banning chance reduction

#283 Post by rock5 » Mon Jul 02, 2012 10:33 pm

I would have thought the idea of multiple alarms is to give the user a chance to react manually. It would follow that "beingfollowed()" would be the actions you want it to take if you don't take manual action. If beingfollowed() happens on the first alarm it wont give users a chance to act manually. For that reason I would have made beingfollowed() happen on the last alarm.

Just a thought.
  • 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

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

Re: GM detection and banning chance reduction

#284 Post by lisa » Mon Jul 02, 2012 10:42 pm

I did it on the first alarm to give people a chance to do their own code as soon as someone is detected as "following", rather than force people to wait til the 3rd alarm.

If the function exists then it is used instead of the alarm, so the function itself would be called 3 times if you don't force it to do something else.

So you could use that in the function if you want to give yourself a chance to manually override.

--=== Edit ===--
Updated previous post to V 6.3 with more details.
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: GM detection and banning chance reduction

#285 Post by lisa » Tue Jul 03, 2012 5:22 am

Since I didn't write this for myself, someone else asked for it, I left the usage very open to what others would want.

If I was to use it I would probably do something far more complicated.
I would probably add each player to a table
I would probably create a log file and add the pawn info to the log, with a time stamp
I might even add in monitoring of whispers/say text and set up a whisper response like "bugger off I'm drunk" lol

Am I going to write any of that, no, my time is limited enough as it is.

Just some examples of what others could do if they wanted to =).
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

Hetrix
Posts: 74
Joined: Wed Oct 05, 2011 10:34 am

Re: GM detection and banning chance reduction

#286 Post by Hetrix » Tue Jul 03, 2012 10:43 am

Hey!
Tested it out now. Placed the char at the botting spot and started MM. But the mm stops after 30 secs or less and logging out my character and not a single player is near me.
Guess its detecting the channel chat or maybe guild chat because it should work exactly like the GM detect, and loggout when it detects a player in the nearby range.
I added this in profile with the rest of GM detection settings.
<option name="playerDETECT" value="true" /> <!-- enables the player detection userfunction -->

And I added this: function beingfollowed()
RoMScript("Logout();");
error("we were followed by someone")
end
under <onLoad><![CDATA


Getting this message in mm: - [string "..."]:4: we were followed by someone
Forgot to mention, I'm not using the alarm sound at all, didnt even download it, is that causing the problem maybe?

/H

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

Re: GM detection and banning chance reduction

#287 Post by lisa » Tue Jul 03, 2012 8:33 pm

I just had a thought, I am wondering if it is detecting itself.

If you have V 6.3 then get it to use the error message that I posted that uses the pawn.Name, see if it detecting itself lol
userfunction_gmmonitor.lua
V 6.4
added second arg of number of alarms for that pawn
Made it so it didn't detect itself, hopefully.
(9.61 KiB) Downloaded 182 times
Added a second arg to the function

Code: Select all

beingfollowed(pawn,alarmnumber)
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

Hetrix
Posts: 74
Joined: Wed Oct 05, 2011 10:34 am

Re: GM detection and banning chance reduction

#288 Post by Hetrix » Wed Jul 04, 2012 8:57 am

Tested it for like 8-10 hours, works great, loggout the character if detecting a player nearby or that is following you. Thanks to Lisa for making this working. :)

/H

Uniden65
Posts: 151
Joined: Thu Aug 20, 2009 5:17 pm

Re: GM detection and banning chance reduction

#289 Post by Uniden65 » Wed Jul 18, 2012 12:16 pm

does work great Lisa could you add, more like a Say statement to it ..to tell the person following you ...1 line like

Go away

Because most ppls that take the time to follow u or bother a botter wants to see if your there and if it says something they go away and dont bother u ... it does not need to be in a whisper just a simple "Say" "Go away" or change it to what u want ?

like the funtion you created ..

Code: Select all

function beingfollowed(pawn)
   -- ie pawn.Name would be the players name.
   if pname == nil then 
      pname = pawn.Name 
   elseif pname == pawn.Name then 
      -- same as previous "follower"
      _samechar = true
   end

   if _times == nil then 
      _times = 1 
   elseif _samechar == true then
         _times = _times + 1
   else 
         _times = 1
   end
      
   if _times == 1 then
      playalarm()
   end
   if _times == 2 then
      playalarm() playalarm()
   end
   if _times == 3 then
      RoMScript("Logout();");
      error("We were followed by "..pawn.Name.." and logged out")   
   end
end
but would be great if 1st time it would say to normal chat "go away" then alarm on second and log out on 3rd .. Iv have tryed it many times with no luck and i add this funtion to your gm_monitor.lua file i hope that was correct .. and since you created it in a hurry it does not play alarm on x2....i will try to work with it ..

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

Re: GM detection and banning chance reduction

#290 Post by lisa » Wed Jul 18, 2012 7:29 pm

you can just make the beingfollowed into a userfunction, I did it so people could do what ever they want, so yes if you want it to whisper or /say on alarm 1 then you can do it ;)

with V 6.4

Code: Select all

function beingfollowed(pawn,alarmnumber)
if alarmnumber == 1 then
playalarm()
RoMScript('SendChatMessage("Go Away", "WHISPER", 0, "'..pawn.Name..'")')
end
end
Obviously you need the playalarm userfunction for it to actually play any sounds. I have it posted somewhere.
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

Hidden
Posts: 101
Joined: Tue May 08, 2012 6:10 pm

Re: GM detection and banning chance reduction

#291 Post by Hidden » Sat Jul 21, 2012 1:57 pm

Sorry if i missed it, but i had an idea.

Is there some way to configure this so that when your bot is whispered (by player or GM) it sends a whisper to a character of your choice? Or would that be a separate Userfunction?

User avatar
gloover
Posts: 304
Joined: Wed Jul 07, 2010 4:31 am

Re: GM detection and banning chance reduction

#292 Post by gloover » Fri Jul 27, 2012 2:00 am

@ Hidden: read thoroughly the instruction on the first page!

@ lisa: I've used your v5.0 - before chapter 5, it logs all the information of whisperers (guild, class, level zone, name, time)
now it doenst any more - only the name seems to be loging. Missing this nice info. Tried your v6.4 - this one logs nothing. Is there a way to fix this little problem.

Btw. could you also make a log of a character, which was wispered. i.e character_A was whispered by CharXYZ......

thx in advance.

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

Re: GM detection and banning chance reduction

#293 Post by lisa » Fri Jul 27, 2012 3:44 am

gloover wrote:Tried your v6.4 - this one logs nothing
Hmm looks like you are right, at some stage in my "updates" I managed to remove the logging code.
I looked for old versions but couldn't find any.
I found my original V1.0 it was like 50 lines long, V 6.4 is like 270 odd lol

So question is what do you want from the log??

1. Log char info anytime whispered?
2. Log info of chars nearby for longer than 30 seconds?
3. Log only when it triggers the GM detect?
4. have a log file for each character name (player.Name), in another folder like rom/log/GMdetect
5. Add in date and time info ?
6. ??
7. ??

If I am going to rewrite the log code I may aswell do it the way the people using it want ;)

Also I will be implemeting this userfunction I just added when doing the log info for this, so if you want to save to log filer I suguest you get it =)
http://www.solarstrike.net/phpBB3/viewt ... 979#p39979
It will make life so much simpler for doing logs.

Had a look and it did still log the GM whispers but nothing else.

Have a test of this, V 6.6, just make sure to have that loginfo userfunction I added link for.
Also I had like 14 globals that could have been locals, hopefully I didn't break it
userfunction_gmmonitor.lua
V 6.6
Added usage for the logInfo userfunction.
(10.03 KiB) Downloaded 158 times
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: GM detection and banning chance reduction

#294 Post by gloover » Fri Jul 27, 2012 4:39 am

Hey lisa.

The more I can infer from the log the better! ;-)

Options 1,2 an 5 of your list should be enough. I want to see every whisper, not only one from gm. I'm using more then 100 characters - so option 4 may would break the mould, otherwise the log-filename can containing the name of the character - so its more clearly.

thx in advance!

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

Re: GM detection and banning chance reduction

#295 Post by lisa » Fri Jul 27, 2012 4:49 am

1,2,4,5 done in V6.5
Except I didn't use another folder for the logs, issue with that is generally you arn't watching the MM screen when GM detect is triggered so you don't find out you forgot to create the new folder until it is to late.

So yeah in the logs folder you will have files of
playername.txt

I didn't leave in the old code for logging info as basically once I get the userfunction the way I am truely happy with I might add it to default bot.
A log creating function is needed imho =)

There is an existing loggmessage but all the info is added to the 1 single file, so not ideal for lots of different log messages.

I did do a kind of double up on logging info for whispers.
First it logs their name and the message, on the next line it logs their name again and their player info like guild class1 class2 levels, that sort of thing.
The logs will be very close together in tim stamp, so should be able to tell that it was from the same whisper.
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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: GM detection and banning chance reduction

#296 Post by rock5 » Fri Jul 27, 2012 6:01 am

lisa wrote:once I get the userfunction the way I am truely happy with I might add it to default bot
I was think of suggesting that but I see you already thought of it. :) I can think of some improvements but I'll suggest them at the userfunctions topic.
  • 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

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

Re: GM detection and banning chance reduction

#297 Post by lisa » Fri Jul 27, 2012 9:15 pm

V 6.7 added to first post
If you have the logInfo() userfunction it will be much better for logging info.
http://www.solarstrike.net/phpBB3/viewt ... =27&t=4009
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
Edamh
Posts: 106
Joined: Tue May 24, 2011 11:56 pm

Re: GM detection and banning chance reduction

#298 Post by Edamh » Mon Aug 06, 2012 1:02 pm

Maybe I don't understand correctly, but I have the following code in a couple of my waypoints to check if my bot is being followed:

Code: Select all

		<!-- #  1 --><waypoint x="9999" z="9999" y="999"> beingfollowed(pawn,alarmnumber); player:rest(10, 30, "full"); 	</waypoint>
Within the waypoint file's onload, I have

Code: Select all

function beingfollowed(pawn,alarmnumber)
		cprintf(cli.lightblue,"Inside beingfollowed \n");
	if alarmnumber == 3 then
		cprintf(cli.lightblue,"Player following us. Logout. \n");
		sendMacro("Logout();");
	end
end		
I also have

Code: Select all

<option name="playerDETECT"      value="true" /> -- enables the player detection userfunction
within my bot's profile.

Am I correct in my understanding that the bot will logout if followed by a player and the alarm is triggered 3 times? I'm not seeing that. I had another character follow my bot for 5 minutes, but the bot did not logout. Am I missing something?

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

Re: GM detection and banning chance reduction

#299 Post by lisa » Mon Aug 06, 2012 6:38 pm

The onload code looks fine but the waypoint code callling the function isn't what you need to do.

profile options

Code: Select all

     <!-- GM detection options -->
      <option name="GMDETECT"         value="true" /> -- enables the GM detection userfunction
      <option name="GMnearbylogout"      value="true" /> -- If a GM is close to the character it will log out.
      <option name="PAUSEONGM"      value="300" />  -- Pauses when GM whispers for value in seconds. ie 300 = 5 minutes
      <option name="RECALL"         value="true" /> -- if in combat while pausing it will use recall and whisper/logout
<option name="playerDETECT"      value="true" /> -- enables the player detection userfunction

and in the WP onload or profle onload add

Code: Select all

startGMDetect()
The player following is part of the GMDetect userfunction so if you are using GMDETECT and have the playerDETECT as true then it will do the code as required.
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
Edamh
Posts: 106
Joined: Tue May 24, 2011 11:56 pm

Re: GM detection and banning chance reduction

#300 Post by Edamh » Mon Aug 06, 2012 10:23 pm

I removed the unnecessary calls to beingfollowed() within the waypoints. I do have all the GMDETECT options within the bot's profile -- including the new playerDETECT option. I also do have the startGMDetect() within the bot profile onload (see MM output).

Code: Select all

Enter the number of the path you want to use and press Enter > 1
You chose 1
Loaded waypoint path TEMP4now.xml
No return path with default naming TEMP4now_return.xml found.
We use the normal waypoint path TEMP4now.xml now.
Waypoint #14 is closer then #1. Hence we start with waypoint #14.
GM detection started
...
Fight finished. Killed 4 mobnamehere. (fight #17 / runtime 15 minutes)
Durability:99.982142857143
Resting for 3 seconds.
Resting finished after 3 seconds.
Clearing target.
Moving to waypoint #12,
Again, the bot does not logout as I expect since I have in the waypoint file onload

Code: Select all

<onLoad>
		function beingfollowed(pawn,alarmnumber)
				cprintf(cli.lightblue,"Inside beingfollowed \n");
			if alarmnumber == 2 then
				cprintf(cli.lightblue,"Player following us. Logout. \n");
				sendMacro("Logout();");
			end
		end		

	
	</onLoad>
I ran my test waypoint file for over 15 minutes with a non-party char "following" the bot, but still the bot did NOT logout. I guess that I'm still NOT seeing what I'm missing.

Locked

Who is online

Users browsing this forum: Bing [Bot] and 1 guest