[Release] macro to auto-ignore gold farmer spam!

Moderator: Moderators

User avatar
twist3d
Testers Team
Testers Team
Posts: 94
Joined: 09 Sep 2009, 04:34
Noob?: No
Location: USA

[Release] macro to auto-ignore gold farmer spam!

#1 Post by twist3d »

I don't know about other servers but on iRO Valkyrie you cant walk 10 meters in a major town without getting your screen flooded with gold farmers! This looks for people saying "Buy/Sell" "Zeny" "Gold" "Bonus" and if they say it more then once it auto-ignores them.

[Edit] I tried Mushroom's code and it doesn't seem to work, but this does the trick here:

Code: Select all

automacro checkSpammers {
   pubm /(([Bb]+[Uu]+[Yy]+)|([Ss]+[Ee]+[Ll]+))*.*([Zz]+[Ee]+[Nn]+[Yy]+)*.*([Gg]+[Oo]+[Ll]+[Dd]+)*.*([Bb]+[Oo]+[Nn]+[Uu]+[Ss]+)*.*/
   call checkCount
}
macro checkCount{
   $spamCount = @eval (defined $::Macro::Data::varStack{"spamCount"} ? $::Macro::Data::varStack{"spamCount"} : 0)
   if ($spamCount >= 2) goto spam
      $spamCount++
      stop
   :spam
   do ignore 1 $.lastpub
      $spamCount = 0
}
OR a much simper one, but it will ignore even some people just talking about websites:

Code: Select all

automacro spam {
	pubm /[Ww][Ww][Ww]|[Cc][Oo][Mm]|[Zz][Ee][Nn][Yy]/
	call {
		do ignore 1 $.lastpub
	}
	timeout 1
}
You can change the !=2 to a higher number, so it doesn't auto block anyone that says zeny twice, but if it you raise it more then 2 they will still flood your log/window many lines before it catches them.

Thanks to kLab & Mushroom for helping me fix this macro
Last edited by twist3d on 29 Jan 2013, 10:28, edited 4 times in total.
Member since 09/09/09, botter since its first creation days. Thanks Kura for the original Kore.
Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: [Release] macro to auto-ignore gold farmer spam!

#2 Post by Mushroom »

Moved to Share your macro's forum.
You can't declade variables outside macros, so use this one instanted.

Code: Select all

automacro checkSpammers {
   pubm /(([Bb]+[Uu]+[Yy]+)|([Ss]+[Ee]+[Ll]+))*.*([Zz]+[Ee]+[Nn]+[Yy]+)*.*([Gg]+[Oo]+[Ll]+[Dd]+)*.*([Bb]+[Oo]+[Nn]+[Uu]+[Ss]+)*.*/
   call checkCount
}
macro checkCount{
	$spamCount = @eval (defined $::Macro::Data::varStack{"spamCount"} ? $::Macro::Data::varStack{"spamCount"} : 0)
   if ($spamCount >= 2) goto spam
      $spamCount++
      stop
   :spam
   do ignore 1 $.lastpub
      $spamCount = 0
}
Edit: Fixed my mistake (uuuups) and changed the way it does everything. If the counter is more or equal to 2 it will ignore them. It was ignoring all the message before.
Last edited by Mushroom on 28 Sep 2009, 21:07, edited 1 time in total.
Reason: Fixed bugs, changed it.
Quit.
User avatar
twist3d
Testers Team
Testers Team
Posts: 94
Joined: 09 Sep 2009, 04:34
Noob?: No
Location: USA

Re: [Release] macro to auto-ignore gold farmer spam!

#3 Post by twist3d »

It seemed to work just fine like that but thanks, im sure this is more proper =D
Member since 09/09/09, botter since its first creation days. Thanks Kura for the original Kore.
demonhand
Noob
Noob
Posts: 1
Joined: 28 Sep 2009, 00:13
Noob?: Yes

Re: [Release] macro to auto-ignore gold farmer spam!

#4 Post by demonhand »

Mushroom wrote:Moved to Share your macro's forum.
You can't declade variables outside macros, so use this one instanted.

Code: Select all

automacro checkSpammers {
   pubm /(([Bb]+[Uu]+[Yy]+)|([Ss]+[Ee]+[Ll]+))*.*([Zz]+[Ee]+[Nn]+[Yy]+)*.*([Gg]+[Oo]+[Ll]+[Dd]+)*.*([Bb]+[Oo]+[Nn]+[Uu]+[Ss]+)*.*/
   call checkCount
}
macro checkCount{
   $spamCount = @eval (defined $::Macro::Data::varStack{"spamCount"} ? $::Macro::Data::varStack{"spamCount"} : 0)
   if ($spamCount >= 2) goto count
      do ignore 1 $.lastpub
      $spamCount = 0
      stop
   :count
   $spamCount++
}
I got this error:
[macro] checkCount error: error in 0: @eval (defined $spamCount ? $spamCount : 0) failed
It works fine with the code twist3d posted though. I'm sure it's just a small programming problem, but I myself could not fix it with my shallow knowledge of computer languages.
Last edited by Mushroom on 09 Aug 2010, 13:27, edited 1 time in total.
Reason: Editting quote
legionary
Noob
Noob
Posts: 3
Joined: 22 Jun 2010, 18:01
Noob?: Yes

Re: [Release] macro to auto-ignore gold farmer spam!

#5 Post by legionary »

[macro] checkCount error: error in 0: @eval (defined $spamCount ? $spamCount : 0) failed

i have this error :(

can someone helpme?
Mushroom
Perl Monk
Perl Monk
Posts: 427
Joined: 04 Apr 2008, 14:04
Noob?: No
Location: Brazil

Re: [Release] macro to auto-ignore gold farmer spam!

#6 Post by Mushroom »

Use the macro said on my post, forget about the quote from demonhand, it has a bug on it.
Better edit that.
Quit.